Skip to content

fix: Fix aws_route timeouts-only update fix from upstream PR #47413 - #6547

Merged
corymhall merged 6 commits into
masterfrom
patch/vpc-route-timeouts-only-update
Jul 22, 2026
Merged

fix: Fix aws_route timeouts-only update fix from upstream PR #47413#6547
corymhall merged 6 commits into
masterfrom
patch/vpc-route-timeouts-only-update

Conversation

@pierskarsenbarg

@pierskarsenbarg pierskarsenbarg commented Jul 17, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds patch 0028 backporting resource/aws_route: Fix update failure when only timeouts change hashicorp/terraform-provider-aws#47413, fixing aws_route update failures with "route target attribute not specified" when only the timeouts block changes (or when a provider upgrade produces a timeouts-only diff).
  • Adds an early return in resourceRouteUpdate when no route target attributes have changed, avoiding an unnecessary/erroring API call.
  • Includes the upstream acceptance test TestAccVPCRoute_timeoutsOnlyChange and its supporting config helper.

Test plan

  • Run ./scripts/upstream.sh init -f and confirm the patch applies cleanly
  • Run acceptance tests for TestAccVPCRoute_timeoutsOnlyChange / TestAccVPCRoute_basic in internal/service/ec2

Fixed: #6549

@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

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.

@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 15.83%. Comparing base (43c118b) to head (caa35c3).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6547   +/-   ##
=======================================
  Coverage   15.83%   15.83%           
=======================================
  Files         376      376           
  Lines       91842    91842           
=======================================
  Hits        14544    14544           
  Misses      77276    77276           
  Partials       22       22           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@guineveresaenger

Copy link
Copy Markdown
Contributor

Thank you for this pull request @pierskarsenbarg. I have a few preliminary questions:

  1. Why are we "backporting" an upstream PR? It looks like there was some back and forth - can you give us some context?
  2. Please review the patch policy guidelines to see if a patch is really the best way to resolve this issue. If it is in fact necessary, please file an additional tracking issue so that we can trace the reasoning and remove it when the underlying issue is resolved.

Thanks again!

@pierskarsenbarg pierskarsenbarg changed the title feat: backport aws_route timeouts-only update fix from upstream PR #47413 feat: Fix aws_route timeouts-only update fix from upstream PR #47413 Jul 21, 2026
@pierskarsenbarg

pierskarsenbarg commented Jul 21, 2026

Copy link
Copy Markdown
Member Author

@guineveresaenger

  1. "Backport" shouldn't be in the issue title - it's not backporting at all.
  2. Do you need another issue other than aws_route (aws:ec2/route:Route) update fails with "route target attribute not specified" when only timeouts changes #6549 ?

@corymhall corymhall left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for putting this together. The patch itself looks pretty low-risk because it does not introduce any schema or public API changes, and it matches the proposed upstream fix.

Before merging we should add some more tests:

  1. Run the new upstream acceptance test in CI. The EC2 job in .github/workflows/aws-upstream-tests.yml currently runs only TestAccEC2KeyPair_publicKey, so TestAccVPCRoute_timeoutsOnlyChange was not exercised despite the EC2 job passing. Add the new Route test to the EC2 test expression, ideally alongside TestAccVPCRoute_basic.
  2. Add a Pulumi-side regression test. We need an example that creates an aws:ec2:Route, changes only its customTimeouts, performs an actual pulumi up, and verifies that the update succeeds without replacing the Route. The test should fail without the patch and pass with it.

Once those are covered, I think this is a reasonable patch to carry. The risk of permanent API divergence is low because it changes only internal update behavior, although upstream may still choose a somewhat different implementation since hashicorp/terraform-provider-aws#47413 has not yet been reviewed or merged.

@pierskarsenbarg pierskarsenbarg changed the title feat: Fix aws_route timeouts-only update fix from upstream PR #47413 fix: Fix aws_route timeouts-only update fix from upstream PR #47413 Jul 21, 2026
…7413

Adds a new patch that backports hashicorp/terraform-provider-aws#47413, which fixes aws_route failing with "route target attribute not specified" when only the timeouts block changes, by adding an early return in resourceRouteUpdate when no route target attributes have changed.
…date

Adds examples/test-programs/regress-6549, a minimal VPC/InternetGateway/RouteTable/Route
program plus a step1 variant that only adds customTimeouts, and TestRegress6549 which
deploys the base program, updates in place, and asserts the change summary shows an
in-place update with no replacement (#6549).
@pierskarsenbarg
pierskarsenbarg force-pushed the patch/vpc-route-timeouts-only-update branch from 0d00733 to caa35c3 Compare July 21, 2026 13:02
…>v7 transition

The regression test previously ran both pulumi up calls against the locally-built (already patched) provider, so it never exercised state created by an unpatched v6 provider and could pass without the fix. Switch to testProviderUpgrade, which deploys the base program against a downloaded, unpatched v6 provider and only links the locally-built provider for the post-UpdateSource update, matching the pattern used by TestJobQueueUpgrade and TestBucketToBucketUpgradeTs.
The default envRegion:true option sets aws:region to a deliberately invalid canary value, expecting the provider to fall back to aws:envRegion instead. Combined with NewSourcePath (multi-step UpdateSource tests), this canary leaked through and was used verbatim for the baseline (v6.78.0) deploy's STS call, causing AWS credential validation to fail via DNS lookup on "sts.INVALID_REGION.amazonaws.com". TestJobQueueUpgrade and TestBucketToBucketUpgradeTs, the only other NewSourcePath-based tests, already disable setEnvRegion for the same reason.
…ress6549

The v6->v7 provider upgrade introduces incidental diffs on unrelated resources (vpc, internet gateway, route table), not just the Route whose customTimeouts changed, so the previously hard-coded ResourceChanges map no longer matches. Use assertup.HasNoReplacements plus a simple check that an update occurred, since what this regression test actually needs to verify is that the update succeeds without replacing the Route, not the exact per-resource-type counts.
@pierskarsenbarg

Copy link
Copy Markdown
Member Author

@corymhall I've added in the tests you suggested.

@corymhall
corymhall merged commit c6d74fc into master Jul 22, 2026
34 checks passed
@corymhall
corymhall deleted the patch/vpc-route-timeouts-only-update branch July 22, 2026 14:19
@pulumi-bot

Copy link
Copy Markdown
Contributor

This PR has been shipped in release v7.39.0.

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.

aws_route (aws:ec2/route:Route) update fails with "route target attribute not specified" when only timeouts changes

4 participants