published on Wednesday, Jun 10, 2026 by ionos-cloud
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
GetBucketLocationresponse XML model. The region defaults todewhen importing by bucket name alone. Use theregion:nameimport 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.Bucketand 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:
- Force
Destroy bool - [bool] Defaults to
false. When set totrue, 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 boolEnabled - [bool] Whether Object Lock is enabled for the bucket. Defaults to
false. Cannot be changed after creation — changing this value forces a new resource. - Dictionary<string, string>
- A mapping of tags to assign to the bucket.
- Timeouts
Ionoscloud.
User Bucket Timeouts - 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 totrue, 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 boolEnabled - [bool] Whether Object Lock is enabled for the bucket. Defaults to
false. Cannot be changed after creation — changing this value forces a new resource. - map[string]string
- A mapping of tags to assign to the bucket.
- Timeouts
User
Bucket Timeouts Args - 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 totrue, 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_ boolenabled - [bool] Whether Object Lock is enabled for the bucket. Defaults to
false. Cannot be changed after creation — changing this value forces a new resource. - 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:
- force
Destroy Boolean - [bool] Defaults to
false. When set totrue, 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 BooleanEnabled - [bool] Whether Object Lock is enabled for the bucket. Defaults to
false. Cannot be changed after creation — changing this value forces a new resource. - Map<String,String>
- A mapping of tags to assign to the bucket.
- timeouts
User
Bucket Timeouts - Timeouts for this resource.
- region string
- [string] The region where the bucket is created. Available regions:
- force
Destroy boolean - [bool] Defaults to
false. When set totrue, 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 booleanEnabled - [bool] Whether Object Lock is enabled for the bucket. Defaults to
false. Cannot be changed after creation — changing this value forces a new resource. - {[key: string]: string}
- A mapping of tags to assign to the bucket.
- timeouts
User
Bucket Timeouts - 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 totrue, 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_ boolenabled - [bool] Whether Object Lock is enabled for the bucket. Defaults to
false. Cannot be changed after creation — changing this value forces a new resource. - Mapping[str, str]
- A mapping of tags to assign to the bucket.
- timeouts
User
Bucket Timeouts Args - Timeouts for this resource.
- region String
- [string] The region where the bucket is created. Available regions:
- force
Destroy Boolean - [bool] Defaults to
false. When set totrue, 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 BooleanEnabled - [bool] Whether Object Lock is enabled for the bucket. Defaults to
false. Cannot be changed after creation — changing this value forces a new resource. - 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) -> UserBucketfunc 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.
- Force
Destroy bool - [bool] Defaults to
false. When set totrue, 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 boolEnabled - [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:
- Dictionary<string, string>
- A mapping of tags to assign to the bucket.
- Timeouts
Ionoscloud.
User Bucket Timeouts - Timeouts for this resource.
- Force
Destroy bool - [bool] Defaults to
false. When set totrue, 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 boolEnabled - [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:
- map[string]string
- A mapping of tags to assign to the bucket.
- Timeouts
User
Bucket Timeouts Args - Timeouts for this resource.
- force_
destroy bool - [bool] Defaults to
false. When set totrue, 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_ boolenabled - [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:
- map(string)
- A mapping of tags to assign to the bucket.
- timeouts object
- Timeouts for this resource.
- force
Destroy Boolean - [bool] Defaults to
false. When set totrue, 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 BooleanEnabled - [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:
- Map<String,String>
- A mapping of tags to assign to the bucket.
- timeouts
User
Bucket Timeouts - Timeouts for this resource.
- force
Destroy boolean - [bool] Defaults to
false. When set totrue, 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 booleanEnabled - [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:
- {[key: string]: string}
- A mapping of tags to assign to the bucket.
- timeouts
User
Bucket Timeouts - Timeouts for this resource.
- force_
destroy bool - [bool] Defaults to
false. When set totrue, 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_ boolenabled - [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:
- Mapping[str, str]
- A mapping of tags to assign to the bucket.
- timeouts
User
Bucket Timeouts Args - Timeouts for this resource.
- force
Destroy Boolean - [bool] Defaults to
false. When set totrue, 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 BooleanEnabled - [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:
- Map<String>
- A mapping of tags to assign to the bucket.
- timeouts Property Map
- Timeouts for this resource.
Supporting Types
UserBucketTimeouts, UserBucketTimeoutsArgs
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
ionoscloudTerraform Provider.
published on Wednesday, Jun 10, 2026 by ionos-cloud