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_instance doesn't correctly populate the default http_endpoint metadata_option #16781

Closed
chenjie opened this issue Dec 16, 2020 · 2 comments · Fixed by #24774
Closed

aws_instance doesn't correctly populate the default http_endpoint metadata_option #16781

chenjie opened this issue Dec 16, 2020 · 2 comments · Fixed by #24774
Labels
bug Addresses a defect in current functionality. service/ec2 Issues and PRs that pertain to the ec2 service.
Milestone

Comments

@chenjie
Copy link
Contributor

chenjie commented Dec 16, 2020

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 v0.13.5
+ provider registry.terraform.io/hashicorp/aws v3.21.0

Affected Resource(s)

  • aws_instance

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_instance" "test" {
  ami = "ami-085925f297f89fce1"
  instance_type = "t2.micro"

  metadata_options {
    http_tokens = "required"
  }
}

Debug Output

Panic Output

Expected Behavior

it should create an AWS EC2 instance without any errors

Actual Behavior

aws_instance.test: Creating...

Error: Error launching source instance: InvalidParameterValue: A value of '' is not valid for HttpEndpoint. Specify either 'enabled' or 'disabled' and try again.
        status code: 400, request id: 3b732dc2-23c6-4d87-88d6-9d0b66794f90

Steps to Reproduce

  1. terraform apply

Important Factoids

References

Explicitly assigning a value to http_endpoint attribute works, but the doc says it is optional and defaults to "enabled". Therefore, I should be able to create an instance without explicitly specifying it.

@ghost ghost added the service/ec2 Issues and PRs that pertain to the ec2 service. label Dec 16, 2020
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Dec 16, 2020
@breathingdust breathingdust added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Sep 16, 2021
@github-actions github-actions bot added this to the v5.3.0 milestone Jun 9, 2023
@github-actions
Copy link

This functionality has been released in v5.3.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. Thank you!

@github-actions
Copy link

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 Jul 14, 2023
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. service/ec2 Issues and PRs that pertain to the ec2 service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants