forked from UpCloudLtd/terraform-provider-upcloud
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathobject_storage.tf
27 lines (24 loc) · 1.03 KB
/
object_storage.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# configure the provider
provider "upcloud" {
# Your UpCloud credentials are read from the environment variables:
# export UPCLOUD_USERNAME="Username of your UpCloud API user"
# export UPCLOUD_PASSWORD="Password of your UpCloud API user"
}
# create an object storage instance with 2 buckets called "products" and "images"
resource "upcloud_object_storage" "my_object_storage" {
size = 250 # allocate up to 250GB of storage
name = "storage-name" # the instance name, will form part of the url used to access the storage
# instance so must conform to host naming rules.
zone = "fi-hel2" # The zone in wgich to create the instance
access_key = "admin" # The access key/username used to access the storage instance
secret_key = "changeme" # The secret key/password used to access the storage instance
description = "catalogue"
# Create a bucket called "products"
bucket {
name = "products"
}
# Create a bucket called "images"
bucket {
name = "images"
}
}