-
Notifications
You must be signed in to change notification settings - Fork 162
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
Enable PlanResourceChange #4419
Conversation
Does the PR have any schema changes?Looking good! No breaking changes found. Maintainer note: consult the runbook for dealing with any breaking changes. |
The eks:Cluster resource has received a new parameter with ForceNew and a default. When upgrading from an old version before the parameter was added this triggers a replace. This PR adds a workaround for that - when the state is read the `bootstrapSelfManagedAddons` parameter is added with its default value if not present. covered by `TestEKSClusterUpgrade` partially fixes #4410 stacked on #4403
@@ -371,13 +371,13 @@ resources: | |||
}) | |||
|
|||
res := pulumiTest.Preview() | |||
fmt.Printf("stdout: %s \n", res.StdOut) | |||
fmt.Printf("stderr: %s \n", res.StdErr) | |||
t.Logf("stdout: %s \n", res.StdOut) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated, but it helps to see the log messages in CI under the right sub-test.
d.Set("arn", arn) | ||
|
||
+ // Set ACL default if unset, this fixes resource import option operation under Pulumi. | ||
+ _, gotGrant := d.GetOk("grant") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixing import option for Legacy Bucket. Read now applies defaults.
} | ||
} | ||
]` | ||
|
||
t.Run("case1", func(t *testing.T) { replay(t, case1) }) | ||
t.Run("case2", func(t *testing.T) { replay(t, case2) }) | ||
t.Setenv("PULUMI_ENABLE_PLAN_RESOURCE_CHANGE", "true") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing cases not relevant anymore.
examples/examples_yaml_test.go
Outdated
@@ -377,12 +377,12 @@ outputs: | |||
// This replicates the diff when running `pulumi preview` on a aws.rds.Instance with | |||
// pulumi-aws v6.0.0 and state from pulumi-aws 5.42.0. | |||
// | |||
// The first test ensures we don't regress on https://github.com/pulumi/pulumi-aws/issues/2682 | |||
// The first test ensures we don't regress on [[https://github.com/pulumi/pulumi-aws/issues/2682][pulumi/pulumi-aws#2682: RDS Instance replacement when upgrading to 6.0]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accidental change, let me revert.
return false | ||
} | ||
shimv2.WithPlanResourceChange(func(string) bool { | ||
return true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Piece de resistance
@@ -1,12 +1,12 @@ | |||
{ | |||
"manifest": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This got re-recorded. I think unnecessarily but including for now
@VenelinMartinov since eks Cluster is fixed via a special case, I'm deferring the EnableZeroDefaultSchemaVersion rollout for later. I can go either way here, but my preference is to take one change at a time. |
@@ -548,7 +548,7 @@ type tagsTestStep struct { | |||
|
|||
// TestAccDefaultTags tries to test all the scenarios that might affect provider defaultTags / resource tags | |||
// i.e. up, refresh, preview, import, etc | |||
func TestAccDefaultTags(t *testing.T) { | |||
func TestAccDefaultTagsWithImport(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is another test called TestAccDefaultTags in the repo and I was getting confused.
+ | ||
+ // Similarly, set force_destroy to default value if unset, to fix resource import operation. | ||
+ if _, fdSet := d.GetOk("force_destroy"); !fdSet { | ||
+ d.Set("force_destroy", false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Appreciate eyes on this one; other scenarios this affects are refresh, import proper (not through resource option), and Bucket.get. I think it should be safe but can dig deeper if there are concerns.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢
This PR has been shipped in release v6.51.0. |
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [@pulumi/aws](https://pulumi.io) ([source](https://redirect.github.com/pulumi/pulumi-aws)) | dependencies | minor | [`6.50.1` -> `6.51.0`](https://renovatebot.com/diffs/npm/@pulumi%2faws/6.50.1/6.51.0) | --- ### Release Notes <details> <summary>pulumi/pulumi-aws (@​pulumi/aws)</summary> ### [`v6.51.0`](https://redirect.github.com/pulumi/pulumi-aws/releases/tag/v6.51.0) [Compare Source](https://redirect.github.com/pulumi/pulumi-aws/compare/v6.50.1...v6.51.0) ##### Does the PR have any schema changes? Found 1 breaking change: ##### Resources - `🟢` "aws:drs/replicationConfigurationTemplate:ReplicationConfigurationTemplate": required inputs: "stagingAreaTags" input has changed to Required ##### New resources: - `glue/catalogTableOptimizer.CatalogTableOptimizer` ##### New functions: - `shield/getProtection.getProtection` ##### What's Changed - Enhance docs for resources that depend on Lambda ENIs by [@​flostadler](https://redirect.github.com/flostadler) in [https://github.com/pulumi/pulumi-aws/pull/4392](https://redirect.github.com/pulumi/pulumi-aws/pull/4392) - Start running upstream tests for waf and sqs by [@​t0yv0](https://redirect.github.com/t0yv0) in [https://github.com/pulumi/pulumi-aws/pull/4384](https://redirect.github.com/pulumi/pulumi-aws/pull/4384) - Upgrade upstream to v5.64.0 by [@​flostadler](https://redirect.github.com/flostadler) in [https://github.com/pulumi/pulumi-aws/pull/4395](https://redirect.github.com/pulumi/pulumi-aws/pull/4395) - Add example for deploying an application from the serverless app repository by [@​flostadler](https://redirect.github.com/flostadler) in [https://github.com/pulumi/pulumi-aws/pull/4396](https://redirect.github.com/pulumi/pulumi-aws/pull/4396) - Update region list by [@​corymhall](https://redirect.github.com/corymhall) in [https://github.com/pulumi/pulumi-aws/pull/4404](https://redirect.github.com/pulumi/pulumi-aws/pull/4404) - Move GRPC tests to yaml by [@​VenelinMartinov](https://redirect.github.com/VenelinMartinov) in [https://github.com/pulumi/pulumi-aws/pull/4409](https://redirect.github.com/pulumi/pulumi-aws/pull/4409) - Update GitHub Actions workflows. by [@​pulumi-bot](https://redirect.github.com/pulumi-bot) in [https://github.com/pulumi/pulumi-aws/pull/4420](https://redirect.github.com/pulumi/pulumi-aws/pull/4420) - Rename the custom workflow to avoid deletion by ci-mgmt PRs by [@​t0yv0](https://redirect.github.com/t0yv0) in [https://github.com/pulumi/pulumi-aws/pull/4418](https://redirect.github.com/pulumi/pulumi-aws/pull/4418) - Update GitHub Actions workflows. by [@​pulumi-bot](https://redirect.github.com/pulumi-bot) in [https://github.com/pulumi/pulumi-aws/pull/4423](https://redirect.github.com/pulumi/pulumi-aws/pull/4423) - Enable PlanResourceChange by [@​t0yv0](https://redirect.github.com/t0yv0) in [https://github.com/pulumi/pulumi-aws/pull/4419](https://redirect.github.com/pulumi/pulumi-aws/pull/4419) - Upstream 5.65.0 by [@​t0yv0](https://redirect.github.com/t0yv0) in [https://github.com/pulumi/pulumi-aws/pull/4425](https://redirect.github.com/pulumi/pulumi-aws/pull/4425) - Update GitHub Actions workflows. by [@​pulumi-bot](https://redirect.github.com/pulumi-bot) in [https://github.com/pulumi/pulumi-aws/pull/4434](https://redirect.github.com/pulumi/pulumi-aws/pull/4434) - Update GitHub Actions workflows. by [@​pulumi-bot](https://redirect.github.com/pulumi-bot) in [https://github.com/pulumi/pulumi-aws/pull/4436](https://redirect.github.com/pulumi/pulumi-aws/pull/4436) - Upgrade pulumi-terraform-bridge to v3.90.0 by [@​pulumi-bot](https://redirect.github.com/pulumi-bot) in [https://github.com/pulumi/pulumi-aws/pull/4439](https://redirect.github.com/pulumi/pulumi-aws/pull/4439) **Full Changelog**: pulumi/pulumi-aws@v6.50.1...v6.51.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://redirect.github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC43MS4wIiwidXBkYXRlZEluVmVyIjoiMzguNzEuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsidHlwZS9taW5vciJdfQ==--> Co-authored-by: lumiere-bot[bot] <98047013+lumiere-bot[bot]@users.noreply.github.com>
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [@pulumi/aws](https://pulumi.io) ([source](https://redirect.github.com/pulumi/pulumi-aws)) | dependencies | minor | [`6.50.1` -> `6.51.0`](https://renovatebot.com/diffs/npm/@pulumi%2faws/6.50.1/6.51.0) | --- ### Release Notes <details> <summary>pulumi/pulumi-aws (@​pulumi/aws)</summary> ### [`v6.51.0`](https://redirect.github.com/pulumi/pulumi-aws/releases/tag/v6.51.0) [Compare Source](https://redirect.github.com/pulumi/pulumi-aws/compare/v6.50.1...v6.51.0) ##### Does the PR have any schema changes? Found 1 breaking change: ##### Resources - `🟢` "aws:drs/replicationConfigurationTemplate:ReplicationConfigurationTemplate": required inputs: "stagingAreaTags" input has changed to Required ##### New resources: - `glue/catalogTableOptimizer.CatalogTableOptimizer` ##### New functions: - `shield/getProtection.getProtection` ##### What's Changed - Enhance docs for resources that depend on Lambda ENIs by [@​flostadler](https://redirect.github.com/flostadler) in [https://github.com/pulumi/pulumi-aws/pull/4392](https://redirect.github.com/pulumi/pulumi-aws/pull/4392) - Start running upstream tests for waf and sqs by [@​t0yv0](https://redirect.github.com/t0yv0) in [https://github.com/pulumi/pulumi-aws/pull/4384](https://redirect.github.com/pulumi/pulumi-aws/pull/4384) - Upgrade upstream to v5.64.0 by [@​flostadler](https://redirect.github.com/flostadler) in [https://github.com/pulumi/pulumi-aws/pull/4395](https://redirect.github.com/pulumi/pulumi-aws/pull/4395) - Add example for deploying an application from the serverless app repository by [@​flostadler](https://redirect.github.com/flostadler) in [https://github.com/pulumi/pulumi-aws/pull/4396](https://redirect.github.com/pulumi/pulumi-aws/pull/4396) - Update region list by [@​corymhall](https://redirect.github.com/corymhall) in [https://github.com/pulumi/pulumi-aws/pull/4404](https://redirect.github.com/pulumi/pulumi-aws/pull/4404) - Move GRPC tests to yaml by [@​VenelinMartinov](https://redirect.github.com/VenelinMartinov) in [https://github.com/pulumi/pulumi-aws/pull/4409](https://redirect.github.com/pulumi/pulumi-aws/pull/4409) - Update GitHub Actions workflows. by [@​pulumi-bot](https://redirect.github.com/pulumi-bot) in [https://github.com/pulumi/pulumi-aws/pull/4420](https://redirect.github.com/pulumi/pulumi-aws/pull/4420) - Rename the custom workflow to avoid deletion by ci-mgmt PRs by [@​t0yv0](https://redirect.github.com/t0yv0) in [https://github.com/pulumi/pulumi-aws/pull/4418](https://redirect.github.com/pulumi/pulumi-aws/pull/4418) - Update GitHub Actions workflows. by [@​pulumi-bot](https://redirect.github.com/pulumi-bot) in [https://github.com/pulumi/pulumi-aws/pull/4423](https://redirect.github.com/pulumi/pulumi-aws/pull/4423) - Enable PlanResourceChange by [@​t0yv0](https://redirect.github.com/t0yv0) in [https://github.com/pulumi/pulumi-aws/pull/4419](https://redirect.github.com/pulumi/pulumi-aws/pull/4419) - Upstream 5.65.0 by [@​t0yv0](https://redirect.github.com/t0yv0) in [https://github.com/pulumi/pulumi-aws/pull/4425](https://redirect.github.com/pulumi/pulumi-aws/pull/4425) - Update GitHub Actions workflows. by [@​pulumi-bot](https://redirect.github.com/pulumi-bot) in [https://github.com/pulumi/pulumi-aws/pull/4434](https://redirect.github.com/pulumi/pulumi-aws/pull/4434) - Update GitHub Actions workflows. by [@​pulumi-bot](https://redirect.github.com/pulumi-bot) in [https://github.com/pulumi/pulumi-aws/pull/4436](https://redirect.github.com/pulumi/pulumi-aws/pull/4436) - Upgrade pulumi-terraform-bridge to v3.90.0 by [@​pulumi-bot](https://redirect.github.com/pulumi-bot) in [https://github.com/pulumi/pulumi-aws/pull/4439](https://redirect.github.com/pulumi/pulumi-aws/pull/4439) **Full Changelog**: pulumi/pulumi-aws@v6.50.1...v6.51.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://redirect.github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC43MS4wIiwidXBkYXRlZEluVmVyIjoiMzguNzEuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsidHlwZS9taW5vciJdfQ==--> Co-authored-by: lumiere-bot[bot] <98047013+lumiere-bot[bot]@users.noreply.github.com>
Enable PlanResourceChange by default for every resource in the provider. This pulumi-terraform-bridge feature was incubated under a flag and deployed selectively or quite some time. It should be ready to become the new default. Improvements include prevention of panics and undesirable plans such as permanent diff cycling, as the flow is brought more in line with how TF operates the provider e.g. the expected behavior.