-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
fix: Mark the output of the AMI ID as nonsensitive #338
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks rather weird to use nonsensitive()
on something that is non-sensitive already.
I didn't run the code, but doing a quick look, I can see that ami
is not Sensitive
(https://github.com/GlennChia/terraform-provider-aws/blob/c144b0ccdbd72fe48402b8f9c16b2b63bc92ee94/internal/service/ec2/ec2_instance.go#L61-L67) comparing to this one - https://github.com/hashicorp/terraform-provider-aws/pull/15806/files#diff-2ca8a5d4b6a401ecaf569c24a40caed9842f4fc0f88eb2cf218829d8d4c5485bR41
@antonbabenko To be honest, I am pretty confused too. The problem only occurred with one of two modules. Possibly the problem is caused by Terragrunt, although both modules get the AMI ID via a data source. In any case, this was the only way to get rid of the error message. It feels wrong, but it does not hurt either. ;) |
The problem with using More info - hashicorp/terraform#31646 I'd rather find a better solution to the problem than wrap it like you do in this PR. |
@antonbabenko I just passed the input values to a
The changes can be ignored because the EC2 instance was stopped by a lambda function. I also can confirm that the input value of the AMI is not sensitive.
By the way, this error only occurs if I set |
I've tried to reproduce the issue and made #340 but it just works as expected. Could you please try to run the example and see if you can provide me with the failing example? |
I use this Terraform module for two different use cases and in a total of three environments. However, for some reason, only one of two use cases and two of three environments were affected. So I did some investigation and there seems to be a correlation with the migration from @antonbabenko Sorry for wasting your time. |
Glad to hear that the problem is resolved! Also, now we have an example (aka test case) as code :) |
I'm going to lock this pull request 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 related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Description
Using the latest version of this Terraform module and the AWS provider causes the following error message.
Motivation and Context
I would like to be able to use this Terraform module again without causing any error messages. Since the AMI ID is not sensitive anyway, this change should not be a problem.
Breaking Changes
This change does not break backwards compatibility with the current major version.
How Has This Been Tested?
examples/*
to demonstrate and validate my change(s)examples/*
projectspre-commit run -a
on my pull request