1. Packages
  2. Packages
  3. Ionoscloud
  4. API Docs
  5. objectstorage
  6. UserBucket
Viewing docs for IonosCloud v0.3.1
published on Wednesday, Jun 10, 2026 by ionos-cloud
ionoscloud logo
Viewing docs for IonosCloud v0.3.1
published on Wednesday, Jun 10, 2026 by ionos-cloud

    Manages user-owned IONOS Object Storage Buckets on IonosCloud.

    ⚠️ Deprecation notice: User-owned buckets are a legacy bucket type. IONOS recommends using contract-owned buckets (ionoscloud.objectstorage.Bucket) for all new workloads. Contract-owned buckets offer broader regional availability, full Terraform sub-resource support (versioning, lifecycle, CORS, SSE, etc.), and are the actively developed offering. Migrate existing user-owned buckets to contract-owned buckets where possible.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ionoscloud from "@ionos-cloud/sdk-pulumi";
    
    const example = new ionoscloud.objectstorage.UserBucket("example", {
        name: "example-user-bucket",
        region: "de",
        forceDestroy: true,
        tags: {
            environment: "production",
            team: "platform",
        },
    });
    
    import pulumi
    import pulumi_ionoscloud as ionoscloud
    
    example = ionoscloud.objectstorage.UserBucket("example",
        name="example-user-bucket",
        region="de",
        force_destroy=True,
        tags={
            "environment": "production",
            "team": "platform",
        })
    
    package main
    
    import (
    	"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/objectstorage"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := objectstorage.NewUserBucket(ctx, "example", &objectstorage.UserBucketArgs{
    			Name:         pulumi.String("example-user-bucket"),
    			Region:       pulumi.String("de"),
    			ForceDestroy: pulumi.Bool(true),
    			Tags: pulumi.StringMap{
    				"environment": pulumi.String("production"),
    				"team":        pulumi.String("platform"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ionoscloud = Ionoscloud.Pulumi.Ionoscloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Ionoscloud.Objectstorage.UserBucket("example", new()
        {
            Name = "example-user-bucket",
            Region = "de",
            ForceDestroy = true,
            Tags = 
            {
                { "environment", "production" },
                { "team", "platform" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.ionoscloud.pulumi.ionoscloud.objectstorage.UserBucket;
    import com.ionoscloud.pulumi.ionoscloud.objectstorage.UserBucketArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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) {
            var example = new UserBucket("example", UserBucketArgs.builder()
                .name("example-user-bucket")
                .region("de")
                .forceDestroy(true)
                .tags(Map.ofEntries(
                    Map.entry("environment", "production"),
                    Map.entry("team", "platform")
                ))
                .build());
    
        }
    }
    
    resources:
      example:
        type: ionoscloud:objectstorage:UserBucket
        properties:
          name: example-user-bucket
          region: de
          forceDestroy: true
          tags:
            environment: production
            team: platform
    
    pulumi {
      required_providers {
        ionoscloud = {
          source = "pulumi/ionoscloud"
        }
      }
    }
    
    resource "ionoscloud_objectstorage_userbucket" "example" {
      name          = "example-user-bucket"
      region        = "de"
      force_destroy = true
      tags = {
        "environment" = "production"
        "team"        = "platform"
      }
    }
    

    Limitations

    • Region cannot be read back from the API after import due to a known SDK generator issue with the GetBucketLocation response XML model. The region defaults to de when importing by bucket name alone. Use the region:name import format to specify the correct region explicitly.
    • Tags and sub-resources (versioning, lifecycle, CORS, SSE, website, policy) are not currently supported for user-owned buckets. Use ionoscloud.objectstorage.Bucket and its associated resources for full feature coverage.

    Create UserBucket Resource

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

    Constructor syntax

    new UserBucket(name: string, args: UserBucketArgs, opts?: CustomResourceOptions);
    @overload
    def UserBucket(resource_name: str,
                   args: UserBucketArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def UserBucket(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   region: Optional[str] = None,
                   force_destroy: Optional[bool] = None,
                   name: Optional[str] = None,
                   object_lock_enabled: Optional[bool] = None,
                   tags: Optional[Mapping[str, str]] = None,
                   timeouts: Optional[UserBucketTimeoutsArgs] = None)
    func NewUserBucket(ctx *Context, name string, args UserBucketArgs, opts ...ResourceOption) (*UserBucket, error)
    public UserBucket(string name, UserBucketArgs args, CustomResourceOptions? opts = null)
    public UserBucket(String name, UserBucketArgs args)
    public UserBucket(String name, UserBucketArgs args, CustomResourceOptions options)
    
    type: ionoscloud:objectstorage:UserBucket
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "ionoscloud_objectstorage_userbucket" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args UserBucketArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args UserBucketArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args UserBucketArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args UserBucketArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args UserBucketArgs
    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 userBucketResource = new Ionoscloud.Objectstorage.UserBucket("userBucketResource", new()
    {
        Region = "string",
        ForceDestroy = false,
        Name = "string",
        ObjectLockEnabled = false,
        Tags = 
        {
            { "string", "string" },
        },
        Timeouts = new Ionoscloud.Objectstorage.Inputs.UserBucketTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
            Read = "string",
        },
    });
    
    example, err := objectstorage.NewUserBucket(ctx, "userBucketResource", &objectstorage.UserBucketArgs{
    	Region:            pulumi.String("string"),
    	ForceDestroy:      pulumi.Bool(false),
    	Name:              pulumi.String("string"),
    	ObjectLockEnabled: pulumi.Bool(false),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Timeouts: &objectstorage.UserBucketTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    		Read:   pulumi.String("string"),
    	},
    })
    
    resource "ionoscloud_objectstorage_userbucket" "userBucketResource" {
      region              = "string"
      force_destroy       = false
      name                = "string"
      object_lock_enabled = false
      tags = {
        "string" = "string"
      }
      timeouts = {
        create = "string"
        delete = "string"
        read   = "string"
      }
    }
    
    var userBucketResource = new UserBucket("userBucketResource", UserBucketArgs.builder()
        .region("string")
        .forceDestroy(false)
        .name("string")
        .objectLockEnabled(false)
        .tags(Map.of("string", "string"))
        .timeouts(UserBucketTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .read("string")
            .build())
        .build());
    
    user_bucket_resource = ionoscloud.objectstorage.UserBucket("userBucketResource",
        region="string",
        force_destroy=False,
        name="string",
        object_lock_enabled=False,
        tags={
            "string": "string",
        },
        timeouts={
            "create": "string",
            "delete": "string",
            "read": "string",
        })
    
    const userBucketResource = new ionoscloud.objectstorage.UserBucket("userBucketResource", {
        region: "string",
        forceDestroy: false,
        name: "string",
        objectLockEnabled: false,
        tags: {
            string: "string",
        },
        timeouts: {
            create: "string",
            "delete": "string",
            read: "string",
        },
    });
    
    type: ionoscloud:objectstorage:UserBucket
    properties:
        forceDestroy: false
        name: string
        objectLockEnabled: false
        region: string
        tags:
            string: string
        timeouts:
            create: string
            delete: string
            read: string
    

    UserBucket 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 UserBucket resource accepts the following input properties:

    Region string
    [string] The region where the bucket is created. Available regions:
    ForceDestroy bool
    [bool] Defaults to false. When set to true, all objects in the bucket are deleted before the bucket itself is destroyed, allowing Terraform to remove a non-empty bucket. Use with caution — this irreversibly deletes all bucket contents.
    Name string
    [string] The bucket name. Must be between 3 and 63 characters.
    ObjectLockEnabled bool
    [bool] Whether Object Lock is enabled for the bucket. Defaults to false. Cannot be changed after creation — changing this value forces a new resource.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the bucket.
    Timeouts Ionoscloud.UserBucketTimeouts
    Timeouts for this resource.
    Region string
    [string] The region where the bucket is created. Available regions:
    ForceDestroy bool
    [bool] Defaults to false. When set to true, all objects in the bucket are deleted before the bucket itself is destroyed, allowing Terraform to remove a non-empty bucket. Use with caution — this irreversibly deletes all bucket contents.
    Name string
    [string] The bucket name. Must be between 3 and 63 characters.
    ObjectLockEnabled bool
    [bool] Whether Object Lock is enabled for the bucket. Defaults to false. Cannot be changed after creation — changing this value forces a new resource.
    Tags map[string]string
    A mapping of tags to assign to the bucket.
    Timeouts UserBucketTimeoutsArgs
    Timeouts for this resource.
    region string
    [string] The region where the bucket is created. Available regions:
    force_destroy bool
    [bool] Defaults to false. When set to true, all objects in the bucket are deleted before the bucket itself is destroyed, allowing Terraform to remove a non-empty bucket. Use with caution — this irreversibly deletes all bucket contents.
    name string
    [string] The bucket name. Must be between 3 and 63 characters.
    object_lock_enabled bool
    [bool] Whether Object Lock is enabled for the bucket. Defaults to false. Cannot be changed after creation — changing this value forces a new resource.
    tags map(string)
    A mapping of tags to assign to the bucket.
    timeouts object
    Timeouts for this resource.
    region String
    [string] The region where the bucket is created. Available regions:
    forceDestroy Boolean
    [bool] Defaults to false. When set to true, all objects in the bucket are deleted before the bucket itself is destroyed, allowing Terraform to remove a non-empty bucket. Use with caution — this irreversibly deletes all bucket contents.
    name String
    [string] The bucket name. Must be between 3 and 63 characters.
    objectLockEnabled Boolean
    [bool] Whether Object Lock is enabled for the bucket. Defaults to false. Cannot be changed after creation — changing this value forces a new resource.
    tags Map<String,String>
    A mapping of tags to assign to the bucket.
    timeouts UserBucketTimeouts
    Timeouts for this resource.
    region string
    [string] The region where the bucket is created. Available regions:
    forceDestroy boolean
    [bool] Defaults to false. When set to true, all objects in the bucket are deleted before the bucket itself is destroyed, allowing Terraform to remove a non-empty bucket. Use with caution — this irreversibly deletes all bucket contents.
    name string
    [string] The bucket name. Must be between 3 and 63 characters.
    objectLockEnabled boolean
    [bool] Whether Object Lock is enabled for the bucket. Defaults to false. Cannot be changed after creation — changing this value forces a new resource.
    tags {[key: string]: string}
    A mapping of tags to assign to the bucket.
    timeouts UserBucketTimeouts
    Timeouts for this resource.
    region str
    [string] The region where the bucket is created. Available regions:
    force_destroy bool
    [bool] Defaults to false. When set to true, all objects in the bucket are deleted before the bucket itself is destroyed, allowing Terraform to remove a non-empty bucket. Use with caution — this irreversibly deletes all bucket contents.
    name str
    [string] The bucket name. Must be between 3 and 63 characters.
    object_lock_enabled bool
    [bool] Whether Object Lock is enabled for the bucket. Defaults to false. Cannot be changed after creation — changing this value forces a new resource.
    tags Mapping[str, str]
    A mapping of tags to assign to the bucket.
    timeouts UserBucketTimeoutsArgs
    Timeouts for this resource.
    region String
    [string] The region where the bucket is created. Available regions:
    forceDestroy Boolean
    [bool] Defaults to false. When set to true, all objects in the bucket are deleted before the bucket itself is destroyed, allowing Terraform to remove a non-empty bucket. Use with caution — this irreversibly deletes all bucket contents.
    name String
    [string] The bucket name. Must be between 3 and 63 characters.
    objectLockEnabled Boolean
    [bool] Whether Object Lock is enabled for the bucket. Defaults to false. Cannot be changed after creation — changing this value forces a new resource.
    tags Map<String>
    A mapping of tags to assign to the bucket.
    timeouts Property Map
    Timeouts for this resource.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing UserBucket Resource

    Get an existing UserBucket 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?: UserBucketState, opts?: CustomResourceOptions): UserBucket
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            force_destroy: Optional[bool] = None,
            name: Optional[str] = None,
            object_lock_enabled: Optional[bool] = None,
            region: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            timeouts: Optional[UserBucketTimeoutsArgs] = None) -> UserBucket
    func GetUserBucket(ctx *Context, name string, id IDInput, state *UserBucketState, opts ...ResourceOption) (*UserBucket, error)
    public static UserBucket Get(string name, Input<string> id, UserBucketState? state, CustomResourceOptions? opts = null)
    public static UserBucket get(String name, Output<String> id, UserBucketState state, CustomResourceOptions options)
    resources:  _:    type: ionoscloud:objectstorage:UserBucket    get:      id: ${id}
    import {
      to = ionoscloud_objectstorage_userbucket.example
      id = "${id}"
    }
    
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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:
    ForceDestroy bool
    [bool] Defaults to false. When set to true, all objects in the bucket are deleted before the bucket itself is destroyed, allowing Terraform to remove a non-empty bucket. Use with caution — this irreversibly deletes all bucket contents.
    Name string
    [string] The bucket name. Must be between 3 and 63 characters.
    ObjectLockEnabled bool
    [bool] Whether Object Lock is enabled for the bucket. Defaults to false. Cannot be changed after creation — changing this value forces a new resource.
    Region string
    [string] The region where the bucket is created. Available regions:
    Tags Dictionary<string, string>
    A mapping of tags to assign to the bucket.
    Timeouts Ionoscloud.UserBucketTimeouts
    Timeouts for this resource.
    ForceDestroy bool
    [bool] Defaults to false. When set to true, all objects in the bucket are deleted before the bucket itself is destroyed, allowing Terraform to remove a non-empty bucket. Use with caution — this irreversibly deletes all bucket contents.
    Name string
    [string] The bucket name. Must be between 3 and 63 characters.
    ObjectLockEnabled bool
    [bool] Whether Object Lock is enabled for the bucket. Defaults to false. Cannot be changed after creation — changing this value forces a new resource.
    Region string
    [string] The region where the bucket is created. Available regions:
    Tags map[string]string
    A mapping of tags to assign to the bucket.
    Timeouts UserBucketTimeoutsArgs
    Timeouts for this resource.
    force_destroy bool
    [bool] Defaults to false. When set to true, all objects in the bucket are deleted before the bucket itself is destroyed, allowing Terraform to remove a non-empty bucket. Use with caution — this irreversibly deletes all bucket contents.
    name string
    [string] The bucket name. Must be between 3 and 63 characters.
    object_lock_enabled bool
    [bool] Whether Object Lock is enabled for the bucket. Defaults to false. Cannot be changed after creation — changing this value forces a new resource.
    region string
    [string] The region where the bucket is created. Available regions:
    tags map(string)
    A mapping of tags to assign to the bucket.
    timeouts object
    Timeouts for this resource.
    forceDestroy Boolean
    [bool] Defaults to false. When set to true, all objects in the bucket are deleted before the bucket itself is destroyed, allowing Terraform to remove a non-empty bucket. Use with caution — this irreversibly deletes all bucket contents.
    name String
    [string] The bucket name. Must be between 3 and 63 characters.
    objectLockEnabled Boolean
    [bool] Whether Object Lock is enabled for the bucket. Defaults to false. Cannot be changed after creation — changing this value forces a new resource.
    region String
    [string] The region where the bucket is created. Available regions:
    tags Map<String,String>
    A mapping of tags to assign to the bucket.
    timeouts UserBucketTimeouts
    Timeouts for this resource.
    forceDestroy boolean
    [bool] Defaults to false. When set to true, all objects in the bucket are deleted before the bucket itself is destroyed, allowing Terraform to remove a non-empty bucket. Use with caution — this irreversibly deletes all bucket contents.
    name string
    [string] The bucket name. Must be between 3 and 63 characters.
    objectLockEnabled boolean
    [bool] Whether Object Lock is enabled for the bucket. Defaults to false. Cannot be changed after creation — changing this value forces a new resource.
    region string
    [string] The region where the bucket is created. Available regions:
    tags {[key: string]: string}
    A mapping of tags to assign to the bucket.
    timeouts UserBucketTimeouts
    Timeouts for this resource.
    force_destroy bool
    [bool] Defaults to false. When set to true, all objects in the bucket are deleted before the bucket itself is destroyed, allowing Terraform to remove a non-empty bucket. Use with caution — this irreversibly deletes all bucket contents.
    name str
    [string] The bucket name. Must be between 3 and 63 characters.
    object_lock_enabled bool
    [bool] Whether Object Lock is enabled for the bucket. Defaults to false. Cannot be changed after creation — changing this value forces a new resource.
    region str
    [string] The region where the bucket is created. Available regions:
    tags Mapping[str, str]
    A mapping of tags to assign to the bucket.
    timeouts UserBucketTimeoutsArgs
    Timeouts for this resource.
    forceDestroy Boolean
    [bool] Defaults to false. When set to true, all objects in the bucket are deleted before the bucket itself is destroyed, allowing Terraform to remove a non-empty bucket. Use with caution — this irreversibly deletes all bucket contents.
    name String
    [string] The bucket name. Must be between 3 and 63 characters.
    objectLockEnabled Boolean
    [bool] Whether Object Lock is enabled for the bucket. Defaults to false. Cannot be changed after creation — changing this value forces a new resource.
    region String
    [string] The region where the bucket is created. Available regions:
    tags Map<String>
    A mapping of tags to assign to the bucket.
    timeouts Property Map
    Timeouts for this resource.

    Supporting Types

    UserBucketTimeouts, UserBucketTimeoutsArgs

    Create string
    [string] Time to wait for the bucket to be created. Default is 10m.
    Delete string
    [string] Time to wait for the bucket to be deleted. Default is 60m.
    Read string
    [string] Time to wait for the bucket read operations. Default is 10m.
    Create string
    [string] Time to wait for the bucket to be created. Default is 10m.
    Delete string
    [string] Time to wait for the bucket to be deleted. Default is 60m.
    Read string
    [string] Time to wait for the bucket read operations. Default is 10m.
    create string
    [string] Time to wait for the bucket to be created. Default is 10m.
    delete string
    [string] Time to wait for the bucket to be deleted. Default is 60m.
    read string
    [string] Time to wait for the bucket read operations. Default is 10m.
    create String
    [string] Time to wait for the bucket to be created. Default is 10m.
    delete String
    [string] Time to wait for the bucket to be deleted. Default is 60m.
    read String
    [string] Time to wait for the bucket read operations. Default is 10m.
    create string
    [string] Time to wait for the bucket to be created. Default is 10m.
    delete string
    [string] Time to wait for the bucket to be deleted. Default is 60m.
    read string
    [string] Time to wait for the bucket read operations. Default is 10m.
    create str
    [string] Time to wait for the bucket to be created. Default is 10m.
    delete str
    [string] Time to wait for the bucket to be deleted. Default is 60m.
    read str
    [string] Time to wait for the bucket read operations. Default is 10m.
    create String
    [string] Time to wait for the bucket to be created. Default is 10m.
    delete String
    [string] Time to wait for the bucket to be deleted. Default is 60m.
    read String
    [string] Time to wait for the bucket read operations. Default is 10m.

    Import

    A bucket must be imported using region:bucket_name:

    $ pulumi import ionoscloud:objectstorage/userBucket:UserBucket example de:my-bucket
    $ pulumi import ionoscloud:objectstorage/userBucket:UserBucket example eu-central-2:my-bucket
    

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

    Package Details

    Repository
    ionoscloud ionos-cloud/pulumi-ionoscloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ionoscloud Terraform Provider.
    ionoscloud logo
    Viewing docs for IonosCloud v0.3.1
    published on Wednesday, Jun 10, 2026 by ionos-cloud

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial