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

fix: Avoid invalid-index when controllers disabled #44

Merged
merged 1 commit into from
Jul 5, 2023

Conversation

bdellegrazie
Copy link
Contributor

When emrcontainers or step function capabilties were disabled, Terraform would try to assign the associated policy. The policy doesn't exist because that component is disabled.

fixes: #43

What does this PR do?

avoids trying to reference the (non-existent) policy when the particular functionality (emr containers or step functions) is disabled

Motivation

At the moment, I only need the rds controller.

Test Results

I have tested locally and it works without error now.
I have added a "fully disabled" module to the example which should test all controllers in their default disabled mode.
If this is problematic, happy for it to be removed.

@bdellegrazie bdellegrazie requested a review from a team as a code owner July 5, 2023 08:34
@bdellegrazie bdellegrazie changed the title fix: avoid invalid-index when disabled fix: Avoid invalid-index when controllers disabled Jul 5, 2023
Copy link
Contributor

@askulkarni2 askulkarni2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @bdellegrazie, thanks for reporting the issue and providing the PR!

main.tf Outdated Show resolved Hide resolved
examples/complete/main.tf Outdated Show resolved Hide resolved
When emrcontainers or step function capabilties were disabled, Terraform
would try to assign the associated policy. The policy doesn't exist
because that component is disabled.

As a test, an all controllers disabled module has been added to the example.

fixes: aws-ia#43
main.tf Show resolved Hide resolved
@askulkarni2 askulkarni2 merged commit 701b266 into aws-ia:main Jul 5, 2023
@bdellegrazie bdellegrazie deleted the fix/invalid-index branch July 5, 2023 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid index error when emrcontainers or step functions (sfn) are not enabled
2 participants