-
Notifications
You must be signed in to change notification settings - Fork 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
Open
DanielRieske
wants to merge
130
commits into
hashicorp:main
Choose a base branch
from
DanielRieske:f/migrate-ec2-sdkv2
base: main
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
Community NoteVoting for Prioritization
For Submitters
|
github-actions
bot
added
size/XL
Managed by automation to categorize the size of a PR.
tests
PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
service/ec2
Issues and PRs that pertain to the ec2 service.
labels
May 16, 2024
terraform-aws-provider
bot
added
needs-triage
Waiting for first response or review from a maintainer.
external-maintainer
Contribution from a trusted external contributor.
labels
May 16, 2024
DanielRieske
changed the title
Migrate
[WIP] Migrate May 16, 2024
ec2
resources to AWS SDK V2ec2
resources to AWS SDK V2
justinretzolk
added
aws-sdk-go-migration
Issues that are related to the providers migration to AWS SDK for Go v2.
and removed
needs-triage
Waiting for first response or review from a maintainer.
labels
May 16, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
aws-sdk-go-migration
Issues that are related to the providers migration to AWS SDK for Go v2.
external-maintainer
Contribution from a trusted external contributor.
generators
Relates to code generators.
prioritized
Part of the maintainer teams immediate focus. To be addressed within the current quarter.
service/autoscaling
Issues and PRs that pertain to the autoscaling service.
service/ec2ebs
Issues and PRs that pertain to the ec2ebs service.
service/ec2
Issues and PRs that pertain to the ec2 service.
service/wavelength
Issues and PRs that pertain to the wavelength service.
size/XL
Managed by automation to categorize the size of a PR.
sweeper
Pertains to changes to or issues with the sweeper.
tests
PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
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.
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