-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Labels
bugSomething isn't workingSomething isn't workingnewAdded to an issue when it's new ;)Added to an issue when it's new ;)staleOpen for 30 days with no activityOpen for 30 days with no activity
Description
Terraform Version Details
{
"terraform_version": "\"1.8.0\"",
"terraform_revision": "null",
"terraform_outdated": "true",
"provider_selections": "{\"registry.terraform.io/hashicorp/aws\":\"5.95.0\",\"registry.terraform.io/hashicorp/cloudinit\":\"2.3.7\",\"registry.terraform.io/hashicorp/external\":\"2.3.4\",\"registry.terraform.io/hashicorp/kubernetes\":\"2.36.0\",\"registry.terraform.io/hashicorp/local\":\"2.5.2\",\"registry.terraform.io/hashicorp/null\":\"3.2.4\",\"registry.terraform.io/hashicorp/random\":\"3.7.2\",\"registry.terraform.io/hashicorp/time\":\"0.13.0\",\"registry.terraform.io/hashicorp/tls\":\"4.0.6\"}"
}Terraform Variable File Details
"metadata_http_put_response_hop_limit" = 2
Steps to Reproduce
Set the value of metadata_http_put_response_hop_limit to 2 and run terraform plan, the log will show:
~ metadata_options {
+ http_endpoint = "enabled"
~ http_put_response_hop_limit = 2 -> 1
+ http_tokens = "required"
# (2 unchanged attributes hidden)
}Expected Behavior
The expectation is that the value provided in the terraform.tfvars file will take precedence over any default values. The code in question that seems to be overriding the value provided in terraform.tfvars is this:
Line 123 in 1936403
| metadata_options = { |
I resolved the issue by changed the code shown in the link with this:
metadata_options = {
http_endpoint = lookup(np_value, "metadata_http_endpoint", var.default_nodepool_metadata_http_endpoint)
http_tokens = lookup(np_value, "metadata_http_tokens", var.default_nodepool_metadata_http_tokens)
http_put_response_hop_limit = lookup(np_value, "metadata_http_put_response_hop_limit", var.default_nodepool_metadata_http_put_response_hop_limit)
}Actual Behavior
When you set the value of metadata_http_put_response_hop_limit to 2 and run terraform plan the plan shows that the value of provided in the terraform.tfvars value is ignored.
Additional Context
No response
References
No response
Code of Conduct
- I agree to follow this project's Code of Conduct
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingnewAdded to an issue when it's new ;)Added to an issue when it's new ;)staleOpen for 30 days with no activityOpen for 30 days with no activity