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

aws_launch_template tag_specifications missing network-interface resource_type #17467

Closed
DonBower opened this issue Feb 4, 2021 · 3 comments
Closed
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/ec2 Issues and PRs that pertain to the ec2 service.

Comments

@DonBower
Copy link

DonBower commented Feb 4, 2021

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue 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 issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform CLI and Terraform AWS Provider Version

Terraform Version 0.13.5
Providers:

  • hashicorp/aws: version = "~> 3.26.0"
  • hashicorp/tls: version = "~> 3.0.0"
  • hashicorp/vault: version = "~> 2.18.0"

Affected Resource(s)

  • aws_launch_template
  • tag_specifications

Terraform Configuration Files

Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.

resource "aws_launch_template" "thisLT" {
  ...
  ...
  ...
  dynamic tag_specifications {
    for_each                           = ["instance", "volume", "elastic-gpu", "spot-instances-request", "network-interface"]
#    for_each                           = ["instance", "volume", "elastic-gpu", "spot-instances-request"]
    content {
      resource_type                    = tag_specifications.value

      tags                             = merge(
       var.tagsK8s,
       var.tagsAIG,
       map(
         "Name",local.templateName
        )
      )
    }
  }
}

Debug Output

Error: expected tag_specifications.4.resource_type to be one of [instance volume spot-instances-request elastic-gpu], got network-interface

on /Users/dobower/Developer/ent-devops-tf/tf-paas-source/paas/launchTemplate/main.tf line 1, in resource "aws_launch_template" "thisLT":
1: resource "aws_launch_template" "thisLT" {

Panic Output

Expected Behavior

Create propagated tags for network interfaces

Actual Behavior

failed

Steps to Reproduce

  1. terraform plan

Important Factoids

References

  • #0000
@ghost ghost added the service/ec2 Issues and PRs that pertain to the ec2 service. label Feb 4, 2021
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Feb 4, 2021
@ewbankkit ewbankkit added the enhancement Requests to existing resources that expand the functionality or scope. label Feb 4, 2021
@ewbankkit
Copy link
Contributor

@DonBower Thanks for raising this issue.

According to the AWS User Guide:

You can tag the instance, the volumes, Spot Instance requests, or all three.

whereas the AWS API reference says:

You can only tag instances and volumes on launch.

In the AWS console:

create-launch-template

which is what the AWS Provider code has implemented.

To tag any other EC2 resources created implicitly via the launch template you can use the aws_ec2_tag resource.

@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label Feb 4, 2021
@ghost
Copy link

ghost commented Mar 7, 2021

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 as resolved and limited conversation to collaborators Mar 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/ec2 Issues and PRs that pertain to the ec2 service.
Projects
None yet
Development

No branches or pull requests

2 participants