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

Remove enabled ternary on providers #82

Merged
merged 3 commits into from
Jan 25, 2024

Conversation

tommij
Copy link
Contributor

@tommij tommij commented Dec 4, 2023

what

removal of enabled part of the for_each ternary, as it disables assume_role on enabled = false, which blocks teardown.

why

  • local.enabled ternary causes no provider to be present on enabled = false, preventing teardown.

references

@tommij tommij requested review from a team as code owners December 4, 2023 11:23
Copy link
Member

@aknysh aknysh left a comment

Choose a reason for hiding this comment

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

thanks @tommij

Copy link
Member

@aknysh aknysh left a comment

Choose a reason for hiding this comment

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

thanks @tommij

@aknysh
Copy link
Member

aknysh commented Jan 4, 2024

/terratest

@aknysh
Copy link
Member

aknysh commented Jan 4, 2024

@tommij can you please run the following commands and commit the changes:

make init
make github/init
make readme

Copy link
Member

@aknysh aknysh left a comment

Choose a reason for hiding this comment

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

please rebuild README again

@nitrocode nitrocode changed the title remove enabled flags to fix #81 Remove enabled ternary on providers Jan 5, 2024
@nitrocode
Copy link
Member

Just note that this reverts #56 pr. Honestly we need to remove the providers from this module so the root terraform dir that consumes this module can fully control the provider.

See

@tommij
Copy link
Contributor Author

tommij commented Jan 8, 2024

Just note that this reverts #56 pr. Honestly we need to remove the providers from this module so the root terraform dir that consumes this module can fully control the provider.

See

Not necessarily in disagreement - but I also don't think providers should be be ternary enabled/disabled at any point, as that would effectively mean that you cannot remove resources created with the module. Resources is another thing entirely.

Fortunately, disabled was only the case for assume role parameters, and nothing else - on account of the implementation.

It seems we may have been the only ones using assume_role with role chaining that have tried to set enabled = false with this module, but we did eventually get there :)

@tommij tommij requested a review from aknysh January 9, 2024 09:46
@aknysh
Copy link
Member

aknysh commented Jan 24, 2024

@tommij thank you, please address this:

README.md is outdated. Please run the following commands locally and push the file:
  make init
  make github/init
  make readme

We'll approve the PR since I agree with you that providers should not be disabled in any case (providers are not resources)

Copy link
Member

@aknysh aknysh left a comment

Choose a reason for hiding this comment

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

please see comments

@tommij tommij requested a review from aknysh January 25, 2024 12:32
@aknysh
Copy link
Member

aknysh commented Jan 25, 2024

/terratest

Copy link
Member

@aknysh aknysh left a comment

Choose a reason for hiding this comment

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

thanks @tommij

@aknysh aknysh merged commit 85a0dc3 into cloudposse:main Jan 25, 2024
10 of 11 checks passed
@tommij tommij deleted the provider_assumerole_ternary_fix branch January 30, 2024 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants