Skip to content

fix(ec2): persist VpnConnection StaticRoutesOnly and VpnGateway AmazonSideAsn/AvailabilityZone - #2462

Merged
vieiralucas merged 1 commit into
mainfrom
worktree-ec2-writeread-r2b
Jul 29, 2026
Merged

fix(ec2): persist VpnConnection StaticRoutesOnly and VpnGateway AmazonSideAsn/AvailabilityZone#2462
vieiralucas merged 1 commit into
mainfrom
worktree-ec2-writeread-r2b

Conversation

@vieiralucas

@vieiralucas vieiralucas commented Jul 29, 2026

Copy link
Copy Markdown
Member

Summary

Cycle-8 bug-hunt EC2 write-read-loss round 2 (part 2):

  • E2-4CreateVpnConnection dropped Options.StaticRoutesOnly; vpn_conn_xml hardcoded <staticRoutesOnly>false</staticRoutesOnly>. Added the field + parse + render. aws_vpn_connection (ForceNew) with static_routes_only = true now converges.
  • E2-5CreateVpnGateway dropped AmazonSideAsn (hardcoded 64512 in the render) and AvailabilityZone (never emitted). Added both fields + parse + render (AZ only when set). aws_vpn_gateway (ForceNew) round-trips a custom ASN/AZ.

New state fields are #[serde(default)] so existing snapshots load.

Remaining EC2 round-2 (documented in the cycle-8 report): RequestSpotInstances options+launch spec (E2-2, HIGH) and GetLaunchTemplateData derive-from-instance (E2-6).

Test plan

  • New: VpnConnection static-routes-only + VpnGateway asn/az round-trip.
  • cargo nextest run -p fakecloud-ec2: 213 passed.
  • clippy --all-targets -D warnings + fmt clean.
  • No new API surface → no SDK/doc change.

Summary by cubic

Fixes EC2 VPN write-read drift by persisting StaticRoutesOnly on VPN connections and AmazonSideAsn/AvailabilityZone on VPN gateways. Describe responses now reflect requested values, avoiding Terraform drift on non-defaults.

  • Bug Fixes
    • CreateVpnConnection: parse and store Options.StaticRoutesOnly; render in DescribeVpnConnections.
    • CreateVpnGateway: parse and store AmazonSideAsn and AvailabilityZone; render in DescribeVpnGateways (AZ only when set).
    • Added state fields with serde defaults to keep existing snapshots loading.
    • New round-trip tests for both resources; no API surface changes.

Written for commit e4daccd. Summary will update on new commits.

Review in cubic

…nSideAsn/AvailabilityZone

Cycle-8 bug-hunt EC2 write-read-loss round 2 (part 2):

E2-4 - CreateVpnConnection dropped Options.StaticRoutesOnly; vpn_conn_xml
hardcoded <staticRoutesOnly>false</staticRoutesOnly>. Added the field, parse
Options.StaticRoutesOnly, render it. aws_vpn_connection (ForceNew) with
static_routes_only=true now converges.

E2-5 - CreateVpnGateway dropped AmazonSideAsn (hardcoded 64512 in the render) and
AvailabilityZone (never emitted). Added both fields, parse + render (AZ only when
set). aws_vpn_gateway (ForceNew) round-trips a custom ASN/AZ.

New state fields are #[serde(default)] so existing snapshots load. Remaining EC2
round-2 (documented in the cycle-8 report): RequestSpotInstances options+launch
spec (E2-2, HIGH) and GetLaunchTemplateData derive-from-instance (E2-6). No new
API surface -> no SDK/doc change. Tests: VpnConnection static-routes-only +
VpnGateway asn/az round-trip.
@vieiralucas
vieiralucas requested a review from Copilot July 29, 2026 04:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@vieiralucas
vieiralucas merged commit c76ef1b into main Jul 29, 2026
256 of 257 checks passed
@vieiralucas
vieiralucas deleted the worktree-ec2-writeread-r2b branch July 29, 2026 07:06
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.

2 participants