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

d/aws_launch_configuration: Add 'ebs_block_device.no_device' attribute #14583

Conversation

ewbankkit
Copy link
Contributor

@ewbankkit ewbankkit commented Aug 11, 2020

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

Closes #14572.

Release note for CHANGELOG:

data-source/aws_launch_configuration: Add `no_device` attribute to `ebs_block_device` block

Output from acceptance testing:

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSLaunchConfigurationDataSource_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSLaunchConfigurationDataSource_ -timeout 120m
=== RUN   TestAccAWSLaunchConfigurationDataSource_basic
=== PAUSE TestAccAWSLaunchConfigurationDataSource_basic
=== RUN   TestAccAWSLaunchConfigurationDataSource_securityGroups
=== PAUSE TestAccAWSLaunchConfigurationDataSource_securityGroups
=== RUN   TestAccAWSLaunchConfigurationDataSource_ebsNoDevice
=== PAUSE TestAccAWSLaunchConfigurationDataSource_ebsNoDevice
=== CONT  TestAccAWSLaunchConfigurationDataSource_basic
=== CONT  TestAccAWSLaunchConfigurationDataSource_securityGroups
=== CONT  TestAccAWSLaunchConfigurationDataSource_ebsNoDevice
--- PASS: TestAccAWSLaunchConfigurationDataSource_ebsNoDevice (22.88s)
--- PASS: TestAccAWSLaunchConfigurationDataSource_basic (23.22s)
--- PASS: TestAccAWSLaunchConfigurationDataSource_securityGroups (32.59s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	32.644s

…rce_ebsNoDevice'.

Acceptance test output:

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSLaunchConfigurationDataSource_ebsNoDevice'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSLaunchConfigurationDataSource_ebsNoDevice -timeout 120m
=== RUN   TestAccAWSLaunchConfigurationDataSource_ebsNoDevice
=== PAUSE TestAccAWSLaunchConfigurationDataSource_ebsNoDevice
=== CONT  TestAccAWSLaunchConfigurationDataSource_ebsNoDevice
panic: Invalid address to set: []string{"ebs_block_device", "0", "no_device"}

goroutine 281 [running]:
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ResourceData).Set(0xc001aa1280, 0x669198b, 0x10, 0x527fee0, 0xc000d65f80, 0x0, 0xc001aa1280)
	/home/kit/wrk/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource_data.go:188 +0x388
github.com/terraform-providers/terraform-provider-aws/aws.readLCBlockDevices(0xc001aa1280, 0xc001b19ba0, 0xc0016c6518, 0x52814e0, 0xc000e65820)
	/home/kit/wrk/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_launch_configuration.go:617 +0xc3
github.com/terraform-providers/terraform-provider-aws/aws.dataSourceAwsLaunchConfigurationRead(0xc001aa1280, 0x5ab98c0, 0xc00080c000, 0xb0afa40, 0x6a9c1b0)
	/home/kit/wrk/src/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_launch_configuration.go:251 +0xa1d
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0xc000378e70, 0x75c4920, 0xc00007b500, 0xc001aa1280, 0x5ab98c0, 0xc00080c000, 0x0, 0x0, 0x0)
	/home/kit/wrk/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource.go:281 +0x88
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).ReadDataApply(0xc000378e70, 0x75c4920, 0xc00007b500, 0xc000e52720, 0x5ab98c0, 0xc00080c000, 0xc00080c000, 0xc000e52720, 0x0, 0x0)
	/home/kit/wrk/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource.go:489 +0xff
github.com/hashicorp/terraform-plugin-sdk/v2/internal/helper/plugin.(*GRPCProviderServer).ReadDataSource(0xc0008e8080, 0x75c4920, 0xc00007b500, 0xc00007b4c0, 0xc0008e8080, 0xc0008e8090, 0x6a9c1a0)
	/home/kit/wrk/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/helper/plugin/grpc_provider.go:1102 +0x4c5
github.com/hashicorp/terraform-plugin-sdk/v2/internal/tfplugin5._Provider_ReadDataSource_Handler.func1(0x75c4920, 0xc00007b500, 0x6401a40, 0xc00007b4c0, 0xc00007b500, 0x5c2fce0, 0xc00094e701, 0xc000e52400)
	/home/kit/wrk/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/tfplugin5/tfplugin5.pb.go:3348 +0x86
github.com/hashicorp/terraform-plugin-sdk/v2/plugin.Serve.func3.1(0x75c49e0, 0xc001638570, 0x6401a40, 0xc00007b4c0, 0xc000e523e0, 0xc000e52400, 0xc00172cba0, 0x5094d8, 0x62bf4e0, 0xc001638570)
	/home/kit/wrk/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/plugin/serve.go:76 +0x87
github.com/hashicorp/terraform-plugin-sdk/v2/internal/tfplugin5._Provider_ReadDataSource_Handler(0x6531980, 0xc0008e8080, 0x75c49e0, 0xc001638570, 0xc00094e7e0, 0xc0008e83a0, 0x75c49e0, 0xc001638570, 0xc000dd4780, 0x179)
	/home/kit/wrk/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/tfplugin5/tfplugin5.pb.go:3350 +0x14b
google.golang.org/grpc.(*Server).processUnaryRPC(0xc000dba1c0, 0x75eb560, 0xc00140c000, 0xc001c01600, 0xc001c225d0, 0xb05c0b0, 0x0, 0x0, 0x0)
	/home/kit/wrk/src/github.com/terraform-providers/terraform-provider-aws/vendor/google.golang.org/grpc/server.go:1171 +0x50a
google.golang.org/grpc.(*Server).handleStream(0xc000dba1c0, 0x75eb560, 0xc00140c000, 0xc001c01600, 0x0)
	/home/kit/wrk/src/github.com/terraform-providers/terraform-provider-aws/vendor/google.golang.org/grpc/server.go:1494 +0xccd
google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc000eddec0, 0xc000dba1c0, 0x75eb560, 0xc00140c000, 0xc001c01600)
	/home/kit/wrk/src/github.com/terraform-providers/terraform-provider-aws/vendor/google.golang.org/grpc/server.go:834 +0xa1
created by google.golang.org/grpc.(*Server).serveStreams.func1
	/home/kit/wrk/src/github.com/terraform-providers/terraform-provider-aws/vendor/google.golang.org/grpc/server.go:832 +0x204
FAIL	github.com/terraform-providers/terraform-provider-aws/aws	9.129s
FAIL
GNUmakefile:26: recipe for target 'testacc' failed
make: *** [testacc] Error 1
Acceptance test output:

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSLaunchConfigurationDataSource_ebsNoDevice'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSLaunchConfigurationDataSource_ebsNoDevice -timeout 120m
=== RUN   TestAccAWSLaunchConfigurationDataSource_ebsNoDevice
=== PAUSE TestAccAWSLaunchConfigurationDataSource_ebsNoDevice
=== CONT  TestAccAWSLaunchConfigurationDataSource_ebsNoDevice
--- PASS: TestAccAWSLaunchConfigurationDataSource_ebsNoDevice (19.54s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	19.590s
@ewbankkit ewbankkit requested a review from a team August 11, 2020 21:23
@ghost ghost added size/S Managed by automation to categorize the size of a PR. service/autoscaling Issues and PRs that pertain to the autoscaling service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Aug 11, 2020
@ghost ghost added the documentation Introduces or discusses updates to documentation. label Aug 11, 2020
@ewbankkit ewbankkit added bug Addresses a defect in current functionality. regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. labels Aug 11, 2020
@ewbankkit ewbankkit changed the title d/aws_launch_configuration: Add 'ebs_block_device.no_device' attribute [WIP] d/aws_launch_configuration: Add 'ebs_block_device.no_device' attribute Aug 12, 2020
@ewbankkit
Copy link
Contributor Author

ewbankkit commented Aug 12, 2020

WIP as one of the other acceptance test cases is failing:

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSLaunchConfigurationDataSource_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSLaunchConfigurationDataSource_ -timeout 120m
=== RUN   TestAccAWSLaunchConfigurationDataSource_basic
=== PAUSE TestAccAWSLaunchConfigurationDataSource_basic
=== RUN   TestAccAWSLaunchConfigurationDataSource_securityGroups
=== PAUSE TestAccAWSLaunchConfigurationDataSource_securityGroups
=== RUN   TestAccAWSLaunchConfigurationDataSource_ebsNoDevice
=== PAUSE TestAccAWSLaunchConfigurationDataSource_ebsNoDevice
=== CONT  TestAccAWSLaunchConfigurationDataSource_basic
=== CONT  TestAccAWSLaunchConfigurationDataSource_ebsNoDevice
=== CONT  TestAccAWSLaunchConfigurationDataSource_securityGroups
=== CONT  TestAccAWSLaunchConfigurationDataSource_basic
    data_source_aws_launch_configuration_test.go:16: Check 6/8 error: data.aws_launch_configuration.foo: Attribute 'ebs_block_device.#' expected "1", got "2"
--- FAIL: TestAccAWSLaunchConfigurationDataSource_basic (12.34s)
--- PASS: TestAccAWSLaunchConfigurationDataSource_ebsNoDevice (19.66s)
--- PASS: TestAccAWSLaunchConfigurationDataSource_securityGroups (31.75s)
FAIL
FAIL	github.com/terraform-providers/terraform-provider-aws/aws	31.797s
FAIL
GNUmakefile:26: recipe for target 'testacc' failed
make: *** [testacc] Error 1

Probably due to AMI ID changes introduced in #14147.

…rce_basic'.

Acceptance test output:

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSLaunchConfigurationDataSource_basic'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSLaunchConfigurationDataSource_basic -timeout 120m
=== RUN   TestAccAWSLaunchConfigurationDataSource_basic
=== PAUSE TestAccAWSLaunchConfigurationDataSource_basic
=== CONT  TestAccAWSLaunchConfigurationDataSource_basic
--- PASS: TestAccAWSLaunchConfigurationDataSource_basic (19.27s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	19.317s
@ghost ghost added size/M Managed by automation to categorize the size of a PR. and removed size/S Managed by automation to categorize the size of a PR. labels Aug 12, 2020
@ewbankkit ewbankkit changed the title [WIP] d/aws_launch_configuration: Add 'ebs_block_device.no_device' attribute d/aws_launch_configuration: Add 'ebs_block_device.no_device' attribute Aug 12, 2020
@ewbankkit
Copy link
Contributor Author

Removed WIP. Test fixed.

@bflad bflad self-assigned this Aug 12, 2020
@bflad bflad added this to the v3.2.0 milestone Aug 12, 2020
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

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

Looks good, thanks @ewbankkit 🚀

Output from acceptance testing:

--- PASS: TestAccAWSLaunchConfigurationDataSource_ebsNoDevice (16.78s)
--- PASS: TestAccAWSLaunchConfigurationDataSource_basic (16.97s)
--- PASS: TestAccAWSLaunchConfigurationDataSource_securityGroups (18.15s)

@bflad bflad merged commit 8468412 into hashicorp:master Aug 13, 2020
bflad added a commit that referenced this pull request Aug 13, 2020
@ewbankkit ewbankkit deleted the b-aws_launch_configuration-data-source-mismatched-schema branch August 13, 2020 14:27
@ghost
Copy link

ghost commented Aug 14, 2020

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

@ghost
Copy link

ghost commented Sep 12, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Sep 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. documentation Introduces or discusses updates to documentation. regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. 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
2 participants