Skip to content
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

Feat : EC2 manage spot options for instance tagging #31495

Merged

Conversation

sousmangoosta
Copy link
Contributor

@sousmangoosta sousmangoosta commented May 19, 2023

Description

This is a proposal for the problem exposed on #32.
To be able to tag instances on spot request, we can use the RunInstances API call instead of RequestSpotInstances that is now legacy for AWS.

Relations

Closes #32

References

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-best-practices.html#which-spot-request-method-to-use

Output from Acceptance Testing

$ AWS_DEFAULT_REGION=eu-west-1 AWS_PROFILE=default make testacc TESTS='TestAccEC2Instance_basicWithSpot' PKG=ec2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccEC2Instance_basicWithSpot'  -timeout 180m
=== RUN   TestAccEC2Instance_basicWithSpot
=== PAUSE TestAccEC2Instance_basicWithSpot
=== CONT  TestAccEC2Instance_basicWithSpot
--- PASS: TestAccEC2Instance_basicWithSpot (98.06s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ec2        98.275s
$

@github-actions
Copy link

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added service/ec2 Issues and PRs that pertain to the ec2 service. size/M Managed by automation to categorize the size of a PR. needs-triage Waiting for first response or review from a maintainer. and removed service/ec2 Issues and PRs that pertain to the ec2 service. labels May 19, 2023
@sousmangoosta sousmangoosta force-pushed the f-aws_ec2_instance-spot_option branch from f5b94ec to 20ebfb2 Compare May 19, 2023 16:09
@github-actions github-actions bot added service/ec2 Issues and PRs that pertain to the ec2 service. and removed service/ec2 Issues and PRs that pertain to the ec2 service. labels May 19, 2023
@sousmangoosta sousmangoosta force-pushed the f-aws_ec2_instance-spot_option branch from 20ebfb2 to 2be19e6 Compare May 19, 2023 16:14
@github-actions github-actions bot added the service/ec2 Issues and PRs that pertain to the ec2 service. label May 19, 2023
@sousmangoosta
Copy link
Contributor Author

@ewbankkit Any thought about this ? Worth it to continue on this side, or wait for sdk-v2 ?

@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label May 29, 2023
@ewbankkit
Copy link
Contributor

@sousmangoosta I would suggest continuing with this, especially in light of #30975, #31108.
Thanks.

@github-actions github-actions bot added size/L Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. and removed size/M Managed by automation to categorize the size of a PR. labels May 30, 2023
@sousmangoosta sousmangoosta force-pushed the f-aws_ec2_instance-spot_option branch 2 times, most recently from aac5095 to 7f9289b Compare May 30, 2023 15:31
@github-actions github-actions bot added the tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. label May 31, 2023
@sousmangoosta sousmangoosta force-pushed the f-aws_ec2_instance-spot_option branch from 5736b13 to fdcb031 Compare May 31, 2023 15:16
@sousmangoosta sousmangoosta force-pushed the f-aws_ec2_instance-spot_option branch from fdcb031 to 1f5c27f Compare June 1, 2023 07:14
@sousmangoosta sousmangoosta marked this pull request as ready for review June 1, 2023 07:46
Acceptance test output:

% make testacc TESTARGS='-run=TestAccEC2Instance_basic' PKG=ec2 ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 2  -run=TestAccEC2Instance_basic -timeout 180m
=== RUN   TestAccEC2Instance_basic
=== PAUSE TestAccEC2Instance_basic
=== RUN   TestAccEC2Instance_basicWithSpot
=== PAUSE TestAccEC2Instance_basicWithSpot
=== CONT  TestAccEC2Instance_basic
=== CONT  TestAccEC2Instance_basicWithSpot
--- PASS: TestAccEC2Instance_basic (68.05s)
--- PASS: TestAccEC2Instance_basicWithSpot (101.11s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ec2	106.588s
@github-actions github-actions bot added size/XL Managed by automation to categorize the size of a PR. and removed size/L Managed by automation to categorize the size of a PR. labels Jun 5, 2023
Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

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

LGTM 🚀.

% make testacc TESTARGS='-run=TestAccEC2SpotInstanceRequest_' PKG=ec2 ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 2  -run=TestAccEC2SpotInstanceRequest_ -timeout 180m
=== RUN   TestAccEC2SpotInstanceRequest_basic
=== PAUSE TestAccEC2SpotInstanceRequest_basic
=== RUN   TestAccEC2SpotInstanceRequest_disappears
=== PAUSE TestAccEC2SpotInstanceRequest_disappears
=== RUN   TestAccEC2SpotInstanceRequest_tags
=== PAUSE TestAccEC2SpotInstanceRequest_tags
=== RUN   TestAccEC2SpotInstanceRequest_keyName
=== PAUSE TestAccEC2SpotInstanceRequest_keyName
=== RUN   TestAccEC2SpotInstanceRequest_withLaunchGroup
=== PAUSE TestAccEC2SpotInstanceRequest_withLaunchGroup
=== RUN   TestAccEC2SpotInstanceRequest_withBlockDuration
=== PAUSE TestAccEC2SpotInstanceRequest_withBlockDuration
=== RUN   TestAccEC2SpotInstanceRequest_vpc
=== PAUSE TestAccEC2SpotInstanceRequest_vpc
=== RUN   TestAccEC2SpotInstanceRequest_validUntil
=== PAUSE TestAccEC2SpotInstanceRequest_validUntil
=== RUN   TestAccEC2SpotInstanceRequest_withoutSpotPrice
=== PAUSE TestAccEC2SpotInstanceRequest_withoutSpotPrice
=== RUN   TestAccEC2SpotInstanceRequest_subnetAndSGAndPublicIPAddress
=== PAUSE TestAccEC2SpotInstanceRequest_subnetAndSGAndPublicIPAddress
=== RUN   TestAccEC2SpotInstanceRequest_networkInterfaceAttributes
=== PAUSE TestAccEC2SpotInstanceRequest_networkInterfaceAttributes
=== RUN   TestAccEC2SpotInstanceRequest_getPasswordData
=== PAUSE TestAccEC2SpotInstanceRequest_getPasswordData
=== RUN   TestAccEC2SpotInstanceRequest_interruptStop
=== PAUSE TestAccEC2SpotInstanceRequest_interruptStop
=== RUN   TestAccEC2SpotInstanceRequest_interruptHibernate
=== PAUSE TestAccEC2SpotInstanceRequest_interruptHibernate
=== RUN   TestAccEC2SpotInstanceRequest_interruptUpdate
=== PAUSE TestAccEC2SpotInstanceRequest_interruptUpdate
=== CONT  TestAccEC2SpotInstanceRequest_basic
=== CONT  TestAccEC2SpotInstanceRequest_withoutSpotPrice
--- PASS: TestAccEC2SpotInstanceRequest_withoutSpotPrice (96.70s)
=== CONT  TestAccEC2SpotInstanceRequest_withLaunchGroup
--- PASS: TestAccEC2SpotInstanceRequest_basic (98.05s)
=== CONT  TestAccEC2SpotInstanceRequest_validUntil
--- PASS: TestAccEC2SpotInstanceRequest_withLaunchGroup (86.37s)
=== CONT  TestAccEC2SpotInstanceRequest_vpc
--- PASS: TestAccEC2SpotInstanceRequest_validUntil (104.63s)
=== CONT  TestAccEC2SpotInstanceRequest_withBlockDuration
--- PASS: TestAccEC2SpotInstanceRequest_vpc (95.60s)
=== CONT  TestAccEC2SpotInstanceRequest_interruptStop
--- PASS: TestAccEC2SpotInstanceRequest_withBlockDuration (105.17s)
=== CONT  TestAccEC2SpotInstanceRequest_interruptUpdate
--- PASS: TestAccEC2SpotInstanceRequest_interruptStop (103.80s)
=== CONT  TestAccEC2SpotInstanceRequest_interruptHibernate
--- PASS: TestAccEC2SpotInstanceRequest_interruptUpdate (154.17s)
=== CONT  TestAccEC2SpotInstanceRequest_networkInterfaceAttributes
--- PASS: TestAccEC2SpotInstanceRequest_interruptHibernate (101.84s)
=== CONT  TestAccEC2SpotInstanceRequest_getPasswordData
--- PASS: TestAccEC2SpotInstanceRequest_networkInterfaceAttributes (137.06s)
=== CONT  TestAccEC2SpotInstanceRequest_subnetAndSGAndPublicIPAddress
--- PASS: TestAccEC2SpotInstanceRequest_getPasswordData (180.75s)
=== CONT  TestAccEC2SpotInstanceRequest_tags
--- PASS: TestAccEC2SpotInstanceRequest_subnetAndSGAndPublicIPAddress (127.31s)
=== CONT  TestAccEC2SpotInstanceRequest_keyName
--- PASS: TestAccEC2SpotInstanceRequest_keyName (101.97s)
=== CONT  TestAccEC2SpotInstanceRequest_disappears
--- PASS: TestAccEC2SpotInstanceRequest_tags (164.89s)
--- PASS: TestAccEC2SpotInstanceRequest_disappears (314.92s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ec2	1149.066s
% ACCTEST_TIMEOUT=360m make testacc TESTARGS='-run=TestAccEC2Instance_' PKG=ec2 ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 2  -run=TestAccEC2Instance_ -timeout 360m
=== RUN   TestAccEC2Instance_basic
=== PAUSE TestAccEC2Instance_basic
=== RUN   TestAccEC2Instance_disappears
=== PAUSE TestAccEC2Instance_disappears
=== RUN   TestAccEC2Instance_tags
=== PAUSE TestAccEC2Instance_tags
=== RUN   TestAccEC2Instance_inDefaultVPCBySgName
=== PAUSE TestAccEC2Instance_inDefaultVPCBySgName
=== RUN   TestAccEC2Instance_inDefaultVPCBySgID
=== PAUSE TestAccEC2Instance_inDefaultVPCBySgID
=== RUN   TestAccEC2Instance_atLeastOneOtherEBSVolume
=== PAUSE TestAccEC2Instance_atLeastOneOtherEBSVolume
=== RUN   TestAccEC2Instance_EBSBlockDevice_kmsKeyARN
=== PAUSE TestAccEC2Instance_EBSBlockDevice_kmsKeyARN
=== RUN   TestAccEC2Instance_EBSBlockDevice_invalidIopsForVolumeType
=== PAUSE TestAccEC2Instance_EBSBlockDevice_invalidIopsForVolumeType
=== RUN   TestAccEC2Instance_EBSBlockDevice_invalidThroughputForVolumeType
=== PAUSE TestAccEC2Instance_EBSBlockDevice_invalidThroughputForVolumeType
=== RUN   TestAccEC2Instance_EBSBlockDevice_RootBlockDevice_removed
=== PAUSE TestAccEC2Instance_EBSBlockDevice_RootBlockDevice_removed
=== RUN   TestAccEC2Instance_RootBlockDevice_kmsKeyARN
=== PAUSE TestAccEC2Instance_RootBlockDevice_kmsKeyARN
=== RUN   TestAccEC2Instance_userDataBase64
=== PAUSE TestAccEC2Instance_userDataBase64
=== RUN   TestAccEC2Instance_userDataBase64_updateWithBashFile
=== PAUSE TestAccEC2Instance_userDataBase64_updateWithBashFile
=== RUN   TestAccEC2Instance_userDataBase64_updateWithZipFile
=== PAUSE TestAccEC2Instance_userDataBase64_updateWithZipFile
=== RUN   TestAccEC2Instance_userDataBase64_update
=== PAUSE TestAccEC2Instance_userDataBase64_update
=== RUN   TestAccEC2Instance_gp2IopsDevice
=== PAUSE TestAccEC2Instance_gp2IopsDevice
=== RUN   TestAccEC2Instance_gp2WithIopsValue
=== PAUSE TestAccEC2Instance_gp2WithIopsValue
=== RUN   TestAccEC2Instance_blockDevices
=== PAUSE TestAccEC2Instance_blockDevices
=== RUN   TestAccEC2Instance_rootInstanceStore
=== PAUSE TestAccEC2Instance_rootInstanceStore
=== RUN   TestAccEC2Instance_noAMIEphemeralDevices
=== PAUSE TestAccEC2Instance_noAMIEphemeralDevices
=== RUN   TestAccEC2Instance_sourceDestCheck
=== PAUSE TestAccEC2Instance_sourceDestCheck
=== RUN   TestAccEC2Instance_autoRecovery
=== PAUSE TestAccEC2Instance_autoRecovery
=== RUN   TestAccEC2Instance_disableAPIStop
=== PAUSE TestAccEC2Instance_disableAPIStop
=== RUN   TestAccEC2Instance_disableAPITerminationFinalFalse
=== PAUSE TestAccEC2Instance_disableAPITerminationFinalFalse
=== RUN   TestAccEC2Instance_disableAPITerminationFinalTrue
=== PAUSE TestAccEC2Instance_disableAPITerminationFinalTrue
=== RUN   TestAccEC2Instance_dedicatedInstance
=== PAUSE TestAccEC2Instance_dedicatedInstance
=== RUN   TestAccEC2Instance_outpost
=== PAUSE TestAccEC2Instance_outpost
=== RUN   TestAccEC2Instance_placementGroup
=== PAUSE TestAccEC2Instance_placementGroup
=== RUN   TestAccEC2Instance_placementPartitionNumber
=== PAUSE TestAccEC2Instance_placementPartitionNumber
=== RUN   TestAccEC2Instance_IPv6_supportAddressCount
=== PAUSE TestAccEC2Instance_IPv6_supportAddressCount
=== RUN   TestAccEC2Instance_ipv6AddressCountAndSingleAddressCausesError
=== PAUSE TestAccEC2Instance_ipv6AddressCountAndSingleAddressCausesError
=== RUN   TestAccEC2Instance_IPv6_supportAddressCountWithIPv4
=== PAUSE TestAccEC2Instance_IPv6_supportAddressCountWithIPv4
=== RUN   TestAccEC2Instance_networkInstanceSecurityGroups
=== PAUSE TestAccEC2Instance_networkInstanceSecurityGroups
=== RUN   TestAccEC2Instance_networkInstanceRemovingAllSecurityGroups
=== PAUSE TestAccEC2Instance_networkInstanceRemovingAllSecurityGroups
=== RUN   TestAccEC2Instance_networkInstanceVPCSecurityGroupIDs
=== PAUSE TestAccEC2Instance_networkInstanceVPCSecurityGroupIDs
=== RUN   TestAccEC2Instance_BlockDeviceTags_volumeTags
=== PAUSE TestAccEC2Instance_BlockDeviceTags_volumeTags
=== RUN   TestAccEC2Instance_BlockDeviceTags_withAttachedVolume
=== PAUSE TestAccEC2Instance_BlockDeviceTags_withAttachedVolume
=== RUN   TestAccEC2Instance_BlockDeviceTags_ebsAndRoot
=== PAUSE TestAccEC2Instance_BlockDeviceTags_ebsAndRoot
=== RUN   TestAccEC2Instance_instanceProfileChange
=== PAUSE TestAccEC2Instance_instanceProfileChange
=== RUN   TestAccEC2Instance_withIAMInstanceProfile
=== PAUSE TestAccEC2Instance_withIAMInstanceProfile
=== RUN   TestAccEC2Instance_withIAMInstanceProfilePath
=== PAUSE TestAccEC2Instance_withIAMInstanceProfilePath
=== RUN   TestAccEC2Instance_privateIP
=== PAUSE TestAccEC2Instance_privateIP
=== RUN   TestAccEC2Instance_associatePublicIPAndPrivateIP
=== PAUSE TestAccEC2Instance_associatePublicIPAndPrivateIP
=== RUN   TestAccEC2Instance_Empty_privateIP
=== PAUSE TestAccEC2Instance_Empty_privateIP
=== RUN   TestAccEC2Instance_PrivateDNSNameOptions_computed
=== PAUSE TestAccEC2Instance_PrivateDNSNameOptions_computed
=== RUN   TestAccEC2Instance_PrivateDNSNameOptions_configured
=== PAUSE TestAccEC2Instance_PrivateDNSNameOptions_configured
=== RUN   TestAccEC2Instance_keyPairCheck
=== PAUSE TestAccEC2Instance_keyPairCheck
=== RUN   TestAccEC2Instance_rootBlockDeviceMismatch
=== PAUSE TestAccEC2Instance_rootBlockDeviceMismatch
=== RUN   TestAccEC2Instance_forceNewAndTagsDrift
=== PAUSE TestAccEC2Instance_forceNewAndTagsDrift
=== RUN   TestAccEC2Instance_changeInstanceType
=== PAUSE TestAccEC2Instance_changeInstanceType
=== RUN   TestAccEC2Instance_changeInstanceTypeAndUserData
=== PAUSE TestAccEC2Instance_changeInstanceTypeAndUserData
=== RUN   TestAccEC2Instance_changeInstanceTypeAndUserDataBase64
=== PAUSE TestAccEC2Instance_changeInstanceTypeAndUserDataBase64
=== RUN   TestAccEC2Instance_EBSRootDevice_basic
=== PAUSE TestAccEC2Instance_EBSRootDevice_basic
=== RUN   TestAccEC2Instance_EBSRootDevice_modifySize
=== PAUSE TestAccEC2Instance_EBSRootDevice_modifySize
=== RUN   TestAccEC2Instance_EBSRootDevice_modifyType
=== PAUSE TestAccEC2Instance_EBSRootDevice_modifyType
=== RUN   TestAccEC2Instance_EBSRootDeviceModifyIOPS_io1
=== PAUSE TestAccEC2Instance_EBSRootDeviceModifyIOPS_io1
=== RUN   TestAccEC2Instance_EBSRootDeviceModifyIOPS_io2
=== PAUSE TestAccEC2Instance_EBSRootDeviceModifyIOPS_io2
=== RUN   TestAccEC2Instance_EBSRootDeviceModifyThroughput_gp3
=== PAUSE TestAccEC2Instance_EBSRootDeviceModifyThroughput_gp3
=== RUN   TestAccEC2Instance_EBSRootDevice_modifyDeleteOnTermination
=== PAUSE TestAccEC2Instance_EBSRootDevice_modifyDeleteOnTermination
=== RUN   TestAccEC2Instance_EBSRootDevice_modifyAll
=== PAUSE TestAccEC2Instance_EBSRootDevice_modifyAll
=== RUN   TestAccEC2Instance_EBSRootDeviceMultipleBlockDevices_modifySize
=== PAUSE TestAccEC2Instance_EBSRootDeviceMultipleBlockDevices_modifySize
=== RUN   TestAccEC2Instance_EBSRootDeviceMultipleBlockDevices_modifyDeleteOnTermination
=== PAUSE TestAccEC2Instance_EBSRootDeviceMultipleBlockDevices_modifyDeleteOnTermination
=== RUN   TestAccEC2Instance_EBSRootDevice_multipleDynamicEBSBlockDevices
=== PAUSE TestAccEC2Instance_EBSRootDevice_multipleDynamicEBSBlockDevices
=== RUN   TestAccEC2Instance_gp3RootBlockDevice
=== PAUSE TestAccEC2Instance_gp3RootBlockDevice
=== RUN   TestAccEC2Instance_primaryNetworkInterface
=== PAUSE TestAccEC2Instance_primaryNetworkInterface
=== RUN   TestAccEC2Instance_networkCardIndex
=== PAUSE TestAccEC2Instance_networkCardIndex
=== RUN   TestAccEC2Instance_primaryNetworkInterfaceSourceDestCheck
=== PAUSE TestAccEC2Instance_primaryNetworkInterfaceSourceDestCheck
=== RUN   TestAccEC2Instance_addSecondaryInterface
=== PAUSE TestAccEC2Instance_addSecondaryInterface
=== RUN   TestAccEC2Instance_addSecurityGroupNetworkInterface
=== PAUSE TestAccEC2Instance_addSecurityGroupNetworkInterface
=== RUN   TestAccEC2Instance_NewNetworkInterface_publicIPAndSecondaryPrivateIPs
=== PAUSE TestAccEC2Instance_NewNetworkInterface_publicIPAndSecondaryPrivateIPs
=== RUN   TestAccEC2Instance_NewNetworkInterface_emptyPrivateIPAndSecondaryPrivateIPs
=== PAUSE TestAccEC2Instance_NewNetworkInterface_emptyPrivateIPAndSecondaryPrivateIPs
=== RUN   TestAccEC2Instance_NewNetworkInterface_emptyPrivateIPAndSecondaryPrivateIPsUpdate
=== PAUSE TestAccEC2Instance_NewNetworkInterface_emptyPrivateIPAndSecondaryPrivateIPsUpdate
=== RUN   TestAccEC2Instance_NewNetworkInterface_privateIPAndSecondaryPrivateIPs
=== PAUSE TestAccEC2Instance_NewNetworkInterface_privateIPAndSecondaryPrivateIPs
=== RUN   TestAccEC2Instance_NewNetworkInterface_privateIPAndSecondaryPrivateIPsUpdate
=== PAUSE TestAccEC2Instance_NewNetworkInterface_privateIPAndSecondaryPrivateIPsUpdate
=== RUN   TestAccEC2Instance_AssociatePublic_defaultPrivate
=== PAUSE TestAccEC2Instance_AssociatePublic_defaultPrivate
=== RUN   TestAccEC2Instance_AssociatePublic_defaultPublic
=== PAUSE TestAccEC2Instance_AssociatePublic_defaultPublic
=== RUN   TestAccEC2Instance_AssociatePublic_explicitPublic
=== PAUSE TestAccEC2Instance_AssociatePublic_explicitPublic
=== RUN   TestAccEC2Instance_AssociatePublic_explicitPrivate
=== PAUSE TestAccEC2Instance_AssociatePublic_explicitPrivate
=== RUN   TestAccEC2Instance_AssociatePublic_overridePublic
=== PAUSE TestAccEC2Instance_AssociatePublic_overridePublic
=== RUN   TestAccEC2Instance_AssociatePublic_overridePrivate
=== PAUSE TestAccEC2Instance_AssociatePublic_overridePrivate
=== RUN   TestAccEC2Instance_LaunchTemplate_basic
=== PAUSE TestAccEC2Instance_LaunchTemplate_basic
=== RUN   TestAccEC2Instance_LaunchTemplate_overrideTemplate
=== PAUSE TestAccEC2Instance_LaunchTemplate_overrideTemplate
=== RUN   TestAccEC2Instance_LaunchTemplate_setSpecificVersion
=== PAUSE TestAccEC2Instance_LaunchTemplate_setSpecificVersion
=== RUN   TestAccEC2Instance_LaunchTemplateModifyTemplate_defaultVersion
=== PAUSE TestAccEC2Instance_LaunchTemplateModifyTemplate_defaultVersion
=== RUN   TestAccEC2Instance_LaunchTemplate_updateTemplateVersion
=== PAUSE TestAccEC2Instance_LaunchTemplate_updateTemplateVersion
=== RUN   TestAccEC2Instance_LaunchTemplate_swapIDAndName
=== PAUSE TestAccEC2Instance_LaunchTemplate_swapIDAndName
=== RUN   TestAccEC2Instance_LaunchTemplate_withIAMInstanceProfile
=== PAUSE TestAccEC2Instance_LaunchTemplate_withIAMInstanceProfile
=== RUN   TestAccEC2Instance_LaunchTemplate_spotAndStop
=== PAUSE TestAccEC2Instance_LaunchTemplate_spotAndStop
=== RUN   TestAccEC2Instance_GetPasswordData_falseToTrue
=== PAUSE TestAccEC2Instance_GetPasswordData_falseToTrue
=== RUN   TestAccEC2Instance_GetPasswordData_trueToFalse
=== PAUSE TestAccEC2Instance_GetPasswordData_trueToFalse
=== RUN   TestAccEC2Instance_cpuOptionsAmdSevSnpUnspecifiedToDisabledToEnabledToUnspecified
=== PAUSE TestAccEC2Instance_cpuOptionsAmdSevSnpUnspecifiedToDisabledToEnabledToUnspecified
=== RUN   TestAccEC2Instance_cpuOptionsAmdSevSnpUnspecifiedToEnabledToDisabledToUnspecified
=== PAUSE TestAccEC2Instance_cpuOptionsAmdSevSnpUnspecifiedToEnabledToDisabledToUnspecified
=== RUN   TestAccEC2Instance_cpuOptionsAmdSevSnpEnabledToDisabled
=== PAUSE TestAccEC2Instance_cpuOptionsAmdSevSnpEnabledToDisabled
=== RUN   TestAccEC2Instance_cpuOptionsAmdSevSnpDisabledToEnabled
=== PAUSE TestAccEC2Instance_cpuOptionsAmdSevSnpDisabledToEnabled
=== RUN   TestAccEC2Instance_cpuOptionsAmdSevSnpCoreThreads
=== PAUSE TestAccEC2Instance_cpuOptionsAmdSevSnpCoreThreads
=== RUN   TestAccEC2Instance_cpuOptionsCoreThreads
=== PAUSE TestAccEC2Instance_cpuOptionsCoreThreads
=== RUN   TestAccEC2Instance_cpuOptionsCoreThreadsMigration
=== PAUSE TestAccEC2Instance_cpuOptionsCoreThreadsMigration
=== RUN   TestAccEC2Instance_cpuOptionsCoreThreadsUnspecifiedToSpecified
=== PAUSE TestAccEC2Instance_cpuOptionsCoreThreadsUnspecifiedToSpecified
=== RUN   TestAccEC2Instance_CreditSpecificationEmpty_nonBurstable
=== PAUSE TestAccEC2Instance_CreditSpecificationEmpty_nonBurstable
=== RUN   TestAccEC2Instance_CreditSpecificationUnspecifiedToEmpty_nonBurstable
=== PAUSE TestAccEC2Instance_CreditSpecificationUnspecifiedToEmpty_nonBurstable
=== RUN   TestAccEC2Instance_CreditSpecification_unspecifiedDefaultsToStandard
=== PAUSE TestAccEC2Instance_CreditSpecification_unspecifiedDefaultsToStandard
=== RUN   TestAccEC2Instance_CreditSpecification_standardCPUCredits
=== PAUSE TestAccEC2Instance_CreditSpecification_standardCPUCredits
=== RUN   TestAccEC2Instance_CreditSpecification_unlimitedCPUCredits
=== PAUSE TestAccEC2Instance_CreditSpecification_unlimitedCPUCredits
=== RUN   TestAccEC2Instance_CreditSpecificationUnknownCPUCredits_t2
=== PAUSE TestAccEC2Instance_CreditSpecificationUnknownCPUCredits_t2
=== RUN   TestAccEC2Instance_CreditSpecificationUnknownCPUCredits_t3
=== PAUSE TestAccEC2Instance_CreditSpecificationUnknownCPUCredits_t3
=== RUN   TestAccEC2Instance_CreditSpecificationUnknownCPUCredits_t3a
=== PAUSE TestAccEC2Instance_CreditSpecificationUnknownCPUCredits_t3a
=== RUN   TestAccEC2Instance_CreditSpecificationUnknownCPUCredits_t4g
=== PAUSE TestAccEC2Instance_CreditSpecificationUnknownCPUCredits_t4g
=== RUN   TestAccEC2Instance_CreditSpecification_updateCPUCredits
=== PAUSE TestAccEC2Instance_CreditSpecification_updateCPUCredits
=== RUN   TestAccEC2Instance_CreditSpecification_isNotAppliedToNonBurstable
=== PAUSE TestAccEC2Instance_CreditSpecification_isNotAppliedToNonBurstable
=== RUN   TestAccEC2Instance_CreditSpecificationT3_unspecifiedDefaultsToUnlimited
=== PAUSE TestAccEC2Instance_CreditSpecificationT3_unspecifiedDefaultsToUnlimited
=== RUN   TestAccEC2Instance_CreditSpecificationT3_standardCPUCredits
=== PAUSE TestAccEC2Instance_CreditSpecificationT3_standardCPUCredits
=== RUN   TestAccEC2Instance_CreditSpecificationT3_unlimitedCPUCredits
=== PAUSE TestAccEC2Instance_CreditSpecificationT3_unlimitedCPUCredits
=== RUN   TestAccEC2Instance_CreditSpecificationT3_updateCPUCredits
=== PAUSE TestAccEC2Instance_CreditSpecificationT3_updateCPUCredits
=== RUN   TestAccEC2Instance_CreditSpecificationStandardCPUCredits_t2Tot3Taint
=== PAUSE TestAccEC2Instance_CreditSpecificationStandardCPUCredits_t2Tot3Taint
=== RUN   TestAccEC2Instance_CreditSpecificationUnlimitedCPUCredits_t2Tot3Taint
=== PAUSE TestAccEC2Instance_CreditSpecificationUnlimitedCPUCredits_t2Tot3Taint
=== RUN   TestAccEC2Instance_UserData
=== PAUSE TestAccEC2Instance_UserData
=== RUN   TestAccEC2Instance_UserData_update
=== PAUSE TestAccEC2Instance_UserData_update
=== RUN   TestAccEC2Instance_UserData_stringToEncodedString
=== PAUSE TestAccEC2Instance_UserData_stringToEncodedString
=== RUN   TestAccEC2Instance_UserData_emptyStringToUnspecified
=== PAUSE TestAccEC2Instance_UserData_emptyStringToUnspecified
=== RUN   TestAccEC2Instance_UserData_unspecifiedToEmptyString
=== PAUSE TestAccEC2Instance_UserData_unspecifiedToEmptyString
=== RUN   TestAccEC2Instance_UserDataReplaceOnChange_On
=== PAUSE TestAccEC2Instance_UserDataReplaceOnChange_On
=== RUN   TestAccEC2Instance_UserDataReplaceOnChange_On_Base64
=== PAUSE TestAccEC2Instance_UserDataReplaceOnChange_On_Base64
=== RUN   TestAccEC2Instance_UserDataReplaceOnChange_Off
=== PAUSE TestAccEC2Instance_UserDataReplaceOnChange_Off
=== RUN   TestAccEC2Instance_UserDataReplaceOnChange_Off_Base64
=== PAUSE TestAccEC2Instance_UserDataReplaceOnChange_Off_Base64
=== RUN   TestAccEC2Instance_hibernation
=== PAUSE TestAccEC2Instance_hibernation
=== RUN   TestAccEC2Instance_metadataOptions
=== PAUSE TestAccEC2Instance_metadataOptions
=== RUN   TestAccEC2Instance_enclaveOptions
=== PAUSE TestAccEC2Instance_enclaveOptions
=== RUN   TestAccEC2Instance_CapacityReservation_unspecifiedDefaultsToOpen
=== PAUSE TestAccEC2Instance_CapacityReservation_unspecifiedDefaultsToOpen
=== RUN   TestAccEC2Instance_CapacityReservationPreference_open
=== PAUSE TestAccEC2Instance_CapacityReservationPreference_open
=== RUN   TestAccEC2Instance_CapacityReservationPreference_none
=== PAUSE TestAccEC2Instance_CapacityReservationPreference_none
=== RUN   TestAccEC2Instance_CapacityReservation_targetID
=== PAUSE TestAccEC2Instance_CapacityReservation_targetID
=== RUN   TestAccEC2Instance_CapacityReservation_modifyPreference
=== PAUSE TestAccEC2Instance_CapacityReservation_modifyPreference
=== RUN   TestAccEC2Instance_CapacityReservation_modifyTarget
=== PAUSE TestAccEC2Instance_CapacityReservation_modifyTarget
=== RUN   TestAccEC2Instance_basicWithSpot
=== PAUSE TestAccEC2Instance_basicWithSpot
=== CONT  TestAccEC2Instance_basic
=== CONT  TestAccEC2Instance_addSecondaryInterface
--- PASS: TestAccEC2Instance_basic (145.67s)
=== CONT  TestAccEC2Instance_CreditSpecification_standardCPUCredits
--- PASS: TestAccEC2Instance_CreditSpecification_standardCPUCredits (175.12s)
=== CONT  TestAccEC2Instance_basicWithSpot
--- PASS: TestAccEC2Instance_basicWithSpot (100.87s)
=== CONT  TestAccEC2Instance_CapacityReservation_modifyTarget
--- PASS: TestAccEC2Instance_addSecondaryInterface (490.40s)
=== CONT  TestAccEC2Instance_CapacityReservation_modifyPreference
--- PASS: TestAccEC2Instance_CapacityReservation_modifyTarget (181.09s)
=== CONT  TestAccEC2Instance_CapacityReservation_targetID
--- PASS: TestAccEC2Instance_CapacityReservation_modifyPreference (196.39s)
=== CONT  TestAccEC2Instance_CapacityReservationPreference_none
--- PASS: TestAccEC2Instance_CapacityReservation_targetID (110.88s)
=== CONT  TestAccEC2Instance_CapacityReservationPreference_open
--- PASS: TestAccEC2Instance_CapacityReservationPreference_none (99.77s)
=== CONT  TestAccEC2Instance_CapacityReservation_unspecifiedDefaultsToOpen
--- PASS: TestAccEC2Instance_CapacityReservationPreference_open (117.54s)
=== CONT  TestAccEC2Instance_enclaveOptions
--- PASS: TestAccEC2Instance_CapacityReservation_unspecifiedDefaultsToOpen (128.77s)
=== CONT  TestAccEC2Instance_metadataOptions
--- PASS: TestAccEC2Instance_enclaveOptions (152.08s)
=== CONT  TestAccEC2Instance_hibernation
--- PASS: TestAccEC2Instance_metadataOptions (194.75s)
=== CONT  TestAccEC2Instance_UserDataReplaceOnChange_Off_Base64
--- PASS: TestAccEC2Instance_hibernation (207.85s)
=== CONT  TestAccEC2Instance_UserDataReplaceOnChange_Off
--- PASS: TestAccEC2Instance_UserDataReplaceOnChange_Off_Base64 (225.55s)
=== CONT  TestAccEC2Instance_UserDataReplaceOnChange_On_Base64
--- PASS: TestAccEC2Instance_UserDataReplaceOnChange_Off (193.15s)
=== CONT  TestAccEC2Instance_UserDataReplaceOnChange_On
--- PASS: TestAccEC2Instance_UserDataReplaceOnChange_On_Base64 (212.74s)
=== CONT  TestAccEC2Instance_UserData_unspecifiedToEmptyString
--- PASS: TestAccEC2Instance_UserDataReplaceOnChange_On (212.37s)
=== CONT  TestAccEC2Instance_UserData_emptyStringToUnspecified
--- PASS: TestAccEC2Instance_UserData_unspecifiedToEmptyString (144.30s)
=== CONT  TestAccEC2Instance_UserData_stringToEncodedString
--- PASS: TestAccEC2Instance_UserData_emptyStringToUnspecified (143.73s)
=== CONT  TestAccEC2Instance_UserData_update
--- PASS: TestAccEC2Instance_UserData_stringToEncodedString (227.33s)
=== CONT  TestAccEC2Instance_UserData
--- PASS: TestAccEC2Instance_UserData_update (404.53s)
=== CONT  TestAccEC2Instance_CreditSpecificationUnlimitedCPUCredits_t2Tot3Taint
--- PASS: TestAccEC2Instance_UserData (247.17s)
=== CONT  TestAccEC2Instance_CreditSpecificationStandardCPUCredits_t2Tot3Taint
--- PASS: TestAccEC2Instance_CreditSpecificationUnlimitedCPUCredits_t2Tot3Taint (183.53s)
=== CONT  TestAccEC2Instance_CreditSpecificationT3_updateCPUCredits
--- PASS: TestAccEC2Instance_CreditSpecificationStandardCPUCredits_t2Tot3Taint (176.05s)
=== CONT  TestAccEC2Instance_CreditSpecificationT3_unlimitedCPUCredits
--- PASS: TestAccEC2Instance_CreditSpecificationT3_unlimitedCPUCredits (140.09s)
=== CONT  TestAccEC2Instance_CreditSpecificationT3_standardCPUCredits
--- PASS: TestAccEC2Instance_CreditSpecificationT3_updateCPUCredits (175.32s)
=== CONT  TestAccEC2Instance_CreditSpecificationT3_unspecifiedDefaultsToUnlimited
--- PASS: TestAccEC2Instance_CreditSpecificationT3_unspecifiedDefaultsToUnlimited (101.09s)
=== CONT  TestAccEC2Instance_CreditSpecification_isNotAppliedToNonBurstable
--- PASS: TestAccEC2Instance_CreditSpecificationT3_standardCPUCredits (127.91s)
=== CONT  TestAccEC2Instance_CreditSpecification_updateCPUCredits
--- PASS: TestAccEC2Instance_CreditSpecification_isNotAppliedToNonBurstable (81.41s)
=== CONT  TestAccEC2Instance_CreditSpecificationUnknownCPUCredits_t4g
--- PASS: TestAccEC2Instance_CreditSpecification_updateCPUCredits (149.22s)
=== CONT  TestAccEC2Instance_CreditSpecificationUnknownCPUCredits_t3a
--- PASS: TestAccEC2Instance_CreditSpecificationUnknownCPUCredits_t4g (91.79s)
=== CONT  TestAccEC2Instance_CreditSpecificationUnknownCPUCredits_t3
--- PASS: TestAccEC2Instance_CreditSpecificationUnknownCPUCredits_t3a (121.98s)
=== CONT  TestAccEC2Instance_CreditSpecificationUnknownCPUCredits_t2
--- PASS: TestAccEC2Instance_CreditSpecificationUnknownCPUCredits_t3 (132.26s)
=== CONT  TestAccEC2Instance_CreditSpecification_unlimitedCPUCredits
--- PASS: TestAccEC2Instance_CreditSpecification_unlimitedCPUCredits (127.90s)
=== CONT  TestAccEC2Instance_AssociatePublic_explicitPublic
--- PASS: TestAccEC2Instance_CreditSpecificationUnknownCPUCredits_t2 (192.78s)
=== CONT  TestAccEC2Instance_LaunchTemplateModifyTemplate_defaultVersion
--- PASS: TestAccEC2Instance_AssociatePublic_explicitPublic (121.89s)
=== CONT  TestAccEC2Instance_LaunchTemplate_setSpecificVersion
--- PASS: TestAccEC2Instance_LaunchTemplateModifyTemplate_defaultVersion (93.16s)
=== CONT  TestAccEC2Instance_LaunchTemplate_overrideTemplate
--- PASS: TestAccEC2Instance_LaunchTemplate_overrideTemplate (105.88s)
=== CONT  TestAccEC2Instance_LaunchTemplate_basic
--- PASS: TestAccEC2Instance_LaunchTemplate_setSpecificVersion (121.48s)
=== CONT  TestAccEC2Instance_AssociatePublic_overridePrivate
--- PASS: TestAccEC2Instance_LaunchTemplate_basic (85.84s)
=== CONT  TestAccEC2Instance_AssociatePublic_overridePublic
--- PASS: TestAccEC2Instance_AssociatePublic_overridePrivate (135.57s)
=== CONT  TestAccEC2Instance_AssociatePublic_explicitPrivate
--- PASS: TestAccEC2Instance_AssociatePublic_overridePublic (135.37s)
=== CONT  TestAccEC2Instance_LaunchTemplate_updateTemplateVersion
--- PASS: TestAccEC2Instance_AssociatePublic_explicitPrivate (156.58s)
=== CONT  TestAccEC2Instance_networkInstanceVPCSecurityGroupIDs
--- PASS: TestAccEC2Instance_networkInstanceVPCSecurityGroupIDs (134.94s)
=== CONT  TestAccEC2Instance_CreditSpecification_unspecifiedDefaultsToStandard
--- PASS: TestAccEC2Instance_LaunchTemplate_updateTemplateVersion (235.45s)
=== CONT  TestAccEC2Instance_primaryNetworkInterfaceSourceDestCheck
--- PASS: TestAccEC2Instance_CreditSpecification_unspecifiedDefaultsToStandard (110.78s)
=== CONT  TestAccEC2Instance_CreditSpecificationUnspecifiedToEmpty_nonBurstable
--- PASS: TestAccEC2Instance_primaryNetworkInterfaceSourceDestCheck (114.86s)
=== CONT  TestAccEC2Instance_networkCardIndex
--- PASS: TestAccEC2Instance_CreditSpecificationUnspecifiedToEmpty_nonBurstable (129.40s)
=== CONT  TestAccEC2Instance_CreditSpecificationEmpty_nonBurstable
--- PASS: TestAccEC2Instance_networkCardIndex (120.23s)
=== CONT  TestAccEC2Instance_cpuOptionsCoreThreadsUnspecifiedToSpecified
--- PASS: TestAccEC2Instance_CreditSpecificationEmpty_nonBurstable (117.95s)
=== CONT  TestAccEC2Instance_primaryNetworkInterface
--- PASS: TestAccEC2Instance_cpuOptionsCoreThreadsUnspecifiedToSpecified (173.89s)
=== CONT  TestAccEC2Instance_cpuOptionsCoreThreadsMigration
--- PASS: TestAccEC2Instance_primaryNetworkInterface (138.16s)
=== CONT  TestAccEC2Instance_gp3RootBlockDevice
--- PASS: TestAccEC2Instance_gp3RootBlockDevice (96.81s)
=== CONT  TestAccEC2Instance_cpuOptionsCoreThreads
--- PASS: TestAccEC2Instance_cpuOptionsCoreThreadsMigration (173.44s)
=== CONT  TestAccEC2Instance_cpuOptionsAmdSevSnpCoreThreads
    acctest.go:848: skipping tests; AWS_DEFAULT_REGION (us-west-2) not supported. Supported: [us-east-2]
--- SKIP: TestAccEC2Instance_cpuOptionsAmdSevSnpCoreThreads (0.00s)
=== CONT  TestAccEC2Instance_cpuOptionsAmdSevSnpDisabledToEnabled
    acctest.go:848: skipping tests; AWS_DEFAULT_REGION (us-west-2) not supported. Supported: [us-east-2]
--- SKIP: TestAccEC2Instance_cpuOptionsAmdSevSnpDisabledToEnabled (0.00s)
=== CONT  TestAccEC2Instance_cpuOptionsAmdSevSnpEnabledToDisabled
    acctest.go:848: skipping tests; AWS_DEFAULT_REGION (us-west-2) not supported. Supported: [us-east-2]
--- SKIP: TestAccEC2Instance_cpuOptionsAmdSevSnpEnabledToDisabled (0.00s)
=== CONT  TestAccEC2Instance_cpuOptionsAmdSevSnpUnspecifiedToEnabledToDisabledToUnspecified
    acctest.go:848: skipping tests; AWS_DEFAULT_REGION (us-west-2) not supported. Supported: [us-east-2]
--- SKIP: TestAccEC2Instance_cpuOptionsAmdSevSnpUnspecifiedToEnabledToDisabledToUnspecified (0.00s)
=== CONT  TestAccEC2Instance_EBSRootDevice_multipleDynamicEBSBlockDevices
--- PASS: TestAccEC2Instance_cpuOptionsCoreThreads (171.31s)
=== CONT  TestAccEC2Instance_cpuOptionsAmdSevSnpUnspecifiedToDisabledToEnabledToUnspecified
    acctest.go:848: skipping tests; AWS_DEFAULT_REGION (us-west-2) not supported. Supported: [us-east-2]
--- SKIP: TestAccEC2Instance_cpuOptionsAmdSevSnpUnspecifiedToDisabledToEnabledToUnspecified (0.00s)
=== CONT  TestAccEC2Instance_GetPasswordData_trueToFalse
--- PASS: TestAccEC2Instance_EBSRootDevice_multipleDynamicEBSBlockDevices (342.86s)
=== CONT  TestAccEC2Instance_GetPasswordData_falseToTrue
--- PASS: TestAccEC2Instance_GetPasswordData_trueToFalse (183.49s)
--- PASS: TestAccEC2Instance_GetPasswordData_falseToTrue (203.66s)
=== CONT  TestAccEC2Instance_LaunchTemplate_withIAMInstanceProfile
--- PASS: TestAccEC2Instance_basicWithSpot (133.24s)
=== CONT  TestAccEC2Instance_LaunchTemplate_swapIDAndName
--- PASS: TestAccEC2Instance_LaunchTemplate_withIAMInstanceProfile (136.30s)
=== CONT  TestAccEC2Instance_EBSRootDeviceMultipleBlockDevices_modifyDeleteOnTermination
--- PASS: TestAccEC2Instance_LaunchTemplate_swapIDAndName (135.07s)
=== CONT  TestAccEC2Instance_EBSRootDeviceMultipleBlockDevices_modifySize
--- PASS: TestAccEC2Instance_EBSRootDeviceMultipleBlockDevices_modifyDeleteOnTermination (145.58s)
=== CONT  TestAccEC2Instance_NewNetworkInterface_privateIPAndSecondaryPrivateIPs
--- PASS: TestAccEC2Instance_NewNetworkInterface_privateIPAndSecondaryPrivateIPs (124.31s)
=== CONT  TestAccEC2Instance_EBSRootDevice_modifyAll
--- PASS: TestAccEC2Instance_EBSRootDeviceMultipleBlockDevices_modifySize (184.75s)
=== CONT  TestAccEC2Instance_AssociatePublic_defaultPublic
--- PASS: TestAccEC2Instance_AssociatePublic_defaultPublic (123.97s)
=== CONT  TestAccEC2Instance_EBSRootDevice_modifyDeleteOnTermination
--- PASS: TestAccEC2Instance_EBSRootDevice_modifyAll (157.30s)
=== CONT  TestAccEC2Instance_AssociatePublic_defaultPrivate
--- PASS: TestAccEC2Instance_AssociatePublic_defaultPrivate (112.50s)
=== CONT  TestAccEC2Instance_EBSRootDeviceModifyThroughput_gp3
--- PASS: TestAccEC2Instance_EBSRootDevice_modifyDeleteOnTermination (145.60s)
=== CONT  TestAccEC2Instance_NewNetworkInterface_privateIPAndSecondaryPrivateIPsUpdate
--- PASS: TestAccEC2Instance_NewNetworkInterface_privateIPAndSecondaryPrivateIPsUpdate (167.73s)
=== CONT  TestAccEC2Instance_PrivateDNSNameOptions_configured
--- PASS: TestAccEC2Instance_EBSRootDeviceModifyThroughput_gp3 (198.10s)
=== CONT  TestAccEC2Instance_EBSRootDeviceModifyIOPS_io1
--- PASS: TestAccEC2Instance_EBSRootDeviceModifyIOPS_io1 (187.43s)
=== CONT  TestAccEC2Instance_EBSRootDevice_modifyType
--- PASS: TestAccEC2Instance_PrivateDNSNameOptions_configured (263.92s)
=== CONT  TestAccEC2Instance_EBSRootDeviceModifyIOPS_io2
--- PASS: TestAccEC2Instance_EBSRootDevice_modifyType (177.61s)
=== CONT  TestAccEC2Instance_EBSRootDevice_modifySize
--- PASS: TestAccEC2Instance_EBSRootDeviceModifyIOPS_io2 (178.51s)
=== CONT  TestAccEC2Instance_PrivateDNSNameOptions_computed
--- PASS: TestAccEC2Instance_PrivateDNSNameOptions_computed (163.59s)
=== CONT  TestAccEC2Instance_EBSRootDevice_basic
--- PASS: TestAccEC2Instance_EBSRootDevice_modifySize (236.38s)
=== CONT  TestAccEC2Instance_Empty_privateIP
--- PASS: TestAccEC2Instance_EBSRootDevice_basic (92.60s)
=== CONT  TestAccEC2Instance_changeInstanceTypeAndUserDataBase64
--- PASS: TestAccEC2Instance_Empty_privateIP (131.54s)
=== CONT  TestAccEC2Instance_associatePublicIPAndPrivateIP
--- PASS: TestAccEC2Instance_associatePublicIPAndPrivateIP (120.81s)
=== CONT  TestAccEC2Instance_privateIP
--- PASS: TestAccEC2Instance_changeInstanceTypeAndUserDataBase64 (241.05s)
=== CONT  TestAccEC2Instance_withIAMInstanceProfilePath
--- PASS: TestAccEC2Instance_privateIP (121.28s)
=== CONT  TestAccEC2Instance_withIAMInstanceProfile
--- PASS: TestAccEC2Instance_withIAMInstanceProfilePath (129.16s)
=== CONT  TestAccEC2Instance_instanceProfileChange
--- PASS: TestAccEC2Instance_withIAMInstanceProfile (117.57s)
=== CONT  TestAccEC2Instance_changeInstanceTypeAndUserData
--- PASS: TestAccEC2Instance_instanceProfileChange (230.50s)
=== CONT  TestAccEC2Instance_BlockDeviceTags_ebsAndRoot
--- PASS: TestAccEC2Instance_changeInstanceTypeAndUserData (311.16s)
=== CONT  TestAccEC2Instance_changeInstanceType
--- PASS: TestAccEC2Instance_BlockDeviceTags_ebsAndRoot (159.55s)
=== CONT  TestAccEC2Instance_BlockDeviceTags_withAttachedVolume
--- PASS: TestAccEC2Instance_changeInstanceType (184.36s)
=== CONT  TestAccEC2Instance_forceNewAndTagsDrift
--- PASS: TestAccEC2Instance_BlockDeviceTags_withAttachedVolume (174.69s)
=== CONT  TestAccEC2Instance_BlockDeviceTags_volumeTags
--- PASS: TestAccEC2Instance_forceNewAndTagsDrift (199.25s)
=== CONT  TestAccEC2Instance_rootBlockDeviceMismatch
--- PASS: TestAccEC2Instance_BlockDeviceTags_volumeTags (176.53s)
=== CONT  TestAccEC2Instance_keyPairCheck
--- PASS: TestAccEC2Instance_rootBlockDeviceMismatch (102.74s)
=== CONT  TestAccEC2Instance_userDataBase64_updateWithZipFile
--- PASS: TestAccEC2Instance_keyPairCheck (111.93s)
=== CONT  TestAccEC2Instance_gp2WithIopsValue
--- PASS: TestAccEC2Instance_gp2WithIopsValue (11.93s)
=== CONT  TestAccEC2Instance_EBSBlockDevice_RootBlockDevice_removed
--- PASS: TestAccEC2Instance_EBSBlockDevice_RootBlockDevice_removed (123.77s)
=== CONT  TestAccEC2Instance_blockDevices
--- PASS: TestAccEC2Instance_blockDevices (97.83s)
=== CONT  TestAccEC2Instance_networkInstanceRemovingAllSecurityGroups
--- PASS: TestAccEC2Instance_userDataBase64_updateWithZipFile (291.15s)
=== CONT  TestAccEC2Instance_gp2IopsDevice
--- PASS: TestAccEC2Instance_gp2IopsDevice (88.21s)
=== CONT  TestAccEC2Instance_networkInstanceSecurityGroups
--- PASS: TestAccEC2Instance_networkInstanceRemovingAllSecurityGroups (162.63s)
=== CONT  TestAccEC2Instance_userDataBase64_updateWithBashFile
--- PASS: TestAccEC2Instance_networkInstanceSecurityGroups (116.69s)
=== CONT  TestAccEC2Instance_IPv6_supportAddressCountWithIPv4
--- PASS: TestAccEC2Instance_IPv6_supportAddressCountWithIPv4 (130.51s)
=== CONT  TestAccEC2Instance_userDataBase64
--- PASS: TestAccEC2Instance_userDataBase64_updateWithBashFile (270.42s)
=== CONT  TestAccEC2Instance_ipv6AddressCountAndSingleAddressCausesError
--- PASS: TestAccEC2Instance_ipv6AddressCountAndSingleAddressCausesError (1.86s)
=== CONT  TestAccEC2Instance_RootBlockDevice_kmsKeyARN
--- PASS: TestAccEC2Instance_userDataBase64 (130.12s)
=== CONT  TestAccEC2Instance_userDataBase64_update
--- PASS: TestAccEC2Instance_RootBlockDevice_kmsKeyARN (69.41s)
=== CONT  TestAccEC2Instance_disableAPITerminationFinalFalse
--- PASS: TestAccEC2Instance_disableAPITerminationFinalFalse (169.48s)
=== CONT  TestAccEC2Instance_placementPartitionNumber
--- PASS: TestAccEC2Instance_placementPartitionNumber (111.60s)
=== CONT  TestAccEC2Instance_placementGroup
--- PASS: TestAccEC2Instance_userDataBase64_update (222.19s)
=== CONT  TestAccEC2Instance_IPv6_supportAddressCount
--- PASS: TestAccEC2Instance_placementGroup (90.27s)
=== CONT  TestAccEC2Instance_noAMIEphemeralDevices
--- PASS: TestAccEC2Instance_IPv6_supportAddressCount (131.01s)
=== CONT  TestAccEC2Instance_rootInstanceStore
--- PASS: TestAccEC2Instance_noAMIEphemeralDevices (87.79s)
=== CONT  TestAccEC2Instance_outpost
    acctest.go:1061: skipping since no Outposts found
--- SKIP: TestAccEC2Instance_outpost (0.61s)
=== CONT  TestAccEC2Instance_dedicatedInstance
--- PASS: TestAccEC2Instance_dedicatedInstance (91.31s)
=== CONT  TestAccEC2Instance_sourceDestCheck
--- PASS: TestAccEC2Instance_rootInstanceStore (251.57s)
=== CONT  TestAccEC2Instance_autoRecovery
--- PASS: TestAccEC2Instance_sourceDestCheck (188.28s)
=== CONT  TestAccEC2Instance_disableAPIStop
--- PASS: TestAccEC2Instance_autoRecovery (158.00s)
=== CONT  TestAccEC2Instance_NewNetworkInterface_publicIPAndSecondaryPrivateIPs
--- PASS: TestAccEC2Instance_disableAPIStop (130.23s)
=== CONT  TestAccEC2Instance_addSecurityGroupNetworkInterface
--- PASS: TestAccEC2Instance_NewNetworkInterface_publicIPAndSecondaryPrivateIPs (236.27s)
=== CONT  TestAccEC2Instance_NewNetworkInterface_emptyPrivateIPAndSecondaryPrivateIPsUpdate
--- PASS: TestAccEC2Instance_NewNetworkInterface_emptyPrivateIPAndSecondaryPrivateIPsUpdate (167.47s)
=== CONT  TestAccEC2Instance_disableAPITerminationFinalTrue
--- PASS: TestAccEC2Instance_addSecurityGroupNetworkInterface (487.51s)
=== CONT  TestAccEC2Instance_inDefaultVPCBySgName
--- PASS: TestAccEC2Instance_disableAPITerminationFinalTrue (130.67s)
=== CONT  TestAccEC2Instance_inDefaultVPCBySgID
--- PASS: TestAccEC2Instance_inDefaultVPCBySgName (109.64s)
=== CONT  TestAccEC2Instance_NewNetworkInterface_emptyPrivateIPAndSecondaryPrivateIPs
--- PASS: TestAccEC2Instance_inDefaultVPCBySgID (136.42s)
=== CONT  TestAccEC2Instance_atLeastOneOtherEBSVolume
--- PASS: TestAccEC2Instance_NewNetworkInterface_emptyPrivateIPAndSecondaryPrivateIPs (118.71s)
=== CONT  TestAccEC2Instance_tags
--- PASS: TestAccEC2Instance_tags (156.57s)
=== CONT  TestAccEC2Instance_EBSBlockDevice_invalidIopsForVolumeType
--- PASS: TestAccEC2Instance_atLeastOneOtherEBSVolume (219.94s)
=== CONT  TestAccEC2Instance_EBSBlockDevice_invalidThroughputForVolumeType
--- PASS: TestAccEC2Instance_EBSBlockDevice_invalidIopsForVolumeType (12.99s)
=== CONT  TestAccEC2Instance_disappears
--- PASS: TestAccEC2Instance_EBSBlockDevice_invalidThroughputForVolumeType (12.45s)
=== CONT  TestAccEC2Instance_EBSBlockDevice_kmsKeyARN
--- PASS: TestAccEC2Instance_EBSBlockDevice_kmsKeyARN (112.72s)
--- PASS: TestAccEC2Instance_disappears (313.86s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ec2	10381.375s

@ewbankkit
Copy link
Contributor

@sousmangoosta Thanks for the contribution 🎉 👏.

@@ -395,8 +395,8 @@ func ResourceInstance() *schema.Resource {
"market_type": {
Type: schema.TypeString,
Optional: true,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Does the market_type need to be Required here, and set as required with value spot in the documentation as we removed the Default value ?

Copy link
Contributor

@ewbankkit ewbankkit Jun 6, 2023

Choose a reason for hiding this comment

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

No it doesn't, but the fact that instance_market_options and all it's sub-attributes are Computed (so as to avoid diffs and resource replacement if the instance uses a launch template that specifies instance_market_options) means that instance_market_options {} in configuration is now ignored. That's why I had to change the new test case to add en explicit market_type = "spot".

@sousmangoosta
Copy link
Contributor Author

@sousmangoosta Thanks for the contribution 🎉 👏.

Thanks for your modifications, I learn a lot 🙏

@ewbankkit ewbankkit merged commit 85122f2 into hashicorp:main Jun 6, 2023
@github-actions github-actions bot added this to the v5.2.0 milestone Jun 6, 2023
@ewbankkit ewbankkit mentioned this pull request Jun 7, 2023
@github-actions
Copy link

github-actions bot commented Jun 9, 2023

This functionality has been released in v5.2.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@sousmangoosta sousmangoosta deleted the f-aws_ec2_instance-spot_option branch June 12, 2023 15:56
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. service/ec2 Issues and PRs that pertain to the ec2 service. size/XL Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws_spot_instance_request tags won't apply to instance
2 participants