-
Notifications
You must be signed in to change notification settings - Fork 159
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
BucketReplicationConfig perpetual differences on refresh #2063
Comments
@joffreychambrin Thanks for opening the issue. This is interesting. I am not entirely sure how the replication config is being recorded in the state for a bucket when it is a separate resource while a read on the resource doesn't return the replication config. We will investigate but for the timebeing, could you add an |
Thanks @viveklak ! Indeed, adding the ignoreChanges fixed my problem |
Checking this now and the issue still occurs on """An AWS Python Pulumi program"""
import pulumi
import pulumi_aws as aws
bucket = aws.s3.BucketV2(
"chall-test",
)
aws.s3.BucketVersioningV2(
"chall-test-versioning",
bucket=bucket.id,
versioning_configuration=aws.s3.BucketVersioningV2VersioningConfigurationArgs(
status="Enabled"
),
)
destination_bucket = aws.s3.BucketV2(
"chall-test-destination",
)
aws.s3.BucketVersioningV2(
"chall-test-dest-versioning",
bucket=destination_bucket.id,
versioning_configuration=aws.s3.BucketVersioningV2VersioningConfigurationArgs(
status="Enabled"
),
)
replication_role = aws.iam.Role(
"replicationRole",
assume_role_policy="""{
"Version": "2012-10-17",
"Statement": [
{
"Action": "sts:AssumeRole",
"Principal": {
"Service": "s3.amazonaws.com"
},
"Effect": "Allow",
"Sid": ""
}
]
}
""",
)
replication_bucket_replication_config = aws.s3.BucketReplicationConfig(
"replicationBucketReplicationConfig",
role=replication_role.arn,
bucket=bucket.id,
rules=[
aws.s3.BucketReplicationConfigRuleArgs(
id="foobar",
filter=aws.s3.BucketReplicationConfigRuleFilterArgs(
prefix="foo",
),
delete_marker_replication=aws.s3.BucketReplicationConfigRuleDeleteMarkerReplicationArgs(
status="Enabled"
),
status="Enabled",
destination=aws.s3.BucketReplicationConfigRuleDestinationArgs(
bucket=destination_bucket.arn,
storage_class="STANDARD",
),
)
],
opts=pulumi.ResourceOptions(depends_on=[bucket]),
)
# Export the name of the bucket
pulumi.export("bucket_name", bucket.id) |
What happened?
Using BucketReplicationConfig leads to perpetual changes after refreshes
Steps to reproduce
Create the following pulumi program :
Then, launch
pulumi up -r
multiple timesExpected Behavior
Launching
pulumi up -r
should have no effectActual Behavior
Instead, we have perpetual changes. For example, if I run twice the command
First run :
Second run :
Versions used
CLI
Version 3.36.0
Go Version go1.18.4
Go Compiler gc
Host
OS darwin
Version 12.4
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: