Skip to content
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

Fix import resources with provider default tags #4169

Merged
merged 18 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
updating based on comments
  • Loading branch information
corymhall committed Jul 23, 2024
commit 8c72e647cdad57ba0e339984603f4cfd8a12da38
2 changes: 2 additions & 0 deletions examples/examples_go_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ func (st tagsState) validateStateResult(phase int) func(
t.Logf("key=%s tags are as expected: %v", k, actualTagsJSON)

if k == "bucket" {
// TODO: uncomment when https://github.com/pulumi/pulumi-aws/issues/4258 is fixed
// getTags := stack.Outputs["get-bucket"].(string)
// assert.Equal(t, v.(string), getTags)
bucketName := stack.Outputs["bucket-name"].(string)
Expand All @@ -259,6 +260,7 @@ func (st tagsState) validateStateResult(phase int) func(
"bad bucket tags")
}
if k == "legacy-bucket" {
// TODO: uncomment when https://github.com/pulumi/pulumi-aws/issues/4258 is fixed
// getTags := stack.Outputs["get-legacy-bucket"].(string)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these comments still useful?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added another comment with link to the issue. When the issue is fixed the code can be uncommented.

// assert.Equal(t, v.(string), getTags)
bucketName := stack.Outputs["legacy-bucket-name"].(string)
Expand Down
3 changes: 2 additions & 1 deletion examples/tags-combinations-go/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ func main() {
return err
}

// refresh doesn't work for `forceDelete` & `acl` uncomment when fixed
// TODO: uncomment when https://github.com/pulumi/pulumi-aws/issues/4258 is fixed
// refresh doesn't work for `forceDelete` & `acl`
// getBucket, err := s3.GetBucketV2(ctx, "get-bucketv2"+testIdent, bucket.ID(), &s3.BucketV2State{}, pulumi.Provider(p), pulumi.IgnoreChanges([]string{"forceDestroy", "acl"}))
// if err != nil {
// return err
Expand Down
3 changes: 2 additions & 1 deletion examples/tags-combinations-go/step1/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ func main() {
return err
}

// refresh doesn't work for `forceDelete` & `acl` uncomment when fixed
// TODO: uncomment when https://github.com/pulumi/pulumi-aws/issues/4258 is fixed
// refresh doesn't work for `forceDelete` & `acl`
// getBucket, err := s3.GetBucketV2(ctx, "get-bucketv2"+testIdent, bucket.ID(), &s3.BucketV2State{}, pulumi.Provider(p))
// if err != nil {
// return err
Expand Down
2 changes: 1 addition & 1 deletion provider/provider_yaml_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ func TestAccDefaultTags(t *testing.T) {
})
bucketName := outputs["id"].Value.(string)
tags := getBucketTagging(context.Background(), bucketName)
assert.Subset(t, tags, []types.Tag{
assert.Equal(t, tags, []types.Tag{
{
Key: pulumi.StringRef("LocalTag"),
Value: pulumi.StringRef("foo"),
Expand Down
Loading