Terraform-provider-aws: Document the options available for aws_launch_template's tag_specifications' resource_type

Created on 25 May 2018  ·  5Comments  ·  Source: hashicorp/terraform-provider-aws

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 "me too" comments, 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

Description

I'd love to see some extra documentation around the aws_launch_template's tagging functionality - in particular, the valid resource_types that can be used other than instance.

New or Affected Resource(s)

References

  • _Semi_-related to #4650 request for tagging support on the launch_template itself
documentation servicec2

Most helpful comment

I agree this would be helpful.

For others looking for which resource types are supported, the only two I know of are instance and volume.

To tag both instances and volumes simply use two blocks:

  tag_specifications {
    resource_type = "volume"
    tags          = "${var.tags}"
  }

  tag_specifications {
    resource_type = "instance"
    tags          = "${var.tags}"
  }

All 5 comments

I agree this would be helpful.

For others looking for which resource types are supported, the only two I know of are instance and volume.

To tag both instances and volumes simply use two blocks:

  tag_specifications {
    resource_type = "volume"
    tags          = "${var.tags}"
  }

  tag_specifications {
    resource_type = "instance"
    tags          = "${var.tags}"
  }

FYI the resource documentation page lives at: https://github.com/terraform-providers/terraform-provider-aws/blob/master/website/docs/r/launch_template.html.markdown

Generally we prefer to point to existing AWS documentation in this case, in fact this seems like a good start: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_LaunchTemplateTagSpecificationRequest.html

I've submitted a PR to add the link and validate the two currently valid values in the schema: #4765

The documentation update will release with version 1.23.0 of the AWS provider, likely middle of next week. 👍

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

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!

Was this page helpful?
0 / 5 - 0 ratings