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

data aws_launch_configuration throws Error: Invalid address to set: []string{"ebs_block_device", "0", "no_device"} #14572

Closed
ghost opened this issue Aug 11, 2020 · 4 comments · Fixed by #14583
Assignees
Labels
bug Addresses a defect in current functionality. 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.
Milestone

Comments

@ghost
Copy link

ghost commented Aug 11, 2020

This issue was originally opened by @datapromike as hashicorp/terraform#25787. It was migrated here as a result of the provider split. The original body of the issue is below.


Terraform Version

Terraform v0.12.29
+ provider.aws v3.0.0

Terraform Configuration Files

provider "aws" {
  profile = "default"
  secret_key = var.secret_key
  region     = var.aws_region
}

data "aws_launch_configuration" "launch_config" {
  name = "EA-cluster-LaunchConfig1-19A7XZL8FKR8A"
}

Debug Output

Debug Output

Crash Output

N/A

Expected Behavior

Retrieve launch configuration data

Actual Behavior

Returns Error:

data.aws_availability_zones.available: Refreshing state...
data.aws_launch_configuration.launch_config: Refreshing state...

Error: Invalid address to set: []string{"ebs_block_device", "0", "no_device"}

on marklogic-cf-with-tf-exist-vpc.tf line 40, in data "aws_launch_configuration" "launch_config":
40: data "aws_launch_configuration" "launch_config" {

Steps to Reproduce

terraform apply

Additional Context

There are two EBS devices in the launch configuration, both with encrypted set to false:

 <DescribeImagesResponse xmlns="http://ec2.amazonaws.com/doc/2016-11-15/">
     <requestId>2d9d0dd2-9c9c-42af-a290-31c8eea45ecc</requestId>
     <imagesSet>
         <item>
             <imageId>ami-0b08f9840dc6d5f9b</imageId>
             <imageLocation>aws-marketplace/release-MarkLogic-10.0-4.x86_64.rpm-52ce1567-c738-4208-be90-08b575f2c41d-ami-072912159b2174cd4.4</imageLocation>
             <imageState>available</imageState>
             <imageOwnerId>679593333241</imageOwnerId>
             <creationDate>2020-04-16T13:16:50.000Z</creationDate>
             <isPublic>true</isPublic>
             <productCodes>
                 <item>
                     <productCode>4whbpp8cq0qvbyg98jlvmjod9</productCode>
                     <type>marketplace</type>
                 </item>
             </productCodes>
             <architecture>x86_64</architecture>
             <imageType>machine</imageType>
             <sriovNetSupport>simple</sriovNetSupport>
             <imageOwnerAlias>aws-marketplace</imageOwnerAlias>
             <name>release-MarkLogic-10.0-4.x86_64.rpm-52ce1567-c738-4208-be90-08b575f2c41d-ami-072912159b2174cd4.4</name>
             <description>release-MarkLogic-10.0-4.x86_64.rpm</description>
             <rootDeviceType>ebs</rootDeviceType>
             <rootDeviceName>/dev/xvda</rootDeviceName>
             <blockDeviceMapping>
                 <item>
                     <deviceName>/dev/xvda</deviceName>
                     <ebs>
                         <snapshotId>snap-038f64149ad8b9993</snapshotId>
                         <volumeSize>8</volumeSize>
                         <deleteOnTermination>true</deleteOnTermination>
                         <volumeType>gp2</volumeType>
                         <encrypted>false</encrypted>
                     </ebs>
                 </item>
                 <item>
                     <deviceName>/dev/sdf</deviceName>
                     <ebs>
                         <snapshotId>snap-007fd7e86733caab0</snapshotId>
                         <volumeSize>10</volumeSize>
                         <deleteOnTermination>true</deleteOnTermination>
                         <volumeType>gp2</volumeType>
                         <encrypted>false</encrypted>
                     </ebs>
                 </item>
             </blockDeviceMapping>
             <virtualizationType>hvm</virtualizationType>
             <hypervisor>xen</hypervisor>
             <enaSupport>true</enaSupport>
             <platformDetails>Linux/UNIX</platformDetails>
             <usageOperation>RunInstances</usageOperation>
         </item>
     </imagesSet>
 </DescribeImagesResponse>

References

Appears similar to:

@ghost ghost added the service/autoscaling Issues and PRs that pertain to the autoscaling service. label Aug 11, 2020
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. 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. and removed needs-triage Waiting for first response or review from a maintainer. labels Aug 11, 2020
@bflad
Copy link
Contributor

bflad commented Aug 13, 2020

The fix for this has been merged and will release with version 3.2.0 of the Terraform AWS Provider, later today. Thanks to @ewbankkit for the implementation. 👍

@ghost
Copy link
Author

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
Author

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. 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.
Projects
None yet
2 participants