-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
feat: Remove call data ssm parameter when ami id is specified #351
feat: Remove call data ssm parameter when ami id is specified #351
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.
Please approve it
## [5.3.0](v5.2.1...v5.3.0) (2023-08-16) ### Features * Remove call data ssm parameter when ami id is specified ([#351](#351)) ([7ffc3dd](7ffc3dd))
This PR is included in version 5.3.0 🎉 |
Hello, I am recently trying to use this module and ran into this issue
It seems like it might be due to merging this PR. The reason I believe is that the ami variable is always getting set to null because
|
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. |
#350 Description:
Description
Create an ec2 instance without ssm permission with cause error.
This account or role can still create an instance in console.
The root cause is because this line of code in main.tf in line 9:
Request to make the call data aws_ssm_parameter optional, something like when ami is specified, then no need to call ssm parameter to get the ami id:
Because it coalesce the
var.ami
and thenonsensitive(data.aws_ssm_parameter.this[0].value))
, so we only need it whenvar.ami
is not specified. So it should be check for null when use data to call to ssm.Versions
Module version [Required]: 5.2.1
Terraform version: any version
Provider version(s): any version
Reproduction Code [Required]
Steps to reproduce the behavior:
Expected behavior
Create an instance without ssm parameter permission
Actual behavior
Cannot create instance because missing permission