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 apigee addons config conditional expression #1694

Merged

Conversation

eddern
Copy link
Contributor

@eddern eddern commented Sep 19, 2023

I assume the intended behavior of the addons_config in the Apigee module is to enable the addons that are set to true?

As it is now, I need to pass this in order to enable connectors and integration:

addons_config = {
    connectors_platform = false
    integration         = false
    api_security = true
    monetization = true
    advanced_api_ops = true
 }

Checklist

I applicable, I acknowledge that I have:

  • Read the contributing guide
  • Ran terraform fmt on all modified files
  • Regenerated the relevant README.md files using tools/tfdoc.py
  • Made sure all relevant tests pass

modules/apigee/main.tf Outdated Show resolved Hide resolved
@juliocc juliocc enabled auto-merge September 19, 2023 19:31
@juliocc juliocc merged commit ec7a7a9 into GoogleCloudPlatform:master Sep 19, 2023
@eddern
Copy link
Contributor Author

eddern commented Oct 23, 2023

@juliocc after upgrading my Apigee module to the newest version, terraform keeps wanting to update the values to false every time I plan (even though I have applied several times). Any idea why this is?

Screenshot 2023-10-23 at 09 20 06

@eddern
Copy link
Contributor Author

eddern commented Oct 23, 2023

The same applies with all the values explicitly defined in the config as well
Screenshot 2023-10-23 at 09 31 10

@juliocc
Copy link
Collaborator

juliocc commented Oct 23, 2023

Looks like my suggestion of using the value directly in the configuration block doesn't work. Apparently the provider is only expecting values to be true or nothing.

Do you mind reverting to the previous syntax?

@ghost ghost mentioned this pull request Oct 23, 2023
1 task
@ghost
Copy link

ghost commented Oct 23, 2023

See #1798

ludoo added a commit that referenced this pull request Oct 25, 2023
* Revert "Merge pull request #1694 from eddern/eddern/fix-apigee-addons-config"

This reverts commit ec7a7a9, reversing
changes made to df5daab.

* Flip for_each ternary: use true to enable an add-on

When a given add-on's variable is set to true, do instantiate the block.

---------

Co-authored-by: Julio Castillo <[email protected]>
Co-authored-by: Ludovico Magnocavallo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants