-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Additional S3 Bucket configurations seems to not update Bucket state properly to reflect AWS #3166
Labels
area/refresh
kind/bug
Some behavior is incorrect or out of spec
service/s3
S3-related things (buckets, objects)
Comments
jesperseverinsen
added
kind/bug
Some behavior is incorrect or out of spec
needs-triage
Needs attention from the triage team
labels
Dec 20, 2023
I am sorry this is not working as expected. This is a very interesting issue, thank you @jesperseverinsen for filing this with a repro, my team will have a look as time permits. |
t0yv0
added
area/import
An issue related to `pulumi import` or the import resource option.
and removed
needs-triage
Needs attention from the triage team
labels
Dec 20, 2023
This was referenced Apr 22, 2024
t0yv0
added
area/refresh
and removed
area/import
An issue related to `pulumi import` or the import resource option.
labels
May 14, 2024
Still reproduces on latest unfortunately. import * as aws from "@pulumi/aws";
const name = "aws-3166";
const bucket = new aws.s3.BucketV2(`${name}-s3-bucket`);
new aws.s3.BucketVersioningV2(
`${name}-s3-bucket-versioning`,
{
bucket: bucket.id,
versioningConfiguration: { status: 'Enabled' },
},
);
// refresh yield this diff:
//
// pulumi:pulumi:Stack: (same)
// [urn=urn:pulumi:dev::aws-3166::pulumi:pulumi:Stack::aws-3166-dev]
// ~ aws:s3/bucketV2:BucketV2: (update)
// [id=aws-3166-s3-bucket-3925e83]
// [urn=urn:pulumi:dev::aws-3166::aws:s3/bucketV2:BucketV2::aws-3166-s3-bucket]
// [provider=urn:pulumi:dev::aws-3166::pulumi:providers:aws::default_6_35_0::504bf98f-fbe4-47c0-a038-358bcb6735d8]
// --outputs:--
// ~ versionings : [
// ~ [0]: {
// ~ enabled : false => true
// mfaDelete: false
// }
// ] |
import * as aws from "@pulumi/aws";
const example = new aws.s3.BucketV2("example", {bucket: "my-tf-example-bucket-anton-2024-05-14"});
const exampleBucketOwnershipControls = new aws.s3.BucketOwnershipControls("example", {
bucket: example.id,
rule: {
objectOwnership: "BucketOwnerPreferred",
},
});
const exampleBucketPublicAccessBlock = new aws.s3.BucketPublicAccessBlock("example", {
bucket: example.id,
blockPublicAcls: false,
blockPublicPolicy: false,
ignorePublicAcls: false,
restrictPublicBuckets: false,
});
const exampleBucketAclV2 = new aws.s3.BucketAclV2("example", {
bucket: example.id,
acl: "public-read",
}, {
dependsOn: [
exampleBucketOwnershipControls,
exampleBucketPublicAccessBlock,
],
}); A bit of the same problem here with ACL and ownership controls competing with the grants property.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/refresh
kind/bug
Some behavior is incorrect or out of spec
service/s3
S3-related things (buckets, objects)
What happened?
Using the Automation API, creating stacks in an AWS S3 Bucket, it seems like resources such as
aws.s3.BucketServerSideEncryptionConfigurationV2
,aws.s3.BucketVersioningV2
,aws.s3.BucketPolicy
andaws.s3.BucketLoggingV2
is not properly updating the state of the Bucket in Pulumi, to reflect thestate of the bucket in AWS.An example is the versioning, where after deploying using the Pulumi Automation API, the output of the S3 Bucket contains
with the BucketVersioningV2 resource having the following input and output:
However, running refresh on the stack results in updating the bucket resource itself (
updated (2s) [diff: ~loggings,serverSideEncryptionConfigurations,versionings]
), with the output in Pulumi being updated to properly reflect the state of the bucket in AWS:Example
Output of
pulumi about
CLI
Version 3.94.2
Go Version go1.21.4
Go Compiler gc
Host
OS darwin
Version 13.6
Arch arm64
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
The text was updated successfully, but these errors were encountered: