test(tfacc): wire EC2 NAT/peering/DHCP-assoc/flow-log + fix peering-options & flow-log fidelity#1946
Merged
Merged
Conversation
…ptions & flow-log fidelity - New ec2-vpc2 shard covering VPCNATGateway, VPCPeeringConnection, VPCPeeringConnectionOptions, VPCDHCPOptionsAssociation, VPCFlowLog (_basic), split out of the core ec2 shard. Adds the matching ec2_vpc2_acceptance test; CI matrix picks it up automatically via the tfacc_shards bin. - EC2 peering: emit <peeringOptions> (allowDnsResolutionFromRemoteVpc plus the two classic-link egress flags) inside requester/accepter vpcInfo so DescribeVpcPeeringConnections round-trips ModifyVpcPeeringConnectionOptions. The provider previously nil-dereferenced on the missing PeeringOptions struct. - EC2 flow logs: persist and return deliverLogsPermissionArn (iam_role_arn) and maxAggregationInterval (AWS default 600) on Create/DescribeFlowLogs.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
First batch of the EC2 acceptance-tree expansion for
fakecloud-tfacc. The singleec2shard previously ran only EIP/KeyPair + core VPC_basicfamilies; this wires the next tranche of VPC control-plane resources (all already implemented infakecloud-ec2, just untested against the upstream suite) and fixes the two fidelity gaps they surfaced.New
ec2-vpc2shard (split out ofec2to keep that job's wall time down and isolate the newer families), covering_basicfor:VPCNATGatewayVPCPeeringConnectionVPCPeeringConnectionOptionsVPCDHCPOptionsAssociationVPCFlowLogFidelity fixes the new tests forced:
DescribeVpcPeeringConnections/ Create / Accept now emit<peeringOptions>(allowDnsResolutionFromRemoteVpcplus the two classic-link egress flags) inside bothrequesterVpcInfoandaccepterVpcInfo. The accepter side appears once the connection isactive. Previously the options set viaModifyVpcPeeringConnectionOptionswere persisted but never surfaced on read, so the Terraform provider nil-dereferenced on the missingPeeringOptionsstruct (server-visible as a provider panic).CreateFlowLogsnow reads and persistsDeliverLogsPermissionArnandMaxAggregationInterval(AWS default 600), andDescribeFlowLogsreturns<deliverLogsPermissionArn>+<maxAggregationInterval>. The provider assertsiam_role_arnandmax_aggregation_intervalround-trip.The CI fan-out is auto-generated from
SHARDSvia thetfacc_shardsbin, so the new shard is picked up automatically; the matchingec2_vpc2_acceptancetest was added totests/acc.rs. No hardcoded shard count to update.Test plan
VPCNATGateway_basicPASSVPCPeeringConnection_basicPASSVPCPeeringConnectionOptions_basicPASS (was a provider nil-panic)VPCDHCPOptionsAssociation_basicPASSVPCFlowLog_basicPASS (was failing on missingiam_role_arn/max_aggregation_interval)cargo test -p fakecloud-ec2— 54 passedcargo clippy -p fakecloud-ec2 -p fakecloud-tfacc --all-targets -- -D warningsclean;cargo fmtapplied.Surface check
FlowLogstruct gained two fields with#[serde(default)](+ a600default fn), so persisted snapshots from older versions deserialize fine.docs/about/conformance.mdis unchanged:ec2is already listed; this batch deepens resource coverage within that service rather than adding a service. (Note: that page's "27 services today" line is stale from earlier batches independent of this change.)Follow-on batches
EIP association (needs instance launch +
DescribeInstanceTypeOfferings, Docker), VPC endpoints / managed prefix lists / customer & VPN gateways (a provider panic aborts that group — needs its own investigation), then RDS and Lambda trees.Summary by cubic
Adds an
ec2-vpc2acceptance shard tofakecloud-tfaccfor more EC2 VPC resources, and fixes EC2 peering options and flow log fields to match AWS so provider reads don’t crash and values round-trip.New Features
ec2-vpc2shard covering_basic:VPCNATGateway,VPCPeeringConnection,VPCPeeringConnectionOptions,VPCDHCPOptionsAssociation,VPCFlowLog.ec2_vpc2_acceptancetest; CI picks it up automatically viatfacc_shards.Bug Fixes
DescribeVpcPeeringConnectionsnow includes<peeringOptions>in bothrequesterVpcInfoandaccepterVpcInfo(after active), matchingModifyVpcPeeringConnectionOptionsand preventing a nil deref.CreateFlowLogs/DescribeFlowLogsnow persist and returndeliverLogsPermissionArnandmaxAggregationInterval(defaults to 600).Written for commit 4d328be. Summary will update on new commits.