-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix defaultTags to trigger downstream updates
The `defaultTags` input property on providers now triggers an update on downstream resources. Because of the nature of the fix in the Pulumi TF Bridge, and to limit the scope of the change, we mark only the `tags_all` field from TF schema as a `ComputedInput`, triggering new diff behavior within the bridge. As the `tags_all` field is otherwise hidden as a "computed" value, we omit detailed diff information. This is a tradeoff to avoid a more invasive change with more risk. Fixes #1655. Example output: ``` pulumi up --skip-preview Updating (test-aws-1655) View in Browser (Ctrl+O): https://app.pulumi.com/pulumi/simple-yaml/test-aws-1655/updates/9 Type Name Status Info pulumi:pulumi:Stack simple-yaml-test-aws-1655 ~ ├─ pulumi:providers:aws aws-provider updated (0.13s) [diff: ~defaultTags] ~ ├─ aws:s3:Bucket my-bucket updated (0.87s) ~ └─ aws:s3:BucketObject index.html updated (0.24s) ``` Verified when adding, updating, deleting, and removing entirely the `defaultTags` property.
- Loading branch information
1 parent
93ecd56
commit 8a97a53
Showing
10 changed files
with
2,067 additions
and
358 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: test-aws-1655 | ||
runtime: yaml | ||
description: A minimal Pulumi YAML program | ||
resources: | ||
aws-provider: | ||
type: pulumi:providers:aws | ||
# properties: | ||
# defaultTags: {} | ||
defaultProvider: true | ||
my-bucket: | ||
type: aws:s3:Bucket | ||
outputs: | ||
bucketTags: ${my-bucket.tagsAll} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: test-aws-1655 | ||
runtime: yaml | ||
description: A minimal Pulumi YAML program | ||
resources: | ||
aws-provider: | ||
type: pulumi:providers:aws | ||
properties: | ||
defaultTags: | ||
tags: | ||
foo: bar | ||
defaultProvider: true | ||
my-bucket: | ||
type: aws:s3:Bucket | ||
outputs: | ||
bucketTags: ${my-bucket.tagsAll} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: test-aws-1655 | ||
runtime: yaml | ||
description: A minimal Pulumi YAML program | ||
resources: | ||
aws-provider: | ||
type: pulumi:providers:aws | ||
properties: | ||
defaultTags: | ||
tags: | ||
foo: quux | ||
defaultProvider: true | ||
my-bucket: | ||
type: aws:s3:Bucket | ||
outputs: | ||
bucketTags: ${my-bucket.tagsAll} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: test-aws-1655 | ||
runtime: yaml | ||
description: A minimal Pulumi YAML program | ||
resources: | ||
aws-provider: | ||
type: pulumi:providers:aws | ||
properties: | ||
defaultTags: | ||
tags: | ||
foo: quux | ||
thwomp: pow | ||
defaultProvider: true | ||
my-bucket: | ||
type: aws:s3:Bucket | ||
outputs: | ||
bucketTags: ${my-bucket.tagsAll} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: test-aws-1655 | ||
runtime: yaml | ||
description: A minimal Pulumi YAML program | ||
resources: | ||
aws-provider: | ||
type: pulumi:providers:aws | ||
properties: | ||
defaultTags: | ||
tags: {} | ||
defaultProvider: true | ||
my-bucket: | ||
type: aws:s3:Bucket | ||
outputs: | ||
bucketTags: ${my-bucket.tagsAll} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: test-aws-1655 | ||
runtime: yaml | ||
description: A minimal Pulumi YAML program | ||
resources: | ||
aws-provider: | ||
type: pulumi:providers:aws | ||
defaultProvider: true | ||
my-bucket: | ||
type: aws:s3:Bucket | ||
outputs: | ||
bucketTags: ${my-bucket.tagsAll} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.