published on Wednesday, Apr 15, 2026 by ionos-cloud
published on Wednesday, Apr 15, 2026 by ionos-cloud
Manages Buckets versioning on IonosCloud.
⚠️ Note: The Terraform provider only supports contract-owned buckets. User-owned buckets are not supported, and there are no plans to introduce support for them. As a result, user-owned buckets cannot be created, updated, deleted, read, or imported using this provider.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@ionos-cloud/sdk-pulumi";
const example = new ionoscloud.objectstorage.Bucket("example", {name: "example"});
const exampleBucketVersioning = new ionoscloud.objectstorage.BucketVersioning("example", {
bucket: example.name,
versioningConfiguration: [{
status: "Enabled",
}],
});
import pulumi
import pulumi_ionoscloud as ionoscloud
example = ionoscloud.objectstorage.Bucket("example", name="example")
example_bucket_versioning = ionoscloud.objectstorage.BucketVersioning("example",
bucket=example.name,
versioning_configuration=[{
"status": "Enabled",
}])
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 {
example, err := objectstorage.NewBucket(ctx, "example", &objectstorage.BucketArgs{
Name: pulumi.String("example"),
})
if err != nil {
return err
}
_, err = objectstorage.NewBucketVersioning(ctx, "example", &objectstorage.BucketVersioningArgs{
Bucket: example.Name,
VersioningConfiguration: objectstorage.BucketVersioningVersioningConfigurationArgs{
map[string]interface{}{
"status": "Enabled",
},
},
})
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.Bucket("example", new()
{
Name = "example",
});
var exampleBucketVersioning = new Ionoscloud.Objectstorage.BucketVersioning("example", new()
{
Bucket = example.Name,
VersioningConfiguration = new[]
{
{
{ "status", "Enabled" },
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.ionoscloud.pulumi.ionoscloud.objectstorage.Bucket;
import com.ionoscloud.pulumi.ionoscloud.objectstorage.BucketArgs;
import com.ionoscloud.pulumi.ionoscloud.objectstorage.BucketVersioning;
import com.ionoscloud.pulumi.ionoscloud.objectstorage.BucketVersioningArgs;
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) {
var example = new Bucket("example", BucketArgs.builder()
.name("example")
.build());
var exampleBucketVersioning = new BucketVersioning("exampleBucketVersioning", BucketVersioningArgs.builder()
.bucket(example.name())
.versioningConfiguration(BucketVersioningVersioningConfigurationArgs.builder()
.status("Enabled")
.build())
.build());
}
}
resources:
example:
type: ionoscloud:objectstorage:Bucket
properties:
name: example
exampleBucketVersioning:
type: ionoscloud:objectstorage:BucketVersioning
name: example
properties:
bucket: ${example.name}
versioningConfiguration:
- status: Enabled
Example coming soon!
Create BucketVersioning Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new BucketVersioning(name: string, args: BucketVersioningArgs, opts?: CustomResourceOptions);@overload
def BucketVersioning(resource_name: str,
args: BucketVersioningArgs,
opts: Optional[ResourceOptions] = None)
@overload
def BucketVersioning(resource_name: str,
opts: Optional[ResourceOptions] = None,
bucket: Optional[str] = None,
versioning_configuration: Optional[BucketVersioningVersioningConfigurationArgs] = None)func NewBucketVersioning(ctx *Context, name string, args BucketVersioningArgs, opts ...ResourceOption) (*BucketVersioning, error)public BucketVersioning(string name, BucketVersioningArgs args, CustomResourceOptions? opts = null)
public BucketVersioning(String name, BucketVersioningArgs args)
public BucketVersioning(String name, BucketVersioningArgs args, CustomResourceOptions options)
type: ionoscloud:objectstorage:BucketVersioning
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "ionoscloud_objectstorage_bucketversioning" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args BucketVersioningArgs
- 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 BucketVersioningArgs
- 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 BucketVersioningArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BucketVersioningArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args BucketVersioningArgs
- 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 bucketVersioningResource = new Ionoscloud.Objectstorage.BucketVersioning("bucketVersioningResource", new()
{
Bucket = "string",
VersioningConfiguration = new Ionoscloud.Objectstorage.Inputs.BucketVersioningVersioningConfigurationArgs
{
Status = "string",
MfaDelete = "string",
},
});
example, err := objectstorage.NewBucketVersioning(ctx, "bucketVersioningResource", &objectstorage.BucketVersioningArgs{
Bucket: pulumi.String("string"),
VersioningConfiguration: &objectstorage.BucketVersioningVersioningConfigurationArgs{
Status: pulumi.String("string"),
MfaDelete: pulumi.String("string"),
},
})
resource "ionoscloud_objectstorage_bucketversioning" "bucketVersioningResource" {
bucket = "string"
versioning_configuration = {
status = "string"
mfa_delete = "string"
}
}
var bucketVersioningResource = new BucketVersioning("bucketVersioningResource", BucketVersioningArgs.builder()
.bucket("string")
.versioningConfiguration(BucketVersioningVersioningConfigurationArgs.builder()
.status("string")
.mfaDelete("string")
.build())
.build());
bucket_versioning_resource = ionoscloud.objectstorage.BucketVersioning("bucketVersioningResource",
bucket="string",
versioning_configuration={
"status": "string",
"mfa_delete": "string",
})
const bucketVersioningResource = new ionoscloud.objectstorage.BucketVersioning("bucketVersioningResource", {
bucket: "string",
versioningConfiguration: {
status: "string",
mfaDelete: "string",
},
});
type: ionoscloud:objectstorage:BucketVersioning
properties:
bucket: string
versioningConfiguration:
mfaDelete: string
status: string
BucketVersioning 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 BucketVersioning resource accepts the following input properties:
- Bucket string
- [string] The name of the bucket where the object will be stored.
- Versioning
Configuration Ionoscloud.Bucket Versioning Versioning Configuration - [block] A block of versioningConfiguration as defined below.
- Bucket string
- [string] The name of the bucket where the object will be stored.
- Versioning
Configuration BucketVersioning Versioning Configuration Args - [block] A block of versioningConfiguration as defined below.
- bucket string
- [string] The name of the bucket where the object will be stored.
- versioning_
configuration object - [block] A block of versioningConfiguration as defined below.
- bucket String
- [string] The name of the bucket where the object will be stored.
- versioning
Configuration BucketVersioning Versioning Configuration - [block] A block of versioningConfiguration as defined below.
- bucket string
- [string] The name of the bucket where the object will be stored.
- versioning
Configuration BucketVersioning Versioning Configuration - [block] A block of versioningConfiguration as defined below.
- bucket str
- [string] The name of the bucket where the object will be stored.
- versioning_
configuration BucketVersioning Versioning Configuration Args - [block] A block of versioningConfiguration as defined below.
- bucket String
- [string] The name of the bucket where the object will be stored.
- versioning
Configuration Property Map - [block] A block of versioningConfiguration as defined below.
Outputs
All input properties are implicitly available as output properties. Additionally, the BucketVersioning 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 BucketVersioning Resource
Get an existing BucketVersioning 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?: BucketVersioningState, opts?: CustomResourceOptions): BucketVersioning@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
bucket: Optional[str] = None,
versioning_configuration: Optional[BucketVersioningVersioningConfigurationArgs] = None) -> BucketVersioningfunc GetBucketVersioning(ctx *Context, name string, id IDInput, state *BucketVersioningState, opts ...ResourceOption) (*BucketVersioning, error)public static BucketVersioning Get(string name, Input<string> id, BucketVersioningState? state, CustomResourceOptions? opts = null)public static BucketVersioning get(String name, Output<String> id, BucketVersioningState state, CustomResourceOptions options)resources: _: type: ionoscloud:objectstorage:BucketVersioning get: id: ${id}import {
to = ionoscloud_objectstorage_bucketversioning.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.
- Bucket string
- [string] The name of the bucket where the object will be stored.
- Versioning
Configuration Ionoscloud.Bucket Versioning Versioning Configuration - [block] A block of versioningConfiguration as defined below.
- Bucket string
- [string] The name of the bucket where the object will be stored.
- Versioning
Configuration BucketVersioning Versioning Configuration Args - [block] A block of versioningConfiguration as defined below.
- bucket string
- [string] The name of the bucket where the object will be stored.
- versioning_
configuration object - [block] A block of versioningConfiguration as defined below.
- bucket String
- [string] The name of the bucket where the object will be stored.
- versioning
Configuration BucketVersioning Versioning Configuration - [block] A block of versioningConfiguration as defined below.
- bucket string
- [string] The name of the bucket where the object will be stored.
- versioning
Configuration BucketVersioning Versioning Configuration - [block] A block of versioningConfiguration as defined below.
- bucket str
- [string] The name of the bucket where the object will be stored.
- versioning_
configuration BucketVersioning Versioning Configuration Args - [block] A block of versioningConfiguration as defined below.
- bucket String
- [string] The name of the bucket where the object will be stored.
- versioning
Configuration Property Map - [block] A block of versioningConfiguration as defined below.
Supporting Types
BucketVersioningVersioningConfiguration, BucketVersioningVersioningConfigurationArgs
- status string
- [string] The versioning state of the bucket. Can be
EnabledorSuspended. - mfa_
delete string - [string] Specifies whether MFA delete is enabled or not. Can be
EnabledorDisabled.
- status str
- [string] The versioning state of the bucket. Can be
EnabledorSuspended. - mfa_
delete str - [string] Specifies whether MFA delete is enabled or not. Can be
EnabledorDisabled.
Import
IONOS Object Storage Bucket Versioning can be imported using the bucket name.
$ pulumi import ionoscloud:objectstorage/bucketVersioning:BucketVersioning example example
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, Apr 15, 2026 by ionos-cloud
