1. Packages
  2. UpCloud
  3. API Docs
  4. ObjectStorage
UpCloud v0.1.0 published on Friday, Mar 14, 2025 by UpCloudLtd

upcloud.ObjectStorage

Explore with Pulumi AI

The upcloud.ObjectStorage resource manages previous generatation object storage instances that will reach end of life (EOL) by the end of 2024. For new instances, consider using the new Object Storage product managed with upcloud.ManagedObjectStorage resource.

This resource represents an UpCloud Object Storage instance, which provides S3 compatible storage.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as upcloud from "@upcloud/pulumi-upcloud";

// Object storage instance called storage-name in the fi-hel2 zone, with 2 buckets called "products" and "images".
const myObjectStorage = new upcloud.ObjectStorage("my_object_storage", {
    size: 250,
    name: "storage-name",
    zone: "fi-hel2",
    accessKey: "admin",
    secretKey: "changeme",
    description: "catalogue",
    buckets: [
        {
            name: "products",
        },
        {
            name: "images",
        },
    ],
});
Copy
import pulumi
import pulumi_upcloud as upcloud

# Object storage instance called storage-name in the fi-hel2 zone, with 2 buckets called "products" and "images".
my_object_storage = upcloud.ObjectStorage("my_object_storage",
    size=250,
    name="storage-name",
    zone="fi-hel2",
    access_key="admin",
    secret_key="changeme",
    description="catalogue",
    buckets=[
        {
            "name": "products",
        },
        {
            "name": "images",
        },
    ])
Copy
package main

import (
	"github.com/UpCloudLtd/pulumi-upcloud/sdk/go/upcloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// Object storage instance called storage-name in the fi-hel2 zone, with 2 buckets called "products" and "images".
		_, err := upcloud.NewObjectStorage(ctx, "my_object_storage", &upcloud.ObjectStorageArgs{
			Size:        pulumi.Int(250),
			Name:        pulumi.String("storage-name"),
			Zone:        pulumi.String("fi-hel2"),
			AccessKey:   pulumi.String("admin"),
			SecretKey:   pulumi.String("changeme"),
			Description: pulumi.String("catalogue"),
			Buckets: upcloud.ObjectStorageBucketArray{
				&upcloud.ObjectStorageBucketArgs{
					Name: pulumi.String("products"),
				},
				&upcloud.ObjectStorageBucketArgs{
					Name: pulumi.String("images"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using UpCloud = UpCloud.Pulumi.UpCloud;

return await Deployment.RunAsync(() => 
{
    // Object storage instance called storage-name in the fi-hel2 zone, with 2 buckets called "products" and "images".
    var myObjectStorage = new UpCloud.ObjectStorage("my_object_storage", new()
    {
        Size = 250,
        Name = "storage-name",
        Zone = "fi-hel2",
        AccessKey = "admin",
        SecretKey = "changeme",
        Description = "catalogue",
        Buckets = new[]
        {
            new UpCloud.Inputs.ObjectStorageBucketArgs
            {
                Name = "products",
            },
            new UpCloud.Inputs.ObjectStorageBucketArgs
            {
                Name = "images",
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.upcloud.ObjectStorage;
import com.pulumi.upcloud.ObjectStorageArgs;
import com.pulumi.upcloud.inputs.ObjectStorageBucketArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        // Object storage instance called storage-name in the fi-hel2 zone, with 2 buckets called "products" and "images".
        var myObjectStorage = new ObjectStorage("myObjectStorage", ObjectStorageArgs.builder()
            .size(250)
            .name("storage-name")
            .zone("fi-hel2")
            .accessKey("admin")
            .secretKey("changeme")
            .description("catalogue")
            .buckets(            
                ObjectStorageBucketArgs.builder()
                    .name("products")
                    .build(),
                ObjectStorageBucketArgs.builder()
                    .name("images")
                    .build())
            .build());

    }
}
Copy
resources:
  # Object storage instance called storage-name in the fi-hel2 zone, with 2 buckets called "products" and "images".
  myObjectStorage:
    type: upcloud:ObjectStorage
    name: my_object_storage
    properties:
      size: 250 # allocate up to 250GB of storage
      name: storage-name
      zone: fi-hel2
      accessKey: admin
      secretKey: changeme
      description: catalogue
      buckets:
        - name: products
        - name: images
Copy

Create ObjectStorage Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new ObjectStorage(name: string, args: ObjectStorageArgs, opts?: CustomResourceOptions);
@overload
def ObjectStorage(resource_name: str,
                  args: ObjectStorageArgs,
                  opts: Optional[ResourceOptions] = None)

@overload
def ObjectStorage(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  access_key: Optional[str] = None,
                  description: Optional[str] = None,
                  secret_key: Optional[str] = None,
                  size: Optional[int] = None,
                  zone: Optional[str] = None,
                  buckets: Optional[Sequence[ObjectStorageBucketArgs]] = None,
                  name: Optional[str] = None)
func NewObjectStorage(ctx *Context, name string, args ObjectStorageArgs, opts ...ResourceOption) (*ObjectStorage, error)
public ObjectStorage(string name, ObjectStorageArgs args, CustomResourceOptions? opts = null)
public ObjectStorage(String name, ObjectStorageArgs args)
public ObjectStorage(String name, ObjectStorageArgs args, CustomResourceOptions options)
type: upcloud:ObjectStorage
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ObjectStorageArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ObjectStorageArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ObjectStorageArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ObjectStorageArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ObjectStorageArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var objectStorageResource = new UpCloud.ObjectStorage("objectStorageResource", new()
{
    AccessKey = "string",
    Description = "string",
    SecretKey = "string",
    Size = 0,
    Zone = "string",
    Buckets = new[]
    {
        new UpCloud.Inputs.ObjectStorageBucketArgs
        {
            Name = "string",
        },
    },
    Name = "string",
});
Copy
example, err := upcloud.NewObjectStorage(ctx, "objectStorageResource", &upcloud.ObjectStorageArgs{
	AccessKey:   pulumi.String("string"),
	Description: pulumi.String("string"),
	SecretKey:   pulumi.String("string"),
	Size:        pulumi.Int(0),
	Zone:        pulumi.String("string"),
	Buckets: upcloud.ObjectStorageBucketArray{
		&upcloud.ObjectStorageBucketArgs{
			Name: pulumi.String("string"),
		},
	},
	Name: pulumi.String("string"),
})
Copy
var objectStorageResource = new ObjectStorage("objectStorageResource", ObjectStorageArgs.builder()
    .accessKey("string")
    .description("string")
    .secretKey("string")
    .size(0)
    .zone("string")
    .buckets(ObjectStorageBucketArgs.builder()
        .name("string")
        .build())
    .name("string")
    .build());
Copy
object_storage_resource = upcloud.ObjectStorage("objectStorageResource",
    access_key="string",
    description="string",
    secret_key="string",
    size=0,
    zone="string",
    buckets=[{
        "name": "string",
    }],
    name="string")
Copy
const objectStorageResource = new upcloud.ObjectStorage("objectStorageResource", {
    accessKey: "string",
    description: "string",
    secretKey: "string",
    size: 0,
    zone: "string",
    buckets: [{
        name: "string",
    }],
    name: "string",
});
Copy
type: upcloud:ObjectStorage
properties:
    accessKey: string
    buckets:
        - name: string
    description: string
    name: string
    secretKey: string
    size: 0
    zone: string
Copy

ObjectStorage Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The ObjectStorage resource accepts the following input properties:

AccessKey This property is required. string
The access key used to identify user. Can be set to an empty string, which will tell the provider to get the access key from environment variable. The environment variable should be "UPCLOUD_OBJECT_STORAGE_ACCESS_KEY_{name}". {name} is the name given to object storage instance (so not the resource label), it should be all uppercased and all dashes (-) should be replaced with underscores (_). For example, object storage named "my-files" would use environment variable named "UPCLOUD_OBJECT_STORAGE_ACCESS_KEY_MY_FILES".
Description This property is required. string
The description of the object storage instance to be created
SecretKey This property is required. string
The secret key used to authenticate user. Can be set to an empty string, which will tell the provider to get the secret key from environment variable. The environment variable should be "UPCLOUD_OBJECT_STORAGE_SECRET_KEY_{name}". {name} is the name given to object storage instance (so not the resource label), it should be all uppercased and all dashes (-) should be replaced with underscores (_). For example, object storage named "my-files" would use environment variable named "UPCLOUD_OBJECT_STORAGE_SECRET_KEY_MY_FILES".
Size This property is required. int
The size of the object storage instance in gigabytes
Zone
This property is required.
Changes to this property will trigger replacement.
string
The zone in which the object storage instance will be created, e.g. de-fra1. You can list available zones with upctl zone list.
Buckets List<UpCloud.Pulumi.UpCloud.Inputs.ObjectStorageBucket>
Name string
The name of the object storage instance to be created
AccessKey This property is required. string
The access key used to identify user. Can be set to an empty string, which will tell the provider to get the access key from environment variable. The environment variable should be "UPCLOUD_OBJECT_STORAGE_ACCESS_KEY_{name}". {name} is the name given to object storage instance (so not the resource label), it should be all uppercased and all dashes (-) should be replaced with underscores (_). For example, object storage named "my-files" would use environment variable named "UPCLOUD_OBJECT_STORAGE_ACCESS_KEY_MY_FILES".
Description This property is required. string
The description of the object storage instance to be created
SecretKey This property is required. string
The secret key used to authenticate user. Can be set to an empty string, which will tell the provider to get the secret key from environment variable. The environment variable should be "UPCLOUD_OBJECT_STORAGE_SECRET_KEY_{name}". {name} is the name given to object storage instance (so not the resource label), it should be all uppercased and all dashes (-) should be replaced with underscores (_). For example, object storage named "my-files" would use environment variable named "UPCLOUD_OBJECT_STORAGE_SECRET_KEY_MY_FILES".
Size This property is required. int
The size of the object storage instance in gigabytes
Zone
This property is required.
Changes to this property will trigger replacement.
string
The zone in which the object storage instance will be created, e.g. de-fra1. You can list available zones with upctl zone list.
Buckets []ObjectStorageBucketArgs
Name string
The name of the object storage instance to be created
accessKey This property is required. String
The access key used to identify user. Can be set to an empty string, which will tell the provider to get the access key from environment variable. The environment variable should be "UPCLOUD_OBJECT_STORAGE_ACCESS_KEY_{name}". {name} is the name given to object storage instance (so not the resource label), it should be all uppercased and all dashes (-) should be replaced with underscores (_). For example, object storage named "my-files" would use environment variable named "UPCLOUD_OBJECT_STORAGE_ACCESS_KEY_MY_FILES".
description This property is required. String
The description of the object storage instance to be created
secretKey This property is required. String
The secret key used to authenticate user. Can be set to an empty string, which will tell the provider to get the secret key from environment variable. The environment variable should be "UPCLOUD_OBJECT_STORAGE_SECRET_KEY_{name}". {name} is the name given to object storage instance (so not the resource label), it should be all uppercased and all dashes (-) should be replaced with underscores (_). For example, object storage named "my-files" would use environment variable named "UPCLOUD_OBJECT_STORAGE_SECRET_KEY_MY_FILES".
size This property is required. Integer
The size of the object storage instance in gigabytes
zone
This property is required.
Changes to this property will trigger replacement.
String
The zone in which the object storage instance will be created, e.g. de-fra1. You can list available zones with upctl zone list.
buckets List<ObjectStorageBucket>
name String
The name of the object storage instance to be created
accessKey This property is required. string
The access key used to identify user. Can be set to an empty string, which will tell the provider to get the access key from environment variable. The environment variable should be "UPCLOUD_OBJECT_STORAGE_ACCESS_KEY_{name}". {name} is the name given to object storage instance (so not the resource label), it should be all uppercased and all dashes (-) should be replaced with underscores (_). For example, object storage named "my-files" would use environment variable named "UPCLOUD_OBJECT_STORAGE_ACCESS_KEY_MY_FILES".
description This property is required. string
The description of the object storage instance to be created
secretKey This property is required. string
The secret key used to authenticate user. Can be set to an empty string, which will tell the provider to get the secret key from environment variable. The environment variable should be "UPCLOUD_OBJECT_STORAGE_SECRET_KEY_{name}". {name} is the name given to object storage instance (so not the resource label), it should be all uppercased and all dashes (-) should be replaced with underscores (_). For example, object storage named "my-files" would use environment variable named "UPCLOUD_OBJECT_STORAGE_SECRET_KEY_MY_FILES".
size This property is required. number
The size of the object storage instance in gigabytes
zone
This property is required.
Changes to this property will trigger replacement.
string
The zone in which the object storage instance will be created, e.g. de-fra1. You can list available zones with upctl zone list.
buckets ObjectStorageBucket[]
name string
The name of the object storage instance to be created
access_key This property is required. str
The access key used to identify user. Can be set to an empty string, which will tell the provider to get the access key from environment variable. The environment variable should be "UPCLOUD_OBJECT_STORAGE_ACCESS_KEY_{name}". {name} is the name given to object storage instance (so not the resource label), it should be all uppercased and all dashes (-) should be replaced with underscores (_). For example, object storage named "my-files" would use environment variable named "UPCLOUD_OBJECT_STORAGE_ACCESS_KEY_MY_FILES".
description This property is required. str
The description of the object storage instance to be created
secret_key This property is required. str
The secret key used to authenticate user. Can be set to an empty string, which will tell the provider to get the secret key from environment variable. The environment variable should be "UPCLOUD_OBJECT_STORAGE_SECRET_KEY_{name}". {name} is the name given to object storage instance (so not the resource label), it should be all uppercased and all dashes (-) should be replaced with underscores (_). For example, object storage named "my-files" would use environment variable named "UPCLOUD_OBJECT_STORAGE_SECRET_KEY_MY_FILES".
size This property is required. int
The size of the object storage instance in gigabytes
zone
This property is required.
Changes to this property will trigger replacement.
str
The zone in which the object storage instance will be created, e.g. de-fra1. You can list available zones with upctl zone list.
buckets Sequence[ObjectStorageBucketArgs]
name str
The name of the object storage instance to be created
accessKey This property is required. String
The access key used to identify user. Can be set to an empty string, which will tell the provider to get the access key from environment variable. The environment variable should be "UPCLOUD_OBJECT_STORAGE_ACCESS_KEY_{name}". {name} is the name given to object storage instance (so not the resource label), it should be all uppercased and all dashes (-) should be replaced with underscores (_). For example, object storage named "my-files" would use environment variable named "UPCLOUD_OBJECT_STORAGE_ACCESS_KEY_MY_FILES".
description This property is required. String
The description of the object storage instance to be created
secretKey This property is required. String
The secret key used to authenticate user. Can be set to an empty string, which will tell the provider to get the secret key from environment variable. The environment variable should be "UPCLOUD_OBJECT_STORAGE_SECRET_KEY_{name}". {name} is the name given to object storage instance (so not the resource label), it should be all uppercased and all dashes (-) should be replaced with underscores (_). For example, object storage named "my-files" would use environment variable named "UPCLOUD_OBJECT_STORAGE_SECRET_KEY_MY_FILES".
size This property is required. Number
The size of the object storage instance in gigabytes
zone
This property is required.
Changes to this property will trigger replacement.
String
The zone in which the object storage instance will be created, e.g. de-fra1. You can list available zones with upctl zone list.
buckets List<Property Map>
name String
The name of the object storage instance to be created

Outputs

All input properties are implicitly available as output properties. Additionally, the ObjectStorage resource produces the following output properties:

Created string
Id string
The provider-assigned unique ID for this managed resource.
State string
Url string
UsedSpace int
Created string
Id string
The provider-assigned unique ID for this managed resource.
State string
Url string
UsedSpace int
created String
id String
The provider-assigned unique ID for this managed resource.
state String
url String
usedSpace Integer
created string
id string
The provider-assigned unique ID for this managed resource.
state string
url string
usedSpace number
created str
id str
The provider-assigned unique ID for this managed resource.
state str
url str
used_space int
created String
id String
The provider-assigned unique ID for this managed resource.
state String
url String
usedSpace Number

Look up Existing ObjectStorage Resource

Get an existing ObjectStorage resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ObjectStorageState, opts?: CustomResourceOptions): ObjectStorage
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        access_key: Optional[str] = None,
        buckets: Optional[Sequence[ObjectStorageBucketArgs]] = None,
        created: Optional[str] = None,
        description: Optional[str] = None,
        name: Optional[str] = None,
        secret_key: Optional[str] = None,
        size: Optional[int] = None,
        state: Optional[str] = None,
        url: Optional[str] = None,
        used_space: Optional[int] = None,
        zone: Optional[str] = None) -> ObjectStorage
func GetObjectStorage(ctx *Context, name string, id IDInput, state *ObjectStorageState, opts ...ResourceOption) (*ObjectStorage, error)
public static ObjectStorage Get(string name, Input<string> id, ObjectStorageState? state, CustomResourceOptions? opts = null)
public static ObjectStorage get(String name, Output<String> id, ObjectStorageState state, CustomResourceOptions options)
resources:  _:    type: upcloud:ObjectStorage    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
AccessKey string
The access key used to identify user. Can be set to an empty string, which will tell the provider to get the access key from environment variable. The environment variable should be "UPCLOUD_OBJECT_STORAGE_ACCESS_KEY_{name}". {name} is the name given to object storage instance (so not the resource label), it should be all uppercased and all dashes (-) should be replaced with underscores (_). For example, object storage named "my-files" would use environment variable named "UPCLOUD_OBJECT_STORAGE_ACCESS_KEY_MY_FILES".
Buckets List<UpCloud.Pulumi.UpCloud.Inputs.ObjectStorageBucket>
Created string
Description string
The description of the object storage instance to be created
Name string
The name of the object storage instance to be created
SecretKey string
The secret key used to authenticate user. Can be set to an empty string, which will tell the provider to get the secret key from environment variable. The environment variable should be "UPCLOUD_OBJECT_STORAGE_SECRET_KEY_{name}". {name} is the name given to object storage instance (so not the resource label), it should be all uppercased and all dashes (-) should be replaced with underscores (_). For example, object storage named "my-files" would use environment variable named "UPCLOUD_OBJECT_STORAGE_SECRET_KEY_MY_FILES".
Size int
The size of the object storage instance in gigabytes
State string
Url string
UsedSpace int
Zone Changes to this property will trigger replacement. string
The zone in which the object storage instance will be created, e.g. de-fra1. You can list available zones with upctl zone list.
AccessKey string
The access key used to identify user. Can be set to an empty string, which will tell the provider to get the access key from environment variable. The environment variable should be "UPCLOUD_OBJECT_STORAGE_ACCESS_KEY_{name}". {name} is the name given to object storage instance (so not the resource label), it should be all uppercased and all dashes (-) should be replaced with underscores (_). For example, object storage named "my-files" would use environment variable named "UPCLOUD_OBJECT_STORAGE_ACCESS_KEY_MY_FILES".
Buckets []ObjectStorageBucketArgs
Created string
Description string
The description of the object storage instance to be created
Name string
The name of the object storage instance to be created
SecretKey string
The secret key used to authenticate user. Can be set to an empty string, which will tell the provider to get the secret key from environment variable. The environment variable should be "UPCLOUD_OBJECT_STORAGE_SECRET_KEY_{name}". {name} is the name given to object storage instance (so not the resource label), it should be all uppercased and all dashes (-) should be replaced with underscores (_). For example, object storage named "my-files" would use environment variable named "UPCLOUD_OBJECT_STORAGE_SECRET_KEY_MY_FILES".
Size int
The size of the object storage instance in gigabytes
State string
Url string
UsedSpace int
Zone Changes to this property will trigger replacement. string
The zone in which the object storage instance will be created, e.g. de-fra1. You can list available zones with upctl zone list.
accessKey String
The access key used to identify user. Can be set to an empty string, which will tell the provider to get the access key from environment variable. The environment variable should be "UPCLOUD_OBJECT_STORAGE_ACCESS_KEY_{name}". {name} is the name given to object storage instance (so not the resource label), it should be all uppercased and all dashes (-) should be replaced with underscores (_). For example, object storage named "my-files" would use environment variable named "UPCLOUD_OBJECT_STORAGE_ACCESS_KEY_MY_FILES".
buckets List<ObjectStorageBucket>
created String
description String
The description of the object storage instance to be created
name String
The name of the object storage instance to be created
secretKey String
The secret key used to authenticate user. Can be set to an empty string, which will tell the provider to get the secret key from environment variable. The environment variable should be "UPCLOUD_OBJECT_STORAGE_SECRET_KEY_{name}". {name} is the name given to object storage instance (so not the resource label), it should be all uppercased and all dashes (-) should be replaced with underscores (_). For example, object storage named "my-files" would use environment variable named "UPCLOUD_OBJECT_STORAGE_SECRET_KEY_MY_FILES".
size Integer
The size of the object storage instance in gigabytes
state String
url String
usedSpace Integer
zone Changes to this property will trigger replacement. String
The zone in which the object storage instance will be created, e.g. de-fra1. You can list available zones with upctl zone list.
accessKey string
The access key used to identify user. Can be set to an empty string, which will tell the provider to get the access key from environment variable. The environment variable should be "UPCLOUD_OBJECT_STORAGE_ACCESS_KEY_{name}". {name} is the name given to object storage instance (so not the resource label), it should be all uppercased and all dashes (-) should be replaced with underscores (_). For example, object storage named "my-files" would use environment variable named "UPCLOUD_OBJECT_STORAGE_ACCESS_KEY_MY_FILES".
buckets ObjectStorageBucket[]
created string
description string
The description of the object storage instance to be created
name string
The name of the object storage instance to be created
secretKey string
The secret key used to authenticate user. Can be set to an empty string, which will tell the provider to get the secret key from environment variable. The environment variable should be "UPCLOUD_OBJECT_STORAGE_SECRET_KEY_{name}". {name} is the name given to object storage instance (so not the resource label), it should be all uppercased and all dashes (-) should be replaced with underscores (_). For example, object storage named "my-files" would use environment variable named "UPCLOUD_OBJECT_STORAGE_SECRET_KEY_MY_FILES".
size number
The size of the object storage instance in gigabytes
state string
url string
usedSpace number
zone Changes to this property will trigger replacement. string
The zone in which the object storage instance will be created, e.g. de-fra1. You can list available zones with upctl zone list.
access_key str
The access key used to identify user. Can be set to an empty string, which will tell the provider to get the access key from environment variable. The environment variable should be "UPCLOUD_OBJECT_STORAGE_ACCESS_KEY_{name}". {name} is the name given to object storage instance (so not the resource label), it should be all uppercased and all dashes (-) should be replaced with underscores (_). For example, object storage named "my-files" would use environment variable named "UPCLOUD_OBJECT_STORAGE_ACCESS_KEY_MY_FILES".
buckets Sequence[ObjectStorageBucketArgs]
created str
description str
The description of the object storage instance to be created
name str
The name of the object storage instance to be created
secret_key str
The secret key used to authenticate user. Can be set to an empty string, which will tell the provider to get the secret key from environment variable. The environment variable should be "UPCLOUD_OBJECT_STORAGE_SECRET_KEY_{name}". {name} is the name given to object storage instance (so not the resource label), it should be all uppercased and all dashes (-) should be replaced with underscores (_). For example, object storage named "my-files" would use environment variable named "UPCLOUD_OBJECT_STORAGE_SECRET_KEY_MY_FILES".
size int
The size of the object storage instance in gigabytes
state str
url str
used_space int
zone Changes to this property will trigger replacement. str
The zone in which the object storage instance will be created, e.g. de-fra1. You can list available zones with upctl zone list.
accessKey String
The access key used to identify user. Can be set to an empty string, which will tell the provider to get the access key from environment variable. The environment variable should be "UPCLOUD_OBJECT_STORAGE_ACCESS_KEY_{name}". {name} is the name given to object storage instance (so not the resource label), it should be all uppercased and all dashes (-) should be replaced with underscores (_). For example, object storage named "my-files" would use environment variable named "UPCLOUD_OBJECT_STORAGE_ACCESS_KEY_MY_FILES".
buckets List<Property Map>
created String
description String
The description of the object storage instance to be created
name String
The name of the object storage instance to be created
secretKey String
The secret key used to authenticate user. Can be set to an empty string, which will tell the provider to get the secret key from environment variable. The environment variable should be "UPCLOUD_OBJECT_STORAGE_SECRET_KEY_{name}". {name} is the name given to object storage instance (so not the resource label), it should be all uppercased and all dashes (-) should be replaced with underscores (_). For example, object storage named "my-files" would use environment variable named "UPCLOUD_OBJECT_STORAGE_SECRET_KEY_MY_FILES".
size Number
The size of the object storage instance in gigabytes
state String
url String
usedSpace Number
zone Changes to this property will trigger replacement. String
The zone in which the object storage instance will be created, e.g. de-fra1. You can list available zones with upctl zone list.

Supporting Types

ObjectStorageBucket
, ObjectStorageBucketArgs

Name This property is required. string
The name of the bucket
Name This property is required. string
The name of the bucket
name This property is required. String
The name of the bucket
name This property is required. string
The name of the bucket
name This property is required. str
The name of the bucket
name This property is required. String
The name of the bucket

Import

For object storage import to work properly, you need to set environment variables for access and secret key.

The environment variables names are UPCLOUD_OBJECT_STORAGE_ACCESS_KEY_{name} and UPCLOUD_OBJECT_STORAGE_SECRET_KEY_{name}

where {name} is the name of your object storage instance (not the resource label!), all uppercased, and with all dashes (-)

replaced with underscores (_). So importing an object storage that is named “my-storage” will look like this:

UPCLOUD_OBJECT_STORAGE_ACCESS_KEY_MY_STORAGE=accesskey \

UPCLOUD_OBJECT_STORAGE_SECRET_KEY_MY_STORAGE=supersecret \

$ pulumi import upcloud:index/objectStorage:ObjectStorage example_storage 06c1f4b6-faf2-47d0-8896-1d941092b009
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
upcloud UpCloudLtd/pulumi-upcloud
License
Apache-2.0
Notes
This Pulumi package is based on the upcloud Terraform Provider.