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

bug: Simplify policy creation check to prevent deploy issues #74

Closed
wants to merge 1 commit into from

Conversation

fatbasstard
Copy link
Contributor

The current check for the role creation is "too complex" for Terraform and causes issues with new deployments:

  count = local.create_policy && var.policy != null ? 1 : 0
The "count" value depends on resource attributes that cannot be determined until apply, so Terraform cannot predict how many instances will be created. To work around this, use the -target argument to first apply only the resources that the count depends on.```

To make deployments possible again, this PR removed the `var.policy != null` part of the check. This might cause deploy time issues in situations where an invalid configuration is passed, but at least makes deployments of new Lambda's possible again.

This needs to refactoring in the future, but this is a hotfix for now

@github-actions github-actions bot added the bug Something isn't working label Apr 23, 2024
Copy link
Contributor

Terraform Format and Style 🖌success

Terraform Initialization ⚙️``

Terraform Lint 📖success

Terraform Validation 🤖success

Validation Output

Success! The configuration is valid.


@fatbasstard fatbasstard changed the title fix : Simplify policy creation check to prevent deploy issues bug : Simplify policy creation check to prevent deploy issues Apr 23, 2024
@fatbasstard fatbasstard changed the title bug : Simplify policy creation check to prevent deploy issues bug: Simplify policy creation check to prevent deploy issues Apr 23, 2024
@fatbasstard
Copy link
Contributor Author

In theory obsolete by PR #75

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant