-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
fix: simplify count statements #93
fix: simplify count statements #93
Conversation
@bryantbiggs if you have some time to take a look. |
@@ -51,7 +51,7 @@ resource "aws_iam_policy" "iam_self_management" { | |||
} | |||
|
|||
resource "aws_iam_policy" "custom" { | |||
count = length(var.custom_group_policies) > 0 ? length(var.custom_group_policies) : 0 | |||
count = length(var.custom_group_policies) |
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.
looks good - might be worth considering a refactor to for_each
with an array of maps. just food for thought
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.
ill go over he module and see where this refactor is needed. i wanted to make changes more incremental
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.
looks good to me - @antonbabenko?
Nice and sweet 👍 v2.20.0 has been just released. |
* upstream/master: (26 commits) Updated CHANGELOG fix: Fixed ses_smtp_password_v4 output name Updated CHANGELOG fix: simplify count statements (terraform-aws-modules#93) Updated CHANGELOG fix: Allow running on custom AWS partition (incl. govcloud) (terraform-aws-modules#94) Updated CHANGELOG feat: modules/iam-assumable-role-with-oidc: Support multiple provider URLs (terraform-aws-modules#91) Updated CHANGELOG feat: Strip https:// from OIDC provider URL if present (terraform-aws-modules#50) Updated CHANGELOG fix: Allow modules/iam-assumable-role-with-oidc to work in govcloud (terraform-aws-modules#83) Updated CHANGELOG feat: Added support for sts:ExternalId in modules/iam-assumable-role (terraform-aws-modules#90) Updated CHANGELOG fix: Delete DEPRECATED ses_smtp_password in iam-user. (terraform-aws-modules#88) Updated CHANGELOG feat: Support for Terraform v0.13 and AWS provider v3 (terraform-aws-modules#87) docs: Updated example in README (terraform-aws-modules#52) Updated CHANGELOG ...
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
Simplify Count statement in 2 cases of policy attachments as it causes failures during apply in some cases
Motivation and Context
Simplify Count statement in 2 cases of policy attachments as it causes failures during apply in some cases
Breaking Changes
No.
How Has This Been Tested?
Yes.