Skip to content

Conversation

@diablo02000
Copy link
Contributor

When var.data_cache_enabled is set to false, the dynamic block data_cache_config is ignored. Exemple with mysql module:

for_each = var.edition == "ENTERPRISE_PLUS" && var.data_cache_enabled ? ["cache_enabled"] : []

Due to this, the default value on GCP Cloud SQL, which is true, is applied.

Example:

  • Create Cloud SQL instance:
gcloud sql instances create mysql-testing-instance --region europe-west1 --tier 'db-perf-optimized-N-2' --project-id sbx --database-version 'MYSQL_8_0' --edition ENTERPRISE_PLUS
  • Check the data cache value:
gcloud sql instances describe mysql-testing-instance --project sbx | grep -A 2 dataCacheConfig

  dataCacheConfig:
    dataCacheEnabled: true
  dataDiskSizeGb: '10'

@diablo02000 diablo02000 requested review from a team, ayushmjain, imrannayer and q2w as code owners April 10, 2025 14:23
@google-cla
Copy link

google-cla bot commented Apr 10, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@imrannayer
Copy link
Collaborator

/gcbrun

2 similar comments
@imrannayer
Copy link
Collaborator

/gcbrun

@imrannayer
Copy link
Collaborator

/gcbrun

@imrannayer
Copy link
Collaborator

/gcbrun

1 similar comment
@imrannayer
Copy link
Collaborator

/gcbrun

@imrannayer imrannayer merged commit 7befe54 into terraform-google-modules:main Apr 17, 2025
4 checks passed
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.

3 participants