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

Enable PlanResourceChange #4419

Merged
merged 17 commits into from
Sep 3, 2024
Merged

Enable PlanResourceChange #4419

merged 17 commits into from
Sep 3, 2024

Conversation

t0yv0
Copy link
Member

@t0yv0 t0yv0 commented Aug 28, 2024

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.

Copy link

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

Maintainer note: consult the runbook for dealing with any breaking changes.

t0yv0 and others added 7 commits August 28, 2024 14:16
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)
Copy link
Member Author

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")
Copy link
Member Author

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")
Copy link
Member Author

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.

@@ -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]]
Copy link
Member Author

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
Copy link
Member Author

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": {
Copy link
Member Author

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

@t0yv0
Copy link
Member Author

t0yv0 commented Aug 29, 2024

@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) {
Copy link
Member Author

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)
Copy link
Member Author

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.

@t0yv0 t0yv0 marked this pull request as ready for review August 29, 2024 19:32
Copy link
Contributor

@VenelinMartinov VenelinMartinov left a comment

Choose a reason for hiding this comment

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

🚢

@t0yv0 t0yv0 merged commit 3ff4fa4 into master Sep 3, 2024
30 checks passed
@t0yv0 t0yv0 deleted the t0yv0/prc branch September 3, 2024 14:04
@pulumi-bot
Copy link
Contributor

This PR has been shipped in release v6.51.0.

lumiere-bot bot referenced this pull request in coolguy1771/home-ops Sep 8, 2024
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 (@&#8203;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
[@&#8203;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
[@&#8203;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
[@&#8203;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
[@&#8203;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
[@&#8203;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
[@&#8203;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
[@&#8203;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
[@&#8203;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
[@&#8203;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
[@&#8203;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 [@&#8203;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
[@&#8203;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
[@&#8203;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
[@&#8203;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>
lumiere-bot bot referenced this pull request in coolguy1771/home-ops Sep 8, 2024
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 (@&#8203;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
[@&#8203;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
[@&#8203;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
[@&#8203;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
[@&#8203;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
[@&#8203;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
[@&#8203;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
[@&#8203;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
[@&#8203;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
[@&#8203;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
[@&#8203;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 [@&#8203;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
[@&#8203;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
[@&#8203;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
[@&#8203;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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants