-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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
Migrate ec2
resources to AWS SDK V2
#37568
base: main
Are you sure you want to change the base?
Conversation
Community NoteVoting for Prioritization
For Submitters
|
ec2
resources to AWS SDK V2ec2
resources to AWS SDK V2
The PR is as good as done, there are 2 tests I'd like a maintainer to take a look at. They are both connected to each other and were used as a regression test for a scenario where it was possible that an instance had a To make sure the resource caught it we had two tests,
Thanks for any help/advice when reviewing. |
ec2
resources to AWS SDK V2ec2
resources to AWS SDK V2
# Conflicts: # internal/service/ec2/exports_test.go # internal/service/ec2/find.go # internal/service/ec2/findv2.go # internal/service/ec2/status.go # internal/service/ec2/statusv2.go # internal/service/ec2/wait.go # internal/service/ec2/waitv2.go
Description
This PR migrates the EC2 resources, the PR is scoped to the resources listed in: #36147
Alongside of the migration the acceptance tests mentioned in #35747 will be reviewed.
The following tests are fixed mentioned in the PR above:
TestAccEC2AMIDataSource_localNameFilter
TestAccEC2AMIDataSource_natInstance
-> migrated toTestAccEC2AMIDataSource_linuxInstance
to test Amazon Linux AMIsTestAccEC2AMIDataSource_windowsInstance
TestAccEC2AMIIDsDataSource_basic
TestAccEC2AMIIDsDataSource_sorted
TestAccEC2AMILaunchPermission_group
TestAccEC2Fleet_TargetCapacitySpecification_targetCapacityUnitType
TestAccEC2Fleet_TargetCapacitySpecification_totalTargetCapacity
TestAccEC2LaunchTemplate_instanceRequirements_acceleratorCount
TestAccEC2LaunchTemplate_instanceRequirements_acceleratorManufacturers
TestAccEC2LaunchTemplate_instanceRequirements_acceleratorNames
TestAccEC2LaunchTemplate_instanceRequirements_acceleratorTotalMemoryMiB
TestAccEC2LaunchTemplate_instanceRequirements_acceleratorTypes
TestAccEC2LaunchTemplate_instanceRequirements_allowedInstanceTypes
TestAccEC2LaunchTemplate_instanceRequirements_bareMetal
TestAccEC2LaunchTemplate_instanceRequirements_baselineEBSBandwidthMbps
TestAccEC2LaunchTemplate_instanceRequirements_burstablePerformance
TestAccEC2LaunchTemplate_instanceRequirements_cpuManufacturers
TestAccEC2LaunchTemplate_instanceRequirements_excludedInstanceTypes
TestAccEC2LaunchTemplate_instanceRequirements_instanceGenerations
TestAccEC2LaunchTemplate_instanceRequirements_localStorageTypes
TestAccEC2LaunchTemplate_instanceRequirements_localStorage
TestAccEC2LaunchTemplate_instanceRequirements_memoryGiBPerVCPU
TestAccEC2LaunchTemplate_instanceRequirements_memoryMiBAndVCPUCount
TestAccEC2LaunchTemplate_instanceRequirements_networkBandwidthGbps
TestAccEC2LaunchTemplate_instanceRequirements_networkInterfaceCount
TestAccEC2LaunchTemplate_instanceRequirements_onDemandMaxPricePercentageOverLowestPrice
TestAccEC2LaunchTemplate_instanceRequirements_requireHibernateSupport
TestAccEC2LaunchTemplate_instanceRequirements_spotMaxPricePercentageOverLowestPrice
TestAccEC2LaunchTemplate_instanceRequirements_totalLocalStorageGB
TestAccEC2SpotDatafeedSubscription_serial
TestAccEC2SpotFleetRequest_diversifiedAllocation
TestAccEC2SpotInstanceRequest_interruptHibernate
TestAccEC2SpotInstanceRequest_interruptUpdate
TestAccEC2SpotInstanceRequest_withBlockDuration
- requires: [Enhancement]: deprecateblock_duration_minutes
fromaws_spot_instance_request
resource #37613TestAccEC2SpotInstanceRequest_vpc
- is more difficult to fix and requires it's own PR, it fails in the tests below but that has nothing to do with the SDKv2 migration. It fails because it cannot find an attachednetwork_interface
and asubnet_id
.This is because the underlying schema that the resource uses is from
ec2_instance
where you cannot set anetwork_interface
and asubnet_id
at the same time. This behaviour is consistent for this resource however several arguments within thenetwork_interface
differ and cannot be set here. Even if you override part of that schema theDescribeSpotInstance
request does not return both values, therefore you need to add an additional look-up on the instance itself.But because the schema is heavily tied to
ec2_instance
this goes far outside of the scope of this PR.Relations
Closes #36147
Relates #35747
Relates #37589
References
Output from Acceptance Testing