Files
hunfabric/tests/modules/alloydb/examples/simple.yaml
Wiktor Niesiobędzki d1ec3b0499 Fixes for Alloydb E2E tests (#2312)
* Fixes for Alloydb E2E tests

* too long project name in Sipmle example resulted in:
```
Error: "***-alloydb-prj" name must be 4 to 30 characters with lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point.
```

* using self_link resulted in:
```
Error: Error creating Cluster: googleapi: Error 499: malformed network path: "https://www.googleapis.com/compute/v1/projects/***/global/networks/e2e-test"
```

* Cross region replication stil fails with:
```
│ Error: Error creating cluster. Can not create secondary cluster without secondary_config field.
│
│   with module.alloydb.google_alloydb_cluster.secondary[0],
│   on /usr/local/google/home/wiktorn/git/cloud-foundation-fabric/modules/alloydb/main.tf line 199, in resource "google_alloydb_cluster" "secondary":
│  199: resource "google_alloydb_cluster" "secondary" {
```

* Fix tests

---------

Co-authored-by: Julio Castillo <jccb@google.com>
2024-05-29 14:46:15 +00:00

178 lines
5.6 KiB
YAML

# 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
project: test-alloydb
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:
- authorized_external_networks: []
enable_public_ip: false
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
module.project.google_project.project[0]:
auto_create_network: false
billing_account: 123456-123456-123456
folder_id: '1122334455'
labels: null
name: test-alloydb
org_id: null
project_id: test-alloydb
skip_delete: false
timeouts: null
module.project.google_project_iam_member.servicenetworking[0]:
condition: []
project: test-alloydb
role: roles/servicenetworking.serviceAgent
module.project.google_project_service.project_services["alloydb.googleapis.com"]:
disable_dependent_services: false
disable_on_destroy: false
project: test-alloydb
service: alloydb.googleapis.com
timeouts: null
module.project.google_project_service.project_services["servicenetworking.googleapis.com"]:
disable_dependent_services: false
disable_on_destroy: false
project: test-alloydb
service: servicenetworking.googleapis.com
timeouts: null
module.project.google_project_service_identity.servicenetworking[0]:
project: test-alloydb
service: servicenetworking.googleapis.com
timeouts: null
module.vpc.google_compute_global_address.psa_ranges["servicenetworking-googleapis-com-alloydb"]:
address: 10.60.0.0
address_type: INTERNAL
description: null
ip_version: null
name: servicenetworking-googleapis-com-alloydb
prefix_length: 16
project: test-alloydb
purpose: VPC_PEERING
timeouts: null
module.vpc.google_compute_network.network[0]:
auto_create_subnetworks: false
delete_default_routes_on_create: false
description: Terraform-managed.
enable_ula_internal_ipv6: null
name: my-network
network_firewall_policy_enforcement_order: AFTER_CLASSIC_FIREWALL
project: test-alloydb
routing_mode: GLOBAL
timeouts: null
module.vpc.google_compute_network_peering_routes_config.psa_routes["servicenetworking.googleapis.com"]:
export_custom_routes: false
import_custom_routes: false
network: my-network
project: test-alloydb
timeouts: null
module.vpc.google_compute_route.gateway["private-googleapis"]:
description: Terraform-managed.
dest_range: 199.36.153.8/30
name: my-network-private-googleapis
network: my-network
next_hop_gateway: default-internet-gateway
next_hop_ilb: null
next_hop_instance: null
next_hop_vpn_tunnel: null
priority: 1000
project: test-alloydb
tags: null
timeouts: null
module.vpc.google_compute_route.gateway["restricted-googleapis"]:
description: Terraform-managed.
dest_range: 199.36.153.4/30
name: my-network-restricted-googleapis
network: my-network
next_hop_gateway: default-internet-gateway
next_hop_ilb: null
next_hop_instance: null
next_hop_vpn_tunnel: null
priority: 1000
project: test-alloydb
tags: null
timeouts: null
module.vpc.google_compute_subnetwork.psc["europe-west8/psc"]:
description: Terraform-managed subnet for Private Service Connect (PSC NAT).
ip_cidr_range: 10.0.3.0/24
ipv6_access_type: null
log_config: []
name: psc
network: my-network
project: test-alloydb
purpose: PRIVATE_SERVICE_CONNECT
region: europe-west8
role: null
timeouts: null
module.vpc.google_service_networking_connection.psa_connection["servicenetworking.googleapis.com"]:
deletion_policy: ABANDON
reserved_peering_ranges:
- servicenetworking-googleapis-com-alloydb
service: servicenetworking.googleapis.com
timeouts: null
counts:
google_alloydb_cluster: 1
google_alloydb_instance: 1
google_compute_global_address: 1
google_compute_network: 1
google_compute_network_peering_routes_config: 1
google_compute_route: 2
google_compute_subnetwork: 1
google_project: 1
google_project_iam_member: 1
google_project_service: 2
google_project_service_identity: 1
google_service_networking_connection: 1
modules: 3
resources: 14
outputs: {}