Add data_api_access attribute to cloudsql-instance module (#3866)

* add data-api-access to clousql instance module

* fix readme

* updates to follow guidelines

* update test module

* add validation for data_api_access variable

* regenerate readme.md

* allow data_api_access to be nullable

* set default to null

* update readme

---------

Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
This commit is contained in:
jta-ofr
2026-04-16 11:24:02 +02:00
committed by GitHub
parent 8076220648
commit 2cb67b3532
4 changed files with 42 additions and 27 deletions

View File

@@ -75,6 +75,17 @@ variable "context" {
nullable = false
}
variable "data_api_access" {
description = "Access to the Cloud SQL Data API. Either `ALLOW_DATA_API` or `DISALLOW_DATA_API`."
type = string
default = null
nullable = true
validation {
condition = var.data_api_access == null || contains(["ALLOW_DATA_API", "DISALLOW_DATA_API"], var.data_api_access)
error_message = "The data_api_access must be one of 'ALLOW_DATA_API' or 'DISALLOW_DATA_API'."
}
}
variable "data_cache" {
description = "Enable data cache. Only used for Enterprise MYSQL and PostgreSQL."
type = bool