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

Adding GP3 support for launch configurations #19632

Merged
merged 4 commits into from
Jun 2, 2021

Conversation

akshayjain1996
Copy link

Community Note

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

Relates OR Closes #0000

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWSLaunchConfiguration_withGP3'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSLaunchConfiguration_withGP3 -timeout 180m
=== RUN   TestAccAWSLaunchConfiguration_withGP3
=== PAUSE TestAccAWSLaunchConfiguration_withGP3
=== CONT  TestAccAWSLaunchConfiguration_withGP3
--- PASS: TestAccAWSLaunchConfiguration_withGP3 (21.69s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	24.350s

@akshayjain1996 akshayjain1996 requested a review from a team as a code owner June 2, 2021 17:48
@ghost ghost added size/M Managed by automation to categorize the size of a PR. labels Jun 2, 2021
@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. documentation Introduces or discusses updates to documentation. service/autoscaling Issues and PRs that pertain to the autoscaling service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Jun 2, 2021
@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label Jun 2, 2021
@ewbankkit ewbankkit self-assigned this Jun 2, 2021
@akshayjain1996
Copy link
Author

Needs Go SDK version v1.38.53

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 🚀.

Commercial
% make testacc TEST=./aws TESTARGS='-run=TestAccAWSLaunchConfigurationDataSource_\|TestAccAWSLaunchConfiguration_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSLaunchConfigurationDataSource_\|TestAccAWSLaunchConfiguration_ -timeout 180m
=== RUN   TestAccAWSLaunchConfigurationDataSource_basic
=== PAUSE TestAccAWSLaunchConfigurationDataSource_basic
=== RUN   TestAccAWSLaunchConfigurationDataSource_securityGroups
=== PAUSE TestAccAWSLaunchConfigurationDataSource_securityGroups
=== RUN   TestAccAWSLaunchConfigurationDataSource_ebsNoDevice
=== PAUSE TestAccAWSLaunchConfigurationDataSource_ebsNoDevice
=== RUN   TestAccAWSLaunchConfigurationDataSource_metadataOptions
=== PAUSE TestAccAWSLaunchConfigurationDataSource_metadataOptions
=== RUN   TestAccAWSLaunchConfiguration_basic
=== PAUSE TestAccAWSLaunchConfiguration_basic
=== RUN   TestAccAWSLaunchConfiguration_withBlockDevices
=== PAUSE TestAccAWSLaunchConfiguration_withBlockDevices
=== RUN   TestAccAWSLaunchConfiguration_withInstanceStoreAMI
=== PAUSE TestAccAWSLaunchConfiguration_withInstanceStoreAMI
=== RUN   TestAccAWSLaunchConfiguration_RootBlockDevice_AmiDisappears
=== PAUSE TestAccAWSLaunchConfiguration_RootBlockDevice_AmiDisappears
=== RUN   TestAccAWSLaunchConfiguration_RootBlockDevice_VolumeSize
=== PAUSE TestAccAWSLaunchConfiguration_RootBlockDevice_VolumeSize
=== RUN   TestAccAWSLaunchConfiguration_encryptedRootBlockDevice
=== PAUSE TestAccAWSLaunchConfiguration_encryptedRootBlockDevice
=== RUN   TestAccAWSLaunchConfiguration_withSpotPrice
=== PAUSE TestAccAWSLaunchConfiguration_withSpotPrice
=== RUN   TestAccAWSLaunchConfiguration_withVpcClassicLink
=== PAUSE TestAccAWSLaunchConfiguration_withVpcClassicLink
=== RUN   TestAccAWSLaunchConfiguration_withIAMProfile
=== PAUSE TestAccAWSLaunchConfiguration_withIAMProfile
=== RUN   TestAccAWSLaunchConfiguration_withEncryption
=== PAUSE TestAccAWSLaunchConfiguration_withEncryption
=== RUN   TestAccAWSLaunchConfiguration_withGP3
=== PAUSE TestAccAWSLaunchConfiguration_withGP3
=== RUN   TestAccAWSLaunchConfiguration_updateEbsBlockDevices
=== PAUSE TestAccAWSLaunchConfiguration_updateEbsBlockDevices
=== RUN   TestAccAWSLaunchConfiguration_metadataOptions
=== PAUSE TestAccAWSLaunchConfiguration_metadataOptions
=== RUN   TestAccAWSLaunchConfiguration_ebs_noDevice
=== PAUSE TestAccAWSLaunchConfiguration_ebs_noDevice
=== RUN   TestAccAWSLaunchConfiguration_userData
=== PAUSE TestAccAWSLaunchConfiguration_userData
=== CONT  TestAccAWSLaunchConfigurationDataSource_basic
=== CONT  TestAccAWSLaunchConfiguration_userData
=== CONT  TestAccAWSLaunchConfiguration_encryptedRootBlockDevice
=== CONT  TestAccAWSLaunchConfiguration_withGP3
=== CONT  TestAccAWSLaunchConfiguration_withEncryption
=== CONT  TestAccAWSLaunchConfigurationDataSource_securityGroups
=== CONT  TestAccAWSLaunchConfiguration_RootBlockDevice_VolumeSize
=== CONT  TestAccAWSLaunchConfiguration_RootBlockDevice_AmiDisappears
=== CONT  TestAccAWSLaunchConfiguration_withInstanceStoreAMI
=== CONT  TestAccAWSLaunchConfiguration_withIAMProfile
=== CONT  TestAccAWSLaunchConfigurationDataSource_metadataOptions
=== CONT  TestAccAWSLaunchConfiguration_withBlockDevices
=== CONT  TestAccAWSLaunchConfiguration_basic
=== CONT  TestAccAWSLaunchConfiguration_updateEbsBlockDevices
=== CONT  TestAccAWSLaunchConfiguration_withSpotPrice
=== CONT  TestAccAWSLaunchConfigurationDataSource_ebsNoDevice
=== CONT  TestAccAWSLaunchConfiguration_ebs_noDevice
=== CONT  TestAccAWSLaunchConfiguration_metadataOptions
=== CONT  TestAccAWSLaunchConfiguration_withVpcClassicLink
--- PASS: TestAccAWSLaunchConfiguration_withSpotPrice (29.02s)
--- PASS: TestAccAWSLaunchConfiguration_withInstanceStoreAMI (29.86s)
--- PASS: TestAccAWSLaunchConfigurationDataSource_metadataOptions (30.00s)
--- PASS: TestAccAWSLaunchConfigurationDataSource_ebsNoDevice (30.99s)
--- PASS: TestAccAWSLaunchConfiguration_metadataOptions (31.84s)
--- PASS: TestAccAWSLaunchConfigurationDataSource_basic (32.47s)
--- PASS: TestAccAWSLaunchConfiguration_ebs_noDevice (34.11s)
--- PASS: TestAccAWSLaunchConfiguration_withGP3 (35.72s)
--- PASS: TestAccAWSLaunchConfiguration_withEncryption (35.94s)
--- PASS: TestAccAWSLaunchConfiguration_withBlockDevices (35.96s)
--- PASS: TestAccAWSLaunchConfiguration_encryptedRootBlockDevice (39.75s)
--- PASS: TestAccAWSLaunchConfiguration_withIAMProfile (41.09s)
--- PASS: TestAccAWSLaunchConfigurationDataSource_securityGroups (42.01s)
--- PASS: TestAccAWSLaunchConfiguration_withVpcClassicLink (44.12s)
--- PASS: TestAccAWSLaunchConfiguration_basic (46.57s)
--- PASS: TestAccAWSLaunchConfiguration_userData (47.53s)
--- PASS: TestAccAWSLaunchConfiguration_updateEbsBlockDevices (48.62s)
--- PASS: TestAccAWSLaunchConfiguration_RootBlockDevice_VolumeSize (49.88s)
--- PASS: TestAccAWSLaunchConfiguration_RootBlockDevice_AmiDisappears (355.32s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	358.873s
GovCloud
% make testacc TEST=./aws TESTARGS='-run=TestAccAWSLaunchConfigurationDataSource_\|TestAccAWSLaunchConfiguration_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSLaunchConfigurationDataSource_\|TestAccAWSLaunchConfiguration_ -timeout 180m
=== RUN   TestAccAWSLaunchConfigurationDataSource_basic
=== PAUSE TestAccAWSLaunchConfigurationDataSource_basic
=== RUN   TestAccAWSLaunchConfigurationDataSource_securityGroups
=== PAUSE TestAccAWSLaunchConfigurationDataSource_securityGroups
=== RUN   TestAccAWSLaunchConfigurationDataSource_ebsNoDevice
=== PAUSE TestAccAWSLaunchConfigurationDataSource_ebsNoDevice
=== RUN   TestAccAWSLaunchConfigurationDataSource_metadataOptions
=== PAUSE TestAccAWSLaunchConfigurationDataSource_metadataOptions
=== RUN   TestAccAWSLaunchConfiguration_basic
=== PAUSE TestAccAWSLaunchConfiguration_basic
=== RUN   TestAccAWSLaunchConfiguration_withBlockDevices
=== PAUSE TestAccAWSLaunchConfiguration_withBlockDevices
=== RUN   TestAccAWSLaunchConfiguration_withInstanceStoreAMI
=== PAUSE TestAccAWSLaunchConfiguration_withInstanceStoreAMI
=== RUN   TestAccAWSLaunchConfiguration_RootBlockDevice_AmiDisappears
=== PAUSE TestAccAWSLaunchConfiguration_RootBlockDevice_AmiDisappears
=== RUN   TestAccAWSLaunchConfiguration_RootBlockDevice_VolumeSize
=== PAUSE TestAccAWSLaunchConfiguration_RootBlockDevice_VolumeSize
=== RUN   TestAccAWSLaunchConfiguration_encryptedRootBlockDevice
=== PAUSE TestAccAWSLaunchConfiguration_encryptedRootBlockDevice
=== RUN   TestAccAWSLaunchConfiguration_withSpotPrice
=== PAUSE TestAccAWSLaunchConfiguration_withSpotPrice
=== RUN   TestAccAWSLaunchConfiguration_withVpcClassicLink
=== PAUSE TestAccAWSLaunchConfiguration_withVpcClassicLink
=== RUN   TestAccAWSLaunchConfiguration_withIAMProfile
=== PAUSE TestAccAWSLaunchConfiguration_withIAMProfile
=== RUN   TestAccAWSLaunchConfiguration_withEncryption
=== PAUSE TestAccAWSLaunchConfiguration_withEncryption
=== RUN   TestAccAWSLaunchConfiguration_withGP3
=== PAUSE TestAccAWSLaunchConfiguration_withGP3
=== RUN   TestAccAWSLaunchConfiguration_updateEbsBlockDevices
=== PAUSE TestAccAWSLaunchConfiguration_updateEbsBlockDevices
=== RUN   TestAccAWSLaunchConfiguration_metadataOptions
=== PAUSE TestAccAWSLaunchConfiguration_metadataOptions
=== RUN   TestAccAWSLaunchConfiguration_ebs_noDevice
=== PAUSE TestAccAWSLaunchConfiguration_ebs_noDevice
=== RUN   TestAccAWSLaunchConfiguration_userData
=== PAUSE TestAccAWSLaunchConfiguration_userData
=== CONT  TestAccAWSLaunchConfigurationDataSource_basic
=== CONT  TestAccAWSLaunchConfiguration_withSpotPrice
=== CONT  TestAccAWSLaunchConfiguration_basic
=== CONT  TestAccAWSLaunchConfiguration_withGP3
=== CONT  TestAccAWSLaunchConfigurationDataSource_metadataOptions
=== CONT  TestAccAWSLaunchConfiguration_withVpcClassicLink
=== CONT  TestAccAWSLaunchConfiguration_ebs_noDevice
=== CONT  TestAccAWSLaunchConfiguration_metadataOptions
=== CONT  TestAccAWSLaunchConfiguration_withInstanceStoreAMI
=== CONT  TestAccAWSLaunchConfiguration_withEncryption
=== CONT  TestAccAWSLaunchConfiguration_withIAMProfile
=== CONT  TestAccAWSLaunchConfiguration_updateEbsBlockDevices
=== CONT  TestAccAWSLaunchConfiguration_userData
=== CONT  TestAccAWSLaunchConfiguration_withBlockDevices
=== CONT  TestAccAWSLaunchConfiguration_encryptedRootBlockDevice
=== CONT  TestAccAWSLaunchConfiguration_RootBlockDevice_VolumeSize
=== CONT  TestAccAWSLaunchConfiguration_RootBlockDevice_AmiDisappears
=== CONT  TestAccAWSLaunchConfigurationDataSource_ebsNoDevice
=== CONT  TestAccAWSLaunchConfigurationDataSource_securityGroups
=== CONT  TestAccAWSLaunchConfiguration_withVpcClassicLink
    ec2_classic_test.go:54: this test can only run in EC2-Classic, platforms available in us-gov-west-1: ["VPC"]
--- SKIP: TestAccAWSLaunchConfiguration_withVpcClassicLink (3.12s)
=== CONT  TestAccAWSLaunchConfiguration_withGP3
    provider_test.go:1103: skipping test for aws-us-gov/us-gov-west-1: Error running apply: exit status 1
        2021/06/02 15:02:49 [DEBUG] Using modified User-Agent: Terraform/0.12.31 HashiCorp-terraform-exec/0.13.3
        
        Error: Error creating launch configuration: ValidationError: gp3 is invalid. Valid volume types are: standard, io1, gp2, st1, sc1
        	status code: 400, request id: ebc0d1eb-73f7-40c7-a293-acf47bcb10e9
        
          on terraform_plugin_test.tf line 17, in resource "aws_launch_configuration" "test":
          17: resource "aws_launch_configuration" "test" {
        
        
--- SKIP: TestAccAWSLaunchConfiguration_withGP3 (10.66s)
--- PASS: TestAccAWSLaunchConfigurationDataSource_metadataOptions (32.04s)
--- PASS: TestAccAWSLaunchConfigurationDataSource_basic (34.48s)
--- PASS: TestAccAWSLaunchConfiguration_withSpotPrice (34.49s)
--- PASS: TestAccAWSLaunchConfigurationDataSource_ebsNoDevice (34.61s)
--- PASS: TestAccAWSLaunchConfiguration_metadataOptions (35.53s)
--- PASS: TestAccAWSLaunchConfiguration_withInstanceStoreAMI (35.99s)
--- PASS: TestAccAWSLaunchConfiguration_ebs_noDevice (36.49s)
--- PASS: TestAccAWSLaunchConfiguration_withBlockDevices (37.59s)
--- PASS: TestAccAWSLaunchConfiguration_withEncryption (37.88s)
--- PASS: TestAccAWSLaunchConfiguration_withIAMProfile (40.76s)
--- PASS: TestAccAWSLaunchConfiguration_encryptedRootBlockDevice (41.84s)
--- PASS: TestAccAWSLaunchConfigurationDataSource_securityGroups (42.11s)
--- PASS: TestAccAWSLaunchConfiguration_userData (47.45s)
--- PASS: TestAccAWSLaunchConfiguration_basic (51.17s)
--- PASS: TestAccAWSLaunchConfiguration_updateEbsBlockDevices (52.70s)
--- PASS: TestAccAWSLaunchConfiguration_RootBlockDevice_VolumeSize (54.52s)
--- PASS: TestAccAWSLaunchConfiguration_RootBlockDevice_AmiDisappears (369.78s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	372.903s

@ewbankkit
Copy link
Contributor

@akshayjain1996 Thanks for the contribution 🎉 👏.
Everything looks great.
In order to get this merged quickly I went ahead and pushed a few minor additions:

  1. Added a CHANGELOG entry file
  2. Suppressed Error creating launch configuration: ValidationError: gp3 is invalid. Valid volume types are: standard, io1, gp2, st1, sc1 error for GovCloud testing
  3. Added the equivalent attributes to the aws_launch_configuration data source (not always strictly necessary but here the resource and the data source share the same API reading code so an error would result if the changes weren't made)

@ewbankkit ewbankkit merged commit fdcf6c8 into hashicorp:main Jun 2, 2021
@github-actions github-actions bot added this to the v3.44.0 milestone Jun 2, 2021
@ghost
Copy link

ghost commented Jun 3, 2021

This has been released in version 3.44.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 for triage. Thanks!

@github-actions
Copy link

github-actions bot commented Jul 4, 2021

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 4, 2021
@justinretzolk justinretzolk added the partner Contribution from a partner. label May 16, 2024
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. partner Contribution from a partner. service/autoscaling Issues and PRs that pertain to the autoscaling service. size/M 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.

3 participants