Try AWS Native preview for resources not in the classic version.
aws.s3.BucketVersioningV2
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
Provides a resource for controlling versioning on an S3 bucket. Deleting this resource will either suspend versioning on the associated S3 bucket or simply remove the resource from state if the associated S3 bucket is unversioned.
For more information, see How S3 versioning works.
NOTE: If you are enabling versioning on the bucket for the first time, AWS recommends that you wait for 15 minutes after enabling versioning before issuing write operations (PUT or DELETE) on objects in the bucket.
This resource cannot be used with S3 directory buckets.
Example Usage
With Versioning Enabled
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var exampleBucketV2 = new Aws.S3.BucketV2("exampleBucketV2");
var exampleBucketAclV2 = new Aws.S3.BucketAclV2("exampleBucketAclV2", new()
{
Bucket = exampleBucketV2.Id,
Acl = "private",
});
var versioningExample = new Aws.S3.BucketVersioningV2("versioningExample", new()
{
Bucket = exampleBucketV2.Id,
VersioningConfiguration = new Aws.S3.Inputs.BucketVersioningV2VersioningConfigurationArgs
{
Status = "Enabled",
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleBucketV2, err := s3.NewBucketV2(ctx, "exampleBucketV2", nil)
if err != nil {
return err
}
_, err = s3.NewBucketAclV2(ctx, "exampleBucketAclV2", &s3.BucketAclV2Args{
Bucket: exampleBucketV2.ID(),
Acl: pulumi.String("private"),
})
if err != nil {
return err
}
_, err = s3.NewBucketVersioningV2(ctx, "versioningExample", &s3.BucketVersioningV2Args{
Bucket: exampleBucketV2.ID(),
VersioningConfiguration: &s3.BucketVersioningV2VersioningConfigurationArgs{
Status: pulumi.String("Enabled"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.s3.BucketV2;
import com.pulumi.aws.s3.BucketAclV2;
import com.pulumi.aws.s3.BucketAclV2Args;
import com.pulumi.aws.s3.BucketVersioningV2;
import com.pulumi.aws.s3.BucketVersioningV2Args;
import com.pulumi.aws.s3.inputs.BucketVersioningV2VersioningConfigurationArgs;
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 exampleBucketV2 = new BucketV2("exampleBucketV2");
var exampleBucketAclV2 = new BucketAclV2("exampleBucketAclV2", BucketAclV2Args.builder()
.bucket(exampleBucketV2.id())
.acl("private")
.build());
var versioningExample = new BucketVersioningV2("versioningExample", BucketVersioningV2Args.builder()
.bucket(exampleBucketV2.id())
.versioningConfiguration(BucketVersioningV2VersioningConfigurationArgs.builder()
.status("Enabled")
.build())
.build());
}
}
import pulumi
import pulumi_aws as aws
example_bucket_v2 = aws.s3.BucketV2("exampleBucketV2")
example_bucket_acl_v2 = aws.s3.BucketAclV2("exampleBucketAclV2",
bucket=example_bucket_v2.id,
acl="private")
versioning_example = aws.s3.BucketVersioningV2("versioningExample",
bucket=example_bucket_v2.id,
versioning_configuration=aws.s3.BucketVersioningV2VersioningConfigurationArgs(
status="Enabled",
))
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const exampleBucketV2 = new aws.s3.BucketV2("exampleBucketV2", {});
const exampleBucketAclV2 = new aws.s3.BucketAclV2("exampleBucketAclV2", {
bucket: exampleBucketV2.id,
acl: "private",
});
const versioningExample = new aws.s3.BucketVersioningV2("versioningExample", {
bucket: exampleBucketV2.id,
versioningConfiguration: {
status: "Enabled",
},
});
resources:
exampleBucketV2:
type: aws:s3:BucketV2
exampleBucketAclV2:
type: aws:s3:BucketAclV2
properties:
bucket: ${exampleBucketV2.id}
acl: private
versioningExample:
type: aws:s3:BucketVersioningV2
properties:
bucket: ${exampleBucketV2.id}
versioningConfiguration:
status: Enabled
With Versioning Disabled
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var exampleBucketV2 = new Aws.S3.BucketV2("exampleBucketV2");
var exampleBucketAclV2 = new Aws.S3.BucketAclV2("exampleBucketAclV2", new()
{
Bucket = exampleBucketV2.Id,
Acl = "private",
});
var versioningExample = new Aws.S3.BucketVersioningV2("versioningExample", new()
{
Bucket = exampleBucketV2.Id,
VersioningConfiguration = new Aws.S3.Inputs.BucketVersioningV2VersioningConfigurationArgs
{
Status = "Disabled",
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleBucketV2, err := s3.NewBucketV2(ctx, "exampleBucketV2", nil)
if err != nil {
return err
}
_, err = s3.NewBucketAclV2(ctx, "exampleBucketAclV2", &s3.BucketAclV2Args{
Bucket: exampleBucketV2.ID(),
Acl: pulumi.String("private"),
})
if err != nil {
return err
}
_, err = s3.NewBucketVersioningV2(ctx, "versioningExample", &s3.BucketVersioningV2Args{
Bucket: exampleBucketV2.ID(),
VersioningConfiguration: &s3.BucketVersioningV2VersioningConfigurationArgs{
Status: pulumi.String("Disabled"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.s3.BucketV2;
import com.pulumi.aws.s3.BucketAclV2;
import com.pulumi.aws.s3.BucketAclV2Args;
import com.pulumi.aws.s3.BucketVersioningV2;
import com.pulumi.aws.s3.BucketVersioningV2Args;
import com.pulumi.aws.s3.inputs.BucketVersioningV2VersioningConfigurationArgs;
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 exampleBucketV2 = new BucketV2("exampleBucketV2");
var exampleBucketAclV2 = new BucketAclV2("exampleBucketAclV2", BucketAclV2Args.builder()
.bucket(exampleBucketV2.id())
.acl("private")
.build());
var versioningExample = new BucketVersioningV2("versioningExample", BucketVersioningV2Args.builder()
.bucket(exampleBucketV2.id())
.versioningConfiguration(BucketVersioningV2VersioningConfigurationArgs.builder()
.status("Disabled")
.build())
.build());
}
}
import pulumi
import pulumi_aws as aws
example_bucket_v2 = aws.s3.BucketV2("exampleBucketV2")
example_bucket_acl_v2 = aws.s3.BucketAclV2("exampleBucketAclV2",
bucket=example_bucket_v2.id,
acl="private")
versioning_example = aws.s3.BucketVersioningV2("versioningExample",
bucket=example_bucket_v2.id,
versioning_configuration=aws.s3.BucketVersioningV2VersioningConfigurationArgs(
status="Disabled",
))
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const exampleBucketV2 = new aws.s3.BucketV2("exampleBucketV2", {});
const exampleBucketAclV2 = new aws.s3.BucketAclV2("exampleBucketAclV2", {
bucket: exampleBucketV2.id,
acl: "private",
});
const versioningExample = new aws.s3.BucketVersioningV2("versioningExample", {
bucket: exampleBucketV2.id,
versioningConfiguration: {
status: "Disabled",
},
});
resources:
exampleBucketV2:
type: aws:s3:BucketV2
exampleBucketAclV2:
type: aws:s3:BucketAclV2
properties:
bucket: ${exampleBucketV2.id}
acl: private
versioningExample:
type: aws:s3:BucketVersioningV2
properties:
bucket: ${exampleBucketV2.id}
versioningConfiguration:
status: Disabled
Object Dependency On Versioning
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var exampleBucketV2 = new Aws.S3.BucketV2("exampleBucketV2");
var exampleBucketVersioningV2 = new Aws.S3.BucketVersioningV2("exampleBucketVersioningV2", new()
{
Bucket = exampleBucketV2.Id,
VersioningConfiguration = new Aws.S3.Inputs.BucketVersioningV2VersioningConfigurationArgs
{
Status = "Enabled",
},
});
var exampleBucketObjectv2 = new Aws.S3.BucketObjectv2("exampleBucketObjectv2", new()
{
Bucket = exampleBucketVersioningV2.Id,
Key = "droeloe",
Source = new FileAsset("example.txt"),
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleBucketV2, err := s3.NewBucketV2(ctx, "exampleBucketV2", nil)
if err != nil {
return err
}
exampleBucketVersioningV2, err := s3.NewBucketVersioningV2(ctx, "exampleBucketVersioningV2", &s3.BucketVersioningV2Args{
Bucket: exampleBucketV2.ID(),
VersioningConfiguration: &s3.BucketVersioningV2VersioningConfigurationArgs{
Status: pulumi.String("Enabled"),
},
})
if err != nil {
return err
}
_, err = s3.NewBucketObjectv2(ctx, "exampleBucketObjectv2", &s3.BucketObjectv2Args{
Bucket: exampleBucketVersioningV2.ID(),
Key: pulumi.String("droeloe"),
Source: pulumi.NewFileAsset("example.txt"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.s3.BucketV2;
import com.pulumi.aws.s3.BucketVersioningV2;
import com.pulumi.aws.s3.BucketVersioningV2Args;
import com.pulumi.aws.s3.inputs.BucketVersioningV2VersioningConfigurationArgs;
import com.pulumi.aws.s3.BucketObjectv2;
import com.pulumi.aws.s3.BucketObjectv2Args;
import com.pulumi.asset.FileAsset;
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 exampleBucketV2 = new BucketV2("exampleBucketV2");
var exampleBucketVersioningV2 = new BucketVersioningV2("exampleBucketVersioningV2", BucketVersioningV2Args.builder()
.bucket(exampleBucketV2.id())
.versioningConfiguration(BucketVersioningV2VersioningConfigurationArgs.builder()
.status("Enabled")
.build())
.build());
var exampleBucketObjectv2 = new BucketObjectv2("exampleBucketObjectv2", BucketObjectv2Args.builder()
.bucket(exampleBucketVersioningV2.id())
.key("droeloe")
.source(new FileAsset("example.txt"))
.build());
}
}
import pulumi
import pulumi_aws as aws
example_bucket_v2 = aws.s3.BucketV2("exampleBucketV2")
example_bucket_versioning_v2 = aws.s3.BucketVersioningV2("exampleBucketVersioningV2",
bucket=example_bucket_v2.id,
versioning_configuration=aws.s3.BucketVersioningV2VersioningConfigurationArgs(
status="Enabled",
))
example_bucket_objectv2 = aws.s3.BucketObjectv2("exampleBucketObjectv2",
bucket=example_bucket_versioning_v2.id,
key="droeloe",
source=pulumi.FileAsset("example.txt"))
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const exampleBucketV2 = new aws.s3.BucketV2("exampleBucketV2", {});
const exampleBucketVersioningV2 = new aws.s3.BucketVersioningV2("exampleBucketVersioningV2", {
bucket: exampleBucketV2.id,
versioningConfiguration: {
status: "Enabled",
},
});
const exampleBucketObjectv2 = new aws.s3.BucketObjectv2("exampleBucketObjectv2", {
bucket: exampleBucketVersioningV2.id,
key: "droeloe",
source: new pulumi.asset.FileAsset("example.txt"),
});
resources:
exampleBucketV2:
type: aws:s3:BucketV2
exampleBucketVersioningV2:
type: aws:s3:BucketVersioningV2
properties:
bucket: ${exampleBucketV2.id}
versioningConfiguration:
status: Enabled
exampleBucketObjectv2:
type: aws:s3:BucketObjectv2
properties:
bucket: ${exampleBucketVersioningV2.id}
key: droeloe
source:
fn::FileAsset: example.txt
Create BucketVersioningV2 Resource
new BucketVersioningV2(name: string, args: BucketVersioningV2Args, opts?: CustomResourceOptions);
@overload
def BucketVersioningV2(resource_name: str,
opts: Optional[ResourceOptions] = None,
bucket: Optional[str] = None,
expected_bucket_owner: Optional[str] = None,
mfa: Optional[str] = None,
versioning_configuration: Optional[BucketVersioningV2VersioningConfigurationArgs] = None)
@overload
def BucketVersioningV2(resource_name: str,
args: BucketVersioningV2Args,
opts: Optional[ResourceOptions] = None)
func NewBucketVersioningV2(ctx *Context, name string, args BucketVersioningV2Args, opts ...ResourceOption) (*BucketVersioningV2, error)
public BucketVersioningV2(string name, BucketVersioningV2Args args, CustomResourceOptions? opts = null)
public BucketVersioningV2(String name, BucketVersioningV2Args args)
public BucketVersioningV2(String name, BucketVersioningV2Args args, CustomResourceOptions options)
type: aws:s3:BucketVersioningV2
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BucketVersioningV2Args
- 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 BucketVersioningV2Args
- 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 BucketVersioningV2Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BucketVersioningV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args BucketVersioningV2Args
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
BucketVersioningV2 Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The BucketVersioningV2 resource accepts the following input properties:
- Bucket string
Name of the S3 bucket.
- Versioning
Configuration BucketVersioning V2Versioning Configuration Configuration block for the versioning parameters. See below.
- Expected
Bucket stringOwner Account ID of the expected bucket owner.
- Mfa string
Concatenation of the authentication device's serial number, a space, and the value that is displayed on your authentication device.
- Bucket string
Name of the S3 bucket.
- Versioning
Configuration BucketVersioning V2Versioning Configuration Args Configuration block for the versioning parameters. See below.
- Expected
Bucket stringOwner Account ID of the expected bucket owner.
- Mfa string
Concatenation of the authentication device's serial number, a space, and the value that is displayed on your authentication device.
- bucket String
Name of the S3 bucket.
- versioning
Configuration BucketVersioning V2Versioning Configuration Configuration block for the versioning parameters. See below.
- expected
Bucket StringOwner Account ID of the expected bucket owner.
- mfa String
Concatenation of the authentication device's serial number, a space, and the value that is displayed on your authentication device.
- bucket string
Name of the S3 bucket.
- versioning
Configuration BucketVersioning V2Versioning Configuration Configuration block for the versioning parameters. See below.
- expected
Bucket stringOwner Account ID of the expected bucket owner.
- mfa string
Concatenation of the authentication device's serial number, a space, and the value that is displayed on your authentication device.
- bucket str
Name of the S3 bucket.
- versioning_
configuration BucketVersioning V2Versioning Configuration Args Configuration block for the versioning parameters. See below.
- expected_
bucket_ strowner Account ID of the expected bucket owner.
- mfa str
Concatenation of the authentication device's serial number, a space, and the value that is displayed on your authentication device.
- bucket String
Name of the S3 bucket.
- versioning
Configuration Property Map Configuration block for the versioning parameters. See below.
- expected
Bucket StringOwner Account ID of the expected bucket owner.
- mfa String
Concatenation of the authentication device's serial number, a space, and the value that is displayed on your authentication device.
Outputs
All input properties are implicitly available as output properties. Additionally, the BucketVersioningV2 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 str
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
Look up Existing BucketVersioningV2 Resource
Get an existing BucketVersioningV2 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?: BucketVersioningV2State, opts?: CustomResourceOptions): BucketVersioningV2
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
bucket: Optional[str] = None,
expected_bucket_owner: Optional[str] = None,
mfa: Optional[str] = None,
versioning_configuration: Optional[BucketVersioningV2VersioningConfigurationArgs] = None) -> BucketVersioningV2
func GetBucketVersioningV2(ctx *Context, name string, id IDInput, state *BucketVersioningV2State, opts ...ResourceOption) (*BucketVersioningV2, error)
public static BucketVersioningV2 Get(string name, Input<string> id, BucketVersioningV2State? state, CustomResourceOptions? opts = null)
public static BucketVersioningV2 get(String name, Output<String> id, BucketVersioningV2State state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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
Name of the S3 bucket.
- Expected
Bucket stringOwner Account ID of the expected bucket owner.
- Mfa string
Concatenation of the authentication device's serial number, a space, and the value that is displayed on your authentication device.
- Versioning
Configuration BucketVersioning V2Versioning Configuration Configuration block for the versioning parameters. See below.
- Bucket string
Name of the S3 bucket.
- Expected
Bucket stringOwner Account ID of the expected bucket owner.
- Mfa string
Concatenation of the authentication device's serial number, a space, and the value that is displayed on your authentication device.
- Versioning
Configuration BucketVersioning V2Versioning Configuration Args Configuration block for the versioning parameters. See below.
- bucket String
Name of the S3 bucket.
- expected
Bucket StringOwner Account ID of the expected bucket owner.
- mfa String
Concatenation of the authentication device's serial number, a space, and the value that is displayed on your authentication device.
- versioning
Configuration BucketVersioning V2Versioning Configuration Configuration block for the versioning parameters. See below.
- bucket string
Name of the S3 bucket.
- expected
Bucket stringOwner Account ID of the expected bucket owner.
- mfa string
Concatenation of the authentication device's serial number, a space, and the value that is displayed on your authentication device.
- versioning
Configuration BucketVersioning V2Versioning Configuration Configuration block for the versioning parameters. See below.
- bucket str
Name of the S3 bucket.
- expected_
bucket_ strowner Account ID of the expected bucket owner.
- mfa str
Concatenation of the authentication device's serial number, a space, and the value that is displayed on your authentication device.
- versioning_
configuration BucketVersioning V2Versioning Configuration Args Configuration block for the versioning parameters. See below.
- bucket String
Name of the S3 bucket.
- expected
Bucket StringOwner Account ID of the expected bucket owner.
- mfa String
Concatenation of the authentication device's serial number, a space, and the value that is displayed on your authentication device.
- versioning
Configuration Property Map Configuration block for the versioning parameters. See below.
Supporting Types
BucketVersioningV2VersioningConfiguration, BucketVersioningV2VersioningConfigurationArgs
- Status string
Versioning state of the bucket. Valid values:
Enabled
,Suspended
, orDisabled
.Disabled
should only be used when creating or importing resources that correspond to unversioned S3 buckets.- Mfa
Delete string Specifies whether MFA delete is enabled in the bucket versioning configuration. Valid values:
Enabled
orDisabled
.
- Status string
Versioning state of the bucket. Valid values:
Enabled
,Suspended
, orDisabled
.Disabled
should only be used when creating or importing resources that correspond to unversioned S3 buckets.- Mfa
Delete string Specifies whether MFA delete is enabled in the bucket versioning configuration. Valid values:
Enabled
orDisabled
.
- status String
Versioning state of the bucket. Valid values:
Enabled
,Suspended
, orDisabled
.Disabled
should only be used when creating or importing resources that correspond to unversioned S3 buckets.- mfa
Delete String Specifies whether MFA delete is enabled in the bucket versioning configuration. Valid values:
Enabled
orDisabled
.
- status string
Versioning state of the bucket. Valid values:
Enabled
,Suspended
, orDisabled
.Disabled
should only be used when creating or importing resources that correspond to unversioned S3 buckets.- mfa
Delete string Specifies whether MFA delete is enabled in the bucket versioning configuration. Valid values:
Enabled
orDisabled
.
- status str
Versioning state of the bucket. Valid values:
Enabled
,Suspended
, orDisabled
.Disabled
should only be used when creating or importing resources that correspond to unversioned S3 buckets.- mfa_
delete str Specifies whether MFA delete is enabled in the bucket versioning configuration. Valid values:
Enabled
orDisabled
.
- status String
Versioning state of the bucket. Valid values:
Enabled
,Suspended
, orDisabled
.Disabled
should only be used when creating or importing resources that correspond to unversioned S3 buckets.- mfa
Delete String Specifies whether MFA delete is enabled in the bucket versioning configuration. Valid values:
Enabled
orDisabled
.
Import
If the owner (account ID) of the source bucket differs from the account used to configure the AWS Provider, import using the bucket
and expected_bucket_owner
separated by a comma (,
):
Using pulumi import
to import S3 bucket versioning using the bucket
or using the bucket
and expected_bucket_owner
separated by a comma (,
). For example:
If the owner (account ID) of the source bucket is the same account used to configure the AWS Provider, import using the bucket
:
$ pulumi import aws:s3/bucketVersioningV2:BucketVersioningV2 example bucket-name
If the owner (account ID) of the source bucket differs from the account used to configure the AWS Provider, import using the bucket
and expected_bucket_owner
separated by a comma (,
):
$ pulumi import aws:s3/bucketVersioningV2:BucketVersioningV2 example bucket-name,123456789012
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.