Alloydb add support for psc (#2341)

* alloydb add support for psc
* add tag binding support

Co-authored-by: Wiktor Niesiobędzki <wiktorn@google.com>
This commit is contained in:
simonebruzzechesse
2024-06-05 13:39:03 +02:00
committed by GitHub
parent c1e0788957
commit 1969b02ed8
96 changed files with 463 additions and 215 deletions

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -13,10 +13,12 @@ Note that this module assumes that some options are the same for both the primar
* [Examples](#examples)
* [Simple example](#simple-example)
* [Cross region replication](#cross-region-replication)
* [PSC instance](#psc-instance)
* [Custom flags and users definition](#custom-flags-and-users-definition)
* [CMEK encryption](#cmek-encryption)
* [Variables](#variables)
* [Outputs](#outputs)
* [Fixtures](#fixtures)
<!-- TOC -->
## Examples
@@ -57,7 +59,9 @@ module "alloydb" {
project_id = module.project.project_id
cluster_name = "db"
network_config = {
network = module.vpc.id
psa_config = {
network = module.vpc.id
}
}
name = "db"
location = var.region
@@ -75,7 +79,9 @@ module "alloydb" {
location = var.region
name = "db"
network_config = {
network = var.vpc.id
psa_config = {
network = var.vpc.id
}
}
cross_region_replication = {
enabled = true
@@ -87,6 +93,23 @@ module "alloydb" {
In a cross-region replication scenario (like in the previous example) this module also supports [promoting the secondary instance](https://cloud.google.com/alloydb/docs/cross-region-replication/work-with-cross-region-replication#promote-secondary-cluster) to become a primary instance via the `var.cross_region_replication.promote_secondary` flag.
### PSC instance
```hcl
module "alloydb" {
source = "./fabric/modules/alloydb"
project_id = var.project_id
cluster_name = "db"
location = var.region
name = "db"
network_config = {
psc_config = { allowed_consumer_projects = [var.project_number] }
}
}
# tftest modules=1 resources=2 inventory=psc.yaml e2e
```
### Custom flags and users definition
```hcl
@@ -103,7 +126,9 @@ module "alloydb" {
timezone = "'UTC'"
}
network_config = {
network = var.vpc.id
psa_config = {
network = var.vpc.id
}
}
users = {
# generate a password for user1
@@ -129,7 +154,9 @@ module "alloydb" {
location = var.region
name = "primary"
network_config = {
network = var.vpc.id
psa_config = {
network = var.vpc.id
}
}
encryption_config = {
primary_kms_key_name = var.kms_key.id
@@ -138,6 +165,44 @@ module "alloydb" {
# tftest modules=1 resources=3 fixtures=fixtures/alloydb-kms-iam-grant.tf inventory=cmek.yaml e2e
```
## Tag bindings
Refer to the [Creating and managing tags](https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing) documentation for details on usage.
```hcl
module "org" {
source = "./fabric/modules/organization"
organization_id = var.organization_id
tags = {
environment = {
description = "Environment specification."
values = {
dev = {}
prod = {}
sandbox = {}
}
}
}
}
module "alloydb" {
source = "./fabric/modules/alloydb"
project_id = var.project_id
cluster_name = "primary"
location = var.region
name = "primary"
network_config = {
psa_config = {
network = var.vpc.id
}
}
tag_bindings = {
env-sandbox = module.org.tag_values["environment/sandbox"].id
}
}
# tftest modules=2 resources=7
```
<!-- BEGIN TFDOC -->
## Variables
@@ -146,8 +211,8 @@ module "alloydb" {
| [cluster_name](variables.tf#L99) | Name of the primary cluster. | <code>string</code> | ✓ | |
| [location](variables.tf#L186) | Region or zone of the cluster and instance. | <code>string</code> | ✓ | |
| [name](variables.tf#L242) | Name of primary instance. | <code>string</code> | ✓ | |
| [network_config](variables.tf#L247) | Network configuration for cluster and instance. Only one between cluster_network_config and cluster_psc_config can be used. | <code title="object&#40;&#123;&#10; network &#61; string&#10; allocated_ip_range &#61; optional&#40;string, null&#41;&#10; authorized_external_networks &#61; optional&#40;list&#40;string&#41;, null&#41;&#10; enable_public_ip &#61; optional&#40;bool, false&#41;&#10;&#125;&#41;">object&#40;&#123;&#8230;&#125;&#41;</code> | ✓ | |
| [project_id](variables.tf#L275) | The ID of the project where this instances will be created. | <code>string</code> | ✓ | |
| [network_config](variables.tf#L247) | Network configuration for cluster and instance. Only one between psa_config and psc_config can be used. | <code title="object&#40;&#123;&#10; psa_config &#61; optional&#40;object&#40;&#123;&#10; network &#61; optional&#40;string&#41;&#10; allocated_ip_range &#61; optional&#40;string&#41;&#10; authorized_external_networks &#61; optional&#40;list&#40;string&#41;, &#91;&#93;&#41;&#10; enable_public_ip &#61; optional&#40;bool, false&#41;&#10; &#125;&#41;&#41;&#10; psc_config &#61; optional&#40;object&#40;&#123;&#10; allowed_consumer_projects &#61; optional&#40;list&#40;string&#41;, &#91;&#93;&#41;&#10; &#125;&#41;, null&#41;&#10;&#125;&#41;">object&#40;&#123;&#8230;&#125;&#41;</code> | ✓ | |
| [project_id](variables.tf#L290) | The ID of the project where this instances will be created. | <code>string</code> | ✓ | |
| [annotations](variables.tf#L17) | Map FLAG_NAME=>VALUE for annotations which allow client tools to store small amount of arbitrary data. | <code>map&#40;string&#41;</code> | | <code>null</code> |
| [automated_backup_configuration](variables.tf#L23) | Automated backup settings for cluster. | <code title="object&#40;&#123;&#10; enabled &#61; optional&#40;bool, false&#41;&#10; backup_window &#61; optional&#40;string, &#34;1800s&#34;&#41;&#10; location &#61; optional&#40;string&#41;&#10; weekly_schedule &#61; optional&#40;object&#40;&#123;&#10; days_of_week &#61; optional&#40;list&#40;string&#41;, &#91;&#10; &#34;MONDAY&#34;, &#34;TUESDAY&#34;, &#34;WEDNESDAY&#34;, &#34;THURSDAY&#34;, &#34;FRIDAY&#34;, &#34;SATURDAY&#34;, &#34;SUNDAY&#34;&#10; &#93;&#41;&#10; start_times &#61; optional&#40;object&#40;&#123;&#10; hours &#61; optional&#40;number, 23&#41;&#10; minutes &#61; optional&#40;number, 0&#41;&#10; seconds &#61; optional&#40;number, 0&#41;&#10; nanos &#61; optional&#40;number, 0&#41;&#10; &#125;&#41;, &#123;&#125;&#41;&#10; &#125;&#41;, &#123;&#125;&#41;&#10; retention_count &#61; optional&#40;number, 7&#41;&#10; retention_period &#61; optional&#40;string, null&#41;&#10;&#125;&#41;">object&#40;&#123;&#8230;&#125;&#41;</code> | | <code title="&#123;&#10; enabled &#61; false&#10; backup_window &#61; &#34;1800s&#34;&#10; location &#61; null&#10; weekly_schedule &#61; &#123;&#10; days_of_week &#61; &#91;&#34;MONDAY&#34;, &#34;TUESDAY&#34;, &#34;WEDNESDAY&#34;, &#34;THURSDAY&#34;, &#34;FRIDAY&#34;, &#34;SATURDAY&#34;, &#34;SUNDAY&#34;&#93;&#10; start_times &#61; &#123;&#10; hours &#61; 23&#10; minutes &#61; 0&#10; seconds &#61; 0&#10; nanos &#61; 0&#10; &#125;&#10; &#125;&#10; retention_count &#61; 7&#10; retention_period &#61; null&#10;&#125;">&#123;&#8230;&#125;</code> |
| [availability_type](variables.tf#L76) | Availability type for the primary replica. Either `ZONAL` or `REGIONAL`. | <code>string</code> | | <code>&#34;REGIONAL&#34;</code> |
@@ -165,13 +230,14 @@ module "alloydb" {
| [labels](variables.tf#L180) | Labels to be attached to all instances. | <code>map&#40;string&#41;</code> | | <code>null</code> |
| [machine_config](variables.tf#L191) | AlloyDB machine config. | <code title="object&#40;&#123;&#10; cpu_count &#61; optional&#40;number, 2&#41;&#10;&#125;&#41;">object&#40;&#123;&#8230;&#125;&#41;</code> | | <code title="&#123;&#10; cpu_count &#61; 2&#10;&#125;">&#123;&#8230;&#125;</code> |
| [maintenance_config](variables.tf#L202) | Set maintenance window configuration. | <code title="object&#40;&#123;&#10; enabled &#61; optional&#40;bool, false&#41;&#10; day &#61; optional&#40;string, &#34;SUNDAY&#34;&#41;&#10; start_time &#61; optional&#40;object&#40;&#123;&#10; hours &#61; optional&#40;number, 23&#41;&#10; minutes &#61; optional&#40;number, 0&#41;&#10; seconds &#61; optional&#40;number, 0&#41;&#10; nanos &#61; optional&#40;number, 0&#41;&#10; &#125;&#41;, &#123;&#125;&#41;&#10;&#125;&#41;">object&#40;&#123;&#8230;&#125;&#41;</code> | | <code title="&#123;&#10; enabled &#61; false&#10; day &#61; &#34;SUNDAY&#34;&#10; start_time &#61; &#123;&#10; hours &#61; 23&#10; minutes &#61; 0&#10; seconds &#61; 0&#10; nanos &#61; 0&#10; &#125;&#10;&#125;">&#123;&#8230;&#125;</code> |
| [prefix](variables.tf#L265) | Optional prefix used to generate instance names. | <code>string</code> | | <code>null</code> |
| [query_insights_config](variables.tf#L280) | Query insights config. | <code title="object&#40;&#123;&#10; query_string_length &#61; optional&#40;number, 1024&#41;&#10; record_application_tags &#61; optional&#40;bool, true&#41;&#10; record_client_address &#61; optional&#40;bool, true&#41;&#10; query_plans_per_minute &#61; optional&#40;number, 5&#41;&#10;&#125;&#41;">object&#40;&#123;&#8230;&#125;&#41;</code> | | <code title="&#123;&#10; query_string_length &#61; 1024&#10; record_application_tags &#61; true&#10; record_client_address &#61; true&#10; query_plans_per_minute &#61; 5&#10;&#125;">&#123;&#8230;&#125;</code> |
| [secondary_cluster_display_name](variables.tf#L296) | Display name of secondary cluster instance. | <code>string</code> | | <code>null</code> |
| [secondary_cluster_name](variables.tf#L302) | Name of secondary cluster instance. | <code>string</code> | | <code>null</code> |
| [secondary_display_name](variables.tf#L308) | Display name of secondary instance. | <code>string</code> | | <code>null</code> |
| [secondary_name](variables.tf#L314) | Name of secondary instance. | <code>string</code> | | <code>null</code> |
| [users](variables.tf#L320) | Map of users to create in the primary instance (and replicated to other replicas). Set PASSWORD to null if you want to get an autogenerated password. The user types available are: 'ALLOYDB_BUILT_IN' or 'ALLOYDB_IAM_USER'. | <code title="map&#40;object&#40;&#123;&#10; password &#61; optional&#40;string&#41;&#10; roles &#61; optional&#40;list&#40;string&#41;, &#91;&#34;alloydbsuperuser&#34;&#93;&#41;&#10; type &#61; optional&#40;string&#41;&#10;&#125;&#41;&#41;">map&#40;object&#40;&#123;&#8230;&#125;&#41;&#41;</code> | | <code>null</code> |
| [prefix](variables.tf#L280) | Optional prefix used to generate instance names. | <code>string</code> | | <code>null</code> |
| [query_insights_config](variables.tf#L295) | Query insights config. | <code title="object&#40;&#123;&#10; query_string_length &#61; optional&#40;number, 1024&#41;&#10; record_application_tags &#61; optional&#40;bool, true&#41;&#10; record_client_address &#61; optional&#40;bool, true&#41;&#10; query_plans_per_minute &#61; optional&#40;number, 5&#41;&#10;&#125;&#41;">object&#40;&#123;&#8230;&#125;&#41;</code> | | <code title="&#123;&#10; query_string_length &#61; 1024&#10; record_application_tags &#61; true&#10; record_client_address &#61; true&#10; query_plans_per_minute &#61; 5&#10;&#125;">&#123;&#8230;&#125;</code> |
| [secondary_cluster_display_name](variables.tf#L311) | Display name of secondary cluster instance. | <code>string</code> | | <code>null</code> |
| [secondary_cluster_name](variables.tf#L317) | Name of secondary cluster instance. | <code>string</code> | | <code>null</code> |
| [secondary_display_name](variables.tf#L323) | Display name of secondary instance. | <code>string</code> | | <code>null</code> |
| [secondary_name](variables.tf#L329) | Name of secondary instance. | <code>string</code> | | <code>null</code> |
| [tag_bindings](variables.tf#L335) | Tag bindings for this service, in key => tag value id format. | <code>map&#40;string&#41;</code> | | <code>&#123;&#125;</code> |
| [users](variables.tf#L342) | Map of users to create in the primary instance (and replicated to other replicas). Set PASSWORD to null if you want to get an autogenerated password. The user types available are: 'ALLOYDB_BUILT_IN' or 'ALLOYDB_IAM_USER'. | <code title="map&#40;object&#40;&#123;&#10; password &#61; optional&#40;string&#41;&#10; roles &#61; optional&#40;list&#40;string&#41;, &#91;&#34;alloydbsuperuser&#34;&#93;&#41;&#10; type &#61; optional&#40;string&#41;&#10;&#125;&#41;&#41;">map&#40;object&#40;&#123;&#8230;&#125;&#41;&#41;</code> | | <code>null</code> |
## Outputs
@@ -184,9 +250,13 @@ module "alloydb" {
| [ips](outputs.tf#L48) | IP addresses of all instances. | |
| [name](outputs.tf#L55) | Name of the primary instance. | |
| [names](outputs.tf#L60) | Names of all instances. | |
| [secondary_id](outputs.tf#L68) | Fully qualified primary instance id. | |
| [secondary_ip](outputs.tf#L73) | IP address of the primary instance. | |
| [user_passwords](outputs.tf#L78) | Map of containing the password of all users created through terraform. | |
| [psc_dns_name](outputs.tf#L68) | AlloyDB Primary instance PSC DNS name. | |
| [psc_dns_names](outputs.tf#L73) | AlloyDB instances PSC DNS names. | |
| [secondary_id](outputs.tf#L80) | Fully qualified primary instance id. | |
| [secondary_ip](outputs.tf#L85) | IP address of the primary instance. | |
| [service_attachment](outputs.tf#L90) | AlloyDB Primary instance service attachment. | |
| [service_attachments](outputs.tf#L95) | AlloyDB instances service attachment. | |
| [user_passwords](outputs.tf#L102) | Map of containing the password of all users created through terraform. | ✓ |
## Fixtures

View File

@@ -51,8 +51,8 @@ resource "google_alloydb_cluster" "primary" {
location = var.location
network_config {
network = var.network_config.network
allocated_ip_range = var.network_config.allocated_ip_range
network = try(var.network_config.psa_config.network, null)
allocated_ip_range = try(var.network_config.psa_config.allocated_ip_range, null)
}
dynamic "automated_backup_policy" {
@@ -139,10 +139,17 @@ resource "google_alloydb_cluster" "primary" {
}
}
}
psc_config {
psc_enabled = var.network_config.psc_config != null ? true : null
}
# waiting to fix this issue https://github.com/hashicorp/terraform-provider-google/issues/14944
lifecycle {
ignore_changes = [
display_name
display_name,
network_config,
psc_config
]
}
}
@@ -179,15 +186,22 @@ resource "google_alloydb_instance" "primary" {
}
dynamic "network_config" {
for_each = var.network_config != null ? [""] : []
for_each = var.network_config.psa_config != null ? [""] : []
content {
dynamic "authorized_external_networks" {
for_each = coalesce(var.network_config.authorized_external_networks, [])
for_each = coalesce(var.network_config.psa_config.authorized_external_networks, [])
content {
cidr_range = authorized_external_networks.value
}
}
enable_public_ip = var.network_config.enable_public_ip
enable_public_ip = var.network_config.psa_config.enable_public_ip
}
}
dynamic "psc_instance_config" {
for_each = var.network_config.psc_config != null ? [""] : []
content {
allowed_consumer_projects = var.network_config.psc_config.allowed_consumer_projects
}
}
@@ -222,8 +236,8 @@ resource "google_alloydb_cluster" "secondary" {
location = var.cross_region_replication.region
network_config {
network = var.network_config.network
allocated_ip_range = var.network_config.allocated_ip_range
network = try(var.network_config.psa_config.network, null)
allocated_ip_range = try(var.network_config.psa_config.allocated_ip_range, null)
}
dynamic "automated_backup_policy" {
@@ -311,6 +325,10 @@ resource "google_alloydb_cluster" "secondary" {
}
}
psc_config {
psc_enabled = var.network_config.psc_config != null ? true : null
}
dynamic "secondary_config" {
for_each = var.cross_region_replication.promote_secondary ? [] : [""]
content {
@@ -322,7 +340,9 @@ resource "google_alloydb_cluster" "secondary" {
# waiting to fix this issue https://github.com/hashicorp/terraform-provider-google/issues/14944
lifecycle {
ignore_changes = [
display_name
display_name,
network_config,
psc_config
]
}
}
@@ -360,15 +380,22 @@ resource "google_alloydb_instance" "secondary" {
}
dynamic "network_config" {
for_each = var.network_config != null ? [""] : []
for_each = var.network_config.psa_config != null ? [""] : []
content {
dynamic "authorized_external_networks" {
for_each = coalesce(var.network_config.authorized_external_networks, [])
for_each = coalesce(var.network_config.psa_config.authorized_external_networks, [])
content {
cidr_range = authorized_external_networks.value
}
}
enable_public_ip = var.network_config.enable_public_ip
enable_public_ip = var.network_config.psa_config.enable_public_ip
}
}
dynamic "psc_instance_config" {
for_each = var.network_config.psc_config != null ? [""] : []
content {
allowed_consumer_projects = var.network_config.psc_config.allowed_consumer_projects
}
}

View File

@@ -65,6 +65,18 @@ output "names" {
}
}
output "psc_dns_name" {
description = "AlloyDB Primary instance PSC DNS name."
value = try(google_alloydb_instance.primary.psc_instance_config[0].psc_dns_name, null)
}
output "psc_dns_names" {
description = "AlloyDB instances PSC DNS names."
value = {
for id, instance in local._all_instances : id => try(instance.psc_instance_config[0].psc_dns_name, null)
}
}
output "secondary_id" {
description = "Fully qualified primary instance id."
value = var.cross_region_replication.enabled ? google_alloydb_instance.secondary[0].id : null
@@ -75,6 +87,18 @@ output "secondary_ip" {
value = var.cross_region_replication.enabled ? google_alloydb_instance.secondary[0].ip_address : null
}
output "service_attachment" {
description = "AlloyDB Primary instance service attachment."
value = try(google_alloydb_instance.primary.psc_instance_config[0].service_attachment_link, null)
}
output "service_attachments" {
description = "AlloyDB instances service attachment."
value = {
for id, instance in local._all_instances : id => try(instance.psc_instance_config[0].service_attachment_link, null)
}
}
output "user_passwords" {
description = "Map of containing the password of all users created through terraform."
value = {

34
modules/alloydb/tags.tf Normal file
View File

@@ -0,0 +1,34 @@
/**
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
resource "google_tags_location_tag_binding" "primary_binding" {
for_each = var.tag_bindings
parent = (
"//alloydb.googleapis.com/${google_alloydb_cluster.primary.id}"
)
tag_value = each.value
location = var.location
}
resource "google_tags_location_tag_binding" "secondary_binding" {
for_each = var.cross_region_replication.enabled ? var.tag_bindings : {}
parent = (
"//alloydb.googleapis.com/${google_alloydb_cluster.secondary[0].id}"
)
tag_value = each.value
location = var.cross_region_replication.region
}

View File

@@ -245,21 +245,36 @@ variable "name" {
}
variable "network_config" {
description = "Network configuration for cluster and instance. Only one between cluster_network_config and cluster_psc_config can be used."
description = "Network configuration for cluster and instance. Only one between psa_config and psc_config can be used."
type = object({
network = string
allocated_ip_range = optional(string, null)
authorized_external_networks = optional(list(string), null)
enable_public_ip = optional(bool, false)
psa_config = optional(object({
network = optional(string)
allocated_ip_range = optional(string)
authorized_external_networks = optional(list(string), [])
enable_public_ip = optional(bool, false)
}))
psc_config = optional(object({
allowed_consumer_projects = optional(list(string), [])
}), null)
})
nullable = false
validation {
condition = (
(try(length(var.network_config.authorized_external_networks), 0) != 0 && var.network_config.enable_public_ip)
|| try(length(var.network_config.authorized_external_networks), 0) == 0
var.network_config.psa_config == null || (
(
try(var.network_config.psa_config.enable_public_ip, false) &&
try(length(var.network_config.psa_config.authorized_external_networks), 0) > 0
) || (
try(length(var.network_config.psa_config.authorized_external_networks), 0) == 0
)
)
)
error_message = "A list of external network authorized to access this instance is required only in case public ip is enabled for the instance."
}
validation {
condition = (var.network_config.psc_config == null) != (var.network_config.psa_config == null)
error_message = "Please specify either psa_config or psc_config."
}
}
variable "prefix" {
@@ -317,6 +332,13 @@ variable "secondary_name" {
default = null
}
variable "tag_bindings" {
description = "Tag bindings for this service, in key => tag value id format."
type = map(string)
nullable = false
default = {}
}
variable "users" {
description = "Map of users to create in the primary instance (and replicated to other replicas). Set PASSWORD to null if you want to get an autogenerated password. The user types available are: 'ALLOYDB_BUILT_IN' or 'ALLOYDB_IAM_USER'."
type = map(object({

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -17,11 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.29.1, < 6.0.0" # tftest
version = ">= 5.32.0, < 6.0.0" # tftest
}
}
}

View File

@@ -0,0 +1,71 @@
# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
values:
module.alloydb.google_alloydb_cluster.primary:
annotations: null
cluster_id: db
cluster_type: PRIMARY
continuous_backup_config:
- enabled: true
encryption_config: []
recovery_window_days: 14
database_version: POSTGRES_15
deletion_policy: DEFAULT
display_name: db
encryption_config: []
etag: null
initial_user: []
labels: null
location: europe-west8
maintenance_update_policy: []
network_config:
- allocated_ip_range: null
network: null
project: project-id
psc_config:
- psc_enabled: true
restore_backup_source: []
restore_continuous_backup_source: []
secondary_config: []
timeouts: null
module.alloydb.google_alloydb_instance.primary:
annotations: null
availability_type: REGIONAL
display_name: db
gce_zone: null
instance_id: db
instance_type: PRIMARY
labels: null
machine_config:
- cpu_count: 2
network_config: []
psc_instance_config:
- allowed_consumer_projects:
- '123'
query_insights_config:
- query_plans_per_minute: 5
query_string_length: 1024
record_application_tags: true
record_client_address: true
read_pool_config: []
timeouts: null
counts:
google_alloydb_cluster: 1
google_alloydb_instance: 1
modules: 1
resources: 2
outputs: {}