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 default values does not match documentation #20493

Closed
cc-jhr opened this issue Aug 9, 2021 · 3 comments
Closed

aws_launch_template default values does not match documentation #20493

cc-jhr opened this issue Aug 9, 2021 · 3 comments
Labels
documentation Introduces or discusses updates to documentation. service/ec2 Issues and PRs that pertain to the ec2 service.

Comments

@cc-jhr
Copy link

cc-jhr commented Aug 9, 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: 1.0.4
aws provider: 3.53.0

Affected Resource(s)

  • aws_launch_template

Terraform Configuration Files

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

# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. For
# security, you can also encrypt the files using our GPG public key: https://keybase.io/hashicorp
resource "aws_launch_template" "this" {
  name = "test"
  image_id = data.aws_ami.amazon_linux.image_id
  instance_type = "t3a.nano"
  vpc_security_group_ids = [
    "ID HERE"
  ]

  metadata_options {
    # not setting http_endpoint!
    http_tokens = "required"  
  }
}

Debug Output

Panic Output

Expected Behavior

As stated in the documentation I would expect the default value for http_endpoint to be enabled and therefore I would expect that no error would be thrown.

Actual Behavior

An error is thrown indicating that the string is actually empty.

Error: InvaldiParameterValue: A value of '' is not valid for http-endpoint. Valid values are 'enabled' or 'disabled'

From my perspective either the documentation is incorrect or the default value is missing in the provider.

Steps to Reproduce

  1. terraform apply

Important Factoids

References

  • #0000
@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. service/ec2 Issues and PRs that pertain to the ec2 service. labels Aug 9, 2021
@ewbankkit ewbankkit added documentation Introduces or discusses updates to documentation. and removed needs-triage Waiting for first response or review from a maintainer. labels Aug 9, 2021
nicwaller added a commit to nicwaller/terraform-provider-aws that referenced this issue Aug 26, 2021
As shown in hashicorp#20493 the documentation does not accurately reflect the current observed behaviour of this provider. The docs say that metadata_options.http_endpoint is optional, but the provider gives an error if http_endpoint is omitted.
@nicwaller
Copy link
Contributor

I opened a pull request (#20701) to fix the docs.

breathingdust pushed a commit that referenced this issue Aug 26, 2021
As shown in #20493 the documentation does not accurately reflect the current observed behaviour of this provider. The docs say that metadata_options.http_endpoint is optional, but the provider gives an error if http_endpoint is omitted.
nikhil-goenka pushed a commit to nikhil-goenka/terraform-provider-aws that referenced this issue Sep 2, 2021
…orp#20701)

As shown in hashicorp#20493 the documentation does not accurately reflect the current observed behaviour of this provider. The docs say that metadata_options.http_endpoint is optional, but the provider gives an error if http_endpoint is omitted.
@justinretzolk
Copy link
Member

Fixed with #20701; closing

@github-actions
Copy link

github-actions bot commented Jun 3, 2022

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 have found a problem that seems similar to this, 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 Jun 3, 2022
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. service/ec2 Issues and PRs that pertain to the ec2 service.
Projects
None yet
Development

No branches or pull requests

4 participants