From 2d99f8f055347e99e18e7a08445411909606a03b Mon Sep 17 00:00:00 2001 From: Yuwen Ma Date: Tue, 4 Jun 2024 06:16:45 +0000 Subject: [PATCH] turn on golden log check in e2e --- ...ted_object_basicalloydbcluster.golden.yaml | 51 +- .../basicalloydbcluster/_http.log | 872 ++--------- ...t_basicalloydbsecondarycluster.golden.yaml | 42 + .../basicalloydbsecondarycluster/_http.log | 1169 +++++++++++++++ ...ed_object_basicalloydbinstance.golden.yaml | 5 +- .../basicalloydbinstance/_http.log | 1006 +++++++++++++ ..._basicalloydbsecondaryinstance.golden.yaml | 36 + .../basicalloydbsecondaryinstance/_http.log | 1292 +++++++++++++++++ ...ted_object_fullalloydbinstance.golden.yaml | 36 + .../fullalloydbinstance/_http.log | 997 +++++++++++++ ...ted_object_readalloydbinstance.golden.yaml | 36 + .../readalloydbinstance/_http.log | 1150 +++++++++++++++ ...ed_object_zonalalloydbinstance.golden.yaml | 34 + .../zonalalloydbinstance/_http.log | 929 ++++++++++++ ...nerated_object_apikeyskeybasic.golden.yaml | 17 +- .../apikeyskey/apikeyskeybasic/_http.log | 695 +++++++++ ...ect_artifactregistryrepository.golden.yaml | 39 + .../artifactregistryrepository/_http.log | 143 -- .../basicbigquerydataset/_http.log | 230 +-- .../bigquerydatasetaccessblock/_http.log | 214 +-- .../_http.log | 377 +++++ .../_http.log | 142 ++ .../_http.log | 124 ++ .../_http.log | 355 +++++ .../_http.log | 131 ++ .../httpsfunction/_http.log | 198 +++ .../globalcomputeaddress/_http.log | 355 +++++ scripts/github-actions/tests-e2e-fixtures | 2 + scripts/github-actions/tests-e2e-samples | 2 + 29 files changed, 9285 insertions(+), 1394 deletions(-) create mode 100644 pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbcluster/basicalloydbsecondarycluster/_generated_object_basicalloydbsecondarycluster.golden.yaml create mode 100644 pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbcluster/basicalloydbsecondarycluster/_http.log create mode 100644 pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbinstance/basicalloydbinstance/_http.log create mode 100644 pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbinstance/basicalloydbsecondaryinstance/_generated_object_basicalloydbsecondaryinstance.golden.yaml create mode 100644 pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbinstance/basicalloydbsecondaryinstance/_http.log create mode 100644 pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbinstance/fullalloydbinstance/_generated_object_fullalloydbinstance.golden.yaml create mode 100644 pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbinstance/fullalloydbinstance/_http.log create mode 100644 pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbinstance/readalloydbinstance/_generated_object_readalloydbinstance.golden.yaml create mode 100644 pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbinstance/readalloydbinstance/_http.log create mode 100644 pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbinstance/zonalalloydbinstance/_generated_object_zonalalloydbinstance.golden.yaml create mode 100644 pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbinstance/zonalalloydbinstance/_http.log create mode 100644 pkg/test/resourcefixture/testdata/basic/apikeys/v1alpha1/apikeyskey/apikeyskeybasic/_http.log create mode 100644 pkg/test/resourcefixture/testdata/basic/artifactregistry/v1beta1/artifactregistryrepository/_generated_object_artifactregistryrepository.golden.yaml create mode 100644 pkg/test/resourcefixture/testdata/basic/certificatemanager/v1beta1/certificatemanagercertificate/certificatemanagercertificatemanageddns/_http.log create mode 100644 pkg/test/resourcefixture/testdata/basic/certificatemanager/v1beta1/certificatemanagercertificate/certificatemanagercertificateselfmanaged/_http.log create mode 100644 pkg/test/resourcefixture/testdata/basic/certificatemanager/v1beta1/certificatemanagercertificatemap/_http.log create mode 100644 pkg/test/resourcefixture/testdata/basic/certificatemanager/v1beta1/certificatemanagercertificatemapentry/_http.log create mode 100644 pkg/test/resourcefixture/testdata/basic/certificatemanager/v1beta1/certificatemanagerdnsauthorization/_http.log create mode 100644 pkg/test/resourcefixture/testdata/basic/cloudfunctions/v1beta1/cloudfunctionsfunction/httpsfunction/_http.log create mode 100644 pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeaddress/globalcomputeaddress/_http.log diff --git a/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbcluster/basicalloydbcluster/_generated_object_basicalloydbcluster.golden.yaml b/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbcluster/basicalloydbcluster/_generated_object_basicalloydbcluster.golden.yaml index da0ed9222ec..6efbca68e17 100644 --- a/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbcluster/basicalloydbcluster/_generated_object_basicalloydbcluster.golden.yaml +++ b/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbcluster/basicalloydbcluster/_generated_object_basicalloydbcluster.golden.yaml @@ -1,17 +1,3 @@ -# 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. - apiVersion: alloydb.cnrm.cloud.google.com/v1beta1 kind: AlloyDBCluster metadata: @@ -31,27 +17,9 @@ metadata: namespace: ${uniqueId} spec: automatedBackupPolicy: - backupWindow: 3600s labels: source: kcc-test - location: southamerica-east1 - timeBasedRetention: - retentionPeriod: 1209600s - weeklySchedule: - daysOfWeek: - - MONDAY - - TUESDAY - - WEDNESDAY - - THURSDAY - - FRIDAY - - SATURDAY - - SUNDAY - startTimes: - - hours: 23 clusterType: PRIMARY - continuousBackupConfig: - enabled: true - recoveryWindowDays: 14 deletionPolicy: DEFAULT displayName: test alloydb cluster 2 initialUser: @@ -62,8 +30,6 @@ spec: networkConfig: networkRef: name: default - networkRef: - external: projects/${projectNumber}/global/networks/default projectRef: external: ${projectId} resourceID: alloydbcluster${uniqueId} @@ -74,21 +40,6 @@ status: reason: UpToDate status: "True" type: Ready - continuousBackupInfo: - - enabledTime: "1970-01-01T00:00:00Z" - encryptionInfo: - - encryptionType: GOOGLE_DEFAULT_ENCRYPTION - schedule: - - MONDAY - - TUESDAY - - WEDNESDAY - - THURSDAY - - FRIDAY - - SATURDAY - - SUNDAY - databaseVersion: POSTGRES_15 - encryptionInfo: - - encryptionType: GOOGLE_DEFAULT_ENCRYPTION + databaseVersion: DATABASE_VERSION_UNSPECIFIED name: projects/${projectId}/locations/southamerica-east1/clusters/alloydbcluster${uniqueId} observedGeneration: 3 - uid: "12345678" diff --git a/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbcluster/basicalloydbcluster/_http.log b/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbcluster/basicalloydbcluster/_http.log index d2e74b16b23..89f27374b85 100644 --- a/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbcluster/basicalloydbcluster/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbcluster/basicalloydbcluster/_http.log @@ -14,70 +14,25 @@ X-Frame-Options: SAMEORIGIN X-Xss-Protection: 0 { - "autoCreateSubnetworks": true, "creationTimestamp": "2024-04-01T12:34:56.123456Z", "description": "Default network for the project", "id": "000000000000000000000", "kind": "compute#network", "name": "default", - "networkFirewallPolicyEnforcementOrder": "AFTER_CLASSIC_FIREWALL", - "routingConfig": { - "routingMode": "REGIONAL" - }, - "selfLink": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/default", - "selfLinkWithId": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}", - "subnetworks": [ - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/us-east1/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/us-west2/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/asia-south2/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/me-central1/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/europe-west6/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/southamerica-east1/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/europe-west8/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/africa-south1/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/us-west8/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/europe-north1/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/us-west3/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/us-east4/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/us-central1/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/us-east7/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/asia-southeast1/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/us-west1/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/europe-west12/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/asia-northeast1/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/asia-northeast3/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/asia-southeast2/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/us-west4/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/europe-west2/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/europe-central2/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/australia-southeast2/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/europe-west4/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/europe-west1/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/southamerica-west1/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/asia-northeast2/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/me-central2/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/europe-west9/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/northamerica-northeast2/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/me-west1/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/europe-southwest1/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/europe-west10/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/asia-east1/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/asia-east2/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/australia-southeast1/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/us-east5/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/asia-south1/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/northamerica-northeast1/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/us-south1/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/europe-west3/subnetworks/default" - ] + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/default", + "selfLinkWithId": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/${networkID}" } --- -GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/default?alt=json +PATCH https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/default?alt=json Content-Type: application/json User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager +{ + "networkFirewallPolicyEnforcementOrder": "AFTER_CLASSIC_FIREWALL" +} + 200 OK Cache-Control: private Content-Type: application/json; charset=UTF-8 @@ -90,71 +45,26 @@ X-Frame-Options: SAMEORIGIN X-Xss-Protection: 0 { - "autoCreateSubnetworks": true, - "creationTimestamp": "2024-04-01T12:34:56.123456Z", - "description": "Default network for the project", "id": "000000000000000000000", - "kind": "compute#network", - "name": "default", - "networkFirewallPolicyEnforcementOrder": "AFTER_CLASSIC_FIREWALL", - "routingConfig": { - "routingMode": "REGIONAL" - }, - "selfLink": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/default", - "selfLinkWithId": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}", - "subnetworks": [ - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/us-east1/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/us-west2/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/asia-south2/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/me-central1/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/europe-west6/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/southamerica-east1/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/europe-west8/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/africa-south1/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/us-west8/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/europe-north1/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/us-west3/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/us-east4/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/us-central1/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/us-east7/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/asia-southeast1/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/us-west1/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/europe-west12/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/asia-northeast1/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/asia-northeast3/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/asia-southeast2/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/us-west4/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/europe-west2/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/europe-central2/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/australia-southeast2/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/europe-west4/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/europe-west1/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/southamerica-west1/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/asia-northeast2/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/me-central2/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/europe-west9/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/northamerica-northeast2/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/me-west1/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/europe-southwest1/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/europe-west10/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/asia-east1/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/asia-east2/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/australia-southeast1/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/us-east5/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/asia-south1/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/northamerica-northeast1/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/us-south1/subnetworks/default", - "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/europe-west3/subnetworks/default" - ] + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "compute#operation", + "name": "${operationID}", + "operationType": "compute.networks.patch", + "progress": 0, + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetId": "${networkID}", + "targetLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/${networkID}" } --- -GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/southamerica-east1/clusters/alloydbcluster${uniqueId}?alt=json +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/default?alt=json Content-Type: application/json User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager -404 Not Found +200 OK Cache-Control: private Content-Type: application/json; charset=UTF-8 Server: ESF @@ -166,33 +76,23 @@ X-Frame-Options: SAMEORIGIN X-Xss-Protection: 0 { - "error": { - "code": 404, - "message": "Resource 'projects/${projectId}/locations/southamerica-east1/clusters/alloydbcluster${uniqueId}' was not found", - "status": "NOT_FOUND" - } + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "description": "Default network for the project", + "id": "000000000000000000000", + "kind": "compute#network", + "name": "default", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/default", + "selfLinkWithId": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/${networkID}" } --- -POST https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/southamerica-east1/clusters?alt=json&clusterId=alloydbcluster${uniqueId} +PATCH https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/default?alt=json Content-Type: application/json User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager { - "clusterType": "PRIMARY", - "displayName": "test alloydb cluster", - "initialUser": { - "password": "postgres", - "user": "postgres" - }, - "labels": { - "cnrm-test": "true", - "managed-by-cnrm": "true" - }, - "networkConfig": { - "network": "projects/${projectId}/global/networks/default" - } + "networkFirewallPolicyEnforcementOrder": "AFTER_CLASSIC_FIREWALL" } 200 OK @@ -207,21 +107,22 @@ X-Frame-Options: SAMEORIGIN X-Xss-Protection: 0 { - "done": false, - "metadata": { - "@type": "type.googleapis.com/google.cloud.alloydb.v1beta.OperationMetadata", - "apiVersion": "v1beta", - "createTime": "2024-04-01T12:34:56.123456Z", - "requestedCancellation": false, - "target": "projects/${projectId}/locations/southamerica-east1/clusters/alloydbcluster${uniqueId}", - "verb": "create" - }, - "name": "projects/${projectId}/locations/southamerica-east1/operations/${operationID}" + "id": "000000000000000000000", + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "compute#operation", + "name": "${operationID}", + "operationType": "compute.networks.patch", + "progress": 0, + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetId": "${networkID}", + "targetLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/${networkID}" } --- -GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/southamerica-east1/operations/${operationID}?alt=json +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/default?alt=json Content-Type: application/json User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager @@ -237,79 +138,13 @@ X-Frame-Options: SAMEORIGIN X-Xss-Protection: 0 { - "done": true, - "metadata": { - "@type": "type.googleapis.com/google.cloud.alloydb.v1beta.OperationMetadata", - "apiVersion": "v1beta", - "createTime": "2024-04-01T12:34:56.123456Z", - "endTime": "2024-04-01T12:34:56.123456Z", - "requestedCancellation": false, - "target": "projects/${projectId}/locations/southamerica-east1/clusters/alloydbcluster${uniqueId}", - "verb": "create" - }, - "name": "projects/${projectId}/locations/southamerica-east1/operations/${operationID}", - "response": { - "@type": "type.googleapis.com/google.cloud.alloydb.v1beta.Cluster", - "automatedBackupPolicy": { - "backupWindow": "3600s", - "enabled": false, - "location": "southamerica-east1", - "timeBasedRetention": { - "retentionPeriod": "1209600s" - }, - "weeklySchedule": { - "daysOfWeek": [ - "MONDAY", - "TUESDAY", - "WEDNESDAY", - "THURSDAY", - "FRIDAY", - "SATURDAY", - "SUNDAY" - ], - "startTimes": [ - { - "hours": 23 - } - ] - } - }, - "clusterType": "PRIMARY", - "continuousBackupConfig": { - "enabled": true, - "recoveryWindowDays": 14 - }, - "continuousBackupInfo": { - "enabledTime": "2024-04-01T12:34:56.123456Z", - "encryptionInfo": { - "encryptionType": "GOOGLE_DEFAULT_ENCRYPTION" - }, - "schedule": [ - "MONDAY", - "TUESDAY", - "WEDNESDAY", - "THURSDAY", - "FRIDAY", - "SATURDAY", - "SUNDAY" - ] - }, - "createTime": "2024-04-01T12:34:56.123456Z", - "databaseVersion": "POSTGRES_15", - "encryptionInfo": { - "encryptionType": "GOOGLE_DEFAULT_ENCRYPTION" - }, - "geminiConfig": {}, - "name": "projects/${projectId}/locations/southamerica-east1/clusters/alloydbcluster${uniqueId}", - "network": "projects/${projectNumber}/global/networks/default", - "networkConfig": { - "network": "projects/${projectNumber}/global/networks/default" - }, - "reconciling": false, - "state": "READY", - "uid": "111111111111111111111", - "updateTime": "2024-04-01T12:34:56.123456Z" - } + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "description": "Default network for the project", + "id": "000000000000000000000", + "kind": "compute#network", + "name": "default", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/default", + "selfLinkWithId": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/${networkID}" } --- @@ -318,164 +153,45 @@ GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/southa Content-Type: application/json User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager -200 OK -Cache-Control: private -Content-Type: application/json; charset=UTF-8 -Server: ESF -Vary: Origin -Vary: X-Origin -Vary: Referer -X-Content-Type-Options: nosniff -X-Frame-Options: SAMEORIGIN -X-Xss-Protection: 0 +404 Not Found +Content-Type: application/json { - "automatedBackupPolicy": { - "backupWindow": "3600s", - "enabled": false, - "location": "southamerica-east1", - "timeBasedRetention": { - "retentionPeriod": "1209600s" - }, - "weeklySchedule": { - "daysOfWeek": [ - "MONDAY", - "TUESDAY", - "WEDNESDAY", - "THURSDAY", - "FRIDAY", - "SATURDAY", - "SUNDAY" - ], - "startTimes": [ - { - "hours": 23 - } - ] - } - }, - "clusterType": "PRIMARY", - "continuousBackupConfig": { - "enabled": true, - "recoveryWindowDays": 14 - }, - "continuousBackupInfo": { - "enabledTime": "2024-04-01T12:34:56.123456Z", - "encryptionInfo": { - "encryptionType": "GOOGLE_DEFAULT_ENCRYPTION" - }, - "schedule": [ - "MONDAY", - "TUESDAY", - "WEDNESDAY", - "THURSDAY", - "FRIDAY", - "SATURDAY", - "SUNDAY" - ] - }, - "createTime": "2024-04-01T12:34:56.123456Z", - "databaseVersion": "POSTGRES_15", - "encryptionInfo": { - "encryptionType": "GOOGLE_DEFAULT_ENCRYPTION" - }, - "geminiConfig": {}, - "labels": { - "cnrm-test": "true", - "managed-by-cnrm": "true" - }, - "name": "projects/${projectId}/locations/southamerica-east1/clusters/alloydbcluster${uniqueId}", - "network": "projects/${projectNumber}/global/networks/default", - "networkConfig": { - "network": "projects/${projectNumber}/global/networks/default" - }, - "reconciling": false, - "state": "READY", - "uid": "111111111111111111111", - "updateTime": "2024-04-01T12:34:56.123456Z" + "code": 5, + "details": [], + "message": "cluster \"projects/${projectId}/locations/southamerica-east1/clusters/alloydbcluster${uniqueId}\" not found" } --- -GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/southamerica-east1/clusters/alloydbcluster${uniqueId}?alt=json +POST https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/southamerica-east1/clusters?alt=json&clusterId=alloydbcluster${uniqueId} Content-Type: application/json User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager -200 OK -Cache-Control: private -Content-Type: application/json; charset=UTF-8 -Server: ESF -Vary: Origin -Vary: X-Origin -Vary: Referer -X-Content-Type-Options: nosniff -X-Frame-Options: SAMEORIGIN -X-Xss-Protection: 0 - { - "automatedBackupPolicy": { - "backupWindow": "3600s", - "enabled": false, - "location": "southamerica-east1", - "timeBasedRetention": { - "retentionPeriod": "1209600s" - }, - "weeklySchedule": { - "daysOfWeek": [ - "MONDAY", - "TUESDAY", - "WEDNESDAY", - "THURSDAY", - "FRIDAY", - "SATURDAY", - "SUNDAY" - ], - "startTimes": [ - { - "hours": 23 - } - ] - } - }, "clusterType": "PRIMARY", - "continuousBackupConfig": { - "enabled": true, - "recoveryWindowDays": 14 - }, - "continuousBackupInfo": { - "enabledTime": "2024-04-01T12:34:56.123456Z", - "encryptionInfo": { - "encryptionType": "GOOGLE_DEFAULT_ENCRYPTION" - }, - "schedule": [ - "MONDAY", - "TUESDAY", - "WEDNESDAY", - "THURSDAY", - "FRIDAY", - "SATURDAY", - "SUNDAY" - ] - }, - "createTime": "2024-04-01T12:34:56.123456Z", - "databaseVersion": "POSTGRES_15", - "encryptionInfo": { - "encryptionType": "GOOGLE_DEFAULT_ENCRYPTION" + "displayName": "test alloydb cluster", + "initialUser": { + "password": "postgres", + "user": "postgres" }, - "geminiConfig": {}, "labels": { "cnrm-test": "true", "managed-by-cnrm": "true" }, - "name": "projects/${projectId}/locations/southamerica-east1/clusters/alloydbcluster${uniqueId}", - "network": "projects/${projectNumber}/global/networks/default", "networkConfig": { - "network": "projects/${projectNumber}/global/networks/default" - }, - "reconciling": false, - "state": "READY", - "uid": "111111111111111111111", - "updateTime": "2024-04-01T12:34:56.123456Z" + "network": "projects/${projectId}/global/networks/default" + } +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" } --- @@ -485,80 +201,44 @@ Content-Type: application/json User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager 200 OK -Cache-Control: private -Content-Type: application/json; charset=UTF-8 -Server: ESF -Vary: Origin -Vary: X-Origin -Vary: Referer -X-Content-Type-Options: nosniff -X-Frame-Options: SAMEORIGIN -X-Xss-Protection: 0 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc { - "automatedBackupPolicy": { - "backupWindow": "3600s", - "enabled": false, - "location": "southamerica-east1", - "timeBasedRetention": { - "retentionPeriod": "1209600s" - }, - "weeklySchedule": { - "daysOfWeek": [ - "MONDAY", - "TUESDAY", - "WEDNESDAY", - "THURSDAY", - "FRIDAY", - "SATURDAY", - "SUNDAY" - ], - "startTimes": [ - { - "hours": 23 - } - ] - } - }, + "annotations": {}, + "automatedBackupPolicy": null, "clusterType": "PRIMARY", - "continuousBackupConfig": { - "enabled": true, - "recoveryWindowDays": 14 - }, - "continuousBackupInfo": { - "enabledTime": "2024-04-01T12:34:56.123456Z", - "encryptionInfo": { - "encryptionType": "GOOGLE_DEFAULT_ENCRYPTION" - }, - "schedule": [ - "MONDAY", - "TUESDAY", - "WEDNESDAY", - "THURSDAY", - "FRIDAY", - "SATURDAY", - "SUNDAY" - ] - }, + "continuousBackupConfig": null, + "continuousBackupInfo": null, "createTime": "2024-04-01T12:34:56.123456Z", - "databaseVersion": "POSTGRES_15", - "encryptionInfo": { - "encryptionType": "GOOGLE_DEFAULT_ENCRYPTION" + "databaseVersion": "DATABASE_VERSION_UNSPECIFIED", + "deleteTime": null, + "displayName": "test alloydb cluster", + "encryptionConfig": null, + "encryptionInfo": null, + "etag": "abcdef0123A=", + "initialUser": { + "password": "postgres", + "user": "postgres" }, - "geminiConfig": {}, "labels": { "cnrm-test": "true", "managed-by-cnrm": "true" }, "name": "projects/${projectId}/locations/southamerica-east1/clusters/alloydbcluster${uniqueId}", - "network": "projects/${projectNumber}/global/networks/default", + "network": "", "networkConfig": { - "network": "projects/${projectNumber}/global/networks/default" + "allocatedIpRange": "", + "network": "projects/${projectId}/global/networks/default" }, + "primaryConfig": null, "reconciling": false, - "state": "READY", + "satisfiesPzs": false, + "secondaryConfig": null, + "sslConfig": null, + "state": "STATE_UNSPECIFIED", "uid": "111111111111111111111", - "updateTime": "2024-04-01T12:34:56.123456Z" + "updateTime": null } --- @@ -569,36 +249,11 @@ User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 t { "automatedBackupPolicy": { - "backupWindow": "3600s", "labels": { "source": "kcc-test" - }, - "location": "southamerica-east1", - "timeBasedRetention": { - "retentionPeriod": "1209600s" - }, - "weeklySchedule": { - "daysOfWeek": [ - "MONDAY", - "TUESDAY", - "WEDNESDAY", - "THURSDAY", - "FRIDAY", - "SATURDAY", - "SUNDAY" - ], - "startTimes": [ - { - "hours": 23 - } - ] } }, "clusterType": "PRIMARY", - "continuousBackupConfig": { - "enabled": true, - "recoveryWindowDays": 14 - }, "displayName": "test alloydb cluster 2", "initialUser": { "password": "postgres", @@ -608,130 +263,19 @@ User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 t "cnrm-test": "true", "managed-by-cnrm": "true" }, - "network": "projects/${projectNumber}/global/networks/default", "networkConfig": { - "network": "projects/${projectNumber}/global/networks/default" + "network": "projects/${projectId}/global/networks/default" } } 200 OK -Cache-Control: private -Content-Type: application/json; charset=UTF-8 -Server: ESF -Vary: Origin -Vary: X-Origin -Vary: Referer -X-Content-Type-Options: nosniff -X-Frame-Options: SAMEORIGIN -X-Xss-Protection: 0 - -{ - "done": false, - "metadata": { - "@type": "type.googleapis.com/google.cloud.alloydb.v1beta.OperationMetadata", - "apiVersion": "v1beta", - "createTime": "2024-04-01T12:34:56.123456Z", - "requestedCancellation": false, - "target": "projects/${projectId}/locations/southamerica-east1/clusters/alloydbcluster${uniqueId}", - "verb": "update" - }, - "name": "projects/${projectId}/locations/southamerica-east1/operations/${operationID}" -} - ---- - -GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/southamerica-east1/operations/${operationID}?alt=json Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager - -200 OK -Cache-Control: private -Content-Type: application/json; charset=UTF-8 -Server: ESF -Vary: Origin -Vary: X-Origin -Vary: Referer -X-Content-Type-Options: nosniff -X-Frame-Options: SAMEORIGIN -X-Xss-Protection: 0 +Grpc-Metadata-Content-Type: application/grpc { "done": true, - "metadata": { - "@type": "type.googleapis.com/google.cloud.alloydb.v1beta.OperationMetadata", - "apiVersion": "v1beta", - "createTime": "2024-04-01T12:34:56.123456Z", - "endTime": "2024-04-01T12:34:56.123456Z", - "requestedCancellation": false, - "target": "projects/${projectId}/locations/southamerica-east1/clusters/alloydbcluster${uniqueId}", - "verb": "update" - }, - "name": "projects/${projectId}/locations/southamerica-east1/operations/${operationID}", - "response": { - "@type": "type.googleapis.com/google.cloud.alloydb.v1beta.Cluster", - "automatedBackupPolicy": { - "backupWindow": "3600s", - "enabled": false, - "labels": { - "source": "kcc-test" - }, - "location": "southamerica-east1", - "timeBasedRetention": { - "retentionPeriod": "1209600s" - }, - "weeklySchedule": { - "daysOfWeek": [ - "MONDAY", - "TUESDAY", - "WEDNESDAY", - "THURSDAY", - "FRIDAY", - "SATURDAY", - "SUNDAY" - ], - "startTimes": [ - { - "hours": 23 - } - ] - } - }, - "clusterType": "PRIMARY", - "continuousBackupConfig": { - "enabled": true, - "recoveryWindowDays": 14 - }, - "continuousBackupInfo": { - "enabledTime": "2024-04-01T12:34:56.123456Z", - "encryptionInfo": { - "encryptionType": "GOOGLE_DEFAULT_ENCRYPTION" - }, - "schedule": [ - "MONDAY", - "TUESDAY", - "WEDNESDAY", - "THURSDAY", - "FRIDAY", - "SATURDAY", - "SUNDAY" - ] - }, - "createTime": "2024-04-01T12:34:56.123456Z", - "databaseVersion": "POSTGRES_15", - "encryptionInfo": { - "encryptionType": "GOOGLE_DEFAULT_ENCRYPTION" - }, - "geminiConfig": {}, - "name": "projects/${projectId}/locations/southamerica-east1/clusters/alloydbcluster${uniqueId}", - "network": "projects/${projectNumber}/global/networks/default", - "networkConfig": { - "network": "projects/${projectNumber}/global/networks/default" - }, - "reconciling": false, - "state": "READY", - "uid": "111111111111111111111", - "updateTime": "2024-04-01T12:34:56.123456Z" - } + "metadata": null, + "name": "${operationID}" } --- @@ -741,169 +285,51 @@ Content-Type: application/json User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager 200 OK -Cache-Control: private -Content-Type: application/json; charset=UTF-8 -Server: ESF -Vary: Origin -Vary: X-Origin -Vary: Referer -X-Content-Type-Options: nosniff -X-Frame-Options: SAMEORIGIN -X-Xss-Protection: 0 - -{ - "automatedBackupPolicy": { - "backupWindow": "3600s", - "enabled": false, - "labels": { - "source": "kcc-test" - }, - "location": "southamerica-east1", - "timeBasedRetention": { - "retentionPeriod": "1209600s" - }, - "weeklySchedule": { - "daysOfWeek": [ - "MONDAY", - "TUESDAY", - "WEDNESDAY", - "THURSDAY", - "FRIDAY", - "SATURDAY", - "SUNDAY" - ], - "startTimes": [ - { - "hours": 23 - } - ] - } - }, - "clusterType": "PRIMARY", - "continuousBackupConfig": { - "enabled": true, - "recoveryWindowDays": 14 - }, - "continuousBackupInfo": { - "enabledTime": "2024-04-01T12:34:56.123456Z", - "encryptionInfo": { - "encryptionType": "GOOGLE_DEFAULT_ENCRYPTION" - }, - "schedule": [ - "MONDAY", - "TUESDAY", - "WEDNESDAY", - "THURSDAY", - "FRIDAY", - "SATURDAY", - "SUNDAY" - ] - }, - "createTime": "2024-04-01T12:34:56.123456Z", - "databaseVersion": "POSTGRES_15", - "encryptionInfo": { - "encryptionType": "GOOGLE_DEFAULT_ENCRYPTION" - }, - "geminiConfig": {}, - "labels": { - "cnrm-test": "true", - "managed-by-cnrm": "true" - }, - "name": "projects/${projectId}/locations/southamerica-east1/clusters/alloydbcluster${uniqueId}", - "network": "projects/${projectNumber}/global/networks/default", - "networkConfig": { - "network": "projects/${projectNumber}/global/networks/default" - }, - "reconciling": false, - "state": "READY", - "uid": "111111111111111111111", - "updateTime": "2024-04-01T12:34:56.123456Z" -} - ---- - -GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/southamerica-east1/clusters/alloydbcluster${uniqueId}?alt=json Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager - -200 OK -Cache-Control: private -Content-Type: application/json; charset=UTF-8 -Server: ESF -Vary: Origin -Vary: X-Origin -Vary: Referer -X-Content-Type-Options: nosniff -X-Frame-Options: SAMEORIGIN -X-Xss-Protection: 0 +Grpc-Metadata-Content-Type: application/grpc { + "annotations": {}, "automatedBackupPolicy": { - "backupWindow": "3600s", - "enabled": false, + "backupWindow": null, + "encryptionConfig": null, "labels": { "source": "kcc-test" }, - "location": "southamerica-east1", - "timeBasedRetention": { - "retentionPeriod": "1209600s" - }, - "weeklySchedule": { - "daysOfWeek": [ - "MONDAY", - "TUESDAY", - "WEDNESDAY", - "THURSDAY", - "FRIDAY", - "SATURDAY", - "SUNDAY" - ], - "startTimes": [ - { - "hours": 23 - } - ] - } + "location": "" }, "clusterType": "PRIMARY", - "continuousBackupConfig": { - "enabled": true, - "recoveryWindowDays": 14 - }, - "continuousBackupInfo": { - "enabledTime": "2024-04-01T12:34:56.123456Z", - "encryptionInfo": { - "encryptionType": "GOOGLE_DEFAULT_ENCRYPTION" - }, - "schedule": [ - "MONDAY", - "TUESDAY", - "WEDNESDAY", - "THURSDAY", - "FRIDAY", - "SATURDAY", - "SUNDAY" - ] - }, + "continuousBackupConfig": null, + "continuousBackupInfo": null, "createTime": "2024-04-01T12:34:56.123456Z", - "databaseVersion": "POSTGRES_15", - "encryptionInfo": { - "encryptionType": "GOOGLE_DEFAULT_ENCRYPTION" + "databaseVersion": "DATABASE_VERSION_UNSPECIFIED", + "deleteTime": null, + "displayName": "test alloydb cluster 2", + "encryptionConfig": null, + "encryptionInfo": null, + "etag": "abcdef0123A=", + "initialUser": { + "password": "postgres", + "user": "postgres" }, - "geminiConfig": {}, "labels": { "cnrm-test": "true", "managed-by-cnrm": "true" }, "name": "projects/${projectId}/locations/southamerica-east1/clusters/alloydbcluster${uniqueId}", - "network": "projects/${projectNumber}/global/networks/default", + "network": "", "networkConfig": { - "network": "projects/${projectNumber}/global/networks/default" + "allocatedIpRange": "", + "network": "projects/${projectId}/global/networks/default" }, + "primaryConfig": null, "reconciling": false, - "state": "READY", + "satisfiesPzs": false, + "secondaryConfig": null, + "sslConfig": null, + "state": "STATE_UNSPECIFIED", "uid": "111111111111111111111", - "updateTime": "2024-04-01T12:34:56.123456Z" + "updateTime": null } --- @@ -913,59 +339,11 @@ Content-Type: application/json User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager 200 OK -Cache-Control: private -Content-Type: application/json; charset=UTF-8 -Server: ESF -Vary: Origin -Vary: X-Origin -Vary: Referer -X-Content-Type-Options: nosniff -X-Frame-Options: SAMEORIGIN -X-Xss-Protection: 0 - -{ - "done": false, - "metadata": { - "@type": "type.googleapis.com/google.cloud.alloydb.v1beta.OperationMetadata", - "apiVersion": "v1beta", - "createTime": "2024-04-01T12:34:56.123456Z", - "requestedCancellation": false, - "target": "projects/${projectId}/locations/southamerica-east1/clusters/alloydbcluster${uniqueId}", - "verb": "delete" - }, - "name": "projects/${projectId}/locations/southamerica-east1/operations/${operationID}" -} - ---- - -GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/southamerica-east1/operations/${operationID}?alt=json Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager - -200 OK -Cache-Control: private -Content-Type: application/json; charset=UTF-8 -Server: ESF -Vary: Origin -Vary: X-Origin -Vary: Referer -X-Content-Type-Options: nosniff -X-Frame-Options: SAMEORIGIN -X-Xss-Protection: 0 +Grpc-Metadata-Content-Type: application/grpc { "done": true, - "metadata": { - "@type": "type.googleapis.com/google.cloud.alloydb.v1beta.OperationMetadata", - "apiVersion": "v1beta", - "createTime": "2024-04-01T12:34:56.123456Z", - "endTime": "2024-04-01T12:34:56.123456Z", - "requestedCancellation": false, - "target": "projects/${projectId}/locations/southamerica-east1/clusters/alloydbcluster${uniqueId}", - "verb": "delete" - }, - "name": "projects/${projectId}/locations/southamerica-east1/operations/${operationID}", - "response": { - "@type": "type.googleapis.com/google.protobuf.Empty" - } + "metadata": null, + "name": "${operationID}" } \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbcluster/basicalloydbsecondarycluster/_generated_object_basicalloydbsecondarycluster.golden.yaml b/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbcluster/basicalloydbsecondarycluster/_generated_object_basicalloydbsecondarycluster.golden.yaml new file mode 100644 index 00000000000..e2957fd64be --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbcluster/basicalloydbsecondarycluster/_generated_object_basicalloydbsecondarycluster.golden.yaml @@ -0,0 +1,42 @@ +apiVersion: alloydb.cnrm.cloud.google.com/v1beta1 +kind: AlloyDBCluster +metadata: + annotations: + cnrm.cloud.google.com/management-conflict-prevention-policy: none + cnrm.cloud.google.com/mutable-but-unreadable-fields: '{"spec":{"deletionPolicy":"FORCE"}}' + cnrm.cloud.google.com/observed-secret-versions: (removed) + cnrm.cloud.google.com/state-into-spec: merge + finalizers: + - cnrm.cloud.google.com/finalizer + - cnrm.cloud.google.com/deletion-defender + generation: 3 + labels: + cnrm-test: "true" + name: alloydbcluster-2-${uniqueId} + namespace: ${uniqueId} +spec: + automatedBackupPolicy: + labels: + source: kcc-test + clusterType: SECONDARY + deletionPolicy: FORCE + location: europe-west8 + networkConfig: + networkRef: + name: computenetwork-${uniqueId} + projectRef: + external: ${projectId} + resourceID: alloydbcluster-2-${uniqueId} + secondaryConfig: + primaryClusterNameRef: + name: alloydbcluster-1-${uniqueId} +status: + conditions: + - lastTransitionTime: "1970-01-01T00:00:00Z" + message: The resource is up to date + reason: UpToDate + status: "True" + type: Ready + databaseVersion: DATABASE_VERSION_UNSPECIFIED + name: projects/${projectId}/locations/europe-west8/clusters/alloydbcluster-2-${uniqueId} + observedGeneration: 3 diff --git a/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbcluster/basicalloydbsecondarycluster/_http.log b/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbcluster/basicalloydbsecondarycluster/_http.log new file mode 100644 index 00000000000..70acc4854ac --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbcluster/basicalloydbsecondarycluster/_http.log @@ -0,0 +1,1169 @@ +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +404 Not Found +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "error": { + "code": 404, + "errors": [ + { + "domain": "global", + "message": "network \"projects/${projectId}/global/networks/computenetwork-${uniqueId}\" not found", + "reason": "notFound" + } + ], + "message": "network \"projects/${projectId}/global/networks/computenetwork-${uniqueId}\" not found", + "status": "NOT_FOUND" + } +} + +--- + +POST https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "autoCreateSubnetworks": false, + "name": "computenetwork-${uniqueId}", + "networkFirewallPolicyEnforcementOrder": "AFTER_CLASSIC_FIREWALL" +} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "id": "000000000000000000000", + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "compute#operation", + "name": "${operationID}", + "operationType": "insert", + "progress": 0, + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetId": "${networkID}", + "targetLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/${networkID}" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "autoCreateSubnetworks": false, + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "id": "000000000000000000000", + "kind": "compute#network", + "name": "computenetwork-${uniqueId}", + "networkFirewallPolicyEnforcementOrder": "AFTER_CLASSIC_FIREWALL", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "selfLinkWithId": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/${networkID}" +} + +--- + +GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/us-west1/clusters/alloydbcluster-1-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +404 Not Found +Content-Type: application/json + +{ + "code": 5, + "details": [], + "message": "cluster \"projects/${projectId}/locations/us-west1/clusters/alloydbcluster-1-${uniqueId}\" not found" +} + +--- + +POST https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/us-west1/clusters?alt=json&clusterId=alloydbcluster-1-${uniqueId} +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "clusterType": "PRIMARY", + "initialUser": { + "password": "alloydb-pg" + }, + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "networkConfig": { + "network": "projects/${projectId}/global/networks/computenetwork-${uniqueId}" + } +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/us-west1/clusters/alloydbcluster-1-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "annotations": {}, + "automatedBackupPolicy": null, + "clusterType": "PRIMARY", + "continuousBackupConfig": null, + "continuousBackupInfo": null, + "createTime": "2024-04-01T12:34:56.123456Z", + "databaseVersion": "DATABASE_VERSION_UNSPECIFIED", + "deleteTime": null, + "displayName": "", + "encryptionConfig": null, + "encryptionInfo": null, + "etag": "abcdef0123A=", + "initialUser": { + "password": "alloydb-pg", + "user": "" + }, + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectId}/locations/us-west1/clusters/alloydbcluster-1-${uniqueId}", + "network": "", + "networkConfig": { + "allocatedIpRange": "", + "network": "projects/${projectId}/global/networks/computenetwork-${uniqueId}" + }, + "primaryConfig": null, + "reconciling": false, + "satisfiesPzs": false, + "secondaryConfig": null, + "sslConfig": null, + "state": "STATE_UNSPECIFIED", + "uid": "111111111111111111111", + "updateTime": null +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses/computeaddress-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +404 Not Found +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "error": { + "code": 404, + "errors": [ + { + "domain": "global", + "message": "address \"projects/${projectId}/global/networks/computeaddress-${uniqueId}\" not found", + "reason": "notFound" + } + ], + "message": "address \"projects/${projectId}/global/networks/computeaddress-${uniqueId}\" not found", + "status": "NOT_FOUND" + } +} + +--- + +POST https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "addressType": "INTERNAL", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "computeaddress-${uniqueId}", + "network": "projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "prefixLength": 16, + "purpose": "VPC_PEERING" +} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "id": "000000000000000000000", + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "compute#operation", + "name": "${operationID}", + "progress": 0, + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "DONE" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses/computeaddress-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "address": "8.8.8.8", + "addressType": "INTERNAL", + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "id": "000000000000000000000", + "kind": "compute#address", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "computeaddress-${uniqueId}", + "network": "projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "prefixLength": 16, + "purpose": "VPC_PEERING", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/computeaddress-${uniqueId}" +} + +--- + +POST https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses/computeaddress-${uniqueId}/setLabels?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "labelFingerprint": "", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + } +} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "id": "000000000000000000000", + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "compute#operation", + "name": "${operationID}", + "progress": 0, + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "DONE" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses/computeaddress-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "address": "8.8.8.8", + "addressType": "INTERNAL", + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "id": "000000000000000000000", + "kind": "compute#address", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "computeaddress-${uniqueId}", + "network": "projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "prefixLength": 16, + "purpose": "VPC_PEERING", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/computeaddress-${uniqueId}" +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "lifecycleState": "ACTIVE", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +--- + +GET https://servicenetworking.googleapis.com/v1/services/servicenetworking.googleapis.com/connections?alt=json&network=projects%2F${projectNumber}%2Fglobal%2Fnetworks%2Fcomputenetwork-${uniqueId}&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "lifecycleState": "ACTIVE", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +--- + +PATCH https://servicenetworking.googleapis.com/v1/services/servicenetworking.googleapis.com/connections/-?alt=json&force=true&prettyPrint=false&updateMask=reservedPeeringRanges +Content-Type: application/json +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "network": "projects/${projectNumber}/global/networks/computenetwork-${uniqueId}", + "reservedPeeringRanges": [ + "computeaddress-${uniqueId}" + ] +} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "name": "operations/${operationID}" +} + +--- + +GET https://servicenetworking.googleapis.com/v1/operations/${operationID}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "done": true, + "name": "operations/${operationID}", + "response": { + "@type": "type.googleapis.com/google.cloud.servicenetworking.v1.Connection", + "network": "projects/${projectNumber}/global/networks/computenetwork-${uniqueId}", + "peering": "servicenetworking-googleapis-com", + "reservedPeeringRanges": [ + "computeaddress-${uniqueId}" + ], + "service": "services/servicenetworking.googleapis.com" + } +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "lifecycleState": "ACTIVE", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +--- + +GET https://servicenetworking.googleapis.com/v1/services/servicenetworking.googleapis.com/connections?alt=json&network=projects%2F${projectNumber}%2Fglobal%2Fnetworks%2Fcomputenetwork-${uniqueId}&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "connections": [ + { + "network": "projects/${projectNumber}/global/networks/computenetwork-${uniqueId}", + "peering": "servicenetworking-googleapis-com", + "reservedPeeringRanges": [ + "computeaddress-${uniqueId}" + ], + "service": "services/servicenetworking.googleapis.com" + } + ] +} + +--- + +GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/us-west1/clusters/alloydbcluster-1-${uniqueId}/instances/alloydbinstance-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +404 Not Found +Content-Type: application/json + +{ + "code": 5, + "details": [], + "message": "instance \"projects/${projectId}/locations/us-west1/clusters/alloydbcluster-1-${uniqueId}/instances/alloydbinstance-${uniqueId}\" not found" +} + +--- + +POST https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/us-west1/clusters/alloydbcluster-1-${uniqueId}/instances?alt=json&instanceId=alloydbinstance-${uniqueId} +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "availabilityType": "REGIONAL", + "instanceType": "PRIMARY", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "machineConfig": { + "cpuCount": 2 + } +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/us-west1/clusters/alloydbcluster-1-${uniqueId}/instances/alloydbinstance-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "annotations": {}, + "availabilityType": "REGIONAL", + "clientConnectionConfig": null, + "createTime": "2024-04-01T12:34:56.123456Z", + "databaseFlags": {}, + "deleteTime": null, + "displayName": "", + "etag": "abcdef0123A=", + "gceZone": "", + "instanceType": "PRIMARY", + "ipAddress": "", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "machineConfig": { + "cpuCount": 2 + }, + "name": "projects/${projectId}/locations/us-west1/clusters/alloydbcluster-1-${uniqueId}/instances/alloydbinstance-${uniqueId}", + "networkConfig": null, + "nodes": [], + "pscInstanceConfig": null, + "publicIpAddress": "", + "queryInsightsConfig": null, + "readPoolConfig": null, + "reconciling": false, + "satisfiesPzs": false, + "state": "STATE_UNSPECIFIED", + "uid": "111111111111111111111", + "updatePolicy": null, + "updateTime": null, + "writableNode": null +} + +--- + +GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west8/clusters/alloydbcluster-2-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +404 Not Found +Content-Type: application/json + +{ + "code": 5, + "details": [], + "message": "cluster \"projects/${projectId}/locations/europe-west8/clusters/alloydbcluster-2-${uniqueId}\" not found" +} + +--- + +POST https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west8/clusters:createsecondary?alt=json&cluster_id=alloydbcluster-2-${uniqueId} +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "clusterType": "SECONDARY", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "networkConfig": { + "network": "projects/${projectId}/global/networks/computenetwork-${uniqueId}" + }, + "secondaryConfig": { + "primaryClusterName": "projects/${projectId}/locations/us-west1/clusters/alloydbcluster-1-${uniqueId}" + } +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west8/clusters/alloydbcluster-2-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "annotations": {}, + "automatedBackupPolicy": null, + "clusterType": "SECONDARY", + "continuousBackupConfig": null, + "continuousBackupInfo": null, + "createTime": "2024-04-01T12:34:56.123456Z", + "databaseVersion": "DATABASE_VERSION_UNSPECIFIED", + "deleteTime": null, + "displayName": "", + "encryptionConfig": null, + "encryptionInfo": null, + "etag": "abcdef0123A=", + "initialUser": null, + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectId}/locations/europe-west8/clusters/alloydbcluster-2-${uniqueId}", + "network": "", + "networkConfig": { + "allocatedIpRange": "", + "network": "projects/${projectId}/global/networks/computenetwork-${uniqueId}" + }, + "primaryConfig": null, + "reconciling": false, + "satisfiesPzs": false, + "secondaryConfig": { + "primaryClusterName": "projects/${projectId}/locations/us-west1/clusters/alloydbcluster-1-${uniqueId}" + }, + "sslConfig": null, + "state": "STATE_UNSPECIFIED", + "uid": "111111111111111111111", + "updateTime": null +} + +--- + +PATCH https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west8/clusters/alloydbcluster-2-${uniqueId}?alt=json&updateMask=automatedBackupPolicy +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "automatedBackupPolicy": { + "labels": { + "source": "kcc-test" + } + }, + "clusterType": "SECONDARY", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "networkConfig": { + "network": "projects/${projectId}/global/networks/computenetwork-${uniqueId}" + }, + "secondaryConfig": { + "primaryClusterName": "projects/${projectId}/locations/us-west1/clusters/alloydbcluster-1-${uniqueId}" + } +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west8/clusters/alloydbcluster-2-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "annotations": {}, + "automatedBackupPolicy": { + "backupWindow": null, + "encryptionConfig": null, + "labels": { + "source": "kcc-test" + }, + "location": "" + }, + "clusterType": "SECONDARY", + "continuousBackupConfig": null, + "continuousBackupInfo": null, + "createTime": "2024-04-01T12:34:56.123456Z", + "databaseVersion": "DATABASE_VERSION_UNSPECIFIED", + "deleteTime": null, + "displayName": "", + "encryptionConfig": null, + "encryptionInfo": null, + "etag": "abcdef0123A=", + "initialUser": null, + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectId}/locations/europe-west8/clusters/alloydbcluster-2-${uniqueId}", + "network": "", + "networkConfig": { + "allocatedIpRange": "", + "network": "projects/${projectId}/global/networks/computenetwork-${uniqueId}" + }, + "primaryConfig": null, + "reconciling": false, + "satisfiesPzs": false, + "secondaryConfig": { + "primaryClusterName": "projects/${projectId}/locations/us-west1/clusters/alloydbcluster-1-${uniqueId}" + }, + "sslConfig": null, + "state": "STATE_UNSPECIFIED", + "uid": "111111111111111111111", + "updateTime": null +} + +--- + +DELETE https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west8/clusters/alloydbcluster-2-${uniqueId}?alt=json&force=true +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/us-west1/clusters/alloydbcluster-1-${uniqueId}/instances/alloydbinstance-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "annotations": {}, + "availabilityType": "REGIONAL", + "clientConnectionConfig": null, + "createTime": "2024-04-01T12:34:56.123456Z", + "databaseFlags": {}, + "deleteTime": null, + "displayName": "", + "etag": "abcdef0123A=", + "gceZone": "", + "instanceType": "PRIMARY", + "ipAddress": "", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "machineConfig": { + "cpuCount": 2 + }, + "name": "projects/${projectId}/locations/us-west1/clusters/alloydbcluster-1-${uniqueId}/instances/alloydbinstance-${uniqueId}", + "networkConfig": null, + "nodes": [], + "pscInstanceConfig": null, + "publicIpAddress": "", + "queryInsightsConfig": null, + "readPoolConfig": null, + "reconciling": false, + "satisfiesPzs": false, + "state": "STATE_UNSPECIFIED", + "uid": "111111111111111111111", + "updatePolicy": null, + "updateTime": null, + "writableNode": null +} + +--- + +DELETE https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/us-west1/clusters/alloydbcluster-1-${uniqueId}/instances/alloydbinstance-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "lifecycleState": "ACTIVE", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +--- + +GET https://servicenetworking.googleapis.com/v1/services/servicenetworking.googleapis.com/connections?alt=json&network=projects%2F${projectNumber}%2Fglobal%2Fnetworks%2Fcomputenetwork-${uniqueId}&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "connections": [ + { + "network": "projects/${projectNumber}/global/networks/computenetwork-${uniqueId}", + "peering": "servicenetworking-googleapis-com", + "reservedPeeringRanges": [ + "computeaddress-${uniqueId}" + ], + "service": "services/servicenetworking.googleapis.com" + } + ] +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "lifecycleState": "ACTIVE", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +--- + +POST https://compute.googleapis.com/compute/beta/projects/${projectNumber}/global/networks/computenetwork-${uniqueId}/removePeering?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "name": "servicenetworking-googleapis-com" +} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "id": "000000000000000000000", + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "compute#operation", + "name": "${operationID}", + "progress": 0, + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses/computeaddress-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "address": "8.8.8.8", + "addressType": "INTERNAL", + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "id": "000000000000000000000", + "kind": "compute#address", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "computeaddress-${uniqueId}", + "network": "projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "prefixLength": 16, + "purpose": "VPC_PEERING", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/computeaddress-${uniqueId}" +} + +--- + +DELETE https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses/computeaddress-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "id": "000000000000000000000", + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "compute#operation", + "name": "${operationID}", + "progress": 0, + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "DONE" +} + +--- + +GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/us-west1/clusters/alloydbcluster-1-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "annotations": {}, + "automatedBackupPolicy": null, + "clusterType": "PRIMARY", + "continuousBackupConfig": null, + "continuousBackupInfo": null, + "createTime": "2024-04-01T12:34:56.123456Z", + "databaseVersion": "DATABASE_VERSION_UNSPECIFIED", + "deleteTime": null, + "displayName": "", + "encryptionConfig": null, + "encryptionInfo": null, + "etag": "abcdef0123A=", + "initialUser": { + "password": "alloydb-pg", + "user": "" + }, + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectId}/locations/us-west1/clusters/alloydbcluster-1-${uniqueId}", + "network": "", + "networkConfig": { + "allocatedIpRange": "", + "network": "projects/${projectId}/global/networks/computenetwork-${uniqueId}" + }, + "primaryConfig": null, + "reconciling": false, + "satisfiesPzs": false, + "secondaryConfig": null, + "sslConfig": null, + "state": "STATE_UNSPECIFIED", + "uid": "111111111111111111111", + "updateTime": null +} + +--- + +DELETE https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/us-west1/clusters/alloydbcluster-1-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "autoCreateSubnetworks": false, + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "id": "000000000000000000000", + "kind": "compute#network", + "name": "computenetwork-${uniqueId}", + "networkFirewallPolicyEnforcementOrder": "AFTER_CLASSIC_FIREWALL", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "selfLinkWithId": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/${networkID}" +} + +--- + +DELETE https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "id": "000000000000000000000", + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "compute#operation", + "name": "${operationID}", + "operationType": "delete", + "progress": 0, + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING" +} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbinstance/basicalloydbinstance/_generated_object_basicalloydbinstance.golden.yaml b/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbinstance/basicalloydbinstance/_generated_object_basicalloydbinstance.golden.yaml index a3cced1c365..7fdbb18683d 100644 --- a/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbinstance/basicalloydbinstance/_generated_object_basicalloydbinstance.golden.yaml +++ b/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbinstance/basicalloydbinstance/_generated_object_basicalloydbinstance.golden.yaml @@ -31,9 +31,6 @@ status: status: "True" type: Ready createTime: "1970-01-01T00:00:00Z" - ipAddress: 10.1.2.3 name: projects/${projectId}/locations/europe-west1/clusters/alloydbcluster-${uniqueId}/instances/alloydbinstance-${uniqueId} observedGeneration: 3 - state: READY - uid: "12345678" - updateTime: "1970-01-01T00:00:00Z" + state: STATE_UNSPECIFIED diff --git a/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbinstance/basicalloydbinstance/_http.log b/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbinstance/basicalloydbinstance/_http.log new file mode 100644 index 00000000000..31b269a3ac4 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbinstance/basicalloydbinstance/_http.log @@ -0,0 +1,1006 @@ +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +404 Not Found +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "error": { + "code": 404, + "errors": [ + { + "domain": "global", + "message": "network \"projects/${projectId}/global/networks/computenetwork-${uniqueId}\" not found", + "reason": "notFound" + } + ], + "message": "network \"projects/${projectId}/global/networks/computenetwork-${uniqueId}\" not found", + "status": "NOT_FOUND" + } +} + +--- + +POST https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "autoCreateSubnetworks": false, + "name": "computenetwork-${uniqueId}", + "networkFirewallPolicyEnforcementOrder": "AFTER_CLASSIC_FIREWALL" +} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "id": "000000000000000000000", + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "compute#operation", + "name": "${operationID}", + "operationType": "insert", + "progress": 0, + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetId": "${networkID}", + "targetLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/${networkID}" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "autoCreateSubnetworks": false, + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "id": "000000000000000000000", + "kind": "compute#network", + "name": "computenetwork-${uniqueId}", + "networkFirewallPolicyEnforcementOrder": "AFTER_CLASSIC_FIREWALL", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "selfLinkWithId": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/${networkID}" +} + +--- + +GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west1/clusters/alloydbcluster-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +404 Not Found +Content-Type: application/json + +{ + "code": 5, + "details": [], + "message": "cluster \"projects/${projectId}/locations/europe-west1/clusters/alloydbcluster-${uniqueId}\" not found" +} + +--- + +POST https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west1/clusters?alt=json&clusterId=alloydbcluster-${uniqueId} +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "clusterType": "PRIMARY", + "initialUser": { + "password": "alloydb-pg" + }, + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "networkConfig": { + "network": "projects/${projectId}/global/networks/computenetwork-${uniqueId}" + } +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west1/clusters/alloydbcluster-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "annotations": {}, + "automatedBackupPolicy": null, + "clusterType": "PRIMARY", + "continuousBackupConfig": null, + "continuousBackupInfo": null, + "createTime": "2024-04-01T12:34:56.123456Z", + "databaseVersion": "DATABASE_VERSION_UNSPECIFIED", + "deleteTime": null, + "displayName": "", + "encryptionConfig": null, + "encryptionInfo": null, + "etag": "abcdef0123A=", + "initialUser": { + "password": "alloydb-pg", + "user": "" + }, + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectId}/locations/europe-west1/clusters/alloydbcluster-${uniqueId}", + "network": "", + "networkConfig": { + "allocatedIpRange": "", + "network": "projects/${projectId}/global/networks/computenetwork-${uniqueId}" + }, + "primaryConfig": null, + "reconciling": false, + "satisfiesPzs": false, + "secondaryConfig": null, + "sslConfig": null, + "state": "STATE_UNSPECIFIED", + "uid": "111111111111111111111", + "updateTime": null +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses/computeaddress-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +404 Not Found +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "error": { + "code": 404, + "errors": [ + { + "domain": "global", + "message": "address \"projects/${projectId}/global/networks/computeaddress-${uniqueId}\" not found", + "reason": "notFound" + } + ], + "message": "address \"projects/${projectId}/global/networks/computeaddress-${uniqueId}\" not found", + "status": "NOT_FOUND" + } +} + +--- + +POST https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "addressType": "INTERNAL", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "computeaddress-${uniqueId}", + "network": "projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "prefixLength": 16, + "purpose": "VPC_PEERING" +} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "id": "000000000000000000000", + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "compute#operation", + "name": "${operationID}", + "progress": 0, + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "DONE" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses/computeaddress-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "address": "8.8.8.8", + "addressType": "INTERNAL", + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "id": "000000000000000000000", + "kind": "compute#address", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "computeaddress-${uniqueId}", + "network": "projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "prefixLength": 16, + "purpose": "VPC_PEERING", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/computeaddress-${uniqueId}" +} + +--- + +POST https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses/computeaddress-${uniqueId}/setLabels?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "labelFingerprint": "", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + } +} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "id": "000000000000000000000", + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "compute#operation", + "name": "${operationID}", + "progress": 0, + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "DONE" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses/computeaddress-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "address": "8.8.8.8", + "addressType": "INTERNAL", + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "id": "000000000000000000000", + "kind": "compute#address", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "computeaddress-${uniqueId}", + "network": "projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "prefixLength": 16, + "purpose": "VPC_PEERING", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/computeaddress-${uniqueId}" +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "lifecycleState": "ACTIVE", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +--- + +GET https://servicenetworking.googleapis.com/v1/services/servicenetworking.googleapis.com/connections?alt=json&network=projects%2F${projectNumber}%2Fglobal%2Fnetworks%2Fcomputenetwork-${uniqueId}&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "lifecycleState": "ACTIVE", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +--- + +PATCH https://servicenetworking.googleapis.com/v1/services/servicenetworking.googleapis.com/connections/-?alt=json&force=true&prettyPrint=false&updateMask=reservedPeeringRanges +Content-Type: application/json +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "network": "projects/${projectNumber}/global/networks/computenetwork-${uniqueId}", + "reservedPeeringRanges": [ + "computeaddress-${uniqueId}" + ] +} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "name": "operations/${operationID}" +} + +--- + +GET https://servicenetworking.googleapis.com/v1/operations/${operationID}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "done": true, + "name": "operations/${operationID}", + "response": { + "@type": "type.googleapis.com/google.cloud.servicenetworking.v1.Connection", + "network": "projects/${projectNumber}/global/networks/computenetwork-${uniqueId}", + "peering": "servicenetworking-googleapis-com", + "reservedPeeringRanges": [ + "computeaddress-${uniqueId}" + ], + "service": "services/servicenetworking.googleapis.com" + } +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "lifecycleState": "ACTIVE", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +--- + +GET https://servicenetworking.googleapis.com/v1/services/servicenetworking.googleapis.com/connections?alt=json&network=projects%2F${projectNumber}%2Fglobal%2Fnetworks%2Fcomputenetwork-${uniqueId}&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "connections": [ + { + "network": "projects/${projectNumber}/global/networks/computenetwork-${uniqueId}", + "peering": "servicenetworking-googleapis-com", + "reservedPeeringRanges": [ + "computeaddress-${uniqueId}" + ], + "service": "services/servicenetworking.googleapis.com" + } + ] +} + +--- + +GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west1/clusters/alloydbcluster-${uniqueId}/instances/alloydbinstance-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +404 Not Found +Content-Type: application/json + +{ + "code": 5, + "details": [], + "message": "instance \"projects/${projectId}/locations/europe-west1/clusters/alloydbcluster-${uniqueId}/instances/alloydbinstance-${uniqueId}\" not found" +} + +--- + +POST https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west1/clusters/alloydbcluster-${uniqueId}/instances?alt=json&instanceId=alloydbinstance-${uniqueId} +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "availabilityType": "REGIONAL", + "instanceType": "PRIMARY", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "machineConfig": { + "cpuCount": 2 + } +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west1/clusters/alloydbcluster-${uniqueId}/instances/alloydbinstance-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "annotations": {}, + "availabilityType": "REGIONAL", + "clientConnectionConfig": null, + "createTime": "2024-04-01T12:34:56.123456Z", + "databaseFlags": {}, + "deleteTime": null, + "displayName": "", + "etag": "abcdef0123A=", + "gceZone": "", + "instanceType": "PRIMARY", + "ipAddress": "", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "machineConfig": { + "cpuCount": 2 + }, + "name": "projects/${projectId}/locations/europe-west1/clusters/alloydbcluster-${uniqueId}/instances/alloydbinstance-${uniqueId}", + "networkConfig": null, + "nodes": [], + "pscInstanceConfig": null, + "publicIpAddress": "", + "queryInsightsConfig": null, + "readPoolConfig": null, + "reconciling": false, + "satisfiesPzs": false, + "state": "STATE_UNSPECIFIED", + "uid": "111111111111111111111", + "updatePolicy": null, + "updateTime": null, + "writableNode": null +} + +--- + +PATCH https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west1/clusters/alloydbcluster-${uniqueId}/instances/alloydbinstance-${uniqueId}?alt=json&updateMask=databaseFlags +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "availabilityType": "REGIONAL", + "databaseFlags": { + "enable_google_adaptive_autovacuum": "off" + }, + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "machineConfig": { + "cpuCount": 2 + } +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west1/clusters/alloydbcluster-${uniqueId}/instances/alloydbinstance-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "annotations": {}, + "availabilityType": "REGIONAL", + "clientConnectionConfig": null, + "createTime": "2024-04-01T12:34:56.123456Z", + "databaseFlags": { + "enable_google_adaptive_autovacuum": "off" + }, + "deleteTime": null, + "displayName": "", + "etag": "abcdef0123A=", + "gceZone": "", + "instanceType": "PRIMARY", + "ipAddress": "", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "machineConfig": { + "cpuCount": 2 + }, + "name": "projects/${projectId}/locations/europe-west1/clusters/alloydbcluster-${uniqueId}/instances/alloydbinstance-${uniqueId}", + "networkConfig": null, + "nodes": [], + "pscInstanceConfig": null, + "publicIpAddress": "", + "queryInsightsConfig": null, + "readPoolConfig": null, + "reconciling": false, + "satisfiesPzs": false, + "state": "STATE_UNSPECIFIED", + "uid": "111111111111111111111", + "updatePolicy": null, + "updateTime": null, + "writableNode": null +} + +--- + +DELETE https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west1/clusters/alloydbcluster-${uniqueId}/instances/alloydbinstance-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "lifecycleState": "ACTIVE", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +--- + +GET https://servicenetworking.googleapis.com/v1/services/servicenetworking.googleapis.com/connections?alt=json&network=projects%2F${projectNumber}%2Fglobal%2Fnetworks%2Fcomputenetwork-${uniqueId}&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "connections": [ + { + "network": "projects/${projectNumber}/global/networks/computenetwork-${uniqueId}", + "peering": "servicenetworking-googleapis-com", + "reservedPeeringRanges": [ + "computeaddress-${uniqueId}" + ], + "service": "services/servicenetworking.googleapis.com" + } + ] +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "lifecycleState": "ACTIVE", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +--- + +POST https://compute.googleapis.com/compute/beta/projects/${projectNumber}/global/networks/computenetwork-${uniqueId}/removePeering?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "name": "servicenetworking-googleapis-com" +} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "id": "000000000000000000000", + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "compute#operation", + "name": "${operationID}", + "progress": 0, + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses/computeaddress-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "address": "8.8.8.8", + "addressType": "INTERNAL", + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "id": "000000000000000000000", + "kind": "compute#address", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "computeaddress-${uniqueId}", + "network": "projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "prefixLength": 16, + "purpose": "VPC_PEERING", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/computeaddress-${uniqueId}" +} + +--- + +DELETE https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses/computeaddress-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "id": "000000000000000000000", + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "compute#operation", + "name": "${operationID}", + "progress": 0, + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "DONE" +} + +--- + +GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west1/clusters/alloydbcluster-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "annotations": {}, + "automatedBackupPolicy": null, + "clusterType": "PRIMARY", + "continuousBackupConfig": null, + "continuousBackupInfo": null, + "createTime": "2024-04-01T12:34:56.123456Z", + "databaseVersion": "DATABASE_VERSION_UNSPECIFIED", + "deleteTime": null, + "displayName": "", + "encryptionConfig": null, + "encryptionInfo": null, + "etag": "abcdef0123A=", + "initialUser": { + "password": "alloydb-pg", + "user": "" + }, + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectId}/locations/europe-west1/clusters/alloydbcluster-${uniqueId}", + "network": "", + "networkConfig": { + "allocatedIpRange": "", + "network": "projects/${projectId}/global/networks/computenetwork-${uniqueId}" + }, + "primaryConfig": null, + "reconciling": false, + "satisfiesPzs": false, + "secondaryConfig": null, + "sslConfig": null, + "state": "STATE_UNSPECIFIED", + "uid": "111111111111111111111", + "updateTime": null +} + +--- + +DELETE https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west1/clusters/alloydbcluster-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "autoCreateSubnetworks": false, + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "id": "000000000000000000000", + "kind": "compute#network", + "name": "computenetwork-${uniqueId}", + "networkFirewallPolicyEnforcementOrder": "AFTER_CLASSIC_FIREWALL", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "selfLinkWithId": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/${networkID}" +} + +--- + +DELETE https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "id": "000000000000000000000", + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "compute#operation", + "name": "${operationID}", + "operationType": "delete", + "progress": 0, + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING" +} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbinstance/basicalloydbsecondaryinstance/_generated_object_basicalloydbsecondaryinstance.golden.yaml b/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbinstance/basicalloydbsecondaryinstance/_generated_object_basicalloydbsecondaryinstance.golden.yaml new file mode 100644 index 00000000000..0770d96fc2c --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbinstance/basicalloydbsecondaryinstance/_generated_object_basicalloydbsecondaryinstance.golden.yaml @@ -0,0 +1,36 @@ +apiVersion: alloydb.cnrm.cloud.google.com/v1beta1 +kind: AlloyDBInstance +metadata: + annotations: + cnrm.cloud.google.com/management-conflict-prevention-policy: none + cnrm.cloud.google.com/state-into-spec: merge + finalizers: + - cnrm.cloud.google.com/finalizer + - cnrm.cloud.google.com/deletion-defender + generation: 3 + labels: + cnrm-test: "true" + name: alloydbinstance-2-${uniqueId} + namespace: ${uniqueId} +spec: + availabilityType: REGIONAL + clusterRef: + name: alloydbcluster-2-${uniqueId} + databaseFlags: + enable_google_adaptive_autovacuum: "off" + instanceTypeRef: + name: alloydbcluster-2-${uniqueId} + machineConfig: + cpuCount: 2 + resourceID: alloydbinstance-2-${uniqueId} +status: + conditions: + - lastTransitionTime: "1970-01-01T00:00:00Z" + message: The resource is up to date + reason: UpToDate + status: "True" + type: Ready + createTime: "1970-01-01T00:00:00Z" + name: projects/${projectId}/locations/europe-west2/clusters/alloydbcluster-2-${uniqueId}/instances/alloydbinstance-2-${uniqueId} + observedGeneration: 3 + state: STATE_UNSPECIFIED diff --git a/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbinstance/basicalloydbsecondaryinstance/_http.log b/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbinstance/basicalloydbsecondaryinstance/_http.log new file mode 100644 index 00000000000..9e730f45b42 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbinstance/basicalloydbsecondaryinstance/_http.log @@ -0,0 +1,1292 @@ +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +404 Not Found +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "error": { + "code": 404, + "errors": [ + { + "domain": "global", + "message": "network \"projects/${projectId}/global/networks/computenetwork-${uniqueId}\" not found", + "reason": "notFound" + } + ], + "message": "network \"projects/${projectId}/global/networks/computenetwork-${uniqueId}\" not found", + "status": "NOT_FOUND" + } +} + +--- + +POST https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "autoCreateSubnetworks": false, + "name": "computenetwork-${uniqueId}", + "networkFirewallPolicyEnforcementOrder": "AFTER_CLASSIC_FIREWALL" +} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "id": "000000000000000000000", + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "compute#operation", + "name": "${operationID}", + "operationType": "insert", + "progress": 0, + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetId": "${networkID}", + "targetLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/${networkID}" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "autoCreateSubnetworks": false, + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "id": "000000000000000000000", + "kind": "compute#network", + "name": "computenetwork-${uniqueId}", + "networkFirewallPolicyEnforcementOrder": "AFTER_CLASSIC_FIREWALL", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "selfLinkWithId": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/${networkID}" +} + +--- + +GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west1/clusters/alloydbcluster-1-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +404 Not Found +Content-Type: application/json + +{ + "code": 5, + "details": [], + "message": "cluster \"projects/${projectId}/locations/europe-west1/clusters/alloydbcluster-1-${uniqueId}\" not found" +} + +--- + +POST https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west1/clusters?alt=json&clusterId=alloydbcluster-1-${uniqueId} +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "clusterType": "PRIMARY", + "initialUser": { + "password": "alloydb-pg" + }, + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "networkConfig": { + "network": "projects/${projectId}/global/networks/computenetwork-${uniqueId}" + } +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west1/clusters/alloydbcluster-1-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "annotations": {}, + "automatedBackupPolicy": null, + "clusterType": "PRIMARY", + "continuousBackupConfig": null, + "continuousBackupInfo": null, + "createTime": "2024-04-01T12:34:56.123456Z", + "databaseVersion": "DATABASE_VERSION_UNSPECIFIED", + "deleteTime": null, + "displayName": "", + "encryptionConfig": null, + "encryptionInfo": null, + "etag": "abcdef0123A=", + "initialUser": { + "password": "alloydb-pg", + "user": "" + }, + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectId}/locations/europe-west1/clusters/alloydbcluster-1-${uniqueId}", + "network": "", + "networkConfig": { + "allocatedIpRange": "", + "network": "projects/${projectId}/global/networks/computenetwork-${uniqueId}" + }, + "primaryConfig": null, + "reconciling": false, + "satisfiesPzs": false, + "secondaryConfig": null, + "sslConfig": null, + "state": "STATE_UNSPECIFIED", + "uid": "111111111111111111111", + "updateTime": null +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses/computeaddress-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +404 Not Found +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "error": { + "code": 404, + "errors": [ + { + "domain": "global", + "message": "address \"projects/${projectId}/global/networks/computeaddress-${uniqueId}\" not found", + "reason": "notFound" + } + ], + "message": "address \"projects/${projectId}/global/networks/computeaddress-${uniqueId}\" not found", + "status": "NOT_FOUND" + } +} + +--- + +POST https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "addressType": "INTERNAL", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "computeaddress-${uniqueId}", + "network": "projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "prefixLength": 16, + "purpose": "VPC_PEERING" +} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "id": "000000000000000000000", + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "compute#operation", + "name": "${operationID}", + "progress": 0, + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "DONE" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses/computeaddress-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "address": "8.8.8.8", + "addressType": "INTERNAL", + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "id": "000000000000000000000", + "kind": "compute#address", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "computeaddress-${uniqueId}", + "network": "projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "prefixLength": 16, + "purpose": "VPC_PEERING", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/computeaddress-${uniqueId}" +} + +--- + +POST https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses/computeaddress-${uniqueId}/setLabels?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "labelFingerprint": "", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + } +} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "id": "000000000000000000000", + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "compute#operation", + "name": "${operationID}", + "progress": 0, + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "DONE" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses/computeaddress-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "address": "8.8.8.8", + "addressType": "INTERNAL", + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "id": "000000000000000000000", + "kind": "compute#address", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "computeaddress-${uniqueId}", + "network": "projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "prefixLength": 16, + "purpose": "VPC_PEERING", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/computeaddress-${uniqueId}" +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "lifecycleState": "ACTIVE", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +--- + +GET https://servicenetworking.googleapis.com/v1/services/servicenetworking.googleapis.com/connections?alt=json&network=projects%2F${projectNumber}%2Fglobal%2Fnetworks%2Fcomputenetwork-${uniqueId}&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "lifecycleState": "ACTIVE", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +--- + +PATCH https://servicenetworking.googleapis.com/v1/services/servicenetworking.googleapis.com/connections/-?alt=json&force=true&prettyPrint=false&updateMask=reservedPeeringRanges +Content-Type: application/json +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "network": "projects/${projectNumber}/global/networks/computenetwork-${uniqueId}", + "reservedPeeringRanges": [ + "computeaddress-${uniqueId}" + ] +} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "name": "operations/${operationID}" +} + +--- + +GET https://servicenetworking.googleapis.com/v1/operations/${operationID}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "done": true, + "name": "operations/${operationID}", + "response": { + "@type": "type.googleapis.com/google.cloud.servicenetworking.v1.Connection", + "network": "projects/${projectNumber}/global/networks/computenetwork-${uniqueId}", + "peering": "servicenetworking-googleapis-com", + "reservedPeeringRanges": [ + "computeaddress-${uniqueId}" + ], + "service": "services/servicenetworking.googleapis.com" + } +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "lifecycleState": "ACTIVE", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +--- + +GET https://servicenetworking.googleapis.com/v1/services/servicenetworking.googleapis.com/connections?alt=json&network=projects%2F${projectNumber}%2Fglobal%2Fnetworks%2Fcomputenetwork-${uniqueId}&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "connections": [ + { + "network": "projects/${projectNumber}/global/networks/computenetwork-${uniqueId}", + "peering": "servicenetworking-googleapis-com", + "reservedPeeringRanges": [ + "computeaddress-${uniqueId}" + ], + "service": "services/servicenetworking.googleapis.com" + } + ] +} + +--- + +GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west1/clusters/alloydbcluster-1-${uniqueId}/instances/alloydbinstance-1-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +404 Not Found +Content-Type: application/json + +{ + "code": 5, + "details": [], + "message": "instance \"projects/${projectId}/locations/europe-west1/clusters/alloydbcluster-1-${uniqueId}/instances/alloydbinstance-1-${uniqueId}\" not found" +} + +--- + +POST https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west1/clusters/alloydbcluster-1-${uniqueId}/instances?alt=json&instanceId=alloydbinstance-1-${uniqueId} +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "availabilityType": "REGIONAL", + "instanceType": "PRIMARY", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "machineConfig": { + "cpuCount": 2 + } +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west1/clusters/alloydbcluster-1-${uniqueId}/instances/alloydbinstance-1-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "annotations": {}, + "availabilityType": "REGIONAL", + "clientConnectionConfig": null, + "createTime": "2024-04-01T12:34:56.123456Z", + "databaseFlags": {}, + "deleteTime": null, + "displayName": "", + "etag": "abcdef0123A=", + "gceZone": "", + "instanceType": "PRIMARY", + "ipAddress": "", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "machineConfig": { + "cpuCount": 2 + }, + "name": "projects/${projectId}/locations/europe-west1/clusters/alloydbcluster-1-${uniqueId}/instances/alloydbinstance-1-${uniqueId}", + "networkConfig": null, + "nodes": [], + "pscInstanceConfig": null, + "publicIpAddress": "", + "queryInsightsConfig": null, + "readPoolConfig": null, + "reconciling": false, + "satisfiesPzs": false, + "state": "STATE_UNSPECIFIED", + "uid": "111111111111111111111", + "updatePolicy": null, + "updateTime": null, + "writableNode": null +} + +--- + +GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west2/clusters/alloydbcluster-2-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +404 Not Found +Content-Type: application/json + +{ + "code": 5, + "details": [], + "message": "cluster \"projects/${projectId}/locations/europe-west2/clusters/alloydbcluster-2-${uniqueId}\" not found" +} + +--- + +POST https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west2/clusters:createsecondary?alt=json&cluster_id=alloydbcluster-2-${uniqueId} +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "clusterType": "SECONDARY", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "networkConfig": { + "network": "projects/${projectId}/global/networks/computenetwork-${uniqueId}" + }, + "secondaryConfig": { + "primaryClusterName": "projects/${projectId}/locations/europe-west1/clusters/alloydbcluster-1-${uniqueId}" + } +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west2/clusters/alloydbcluster-2-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "annotations": {}, + "automatedBackupPolicy": null, + "clusterType": "SECONDARY", + "continuousBackupConfig": null, + "continuousBackupInfo": null, + "createTime": "2024-04-01T12:34:56.123456Z", + "databaseVersion": "DATABASE_VERSION_UNSPECIFIED", + "deleteTime": null, + "displayName": "", + "encryptionConfig": null, + "encryptionInfo": null, + "etag": "abcdef0123A=", + "initialUser": null, + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectId}/locations/europe-west2/clusters/alloydbcluster-2-${uniqueId}", + "network": "", + "networkConfig": { + "allocatedIpRange": "", + "network": "projects/${projectId}/global/networks/computenetwork-${uniqueId}" + }, + "primaryConfig": null, + "reconciling": false, + "satisfiesPzs": false, + "secondaryConfig": { + "primaryClusterName": "projects/${projectId}/locations/europe-west1/clusters/alloydbcluster-1-${uniqueId}" + }, + "sslConfig": null, + "state": "STATE_UNSPECIFIED", + "uid": "111111111111111111111", + "updateTime": null +} + +--- + +GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west2/clusters/alloydbcluster-2-${uniqueId}/instances/alloydbinstance-2-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +404 Not Found +Content-Type: application/json + +{ + "code": 5, + "details": [], + "message": "instance \"projects/${projectId}/locations/europe-west2/clusters/alloydbcluster-2-${uniqueId}/instances/alloydbinstance-2-${uniqueId}\" not found" +} + +--- + +POST https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west2/clusters/alloydbcluster-2-${uniqueId}/instances:createsecondary?alt=json&instanceId=alloydbinstance-2-${uniqueId} +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "availabilityType": "REGIONAL", + "instanceType": "SECONDARY", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "machineConfig": { + "cpuCount": 2 + } +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west2/clusters/alloydbcluster-2-${uniqueId}/instances/alloydbinstance-2-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "annotations": {}, + "availabilityType": "REGIONAL", + "clientConnectionConfig": null, + "createTime": "2024-04-01T12:34:56.123456Z", + "databaseFlags": {}, + "deleteTime": null, + "displayName": "", + "etag": "abcdef0123A=", + "gceZone": "", + "instanceType": "SECONDARY", + "ipAddress": "", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "machineConfig": { + "cpuCount": 2 + }, + "name": "projects/${projectId}/locations/europe-west2/clusters/alloydbcluster-2-${uniqueId}/instances/alloydbinstance-2-${uniqueId}", + "networkConfig": null, + "nodes": [], + "pscInstanceConfig": null, + "publicIpAddress": "", + "queryInsightsConfig": null, + "readPoolConfig": null, + "reconciling": false, + "satisfiesPzs": false, + "state": "STATE_UNSPECIFIED", + "uid": "111111111111111111111", + "updatePolicy": null, + "updateTime": null, + "writableNode": null +} + +--- + +PATCH https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west2/clusters/alloydbcluster-2-${uniqueId}/instances/alloydbinstance-2-${uniqueId}?alt=json&updateMask=databaseFlags +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "availabilityType": "REGIONAL", + "databaseFlags": { + "enable_google_adaptive_autovacuum": "off" + }, + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "machineConfig": { + "cpuCount": 2 + } +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west2/clusters/alloydbcluster-2-${uniqueId}/instances/alloydbinstance-2-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "annotations": {}, + "availabilityType": "REGIONAL", + "clientConnectionConfig": null, + "createTime": "2024-04-01T12:34:56.123456Z", + "databaseFlags": { + "enable_google_adaptive_autovacuum": "off" + }, + "deleteTime": null, + "displayName": "", + "etag": "abcdef0123A=", + "gceZone": "", + "instanceType": "SECONDARY", + "ipAddress": "", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "machineConfig": { + "cpuCount": 2 + }, + "name": "projects/${projectId}/locations/europe-west2/clusters/alloydbcluster-2-${uniqueId}/instances/alloydbinstance-2-${uniqueId}", + "networkConfig": null, + "nodes": [], + "pscInstanceConfig": null, + "publicIpAddress": "", + "queryInsightsConfig": null, + "readPoolConfig": null, + "reconciling": false, + "satisfiesPzs": false, + "state": "STATE_UNSPECIFIED", + "uid": "111111111111111111111", + "updatePolicy": null, + "updateTime": null, + "writableNode": null +} + +--- + +GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west2/clusters/alloydbcluster-2-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "annotations": {}, + "automatedBackupPolicy": null, + "clusterType": "SECONDARY", + "continuousBackupConfig": null, + "continuousBackupInfo": null, + "createTime": "2024-04-01T12:34:56.123456Z", + "databaseVersion": "DATABASE_VERSION_UNSPECIFIED", + "deleteTime": null, + "displayName": "", + "encryptionConfig": null, + "encryptionInfo": null, + "etag": "abcdef0123A=", + "initialUser": null, + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectId}/locations/europe-west2/clusters/alloydbcluster-2-${uniqueId}", + "network": "", + "networkConfig": { + "allocatedIpRange": "", + "network": "projects/${projectId}/global/networks/computenetwork-${uniqueId}" + }, + "primaryConfig": null, + "reconciling": false, + "satisfiesPzs": false, + "secondaryConfig": { + "primaryClusterName": "projects/${projectId}/locations/europe-west1/clusters/alloydbcluster-1-${uniqueId}" + }, + "sslConfig": null, + "state": "STATE_UNSPECIFIED", + "uid": "111111111111111111111", + "updateTime": null +} + +--- + +DELETE https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west2/clusters/alloydbcluster-2-${uniqueId}?alt=json&force=true +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west1/clusters/alloydbcluster-1-${uniqueId}/instances/alloydbinstance-1-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "annotations": {}, + "availabilityType": "REGIONAL", + "clientConnectionConfig": null, + "createTime": "2024-04-01T12:34:56.123456Z", + "databaseFlags": {}, + "deleteTime": null, + "displayName": "", + "etag": "abcdef0123A=", + "gceZone": "", + "instanceType": "PRIMARY", + "ipAddress": "", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "machineConfig": { + "cpuCount": 2 + }, + "name": "projects/${projectId}/locations/europe-west1/clusters/alloydbcluster-1-${uniqueId}/instances/alloydbinstance-1-${uniqueId}", + "networkConfig": null, + "nodes": [], + "pscInstanceConfig": null, + "publicIpAddress": "", + "queryInsightsConfig": null, + "readPoolConfig": null, + "reconciling": false, + "satisfiesPzs": false, + "state": "STATE_UNSPECIFIED", + "uid": "111111111111111111111", + "updatePolicy": null, + "updateTime": null, + "writableNode": null +} + +--- + +DELETE https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west1/clusters/alloydbcluster-1-${uniqueId}/instances/alloydbinstance-1-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "lifecycleState": "ACTIVE", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +--- + +GET https://servicenetworking.googleapis.com/v1/services/servicenetworking.googleapis.com/connections?alt=json&network=projects%2F${projectNumber}%2Fglobal%2Fnetworks%2Fcomputenetwork-${uniqueId}&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "connections": [ + { + "network": "projects/${projectNumber}/global/networks/computenetwork-${uniqueId}", + "peering": "servicenetworking-googleapis-com", + "reservedPeeringRanges": [ + "computeaddress-${uniqueId}" + ], + "service": "services/servicenetworking.googleapis.com" + } + ] +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "lifecycleState": "ACTIVE", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +--- + +POST https://compute.googleapis.com/compute/beta/projects/${projectNumber}/global/networks/computenetwork-${uniqueId}/removePeering?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "name": "servicenetworking-googleapis-com" +} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "id": "000000000000000000000", + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "compute#operation", + "name": "${operationID}", + "progress": 0, + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses/computeaddress-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "address": "8.8.8.8", + "addressType": "INTERNAL", + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "id": "000000000000000000000", + "kind": "compute#address", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "computeaddress-${uniqueId}", + "network": "projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "prefixLength": 16, + "purpose": "VPC_PEERING", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/computeaddress-${uniqueId}" +} + +--- + +DELETE https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses/computeaddress-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "id": "000000000000000000000", + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "compute#operation", + "name": "${operationID}", + "progress": 0, + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "DONE" +} + +--- + +GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west1/clusters/alloydbcluster-1-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "annotations": {}, + "automatedBackupPolicy": null, + "clusterType": "PRIMARY", + "continuousBackupConfig": null, + "continuousBackupInfo": null, + "createTime": "2024-04-01T12:34:56.123456Z", + "databaseVersion": "DATABASE_VERSION_UNSPECIFIED", + "deleteTime": null, + "displayName": "", + "encryptionConfig": null, + "encryptionInfo": null, + "etag": "abcdef0123A=", + "initialUser": { + "password": "alloydb-pg", + "user": "" + }, + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectId}/locations/europe-west1/clusters/alloydbcluster-1-${uniqueId}", + "network": "", + "networkConfig": { + "allocatedIpRange": "", + "network": "projects/${projectId}/global/networks/computenetwork-${uniqueId}" + }, + "primaryConfig": null, + "reconciling": false, + "satisfiesPzs": false, + "secondaryConfig": null, + "sslConfig": null, + "state": "STATE_UNSPECIFIED", + "uid": "111111111111111111111", + "updateTime": null +} + +--- + +DELETE https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west1/clusters/alloydbcluster-1-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "autoCreateSubnetworks": false, + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "id": "000000000000000000000", + "kind": "compute#network", + "name": "computenetwork-${uniqueId}", + "networkFirewallPolicyEnforcementOrder": "AFTER_CLASSIC_FIREWALL", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "selfLinkWithId": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/${networkID}" +} + +--- + +DELETE https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "id": "000000000000000000000", + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "compute#operation", + "name": "${operationID}", + "operationType": "delete", + "progress": 0, + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING" +} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbinstance/fullalloydbinstance/_generated_object_fullalloydbinstance.golden.yaml b/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbinstance/fullalloydbinstance/_generated_object_fullalloydbinstance.golden.yaml new file mode 100644 index 00000000000..5c755fc9c48 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbinstance/fullalloydbinstance/_generated_object_fullalloydbinstance.golden.yaml @@ -0,0 +1,36 @@ +apiVersion: alloydb.cnrm.cloud.google.com/v1beta1 +kind: AlloyDBInstance +metadata: + annotations: + cnrm.cloud.google.com/management-conflict-prevention-policy: none + cnrm.cloud.google.com/state-into-spec: merge + finalizers: + - cnrm.cloud.google.com/finalizer + - cnrm.cloud.google.com/deletion-defender + generation: 3 + labels: + cnrm-test: "true" + name: alloydbinstance-${uniqueId} + namespace: ${uniqueId} +spec: + availabilityType: AVAILABILITY_TYPE_UNSPECIFIED + clusterRef: + name: alloydbcluster-${uniqueId} + databaseFlags: + enable_google_adaptive_autovacuum: "off" + instanceTypeRef: + name: alloydbcluster-${uniqueId} + machineConfig: + cpuCount: 4 + resourceID: alloydbinstance${uniqueId} +status: + conditions: + - lastTransitionTime: "1970-01-01T00:00:00Z" + message: The resource is up to date + reason: UpToDate + status: "True" + type: Ready + createTime: "1970-01-01T00:00:00Z" + name: projects/${projectId}/locations/europe-north1/clusters/alloydbcluster${uniqueId}/instances/alloydbinstance${uniqueId} + observedGeneration: 3 + state: STATE_UNSPECIFIED diff --git a/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbinstance/fullalloydbinstance/_http.log b/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbinstance/fullalloydbinstance/_http.log new file mode 100644 index 00000000000..158028e5b19 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbinstance/fullalloydbinstance/_http.log @@ -0,0 +1,997 @@ +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +404 Not Found +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "error": { + "code": 404, + "errors": [ + { + "domain": "global", + "message": "network \"projects/${projectId}/global/networks/computenetwork-${uniqueId}\" not found", + "reason": "notFound" + } + ], + "message": "network \"projects/${projectId}/global/networks/computenetwork-${uniqueId}\" not found", + "status": "NOT_FOUND" + } +} + +--- + +POST https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "autoCreateSubnetworks": false, + "name": "computenetwork-${uniqueId}", + "networkFirewallPolicyEnforcementOrder": "AFTER_CLASSIC_FIREWALL" +} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "id": "000000000000000000000", + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "compute#operation", + "name": "${operationID}", + "operationType": "insert", + "progress": 0, + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetId": "${networkID}", + "targetLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/${networkID}" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "autoCreateSubnetworks": false, + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "id": "000000000000000000000", + "kind": "compute#network", + "name": "computenetwork-${uniqueId}", + "networkFirewallPolicyEnforcementOrder": "AFTER_CLASSIC_FIREWALL", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "selfLinkWithId": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/${networkID}" +} + +--- + +GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-north1/clusters/alloydbcluster${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +404 Not Found +Content-Type: application/json + +{ + "code": 5, + "details": [], + "message": "cluster \"projects/${projectId}/locations/europe-north1/clusters/alloydbcluster${uniqueId}\" not found" +} + +--- + +POST https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-north1/clusters?alt=json&clusterId=alloydbcluster${uniqueId} +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "clusterType": "PRIMARY", + "initialUser": { + "password": "alloydb-pg" + }, + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "network": "projects/${projectId}/global/networks/computenetwork-${uniqueId}" +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-north1/clusters/alloydbcluster${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "annotations": {}, + "automatedBackupPolicy": null, + "clusterType": "PRIMARY", + "continuousBackupConfig": null, + "continuousBackupInfo": null, + "createTime": "2024-04-01T12:34:56.123456Z", + "databaseVersion": "DATABASE_VERSION_UNSPECIFIED", + "deleteTime": null, + "displayName": "", + "encryptionConfig": null, + "encryptionInfo": null, + "etag": "abcdef0123A=", + "initialUser": { + "password": "alloydb-pg", + "user": "" + }, + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectId}/locations/europe-north1/clusters/alloydbcluster${uniqueId}", + "network": "projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "networkConfig": null, + "primaryConfig": null, + "reconciling": false, + "satisfiesPzs": false, + "secondaryConfig": null, + "sslConfig": null, + "state": "STATE_UNSPECIFIED", + "uid": "111111111111111111111", + "updateTime": null +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses/computeaddress${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +404 Not Found +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "error": { + "code": 404, + "errors": [ + { + "domain": "global", + "message": "address \"projects/${projectId}/global/networks/computeaddress${uniqueId}\" not found", + "reason": "notFound" + } + ], + "message": "address \"projects/${projectId}/global/networks/computeaddress${uniqueId}\" not found", + "status": "NOT_FOUND" + } +} + +--- + +POST https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "addressType": "INTERNAL", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "computeaddress${uniqueId}", + "network": "projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "prefixLength": 16, + "purpose": "VPC_PEERING" +} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "id": "000000000000000000000", + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "compute#operation", + "name": "${operationID}", + "progress": 0, + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "DONE" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses/computeaddress${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "address": "8.8.8.8", + "addressType": "INTERNAL", + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "id": "000000000000000000000", + "kind": "compute#address", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "computeaddress${uniqueId}", + "network": "projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "prefixLength": 16, + "purpose": "VPC_PEERING", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/computeaddress${uniqueId}" +} + +--- + +POST https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses/computeaddress${uniqueId}/setLabels?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "labelFingerprint": "", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + } +} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "id": "000000000000000000000", + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "compute#operation", + "name": "${operationID}", + "progress": 0, + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "DONE" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses/computeaddress${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "address": "8.8.8.8", + "addressType": "INTERNAL", + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "id": "000000000000000000000", + "kind": "compute#address", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "computeaddress${uniqueId}", + "network": "projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "prefixLength": 16, + "purpose": "VPC_PEERING", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/computeaddress${uniqueId}" +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "lifecycleState": "ACTIVE", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +--- + +GET https://servicenetworking.googleapis.com/v1/services/servicenetworking.googleapis.com/connections?alt=json&network=projects%2F${projectNumber}%2Fglobal%2Fnetworks%2Fcomputenetwork-${uniqueId}&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "lifecycleState": "ACTIVE", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +--- + +PATCH https://servicenetworking.googleapis.com/v1/services/servicenetworking.googleapis.com/connections/-?alt=json&force=true&prettyPrint=false&updateMask=reservedPeeringRanges +Content-Type: application/json +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "network": "projects/${projectNumber}/global/networks/computenetwork-${uniqueId}", + "reservedPeeringRanges": [ + "computeaddress${uniqueId}" + ] +} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "name": "operations/${operationID}" +} + +--- + +GET https://servicenetworking.googleapis.com/v1/operations/${operationID}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "done": true, + "name": "operations/${operationID}", + "response": { + "@type": "type.googleapis.com/google.cloud.servicenetworking.v1.Connection", + "network": "projects/${projectNumber}/global/networks/computenetwork-${uniqueId}", + "peering": "servicenetworking-googleapis-com", + "reservedPeeringRanges": [ + "computeaddress${uniqueId}" + ], + "service": "services/servicenetworking.googleapis.com" + } +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "lifecycleState": "ACTIVE", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +--- + +GET https://servicenetworking.googleapis.com/v1/services/servicenetworking.googleapis.com/connections?alt=json&network=projects%2F${projectNumber}%2Fglobal%2Fnetworks%2Fcomputenetwork-${uniqueId}&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "connections": [ + { + "network": "projects/${projectNumber}/global/networks/computenetwork-${uniqueId}", + "peering": "servicenetworking-googleapis-com", + "reservedPeeringRanges": [ + "computeaddress${uniqueId}" + ], + "service": "services/servicenetworking.googleapis.com" + } + ] +} + +--- + +GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-north1/clusters/alloydbcluster${uniqueId}/instances/alloydbinstance${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +404 Not Found +Content-Type: application/json + +{ + "code": 5, + "details": [], + "message": "instance \"projects/${projectId}/locations/europe-north1/clusters/alloydbcluster${uniqueId}/instances/alloydbinstance${uniqueId}\" not found" +} + +--- + +POST https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-north1/clusters/alloydbcluster${uniqueId}/instances?alt=json&instanceId=alloydbinstance${uniqueId} +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "instanceType": "PRIMARY", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "machineConfig": { + "cpuCount": 2 + } +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-north1/clusters/alloydbcluster${uniqueId}/instances/alloydbinstance${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "annotations": {}, + "availabilityType": "AVAILABILITY_TYPE_UNSPECIFIED", + "clientConnectionConfig": null, + "createTime": "2024-04-01T12:34:56.123456Z", + "databaseFlags": {}, + "deleteTime": null, + "displayName": "", + "etag": "abcdef0123A=", + "gceZone": "", + "instanceType": "PRIMARY", + "ipAddress": "", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "machineConfig": { + "cpuCount": 2 + }, + "name": "projects/${projectId}/locations/europe-north1/clusters/alloydbcluster${uniqueId}/instances/alloydbinstance${uniqueId}", + "networkConfig": null, + "nodes": [], + "pscInstanceConfig": null, + "publicIpAddress": "", + "queryInsightsConfig": null, + "readPoolConfig": null, + "reconciling": false, + "satisfiesPzs": false, + "state": "STATE_UNSPECIFIED", + "uid": "111111111111111111111", + "updatePolicy": null, + "updateTime": null, + "writableNode": null +} + +--- + +PATCH https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-north1/clusters/alloydbcluster${uniqueId}/instances/alloydbinstance${uniqueId}?alt=json&updateMask=databaseFlags%2CmachineConfig +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "availabilityType": "AVAILABILITY_TYPE_UNSPECIFIED", + "databaseFlags": { + "enable_google_adaptive_autovacuum": "off" + }, + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "machineConfig": { + "cpuCount": 4 + } +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-north1/clusters/alloydbcluster${uniqueId}/instances/alloydbinstance${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "annotations": {}, + "availabilityType": "AVAILABILITY_TYPE_UNSPECIFIED", + "clientConnectionConfig": null, + "createTime": "2024-04-01T12:34:56.123456Z", + "databaseFlags": { + "enable_google_adaptive_autovacuum": "off" + }, + "deleteTime": null, + "displayName": "", + "etag": "abcdef0123A=", + "gceZone": "", + "instanceType": "PRIMARY", + "ipAddress": "", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "machineConfig": { + "cpuCount": 4 + }, + "name": "projects/${projectId}/locations/europe-north1/clusters/alloydbcluster${uniqueId}/instances/alloydbinstance${uniqueId}", + "networkConfig": null, + "nodes": [], + "pscInstanceConfig": null, + "publicIpAddress": "", + "queryInsightsConfig": null, + "readPoolConfig": null, + "reconciling": false, + "satisfiesPzs": false, + "state": "STATE_UNSPECIFIED", + "uid": "111111111111111111111", + "updatePolicy": null, + "updateTime": null, + "writableNode": null +} + +--- + +DELETE https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-north1/clusters/alloydbcluster${uniqueId}/instances/alloydbinstance${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "lifecycleState": "ACTIVE", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +--- + +GET https://servicenetworking.googleapis.com/v1/services/servicenetworking.googleapis.com/connections?alt=json&network=projects%2F${projectNumber}%2Fglobal%2Fnetworks%2Fcomputenetwork-${uniqueId}&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "connections": [ + { + "network": "projects/${projectNumber}/global/networks/computenetwork-${uniqueId}", + "peering": "servicenetworking-googleapis-com", + "reservedPeeringRanges": [ + "computeaddress${uniqueId}" + ], + "service": "services/servicenetworking.googleapis.com" + } + ] +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "lifecycleState": "ACTIVE", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +--- + +POST https://compute.googleapis.com/compute/beta/projects/${projectNumber}/global/networks/computenetwork-${uniqueId}/removePeering?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "name": "servicenetworking-googleapis-com" +} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "id": "000000000000000000000", + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "compute#operation", + "name": "${operationID}", + "progress": 0, + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses/computeaddress${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "address": "8.8.8.8", + "addressType": "INTERNAL", + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "id": "000000000000000000000", + "kind": "compute#address", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "computeaddress${uniqueId}", + "network": "projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "prefixLength": 16, + "purpose": "VPC_PEERING", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/computeaddress${uniqueId}" +} + +--- + +DELETE https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses/computeaddress${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "id": "000000000000000000000", + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "compute#operation", + "name": "${operationID}", + "progress": 0, + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "DONE" +} + +--- + +GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-north1/clusters/alloydbcluster${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "annotations": {}, + "automatedBackupPolicy": null, + "clusterType": "PRIMARY", + "continuousBackupConfig": null, + "continuousBackupInfo": null, + "createTime": "2024-04-01T12:34:56.123456Z", + "databaseVersion": "DATABASE_VERSION_UNSPECIFIED", + "deleteTime": null, + "displayName": "", + "encryptionConfig": null, + "encryptionInfo": null, + "etag": "abcdef0123A=", + "initialUser": { + "password": "alloydb-pg", + "user": "" + }, + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectId}/locations/europe-north1/clusters/alloydbcluster${uniqueId}", + "network": "projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "networkConfig": null, + "primaryConfig": null, + "reconciling": false, + "satisfiesPzs": false, + "secondaryConfig": null, + "sslConfig": null, + "state": "STATE_UNSPECIFIED", + "uid": "111111111111111111111", + "updateTime": null +} + +--- + +DELETE https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-north1/clusters/alloydbcluster${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "autoCreateSubnetworks": false, + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "id": "000000000000000000000", + "kind": "compute#network", + "name": "computenetwork-${uniqueId}", + "networkFirewallPolicyEnforcementOrder": "AFTER_CLASSIC_FIREWALL", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "selfLinkWithId": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/${networkID}" +} + +--- + +DELETE https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "id": "000000000000000000000", + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "compute#operation", + "name": "${operationID}", + "operationType": "delete", + "progress": 0, + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING" +} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbinstance/readalloydbinstance/_generated_object_readalloydbinstance.golden.yaml b/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbinstance/readalloydbinstance/_generated_object_readalloydbinstance.golden.yaml new file mode 100644 index 00000000000..6928ccb3040 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbinstance/readalloydbinstance/_generated_object_readalloydbinstance.golden.yaml @@ -0,0 +1,36 @@ +apiVersion: alloydb.cnrm.cloud.google.com/v1beta1 +kind: AlloyDBInstance +metadata: + annotations: + cnrm.cloud.google.com/management-conflict-prevention-policy: none + cnrm.cloud.google.com/state-into-spec: merge + finalizers: + - cnrm.cloud.google.com/finalizer + - cnrm.cloud.google.com/deletion-defender + generation: 3 + labels: + cnrm-test: "true" + name: alloydbreadinstance-${uniqueId} + namespace: ${uniqueId} +spec: + availabilityType: AVAILABILITY_TYPE_UNSPECIFIED + clusterRef: + name: alloydbcluster-${uniqueId} + instanceTypeRef: + external: READ_POOL + machineConfig: + cpuCount: 2 + readPoolConfig: + nodeCount: 3 + resourceID: alloydbreadinstance${uniqueId} +status: + conditions: + - lastTransitionTime: "1970-01-01T00:00:00Z" + message: The resource is up to date + reason: UpToDate + status: "True" + type: Ready + createTime: "1970-01-01T00:00:00Z" + name: projects/${projectId}/locations/europe-southwest1/clusters/alloydbcluster${uniqueId}/instances/alloydbreadinstance${uniqueId} + observedGeneration: 3 + state: STATE_UNSPECIFIED diff --git a/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbinstance/readalloydbinstance/_http.log b/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbinstance/readalloydbinstance/_http.log new file mode 100644 index 00000000000..fd25c3e9d2a --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbinstance/readalloydbinstance/_http.log @@ -0,0 +1,1150 @@ +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +404 Not Found +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "error": { + "code": 404, + "errors": [ + { + "domain": "global", + "message": "network \"projects/${projectId}/global/networks/computenetwork${uniqueId}\" not found", + "reason": "notFound" + } + ], + "message": "network \"projects/${projectId}/global/networks/computenetwork${uniqueId}\" not found", + "status": "NOT_FOUND" + } +} + +--- + +POST https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "autoCreateSubnetworks": true, + "name": "computenetwork${uniqueId}", + "networkFirewallPolicyEnforcementOrder": "AFTER_CLASSIC_FIREWALL" +} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "id": "000000000000000000000", + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "compute#operation", + "name": "${operationID}", + "operationType": "insert", + "progress": 0, + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetId": "${networkID}", + "targetLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/${networkID}" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "autoCreateSubnetworks": true, + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "id": "000000000000000000000", + "kind": "compute#network", + "name": "computenetwork${uniqueId}", + "networkFirewallPolicyEnforcementOrder": "AFTER_CLASSIC_FIREWALL", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/computenetwork${uniqueId}", + "selfLinkWithId": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/${networkID}" +} + +--- + +GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-southwest1/clusters/alloydbcluster${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +404 Not Found +Content-Type: application/json + +{ + "code": 5, + "details": [], + "message": "cluster \"projects/${projectId}/locations/europe-southwest1/clusters/alloydbcluster${uniqueId}\" not found" +} + +--- + +POST https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-southwest1/clusters?alt=json&clusterId=alloydbcluster${uniqueId} +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "clusterType": "PRIMARY", + "initialUser": { + "password": "alloydb-pg" + }, + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "network": "projects/${projectId}/global/networks/computenetwork${uniqueId}" +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-southwest1/clusters/alloydbcluster${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "annotations": {}, + "automatedBackupPolicy": null, + "clusterType": "PRIMARY", + "continuousBackupConfig": null, + "continuousBackupInfo": null, + "createTime": "2024-04-01T12:34:56.123456Z", + "databaseVersion": "DATABASE_VERSION_UNSPECIFIED", + "deleteTime": null, + "displayName": "", + "encryptionConfig": null, + "encryptionInfo": null, + "etag": "abcdef0123A=", + "initialUser": { + "password": "alloydb-pg", + "user": "" + }, + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectId}/locations/europe-southwest1/clusters/alloydbcluster${uniqueId}", + "network": "projects/${projectId}/global/networks/computenetwork${uniqueId}", + "networkConfig": null, + "primaryConfig": null, + "reconciling": false, + "satisfiesPzs": false, + "secondaryConfig": null, + "sslConfig": null, + "state": "STATE_UNSPECIFIED", + "uid": "111111111111111111111", + "updateTime": null +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses/computeaddress${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +404 Not Found +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "error": { + "code": 404, + "errors": [ + { + "domain": "global", + "message": "address \"projects/${projectId}/global/networks/computeaddress${uniqueId}\" not found", + "reason": "notFound" + } + ], + "message": "address \"projects/${projectId}/global/networks/computeaddress${uniqueId}\" not found", + "status": "NOT_FOUND" + } +} + +--- + +POST https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "addressType": "INTERNAL", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "computeaddress${uniqueId}", + "network": "projects/${projectId}/global/networks/computenetwork${uniqueId}", + "prefixLength": 16, + "purpose": "VPC_PEERING" +} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "id": "000000000000000000000", + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "compute#operation", + "name": "${operationID}", + "progress": 0, + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "DONE" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses/computeaddress${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "address": "8.8.8.8", + "addressType": "INTERNAL", + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "id": "000000000000000000000", + "kind": "compute#address", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "computeaddress${uniqueId}", + "network": "projects/${projectId}/global/networks/computenetwork${uniqueId}", + "prefixLength": 16, + "purpose": "VPC_PEERING", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/computeaddress${uniqueId}" +} + +--- + +POST https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses/computeaddress${uniqueId}/setLabels?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "labelFingerprint": "", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + } +} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "id": "000000000000000000000", + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "compute#operation", + "name": "${operationID}", + "progress": 0, + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "DONE" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses/computeaddress${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "address": "8.8.8.8", + "addressType": "INTERNAL", + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "id": "000000000000000000000", + "kind": "compute#address", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "computeaddress${uniqueId}", + "network": "projects/${projectId}/global/networks/computenetwork${uniqueId}", + "prefixLength": 16, + "purpose": "VPC_PEERING", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/computeaddress${uniqueId}" +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "lifecycleState": "ACTIVE", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +--- + +GET https://servicenetworking.googleapis.com/v1/services/servicenetworking.googleapis.com/connections?alt=json&network=projects%2F${projectNumber}%2Fglobal%2Fnetworks%2Fcomputenetwork${uniqueId}&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "lifecycleState": "ACTIVE", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +--- + +PATCH https://servicenetworking.googleapis.com/v1/services/servicenetworking.googleapis.com/connections/-?alt=json&force=true&prettyPrint=false&updateMask=reservedPeeringRanges +Content-Type: application/json +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "network": "projects/${projectNumber}/global/networks/computenetwork${uniqueId}", + "reservedPeeringRanges": [ + "computeaddress${uniqueId}" + ] +} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "name": "operations/${operationID}" +} + +--- + +GET https://servicenetworking.googleapis.com/v1/operations/${operationID}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "done": true, + "name": "operations/${operationID}", + "response": { + "@type": "type.googleapis.com/google.cloud.servicenetworking.v1.Connection", + "network": "projects/${projectNumber}/global/networks/computenetwork${uniqueId}", + "peering": "servicenetworking-googleapis-com", + "reservedPeeringRanges": [ + "computeaddress${uniqueId}" + ], + "service": "services/servicenetworking.googleapis.com" + } +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "lifecycleState": "ACTIVE", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +--- + +GET https://servicenetworking.googleapis.com/v1/services/servicenetworking.googleapis.com/connections?alt=json&network=projects%2F${projectNumber}%2Fglobal%2Fnetworks%2Fcomputenetwork${uniqueId}&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "connections": [ + { + "network": "projects/${projectNumber}/global/networks/computenetwork${uniqueId}", + "peering": "servicenetworking-googleapis-com", + "reservedPeeringRanges": [ + "computeaddress${uniqueId}" + ], + "service": "services/servicenetworking.googleapis.com" + } + ] +} + +--- + +GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-southwest1/clusters/alloydbcluster${uniqueId}/instances/alloydbinstance${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +404 Not Found +Content-Type: application/json + +{ + "code": 5, + "details": [], + "message": "instance \"projects/${projectId}/locations/europe-southwest1/clusters/alloydbcluster${uniqueId}/instances/alloydbinstance${uniqueId}\" not found" +} + +--- + +POST https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-southwest1/clusters/alloydbcluster${uniqueId}/instances?alt=json&instanceId=alloydbinstance${uniqueId} +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "instanceType": "PRIMARY", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "machineConfig": { + "cpuCount": 2 + } +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-southwest1/clusters/alloydbcluster${uniqueId}/instances/alloydbinstance${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "annotations": {}, + "availabilityType": "AVAILABILITY_TYPE_UNSPECIFIED", + "clientConnectionConfig": null, + "createTime": "2024-04-01T12:34:56.123456Z", + "databaseFlags": {}, + "deleteTime": null, + "displayName": "", + "etag": "abcdef0123A=", + "gceZone": "", + "instanceType": "PRIMARY", + "ipAddress": "", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "machineConfig": { + "cpuCount": 2 + }, + "name": "projects/${projectId}/locations/europe-southwest1/clusters/alloydbcluster${uniqueId}/instances/alloydbinstance${uniqueId}", + "networkConfig": null, + "nodes": [], + "pscInstanceConfig": null, + "publicIpAddress": "", + "queryInsightsConfig": null, + "readPoolConfig": null, + "reconciling": false, + "satisfiesPzs": false, + "state": "STATE_UNSPECIFIED", + "uid": "111111111111111111111", + "updatePolicy": null, + "updateTime": null, + "writableNode": null +} + +--- + +GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-southwest1/clusters/alloydbcluster${uniqueId}/instances/alloydbreadinstance${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +404 Not Found +Content-Type: application/json + +{ + "code": 5, + "details": [], + "message": "instance \"projects/${projectId}/locations/europe-southwest1/clusters/alloydbcluster${uniqueId}/instances/alloydbreadinstance${uniqueId}\" not found" +} + +--- + +POST https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-southwest1/clusters/alloydbcluster${uniqueId}/instances?alt=json&instanceId=alloydbreadinstance${uniqueId} +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "instanceType": "READ_POOL", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "machineConfig": { + "cpuCount": 2 + }, + "readPoolConfig": { + "nodeCount": 1 + } +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-southwest1/clusters/alloydbcluster${uniqueId}/instances/alloydbreadinstance${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "annotations": {}, + "availabilityType": "AVAILABILITY_TYPE_UNSPECIFIED", + "clientConnectionConfig": null, + "createTime": "2024-04-01T12:34:56.123456Z", + "databaseFlags": {}, + "deleteTime": null, + "displayName": "", + "etag": "abcdef0123A=", + "gceZone": "", + "instanceType": "READ_POOL", + "ipAddress": "", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "machineConfig": { + "cpuCount": 2 + }, + "name": "projects/${projectId}/locations/europe-southwest1/clusters/alloydbcluster${uniqueId}/instances/alloydbreadinstance${uniqueId}", + "networkConfig": null, + "nodes": [], + "pscInstanceConfig": null, + "publicIpAddress": "", + "queryInsightsConfig": null, + "readPoolConfig": { + "nodeCount": 1 + }, + "reconciling": false, + "satisfiesPzs": false, + "state": "STATE_UNSPECIFIED", + "uid": "111111111111111111111", + "updatePolicy": null, + "updateTime": null, + "writableNode": null +} + +--- + +PATCH https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-southwest1/clusters/alloydbcluster${uniqueId}/instances/alloydbreadinstance${uniqueId}?alt=json&updateMask=readPoolConfig +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "availabilityType": "AVAILABILITY_TYPE_UNSPECIFIED", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "machineConfig": { + "cpuCount": 2 + }, + "readPoolConfig": { + "nodeCount": 3 + } +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-southwest1/clusters/alloydbcluster${uniqueId}/instances/alloydbreadinstance${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "annotations": {}, + "availabilityType": "AVAILABILITY_TYPE_UNSPECIFIED", + "clientConnectionConfig": null, + "createTime": "2024-04-01T12:34:56.123456Z", + "databaseFlags": {}, + "deleteTime": null, + "displayName": "", + "etag": "abcdef0123A=", + "gceZone": "", + "instanceType": "READ_POOL", + "ipAddress": "", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "machineConfig": { + "cpuCount": 2 + }, + "name": "projects/${projectId}/locations/europe-southwest1/clusters/alloydbcluster${uniqueId}/instances/alloydbreadinstance${uniqueId}", + "networkConfig": null, + "nodes": [], + "pscInstanceConfig": null, + "publicIpAddress": "", + "queryInsightsConfig": null, + "readPoolConfig": { + "nodeCount": 3 + }, + "reconciling": false, + "satisfiesPzs": false, + "state": "STATE_UNSPECIFIED", + "uid": "111111111111111111111", + "updatePolicy": null, + "updateTime": null, + "writableNode": null +} + +--- + +DELETE https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-southwest1/clusters/alloydbcluster${uniqueId}/instances/alloydbreadinstance${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-southwest1/clusters/alloydbcluster${uniqueId}/instances/alloydbinstance${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "annotations": {}, + "availabilityType": "AVAILABILITY_TYPE_UNSPECIFIED", + "clientConnectionConfig": null, + "createTime": "2024-04-01T12:34:56.123456Z", + "databaseFlags": {}, + "deleteTime": null, + "displayName": "", + "etag": "abcdef0123A=", + "gceZone": "", + "instanceType": "PRIMARY", + "ipAddress": "", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "machineConfig": { + "cpuCount": 2 + }, + "name": "projects/${projectId}/locations/europe-southwest1/clusters/alloydbcluster${uniqueId}/instances/alloydbinstance${uniqueId}", + "networkConfig": null, + "nodes": [], + "pscInstanceConfig": null, + "publicIpAddress": "", + "queryInsightsConfig": null, + "readPoolConfig": null, + "reconciling": false, + "satisfiesPzs": false, + "state": "STATE_UNSPECIFIED", + "uid": "111111111111111111111", + "updatePolicy": null, + "updateTime": null, + "writableNode": null +} + +--- + +DELETE https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-southwest1/clusters/alloydbcluster${uniqueId}/instances/alloydbinstance${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "lifecycleState": "ACTIVE", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +--- + +GET https://servicenetworking.googleapis.com/v1/services/servicenetworking.googleapis.com/connections?alt=json&network=projects%2F${projectNumber}%2Fglobal%2Fnetworks%2Fcomputenetwork${uniqueId}&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "connections": [ + { + "network": "projects/${projectNumber}/global/networks/computenetwork${uniqueId}", + "peering": "servicenetworking-googleapis-com", + "reservedPeeringRanges": [ + "computeaddress${uniqueId}" + ], + "service": "services/servicenetworking.googleapis.com" + } + ] +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "lifecycleState": "ACTIVE", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +--- + +POST https://compute.googleapis.com/compute/beta/projects/${projectNumber}/global/networks/computenetwork${uniqueId}/removePeering?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "name": "servicenetworking-googleapis-com" +} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "id": "000000000000000000000", + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "compute#operation", + "name": "${operationID}", + "progress": 0, + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses/computeaddress${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "address": "8.8.8.8", + "addressType": "INTERNAL", + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "id": "000000000000000000000", + "kind": "compute#address", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "computeaddress${uniqueId}", + "network": "projects/${projectId}/global/networks/computenetwork${uniqueId}", + "prefixLength": 16, + "purpose": "VPC_PEERING", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/computeaddress${uniqueId}" +} + +--- + +DELETE https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses/computeaddress${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "id": "000000000000000000000", + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "compute#operation", + "name": "${operationID}", + "progress": 0, + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "DONE" +} + +--- + +GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-southwest1/clusters/alloydbcluster${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "annotations": {}, + "automatedBackupPolicy": null, + "clusterType": "PRIMARY", + "continuousBackupConfig": null, + "continuousBackupInfo": null, + "createTime": "2024-04-01T12:34:56.123456Z", + "databaseVersion": "DATABASE_VERSION_UNSPECIFIED", + "deleteTime": null, + "displayName": "", + "encryptionConfig": null, + "encryptionInfo": null, + "etag": "abcdef0123A=", + "initialUser": { + "password": "alloydb-pg", + "user": "" + }, + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectId}/locations/europe-southwest1/clusters/alloydbcluster${uniqueId}", + "network": "projects/${projectId}/global/networks/computenetwork${uniqueId}", + "networkConfig": null, + "primaryConfig": null, + "reconciling": false, + "satisfiesPzs": false, + "secondaryConfig": null, + "sslConfig": null, + "state": "STATE_UNSPECIFIED", + "uid": "111111111111111111111", + "updateTime": null +} + +--- + +DELETE https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-southwest1/clusters/alloydbcluster${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "autoCreateSubnetworks": true, + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "id": "000000000000000000000", + "kind": "compute#network", + "name": "computenetwork${uniqueId}", + "networkFirewallPolicyEnforcementOrder": "AFTER_CLASSIC_FIREWALL", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/computenetwork${uniqueId}", + "selfLinkWithId": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/${networkID}" +} + +--- + +DELETE https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "id": "000000000000000000000", + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "compute#operation", + "name": "${operationID}", + "operationType": "delete", + "progress": 0, + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING" +} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbinstance/zonalalloydbinstance/_generated_object_zonalalloydbinstance.golden.yaml b/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbinstance/zonalalloydbinstance/_generated_object_zonalalloydbinstance.golden.yaml new file mode 100644 index 00000000000..e7ba2fa5a72 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbinstance/zonalalloydbinstance/_generated_object_zonalalloydbinstance.golden.yaml @@ -0,0 +1,34 @@ +apiVersion: alloydb.cnrm.cloud.google.com/v1beta1 +kind: AlloyDBInstance +metadata: + annotations: + cnrm.cloud.google.com/management-conflict-prevention-policy: none + cnrm.cloud.google.com/state-into-spec: merge + finalizers: + - cnrm.cloud.google.com/finalizer + - cnrm.cloud.google.com/deletion-defender + generation: 2 + labels: + cnrm-test: "true" + name: alloydbinstance-${uniqueId} + namespace: ${uniqueId} +spec: + availabilityType: ZONAL + clusterRef: + name: alloydbcluster-${uniqueId} + instanceTypeRef: + name: alloydbcluster-${uniqueId} + machineConfig: + cpuCount: 2 + resourceID: alloydbinstance-${uniqueId} +status: + conditions: + - lastTransitionTime: "1970-01-01T00:00:00Z" + message: The resource is up to date + reason: UpToDate + status: "True" + type: Ready + createTime: "1970-01-01T00:00:00Z" + name: projects/${projectId}/locations/europe-central2/clusters/alloydbcluster-${uniqueId}/instances/alloydbinstance-${uniqueId} + observedGeneration: 2 + state: STATE_UNSPECIFIED diff --git a/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbinstance/zonalalloydbinstance/_http.log b/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbinstance/zonalalloydbinstance/_http.log new file mode 100644 index 00000000000..2c8f73edbbf --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbinstance/zonalalloydbinstance/_http.log @@ -0,0 +1,929 @@ +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +404 Not Found +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "error": { + "code": 404, + "errors": [ + { + "domain": "global", + "message": "network \"projects/${projectId}/global/networks/computenetwork-${uniqueId}\" not found", + "reason": "notFound" + } + ], + "message": "network \"projects/${projectId}/global/networks/computenetwork-${uniqueId}\" not found", + "status": "NOT_FOUND" + } +} + +--- + +POST https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "autoCreateSubnetworks": false, + "name": "computenetwork-${uniqueId}", + "networkFirewallPolicyEnforcementOrder": "AFTER_CLASSIC_FIREWALL" +} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "id": "000000000000000000000", + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "compute#operation", + "name": "${operationID}", + "operationType": "insert", + "progress": 0, + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetId": "${networkID}", + "targetLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/${networkID}" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "autoCreateSubnetworks": false, + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "id": "000000000000000000000", + "kind": "compute#network", + "name": "computenetwork-${uniqueId}", + "networkFirewallPolicyEnforcementOrder": "AFTER_CLASSIC_FIREWALL", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "selfLinkWithId": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/${networkID}" +} + +--- + +GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-central2/clusters/alloydbcluster-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +404 Not Found +Content-Type: application/json + +{ + "code": 5, + "details": [], + "message": "cluster \"projects/${projectId}/locations/europe-central2/clusters/alloydbcluster-${uniqueId}\" not found" +} + +--- + +POST https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-central2/clusters?alt=json&clusterId=alloydbcluster-${uniqueId} +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "clusterType": "PRIMARY", + "initialUser": { + "password": "alloydb-pg" + }, + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "networkConfig": { + "network": "projects/${projectId}/global/networks/computenetwork-${uniqueId}" + } +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-central2/clusters/alloydbcluster-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "annotations": {}, + "automatedBackupPolicy": null, + "clusterType": "PRIMARY", + "continuousBackupConfig": null, + "continuousBackupInfo": null, + "createTime": "2024-04-01T12:34:56.123456Z", + "databaseVersion": "DATABASE_VERSION_UNSPECIFIED", + "deleteTime": null, + "displayName": "", + "encryptionConfig": null, + "encryptionInfo": null, + "etag": "abcdef0123A=", + "initialUser": { + "password": "alloydb-pg", + "user": "" + }, + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectId}/locations/europe-central2/clusters/alloydbcluster-${uniqueId}", + "network": "", + "networkConfig": { + "allocatedIpRange": "", + "network": "projects/${projectId}/global/networks/computenetwork-${uniqueId}" + }, + "primaryConfig": null, + "reconciling": false, + "satisfiesPzs": false, + "secondaryConfig": null, + "sslConfig": null, + "state": "STATE_UNSPECIFIED", + "uid": "111111111111111111111", + "updateTime": null +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses/computeaddress-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +404 Not Found +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "error": { + "code": 404, + "errors": [ + { + "domain": "global", + "message": "address \"projects/${projectId}/global/networks/computeaddress-${uniqueId}\" not found", + "reason": "notFound" + } + ], + "message": "address \"projects/${projectId}/global/networks/computeaddress-${uniqueId}\" not found", + "status": "NOT_FOUND" + } +} + +--- + +POST https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "addressType": "INTERNAL", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "computeaddress-${uniqueId}", + "network": "projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "prefixLength": 16, + "purpose": "VPC_PEERING" +} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "id": "000000000000000000000", + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "compute#operation", + "name": "${operationID}", + "progress": 0, + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "DONE" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses/computeaddress-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "address": "8.8.8.8", + "addressType": "INTERNAL", + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "id": "000000000000000000000", + "kind": "compute#address", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "computeaddress-${uniqueId}", + "network": "projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "prefixLength": 16, + "purpose": "VPC_PEERING", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/computeaddress-${uniqueId}" +} + +--- + +POST https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses/computeaddress-${uniqueId}/setLabels?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "labelFingerprint": "", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + } +} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "id": "000000000000000000000", + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "compute#operation", + "name": "${operationID}", + "progress": 0, + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "DONE" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses/computeaddress-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "address": "8.8.8.8", + "addressType": "INTERNAL", + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "id": "000000000000000000000", + "kind": "compute#address", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "computeaddress-${uniqueId}", + "network": "projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "prefixLength": 16, + "purpose": "VPC_PEERING", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/computeaddress-${uniqueId}" +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "lifecycleState": "ACTIVE", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +--- + +GET https://servicenetworking.googleapis.com/v1/services/servicenetworking.googleapis.com/connections?alt=json&network=projects%2F${projectNumber}%2Fglobal%2Fnetworks%2Fcomputenetwork-${uniqueId}&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "lifecycleState": "ACTIVE", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +--- + +PATCH https://servicenetworking.googleapis.com/v1/services/servicenetworking.googleapis.com/connections/-?alt=json&force=true&prettyPrint=false&updateMask=reservedPeeringRanges +Content-Type: application/json +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "network": "projects/${projectNumber}/global/networks/computenetwork-${uniqueId}", + "reservedPeeringRanges": [ + "computeaddress-${uniqueId}" + ] +} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "name": "operations/${operationID}" +} + +--- + +GET https://servicenetworking.googleapis.com/v1/operations/${operationID}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "done": true, + "name": "operations/${operationID}", + "response": { + "@type": "type.googleapis.com/google.cloud.servicenetworking.v1.Connection", + "network": "projects/${projectNumber}/global/networks/computenetwork-${uniqueId}", + "peering": "servicenetworking-googleapis-com", + "reservedPeeringRanges": [ + "computeaddress-${uniqueId}" + ], + "service": "services/servicenetworking.googleapis.com" + } +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "lifecycleState": "ACTIVE", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +--- + +GET https://servicenetworking.googleapis.com/v1/services/servicenetworking.googleapis.com/connections?alt=json&network=projects%2F${projectNumber}%2Fglobal%2Fnetworks%2Fcomputenetwork-${uniqueId}&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "connections": [ + { + "network": "projects/${projectNumber}/global/networks/computenetwork-${uniqueId}", + "peering": "servicenetworking-googleapis-com", + "reservedPeeringRanges": [ + "computeaddress-${uniqueId}" + ], + "service": "services/servicenetworking.googleapis.com" + } + ] +} + +--- + +GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-central2/clusters/alloydbcluster-${uniqueId}/instances/alloydbinstance-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +404 Not Found +Content-Type: application/json + +{ + "code": 5, + "details": [], + "message": "instance \"projects/${projectId}/locations/europe-central2/clusters/alloydbcluster-${uniqueId}/instances/alloydbinstance-${uniqueId}\" not found" +} + +--- + +POST https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-central2/clusters/alloydbcluster-${uniqueId}/instances?alt=json&instanceId=alloydbinstance-${uniqueId} +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "availabilityType": "ZONAL", + "instanceType": "PRIMARY", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "machineConfig": { + "cpuCount": 2 + } +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-central2/clusters/alloydbcluster-${uniqueId}/instances/alloydbinstance-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "annotations": {}, + "availabilityType": "ZONAL", + "clientConnectionConfig": null, + "createTime": "2024-04-01T12:34:56.123456Z", + "databaseFlags": {}, + "deleteTime": null, + "displayName": "", + "etag": "abcdef0123A=", + "gceZone": "", + "instanceType": "PRIMARY", + "ipAddress": "", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "machineConfig": { + "cpuCount": 2 + }, + "name": "projects/${projectId}/locations/europe-central2/clusters/alloydbcluster-${uniqueId}/instances/alloydbinstance-${uniqueId}", + "networkConfig": null, + "nodes": [], + "pscInstanceConfig": null, + "publicIpAddress": "", + "queryInsightsConfig": null, + "readPoolConfig": null, + "reconciling": false, + "satisfiesPzs": false, + "state": "STATE_UNSPECIFIED", + "uid": "111111111111111111111", + "updatePolicy": null, + "updateTime": null, + "writableNode": null +} + +--- + +DELETE https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-central2/clusters/alloydbcluster-${uniqueId}/instances/alloydbinstance-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "lifecycleState": "ACTIVE", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +--- + +GET https://servicenetworking.googleapis.com/v1/services/servicenetworking.googleapis.com/connections?alt=json&network=projects%2F${projectNumber}%2Fglobal%2Fnetworks%2Fcomputenetwork-${uniqueId}&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "connections": [ + { + "network": "projects/${projectNumber}/global/networks/computenetwork-${uniqueId}", + "peering": "servicenetworking-googleapis-com", + "reservedPeeringRanges": [ + "computeaddress-${uniqueId}" + ], + "service": "services/servicenetworking.googleapis.com" + } + ] +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "lifecycleState": "ACTIVE", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +--- + +POST https://compute.googleapis.com/compute/beta/projects/${projectNumber}/global/networks/computenetwork-${uniqueId}/removePeering?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "name": "servicenetworking-googleapis-com" +} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "id": "000000000000000000000", + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "compute#operation", + "name": "${operationID}", + "progress": 0, + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses/computeaddress-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "address": "8.8.8.8", + "addressType": "INTERNAL", + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "id": "000000000000000000000", + "kind": "compute#address", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "computeaddress-${uniqueId}", + "network": "projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "prefixLength": 16, + "purpose": "VPC_PEERING", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/computeaddress-${uniqueId}" +} + +--- + +DELETE https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses/computeaddress-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "id": "000000000000000000000", + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "compute#operation", + "name": "${operationID}", + "progress": 0, + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "DONE" +} + +--- + +GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-central2/clusters/alloydbcluster-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "annotations": {}, + "automatedBackupPolicy": null, + "clusterType": "PRIMARY", + "continuousBackupConfig": null, + "continuousBackupInfo": null, + "createTime": "2024-04-01T12:34:56.123456Z", + "databaseVersion": "DATABASE_VERSION_UNSPECIFIED", + "deleteTime": null, + "displayName": "", + "encryptionConfig": null, + "encryptionInfo": null, + "etag": "abcdef0123A=", + "initialUser": { + "password": "alloydb-pg", + "user": "" + }, + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectId}/locations/europe-central2/clusters/alloydbcluster-${uniqueId}", + "network": "", + "networkConfig": { + "allocatedIpRange": "", + "network": "projects/${projectId}/global/networks/computenetwork-${uniqueId}" + }, + "primaryConfig": null, + "reconciling": false, + "satisfiesPzs": false, + "secondaryConfig": null, + "sslConfig": null, + "state": "STATE_UNSPECIFIED", + "uid": "111111111111111111111", + "updateTime": null +} + +--- + +DELETE https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-central2/clusters/alloydbcluster-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "autoCreateSubnetworks": false, + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "id": "000000000000000000000", + "kind": "compute#network", + "name": "computenetwork-${uniqueId}", + "networkFirewallPolicyEnforcementOrder": "AFTER_CLASSIC_FIREWALL", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "selfLinkWithId": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/${networkID}" +} + +--- + +DELETE https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "id": "000000000000000000000", + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "compute#operation", + "name": "${operationID}", + "operationType": "delete", + "progress": 0, + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING" +} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/basic/apikeys/v1alpha1/apikeyskey/apikeyskeybasic/_generated_object_apikeyskeybasic.golden.yaml b/pkg/test/resourcefixture/testdata/basic/apikeys/v1alpha1/apikeyskey/apikeyskeybasic/_generated_object_apikeyskeybasic.golden.yaml index 45bc0737de2..87ee249f1a3 100644 --- a/pkg/test/resourcefixture/testdata/basic/apikeys/v1alpha1/apikeyskey/apikeyskeybasic/_generated_object_apikeyskeybasic.golden.yaml +++ b/pkg/test/resourcefixture/testdata/basic/apikeys/v1alpha1/apikeyskey/apikeyskeybasic/_generated_object_apikeyskeybasic.golden.yaml @@ -1,23 +1,9 @@ -# 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. - apiVersion: apikeys.cnrm.cloud.google.com/v1alpha1 kind: APIKeysKey metadata: annotations: cnrm.cloud.google.com/management-conflict-prevention-policy: none - cnrm.cloud.google.com/state-into-spec: merge + cnrm.cloud.google.com/state-into-spec: absent finalizers: - cnrm.cloud.google.com/finalizer - cnrm.cloud.google.com/deletion-defender @@ -44,5 +30,4 @@ status: reason: UpToDate status: "True" type: Ready - keyString: dummy-encrypted-value observedGeneration: 2 diff --git a/pkg/test/resourcefixture/testdata/basic/apikeys/v1alpha1/apikeyskey/apikeyskeybasic/_http.log b/pkg/test/resourcefixture/testdata/basic/apikeys/v1alpha1/apikeyskey/apikeyskeybasic/_http.log new file mode 100644 index 00000000000..b8b2388a0bf --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/apikeys/v1alpha1/apikeyskey/apikeyskeybasic/_http.log @@ -0,0 +1,695 @@ +GET https://apikeys.googleapis.com/v2/projects/${projectId}/locations/global/keys/apikeyskey${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager DeclarativeClientLib/0.0.1 + +404 Not Found +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "error": { + "code": 404, + "errors": [ + { + "domain": "global", + "message": "key \"projects/${projectId}/locations/global/keys/apikeyskey${uniqueId}\" not found", + "reason": "notFound" + } + ], + "message": "key \"projects/${projectId}/locations/global/keys/apikeyskey${uniqueId}\" not found", + "status": "NOT_FOUND" + } +} + +--- + +POST https://apikeys.googleapis.com/v2/projects/${projectId}/locations/global/keys?alt=json&keyId=apikeyskey${uniqueId} +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager DeclarativeClientLib/0.0.1 + +{ + "displayName": "Example Display Name", + "restrictions": { + "apiTargets": [ + { + "methods": [ + "GET" + ], + "service": "translate.googleapis.com" + } + ] + } +} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "done": true, + "name": "${operationID}" +} + +--- + +GET https://apikeys.googleapis.com/v2/projects/${projectId}/locations/global/keys/apikeyskey${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager DeclarativeClientLib/0.0.1 + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "displayName": "Example Display Name", + "name": "projects/${projectId}/locations/global/keys/apikeyskey${uniqueId}", + "restrictions": { + "apiTargets": [ + { + "methods": [ + "GET" + ], + "service": "translate.googleapis.com" + } + ] + } +} + +--- + +GET https://apikeys.googleapis.com/v2/projects/${projectId}/locations/global/keys/apikeyskey${uniqueId}/keyString?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager DeclarativeClientLib/0.0.1 + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "keyString": "dummy-encrypted-value" +} + +--- + +GET https://apikeys.googleapis.com/v2/projects/${projectId}/locations/global/keys/apikeyskey${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager DeclarativeClientLib/0.0.1 + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "displayName": "Example Display Name", + "name": "projects/${projectId}/locations/global/keys/apikeyskey${uniqueId}", + "restrictions": { + "apiTargets": [ + { + "methods": [ + "GET" + ], + "service": "translate.googleapis.com" + } + ] + } +} + +--- + +GET https://apikeys.googleapis.com/v2/projects/${projectId}/locations/global/keys/apikeyskey${uniqueId}/keyString?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager DeclarativeClientLib/0.0.1 + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "keyString": "dummy-encrypted-value" +} + +--- + +GET https://apikeys.googleapis.com/v2/projects/${projectId}/locations/global/keys/apikeyskey${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager DeclarativeClientLib/0.0.1 + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "displayName": "Example Display Name", + "name": "projects/${projectId}/locations/global/keys/apikeyskey${uniqueId}", + "restrictions": { + "apiTargets": [ + { + "methods": [ + "GET" + ], + "service": "translate.googleapis.com" + } + ] + } +} + +--- + +GET https://apikeys.googleapis.com/v2/projects/${projectId}/locations/global/keys/apikeyskey${uniqueId}/keyString?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager DeclarativeClientLib/0.0.1 + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "keyString": "dummy-encrypted-value" +} + +--- + +GET https://apikeys.googleapis.com/v2/projects/${projectId}/locations/global/keys/apikeyskey${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager DeclarativeClientLib/0.0.1 + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "displayName": "Example Display Name", + "name": "projects/${projectId}/locations/global/keys/apikeyskey${uniqueId}", + "restrictions": { + "apiTargets": [ + { + "methods": [ + "GET" + ], + "service": "translate.googleapis.com" + } + ] + } +} + +--- + +GET https://apikeys.googleapis.com/v2/projects/${projectId}/locations/global/keys/apikeyskey${uniqueId}/keyString?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager DeclarativeClientLib/0.0.1 + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "keyString": "dummy-encrypted-value" +} + +--- + +GET https://apikeys.googleapis.com/v2/projects/${projectId}/locations/global/keys/apikeyskey${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager DeclarativeClientLib/0.0.1 + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "displayName": "Example Display Name", + "name": "projects/${projectId}/locations/global/keys/apikeyskey${uniqueId}", + "restrictions": { + "apiTargets": [ + { + "methods": [ + "GET" + ], + "service": "translate.googleapis.com" + } + ] + } +} + +--- + +GET https://apikeys.googleapis.com/v2/projects/${projectId}/locations/global/keys/apikeyskey${uniqueId}/keyString?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager DeclarativeClientLib/0.0.1 + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "keyString": "dummy-encrypted-value" +} + +--- + +GET https://apikeys.googleapis.com/v2/projects/${projectId}/locations/global/keys/apikeyskey${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager DeclarativeClientLib/0.0.1 + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "displayName": "Example Display Name", + "name": "projects/${projectId}/locations/global/keys/apikeyskey${uniqueId}", + "restrictions": { + "apiTargets": [ + { + "methods": [ + "GET" + ], + "service": "translate.googleapis.com" + } + ] + } +} + +--- + +GET https://apikeys.googleapis.com/v2/projects/${projectId}/locations/global/keys/apikeyskey${uniqueId}/keyString?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager DeclarativeClientLib/0.0.1 + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "keyString": "dummy-encrypted-value" +} + +--- + +PATCH https://apikeys.googleapis.com/v2/projects/${projectId}/locations/global/keys/apikeyskey${uniqueId}?alt=json&updateMask=displayName%2Crestrictions +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager DeclarativeClientLib/0.0.1 + +{ + "displayName": "Example Display Name - Updated", + "restrictions": { + "apiTargets": [ + { + "methods": [ + "GET", + "DELETE" + ], + "service": "translate.googleapis.com" + } + ] + } +} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "done": true, + "name": "${operationID}" +} + +--- + +GET https://apikeys.googleapis.com/v2/projects/${projectId}/locations/global/keys/apikeyskey${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager DeclarativeClientLib/0.0.1 + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "displayName": "Example Display Name - Updated", + "name": "projects/${projectId}/locations/global/keys/apikeyskey${uniqueId}", + "restrictions": { + "apiTargets": [ + { + "methods": [ + "GET", + "DELETE" + ], + "service": "translate.googleapis.com" + } + ] + } +} + +--- + +GET https://apikeys.googleapis.com/v2/projects/${projectId}/locations/global/keys/apikeyskey${uniqueId}/keyString?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager DeclarativeClientLib/0.0.1 + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "keyString": "dummy-encrypted-value" +} + +--- + +GET https://apikeys.googleapis.com/v2/projects/${projectId}/locations/global/keys/apikeyskey${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager DeclarativeClientLib/0.0.1 + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "displayName": "Example Display Name - Updated", + "name": "projects/${projectId}/locations/global/keys/apikeyskey${uniqueId}", + "restrictions": { + "apiTargets": [ + { + "methods": [ + "GET", + "DELETE" + ], + "service": "translate.googleapis.com" + } + ] + } +} + +--- + +GET https://apikeys.googleapis.com/v2/projects/${projectId}/locations/global/keys/apikeyskey${uniqueId}/keyString?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager DeclarativeClientLib/0.0.1 + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "keyString": "dummy-encrypted-value" +} + +--- + +GET https://apikeys.googleapis.com/v2/projects/${projectId}/locations/global/keys/apikeyskey${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager DeclarativeClientLib/0.0.1 + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "displayName": "Example Display Name - Updated", + "name": "projects/${projectId}/locations/global/keys/apikeyskey${uniqueId}", + "restrictions": { + "apiTargets": [ + { + "methods": [ + "GET", + "DELETE" + ], + "service": "translate.googleapis.com" + } + ] + } +} + +--- + +GET https://apikeys.googleapis.com/v2/projects/${projectId}/locations/global/keys/apikeyskey${uniqueId}/keyString?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager DeclarativeClientLib/0.0.1 + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "keyString": "dummy-encrypted-value" +} + +--- + +GET https://apikeys.googleapis.com/v2/projects/${projectId}/locations/global/keys/apikeyskey${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager DeclarativeClientLib/0.0.1 + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "displayName": "Example Display Name - Updated", + "name": "projects/${projectId}/locations/global/keys/apikeyskey${uniqueId}", + "restrictions": { + "apiTargets": [ + { + "methods": [ + "GET", + "DELETE" + ], + "service": "translate.googleapis.com" + } + ] + } +} + +--- + +GET https://apikeys.googleapis.com/v2/projects/${projectId}/locations/global/keys/apikeyskey${uniqueId}/keyString?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager DeclarativeClientLib/0.0.1 + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "keyString": "dummy-encrypted-value" +} + +--- + +DELETE https://apikeys.googleapis.com/v2/projects/${projectId}/locations/global/keys/apikeyskey${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager DeclarativeClientLib/0.0.1 + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "name": "operations/${operationID}" +} + +--- + +GET https://apikeys.googleapis.com/v2/operations/${operationID}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager DeclarativeClientLib/0.0.1 + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "done": true, + "name": "operations/${operationID}", + "response": { + "@type": "type.googleapis.com/google.api.apikeys.v2.Key", + "displayName": "Example Display Name - Updated", + "name": "projects/${projectId}/locations/global/keys/apikeyskey${uniqueId}", + "restrictions": { + "apiTargets": [ + { + "methods": [ + "GET", + "DELETE" + ], + "service": "translate.googleapis.com" + } + ] + } + } +} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/basic/artifactregistry/v1beta1/artifactregistryrepository/_generated_object_artifactregistryrepository.golden.yaml b/pkg/test/resourcefixture/testdata/basic/artifactregistry/v1beta1/artifactregistryrepository/_generated_object_artifactregistryrepository.golden.yaml new file mode 100644 index 00000000000..8562a65ef6d --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/artifactregistry/v1beta1/artifactregistryrepository/_generated_object_artifactregistryrepository.golden.yaml @@ -0,0 +1,39 @@ +apiVersion: artifactregistry.cnrm.cloud.google.com/v1beta1 +kind: ArtifactRegistryRepository +metadata: + annotations: + cnrm.cloud.google.com/management-conflict-prevention-policy: none + cnrm.cloud.google.com/project-id: ${projectId} + cnrm.cloud.google.com/state-into-spec: merge + finalizers: + - cnrm.cloud.google.com/finalizer + - cnrm.cloud.google.com/deletion-defender + generation: 3 + labels: + cnrm-test: "true" + label-one: value-one + name: arrepository-${uniqueId} + namespace: ${uniqueId} +spec: + description: test repository description 2 + format: DOCKER + location: us-west1 + mode: VIRTUAL_REPOSITORY + resourceID: arrepository-${uniqueId} + virtualRepositoryConfig: + upstreamPolicies: + - id: upstream-repo + priority: 1 + repositoryRef: + name: arrepository-${uniqueId}-2 +status: + conditions: + - lastTransitionTime: "1970-01-01T00:00:00Z" + message: The resource is up to date + reason: UpToDate + status: "True" + type: Ready + createTime: "1970-01-01T00:00:00Z" + name: arrepository-${uniqueId} + observedGeneration: 3 + updateTime: "1970-01-01T00:00:00Z" diff --git a/pkg/test/resourcefixture/testdata/basic/artifactregistry/v1beta1/artifactregistryrepository/_http.log b/pkg/test/resourcefixture/testdata/basic/artifactregistry/v1beta1/artifactregistryrepository/_http.log index 01c8be8591a..dd53037c0e4 100644 --- a/pkg/test/resourcefixture/testdata/basic/artifactregistry/v1beta1/artifactregistryrepository/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/artifactregistry/v1beta1/artifactregistryrepository/_http.log @@ -68,35 +68,6 @@ Grpc-Metadata-Content-Type: application/grpc --- -GET https://artifactregistry.googleapis.com/v1/projects/${projectId}/locations/us-west1/repositories/arrepository-${uniqueId}-2?alt=json -Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager - -200 OK -Content-Type: application/json -Grpc-Metadata-Content-Type: application/grpc - -{ - "cleanupPolicies": {}, - "cleanupPolicyDryRun": false, - "createTime": "2024-04-01T12:34:56.123456Z", - "description": "", - "format": "DOCKER", - "kmsKeyName": "", - "labels": { - "cnrm-test": "true", - "label-one": "value-two", - "managed-by-cnrm": "true" - }, - "mode": "STANDARD_REPOSITORY", - "name": "projects/${projectId}/locations/us-west1/repositories/arrepository-${uniqueId}-2", - "satisfiesPzs": false, - "sizeBytes": "0", - "updateTime": "2024-04-01T12:34:56.123456Z" -} - ---- - GET https://artifactregistry.googleapis.com/v1/projects/${projectId}/locations/us-west1/repositories/arrepository-${uniqueId}?alt=json Content-Type: application/json User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager @@ -186,82 +157,6 @@ Grpc-Metadata-Content-Type: application/grpc --- -GET https://artifactregistry.googleapis.com/v1/projects/${projectId}/locations/us-west1/repositories/arrepository-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager - -200 OK -Content-Type: application/json -Grpc-Metadata-Content-Type: application/grpc - -{ - "cleanupPolicies": {}, - "cleanupPolicyDryRun": false, - "createTime": "2024-04-01T12:34:56.123456Z", - "description": "test repository description", - "format": "DOCKER", - "kmsKeyName": "", - "labels": { - "cnrm-test": "true", - "label-one": "value-one", - "managed-by-cnrm": "true" - }, - "mode": "VIRTUAL_REPOSITORY", - "name": "projects/${projectId}/locations/us-west1/repositories/arrepository-${uniqueId}", - "satisfiesPzs": false, - "sizeBytes": "0", - "updateTime": "2024-04-01T12:34:56.123456Z", - "virtualRepositoryConfig": { - "upstreamPolicies": [ - { - "id": "upstream-repo", - "priority": 1, - "repository": "projects/${projectId}/locations/us-west1/repositories/arrepository-${uniqueId}-2" - } - ] - } -} - ---- - -GET https://artifactregistry.googleapis.com/v1/projects/${projectId}/locations/us-west1/repositories/arrepository-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager - -200 OK -Content-Type: application/json -Grpc-Metadata-Content-Type: application/grpc - -{ - "cleanupPolicies": {}, - "cleanupPolicyDryRun": false, - "createTime": "2024-04-01T12:34:56.123456Z", - "description": "test repository description", - "format": "DOCKER", - "kmsKeyName": "", - "labels": { - "cnrm-test": "true", - "label-one": "value-one", - "managed-by-cnrm": "true" - }, - "mode": "VIRTUAL_REPOSITORY", - "name": "projects/${projectId}/locations/us-west1/repositories/arrepository-${uniqueId}", - "satisfiesPzs": false, - "sizeBytes": "0", - "updateTime": "2024-04-01T12:34:56.123456Z", - "virtualRepositoryConfig": { - "upstreamPolicies": [ - { - "id": "upstream-repo", - "priority": 1, - "repository": "projects/${projectId}/locations/us-west1/repositories/arrepository-${uniqueId}-2" - } - ] - } -} - ---- - PATCH https://artifactregistry.googleapis.com/v1/projects/${projectId}/locations/us-west1/repositories/arrepository-${uniqueId}?alt=json&updateMask=description Content-Type: application/json User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager @@ -357,44 +252,6 @@ Grpc-Metadata-Content-Type: application/grpc --- -GET https://artifactregistry.googleapis.com/v1/projects/${projectId}/locations/us-west1/repositories/arrepository-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager - -200 OK -Content-Type: application/json -Grpc-Metadata-Content-Type: application/grpc - -{ - "cleanupPolicies": {}, - "cleanupPolicyDryRun": false, - "createTime": "2024-04-01T12:34:56.123456Z", - "description": "test repository description 2", - "format": "DOCKER", - "kmsKeyName": "", - "labels": { - "cnrm-test": "true", - "label-one": "value-one", - "managed-by-cnrm": "true" - }, - "mode": "VIRTUAL_REPOSITORY", - "name": "projects/${projectId}/locations/us-west1/repositories/arrepository-${uniqueId}", - "satisfiesPzs": false, - "sizeBytes": "0", - "updateTime": "2024-04-01T12:34:56.123456Z", - "virtualRepositoryConfig": { - "upstreamPolicies": [ - { - "id": "upstream-repo", - "priority": 1, - "repository": "projects/${projectId}/locations/us-west1/repositories/arrepository-${uniqueId}-2" - } - ] - } -} - ---- - DELETE https://artifactregistry.googleapis.com/v1/projects/${projectId}/locations/us-west1/repositories/arrepository-${uniqueId}?alt=json Content-Type: application/json User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager diff --git a/pkg/test/resourcefixture/testdata/basic/bigquery/v1beta1/bigquerydataset/basicbigquerydataset/_http.log b/pkg/test/resourcefixture/testdata/basic/bigquery/v1beta1/bigquerydataset/basicbigquerydataset/_http.log index 2a97bf4c249..e955a3353fb 100644 --- a/pkg/test/resourcefixture/testdata/basic/bigquery/v1beta1/bigquerydataset/basicbigquerydataset/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/bigquery/v1beta1/bigquerydataset/basicbigquerydataset/_http.log @@ -1,4 +1,4 @@ -GET https://bigquery.googleapis.com/bigquery/v2/projects/${projectId}/datasets/bigquerydatasetsample${uniqueId}?alt=json +GET https://bigquery.googleapis.com/bigquery/v2/projects/${projectId}/datasets/${datasetID}?alt=json Content-Type: application/json User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager @@ -97,7 +97,7 @@ X-Xss-Protection: 0 --- -GET https://bigquery.googleapis.com/bigquery/v2/projects/${projectId}/datasets/bigquerydatasetsample${uniqueId}?alt=json +GET https://bigquery.googleapis.com/bigquery/v2/projects/${projectId}/datasets/${datasetID}?alt=json Content-Type: application/json User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager @@ -152,117 +152,7 @@ X-Xss-Protection: 0 --- -GET https://bigquery.googleapis.com/bigquery/v2/projects/${projectId}/datasets/bigquerydatasetsample${uniqueId}?alt=json -Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager - -200 OK -Cache-Control: private -Content-Type: application/json; charset=UTF-8 -Server: ESF -Vary: Origin -Vary: X-Origin -Vary: Referer -X-Content-Type-Options: nosniff -X-Frame-Options: SAMEORIGIN -X-Xss-Protection: 0 - -{ - "access": [ - { - "role": "WRITER", - "specialGroup": "projectWriters" - }, - { - "role": "OWNER", - "specialGroup": "projectOwners" - }, - { - "role": "OWNER", - "userByEmail": "user@google.com" - }, - { - "role": "READER", - "specialGroup": "projectReaders" - } - ], - "creationTime": "123456789", - "datasetReference": { - "datasetId": "bigquerydatasetsample${uniqueId}", - "projectId": "${projectId}" - }, - "etag": "abcdef0123A=", - "friendlyName": "bigquerydataset-sample", - "id": "000000000000000000000", - "kind": "bigquery#dataset", - "labels": { - "cnrm-test": "true", - "managed-by-cnrm": "true" - }, - "lastModifiedTime": "123456789", - "location": "US", - "selfLink": "https://bigquery.googleapis.com/bigquery/v2/projects/${projectId}/datasets/bigquerydatasetsample${uniqueId}", - "type": "DEFAULT" -} - ---- - -GET https://bigquery.googleapis.com/bigquery/v2/projects/${projectId}/datasets/bigquerydatasetsample${uniqueId}?alt=json -Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager - -200 OK -Cache-Control: private -Content-Type: application/json; charset=UTF-8 -Server: ESF -Vary: Origin -Vary: X-Origin -Vary: Referer -X-Content-Type-Options: nosniff -X-Frame-Options: SAMEORIGIN -X-Xss-Protection: 0 - -{ - "access": [ - { - "role": "WRITER", - "specialGroup": "projectWriters" - }, - { - "role": "OWNER", - "specialGroup": "projectOwners" - }, - { - "role": "OWNER", - "userByEmail": "user@google.com" - }, - { - "role": "READER", - "specialGroup": "projectReaders" - } - ], - "creationTime": "123456789", - "datasetReference": { - "datasetId": "bigquerydatasetsample${uniqueId}", - "projectId": "${projectId}" - }, - "etag": "abcdef0123A=", - "friendlyName": "bigquerydataset-sample", - "id": "000000000000000000000", - "kind": "bigquery#dataset", - "labels": { - "cnrm-test": "true", - "managed-by-cnrm": "true" - }, - "lastModifiedTime": "123456789", - "location": "US", - "selfLink": "https://bigquery.googleapis.com/bigquery/v2/projects/${projectId}/datasets/bigquerydatasetsample${uniqueId}", - "type": "DEFAULT" -} - ---- - -PUT https://bigquery.googleapis.com/bigquery/v2/projects/${projectId}/datasets/bigquerydatasetsample${uniqueId}?alt=json +PUT https://bigquery.googleapis.com/bigquery/v2/projects/${projectId}/datasets/${datasetID}?alt=json Content-Type: application/json User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager @@ -347,117 +237,7 @@ X-Xss-Protection: 0 --- -GET https://bigquery.googleapis.com/bigquery/v2/projects/${projectId}/datasets/bigquerydatasetsample${uniqueId}?alt=json -Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager - -200 OK -Cache-Control: private -Content-Type: application/json; charset=UTF-8 -Server: ESF -Vary: Origin -Vary: X-Origin -Vary: Referer -X-Content-Type-Options: nosniff -X-Frame-Options: SAMEORIGIN -X-Xss-Protection: 0 - -{ - "access": [ - { - "role": "WRITER", - "specialGroup": "projectWriters" - }, - { - "role": "OWNER", - "specialGroup": "projectOwners" - }, - { - "role": "OWNER", - "userByEmail": "user@google.com" - }, - { - "role": "READER", - "specialGroup": "projectReaders" - } - ], - "creationTime": "123456789", - "datasetReference": { - "datasetId": "bigquerydatasetsample${uniqueId}", - "projectId": "${projectId}" - }, - "etag": "abcdef0123A=", - "friendlyName": "bigquerydataset-sample-updated", - "id": "000000000000000000000", - "kind": "bigquery#dataset", - "labels": { - "cnrm-test": "true", - "managed-by-cnrm": "true" - }, - "lastModifiedTime": "123456789", - "location": "US", - "selfLink": "https://bigquery.googleapis.com/bigquery/v2/projects/${projectId}/datasets/bigquerydatasetsample${uniqueId}", - "type": "DEFAULT" -} - ---- - -GET https://bigquery.googleapis.com/bigquery/v2/projects/${projectId}/datasets/bigquerydatasetsample${uniqueId}?alt=json -Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager - -200 OK -Cache-Control: private -Content-Type: application/json; charset=UTF-8 -Server: ESF -Vary: Origin -Vary: X-Origin -Vary: Referer -X-Content-Type-Options: nosniff -X-Frame-Options: SAMEORIGIN -X-Xss-Protection: 0 - -{ - "access": [ - { - "role": "WRITER", - "specialGroup": "projectWriters" - }, - { - "role": "OWNER", - "specialGroup": "projectOwners" - }, - { - "role": "OWNER", - "userByEmail": "user@google.com" - }, - { - "role": "READER", - "specialGroup": "projectReaders" - } - ], - "creationTime": "123456789", - "datasetReference": { - "datasetId": "bigquerydatasetsample${uniqueId}", - "projectId": "${projectId}" - }, - "etag": "abcdef0123A=", - "friendlyName": "bigquerydataset-sample-updated", - "id": "000000000000000000000", - "kind": "bigquery#dataset", - "labels": { - "cnrm-test": "true", - "managed-by-cnrm": "true" - }, - "lastModifiedTime": "123456789", - "location": "US", - "selfLink": "https://bigquery.googleapis.com/bigquery/v2/projects/${projectId}/datasets/bigquerydatasetsample${uniqueId}", - "type": "DEFAULT" -} - ---- - -GET https://bigquery.googleapis.com/bigquery/v2/projects/${projectId}/datasets/bigquerydatasetsample${uniqueId}?alt=json +GET https://bigquery.googleapis.com/bigquery/v2/projects/${projectId}/datasets/${datasetID}?alt=json Content-Type: application/json User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager @@ -512,7 +292,7 @@ X-Xss-Protection: 0 --- -DELETE https://bigquery.googleapis.com/bigquery/v2/projects/${projectId}/datasets/bigquerydatasetsample${uniqueId}?alt=json&deleteContents=false +DELETE https://bigquery.googleapis.com/bigquery/v2/projects/${projectId}/datasets/${datasetID}?alt=json&deleteContents=false Content-Type: application/json User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager diff --git a/pkg/test/resourcefixture/testdata/basic/bigquery/v1beta1/bigquerydataset/bigquerydatasetaccessblock/_http.log b/pkg/test/resourcefixture/testdata/basic/bigquery/v1beta1/bigquerydataset/bigquerydatasetaccessblock/_http.log index 087d9a4d702..28d595a03c7 100644 --- a/pkg/test/resourcefixture/testdata/basic/bigquery/v1beta1/bigquerydataset/bigquerydatasetaccessblock/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/bigquery/v1beta1/bigquerydataset/bigquerydatasetaccessblock/_http.log @@ -1,4 +1,4 @@ -GET https://bigquery.googleapis.com/bigquery/v2/projects/${projectId}/datasets/bigquerydataset${uniqueId}?alt=json +GET https://bigquery.googleapis.com/bigquery/v2/projects/${projectId}/datasets/${datasetID}?alt=json Content-Type: application/json User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager @@ -103,7 +103,7 @@ X-Xss-Protection: 0 --- -GET https://bigquery.googleapis.com/bigquery/v2/projects/${projectId}/datasets/bigquerydataset${uniqueId}?alt=json +GET https://bigquery.googleapis.com/bigquery/v2/projects/${projectId}/datasets/${datasetID}?alt=json Content-Type: application/json User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager @@ -152,105 +152,7 @@ X-Xss-Protection: 0 --- -GET https://bigquery.googleapis.com/bigquery/v2/projects/${projectId}/datasets/bigquerydataset${uniqueId}?alt=json -Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager - -200 OK -Cache-Control: private -Content-Type: application/json; charset=UTF-8 -Server: ESF -Vary: Origin -Vary: X-Origin -Vary: Referer -X-Content-Type-Options: nosniff -X-Frame-Options: SAMEORIGIN -X-Xss-Protection: 0 - -{ - "access": [ - { - "role": "OWNER", - "specialGroup": "projectOwners" - }, - { - "domain": "google.com", - "role": "READER" - } - ], - "creationTime": "123456789", - "datasetReference": { - "datasetId": "bigquerydataset${uniqueId}", - "projectId": "${projectId}" - }, - "defaultTableExpirationMs": "3600000", - "description": "BigQuery Dataset With Access Block", - "etag": "abcdef0123A=", - "friendlyName": "bigquerydataset-accessblock", - "id": "000000000000000000000", - "kind": "bigquery#dataset", - "labels": { - "cnrm-test": "true", - "managed-by-cnrm": "true" - }, - "lastModifiedTime": "123456789", - "location": "US", - "selfLink": "https://bigquery.googleapis.com/bigquery/v2/projects/${projectId}/datasets/bigquerydataset${uniqueId}", - "type": "DEFAULT" -} - ---- - -GET https://bigquery.googleapis.com/bigquery/v2/projects/${projectId}/datasets/bigquerydataset${uniqueId}?alt=json -Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager - -200 OK -Cache-Control: private -Content-Type: application/json; charset=UTF-8 -Server: ESF -Vary: Origin -Vary: X-Origin -Vary: Referer -X-Content-Type-Options: nosniff -X-Frame-Options: SAMEORIGIN -X-Xss-Protection: 0 - -{ - "access": [ - { - "role": "OWNER", - "specialGroup": "projectOwners" - }, - { - "domain": "google.com", - "role": "READER" - } - ], - "creationTime": "123456789", - "datasetReference": { - "datasetId": "bigquerydataset${uniqueId}", - "projectId": "${projectId}" - }, - "defaultTableExpirationMs": "3600000", - "description": "BigQuery Dataset With Access Block", - "etag": "abcdef0123A=", - "friendlyName": "bigquerydataset-accessblock", - "id": "000000000000000000000", - "kind": "bigquery#dataset", - "labels": { - "cnrm-test": "true", - "managed-by-cnrm": "true" - }, - "lastModifiedTime": "123456789", - "location": "US", - "selfLink": "https://bigquery.googleapis.com/bigquery/v2/projects/${projectId}/datasets/bigquerydataset${uniqueId}", - "type": "DEFAULT" -} - ---- - -PUT https://bigquery.googleapis.com/bigquery/v2/projects/${projectId}/datasets/bigquerydataset${uniqueId}?alt=json +PUT https://bigquery.googleapis.com/bigquery/v2/projects/${projectId}/datasets/${datasetID}?alt=json Content-Type: application/json User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager @@ -331,113 +233,7 @@ X-Xss-Protection: 0 --- -GET https://bigquery.googleapis.com/bigquery/v2/projects/${projectId}/datasets/bigquerydataset${uniqueId}?alt=json -Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager - -200 OK -Cache-Control: private -Content-Type: application/json; charset=UTF-8 -Server: ESF -Vary: Origin -Vary: X-Origin -Vary: Referer -X-Content-Type-Options: nosniff -X-Frame-Options: SAMEORIGIN -X-Xss-Protection: 0 - -{ - "access": [ - { - "role": "OWNER", - "specialGroup": "projectOwners" - }, - { - "iamMember": "allUsers", - "role": "READER" - }, - { - "domain": "google.com", - "role": "READER" - } - ], - "creationTime": "123456789", - "datasetReference": { - "datasetId": "bigquerydataset${uniqueId}", - "projectId": "${projectId}" - }, - "defaultTableExpirationMs": "7200000", - "description": "BigQuery Dataset With Access Block v2", - "etag": "abcdef0123A=", - "friendlyName": "bigquerydataset-accessblock", - "id": "000000000000000000000", - "kind": "bigquery#dataset", - "labels": { - "cnrm-test": "true", - "managed-by-cnrm": "true" - }, - "lastModifiedTime": "123456789", - "location": "US", - "selfLink": "https://bigquery.googleapis.com/bigquery/v2/projects/${projectId}/datasets/bigquerydataset${uniqueId}", - "type": "DEFAULT" -} - ---- - -GET https://bigquery.googleapis.com/bigquery/v2/projects/${projectId}/datasets/bigquerydataset${uniqueId}?alt=json -Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager - -200 OK -Cache-Control: private -Content-Type: application/json; charset=UTF-8 -Server: ESF -Vary: Origin -Vary: X-Origin -Vary: Referer -X-Content-Type-Options: nosniff -X-Frame-Options: SAMEORIGIN -X-Xss-Protection: 0 - -{ - "access": [ - { - "role": "OWNER", - "specialGroup": "projectOwners" - }, - { - "iamMember": "allUsers", - "role": "READER" - }, - { - "domain": "google.com", - "role": "READER" - } - ], - "creationTime": "123456789", - "datasetReference": { - "datasetId": "bigquerydataset${uniqueId}", - "projectId": "${projectId}" - }, - "defaultTableExpirationMs": "7200000", - "description": "BigQuery Dataset With Access Block v2", - "etag": "abcdef0123A=", - "friendlyName": "bigquerydataset-accessblock", - "id": "000000000000000000000", - "kind": "bigquery#dataset", - "labels": { - "cnrm-test": "true", - "managed-by-cnrm": "true" - }, - "lastModifiedTime": "123456789", - "location": "US", - "selfLink": "https://bigquery.googleapis.com/bigquery/v2/projects/${projectId}/datasets/bigquerydataset${uniqueId}", - "type": "DEFAULT" -} - ---- - -GET https://bigquery.googleapis.com/bigquery/v2/projects/${projectId}/datasets/bigquerydataset${uniqueId}?alt=json +GET https://bigquery.googleapis.com/bigquery/v2/projects/${projectId}/datasets/${datasetID}?alt=json Content-Type: application/json User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager @@ -490,7 +286,7 @@ X-Xss-Protection: 0 --- -DELETE https://bigquery.googleapis.com/bigquery/v2/projects/${projectId}/datasets/bigquerydataset${uniqueId}?alt=json&deleteContents=false +DELETE https://bigquery.googleapis.com/bigquery/v2/projects/${projectId}/datasets/${datasetID}?alt=json&deleteContents=false Content-Type: application/json User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager diff --git a/pkg/test/resourcefixture/testdata/basic/certificatemanager/v1beta1/certificatemanagercertificate/certificatemanagercertificatemanageddns/_http.log b/pkg/test/resourcefixture/testdata/basic/certificatemanager/v1beta1/certificatemanagercertificate/certificatemanagercertificatemanageddns/_http.log new file mode 100644 index 00000000000..ca4f50c3024 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/certificatemanager/v1beta1/certificatemanagercertificate/certificatemanagercertificatemanageddns/_http.log @@ -0,0 +1,377 @@ +GET https://certificatemanager.googleapis.com/v1/projects/${projectId}/locations/global/dnsAuthorizations/certificatemanagerdnsauthorization1${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +404 Not Found +Content-Type: application/json + +{ + "code": 5, + "details": [], + "message": "dnsAuthorization \"projects/${projectId}/locations/global/dnsAuthorizations/certificatemanagerdnsauthorization1${uniqueId}\" not found" +} + +--- + +POST https://certificatemanager.googleapis.com/v1/projects/${projectId}/locations/global/dnsAuthorizations?alt=json&dnsAuthorizationId=certificatemanagerdnsauthorization1${uniqueId} +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "description": "first sample dns for testing creating a certificate with dns-auth", + "domain": "${uniqueId}1.hashicorptest.com", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + } +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://certificatemanager.googleapis.com/v1/projects/${projectId}/locations/global/dnsAuthorizations/certificatemanagerdnsauthorization1${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "createTime": null, + "description": "first sample dns for testing creating a certificate with dns-auth", + "dnsResourceRecord": null, + "domain": "${uniqueId}1.hashicorptest.com", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectId}/locations/global/dnsAuthorizations/certificatemanagerdnsauthorization1${uniqueId}", + "type": "TYPE_UNSPECIFIED", + "updateTime": null +} + +--- + +GET https://certificatemanager.googleapis.com/v1/projects/${projectId}/locations/global/dnsAuthorizations/certificatemanagerdnsauthorization2${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +404 Not Found +Content-Type: application/json + +{ + "code": 5, + "details": [], + "message": "dnsAuthorization \"projects/${projectId}/locations/global/dnsAuthorizations/certificatemanagerdnsauthorization2${uniqueId}\" not found" +} + +--- + +POST https://certificatemanager.googleapis.com/v1/projects/${projectId}/locations/global/dnsAuthorizations?alt=json&dnsAuthorizationId=certificatemanagerdnsauthorization2${uniqueId} +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "description": "second sample dns for testing creating a certificate with dns-auth", + "domain": "${uniqueId}2.hashicorptest.com", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + } +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://certificatemanager.googleapis.com/v1/projects/${projectId}/locations/global/dnsAuthorizations/certificatemanagerdnsauthorization2${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "createTime": null, + "description": "second sample dns for testing creating a certificate with dns-auth", + "dnsResourceRecord": null, + "domain": "${uniqueId}2.hashicorptest.com", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectId}/locations/global/dnsAuthorizations/certificatemanagerdnsauthorization2${uniqueId}", + "type": "TYPE_UNSPECIFIED", + "updateTime": null +} + +--- + +GET https://certificatemanager.googleapis.com/v1/projects/${projectId}/locations/global/certificates/certificatemanagercertificate${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +404 Not Found +Content-Type: application/json + +{ + "code": 5, + "details": [], + "message": "certificate \"projects/${projectId}/locations/global/certificates/certificatemanagercertificate${uniqueId}\" not found" +} + +--- + +POST https://certificatemanager.googleapis.com/v1/projects/${projectId}/locations/global/certificates?alt=json&certificateId=certificatemanagercertificate${uniqueId} +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "description": "sample managed cert for kcc", + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "managed": { + "dnsAuthorizations": [ + "projects/${projectId}/locations/global/dnsAuthorizations/certificatemanagerdnsauthorization1${uniqueId}", + "projects/${projectId}/locations/global/dnsAuthorizations/certificatemanagerdnsauthorization2${uniqueId}" + ], + "domains": [ + "${uniqueId}1.hashicorptest.com", + "${uniqueId}2.hashicorptest.com" + ] + }, + "scope": "EDGE_CACHE" +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://certificatemanager.googleapis.com/v1/projects/${projectId}/locations/global/certificates/certificatemanagercertificate${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "createTime": null, + "description": "sample managed cert for kcc", + "expireTime": null, + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "managed": { + "authorizationAttemptInfo": [], + "dnsAuthorizations": [ + "projects/${projectId}/locations/global/dnsAuthorizations/certificatemanagerdnsauthorization1${uniqueId}", + "projects/${projectId}/locations/global/dnsAuthorizations/certificatemanagerdnsauthorization2${uniqueId}" + ], + "domains": [ + "${uniqueId}1.hashicorptest.com", + "${uniqueId}2.hashicorptest.com" + ], + "issuanceConfig": "", + "provisioningIssue": null, + "state": "STATE_UNSPECIFIED" + }, + "name": "projects/${projectId}/locations/global/certificates/certificatemanagercertificate${uniqueId}", + "pemCertificate": "", + "sanDnsnames": [], + "scope": "EDGE_CACHE", + "updateTime": null +} + +--- + +PATCH https://certificatemanager.googleapis.com/v1/projects/${projectId}/locations/global/certificates/certificatemanagercertificate${uniqueId}?alt=json&updateMask=description%2Clabels +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "description": "updated description of a managed cert for kcc", + "labels": { + "cnrm-test": "true", + "label-one": "value-two", + "managed-by-cnrm": "true" + } +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://certificatemanager.googleapis.com/v1/projects/${projectId}/locations/global/certificates/certificatemanagercertificate${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "createTime": null, + "description": "updated description of a managed cert for kcc", + "expireTime": null, + "labels": { + "cnrm-test": "true", + "label-one": "value-two", + "managed-by-cnrm": "true" + }, + "managed": { + "authorizationAttemptInfo": [], + "dnsAuthorizations": [ + "projects/${projectId}/locations/global/dnsAuthorizations/certificatemanagerdnsauthorization1${uniqueId}", + "projects/${projectId}/locations/global/dnsAuthorizations/certificatemanagerdnsauthorization2${uniqueId}" + ], + "domains": [ + "${uniqueId}1.hashicorptest.com", + "${uniqueId}2.hashicorptest.com" + ], + "issuanceConfig": "", + "provisioningIssue": null, + "state": "STATE_UNSPECIFIED" + }, + "name": "projects/${projectId}/locations/global/certificates/certificatemanagercertificate${uniqueId}", + "pemCertificate": "", + "sanDnsnames": [], + "scope": "EDGE_CACHE", + "updateTime": null +} + +--- + +DELETE https://certificatemanager.googleapis.com/v1/projects/${projectId}/locations/global/certificates/certificatemanagercertificate${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://certificatemanager.googleapis.com/v1/projects/${projectId}/locations/global/dnsAuthorizations/certificatemanagerdnsauthorization2${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "createTime": null, + "description": "second sample dns for testing creating a certificate with dns-auth", + "dnsResourceRecord": null, + "domain": "${uniqueId}2.hashicorptest.com", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectId}/locations/global/dnsAuthorizations/certificatemanagerdnsauthorization2${uniqueId}", + "type": "TYPE_UNSPECIFIED", + "updateTime": null +} + +--- + +DELETE https://certificatemanager.googleapis.com/v1/projects/${projectId}/locations/global/dnsAuthorizations/certificatemanagerdnsauthorization2${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://certificatemanager.googleapis.com/v1/projects/${projectId}/locations/global/dnsAuthorizations/certificatemanagerdnsauthorization1${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "createTime": null, + "description": "first sample dns for testing creating a certificate with dns-auth", + "dnsResourceRecord": null, + "domain": "${uniqueId}1.hashicorptest.com", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectId}/locations/global/dnsAuthorizations/certificatemanagerdnsauthorization1${uniqueId}", + "type": "TYPE_UNSPECIFIED", + "updateTime": null +} + +--- + +DELETE https://certificatemanager.googleapis.com/v1/projects/${projectId}/locations/global/dnsAuthorizations/certificatemanagerdnsauthorization1${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/basic/certificatemanager/v1beta1/certificatemanagercertificate/certificatemanagercertificateselfmanaged/_http.log b/pkg/test/resourcefixture/testdata/basic/certificatemanager/v1beta1/certificatemanagercertificate/certificatemanagercertificateselfmanaged/_http.log new file mode 100644 index 00000000000..485fe99503d --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/certificatemanager/v1beta1/certificatemanagercertificate/certificatemanagercertificateselfmanaged/_http.log @@ -0,0 +1,142 @@ +GET https://certificatemanager.googleapis.com/v1/projects/${projectId}/locations/europe-west1/certificates/certificatemanagercertificate${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +404 Not Found +Content-Type: application/json + +{ + "code": 5, + "details": [], + "message": "certificate \"projects/${projectId}/locations/europe-west1/certificates/certificatemanagercertificate${uniqueId}\" not found" +} + +--- + +POST https://certificatemanager.googleapis.com/v1/projects/${projectId}/locations/europe-west1/certificates?alt=json&certificateId=certificatemanagercertificate${uniqueId} +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "description": "regional self-managed certificate", + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "selfManaged": { + "pemCertificate": "-----BEGIN CERTIFICATE-----\nMIIDDzCCAfegAwIBAgIUDOiCLH9QNMMYnjPZVf4VwO9blsEwDQYJKoZIhvcNAQEL\nBQAwFjEUMBIGA1UEAwwLZXhhbXBsZS5jb20wIBcNMjIwODI0MDg0MDUxWhgPMzAy\nMTEyMjUwODQwNTFaMBYxFDASBgNVBAMMC2V4YW1wbGUuY29tMIIBIjANBgkqhkiG\n9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvOT925GG4lKV9HvAHsbecMhGPAqjhVRC26iZ\nUJC8oSWOu95lWJSX5ZhbiF6Nz192wDGV/VAh3Lxj8RYtcn75eDxQKTcKouDld+To\nCGIStPFWbR6rbysLuZqFVEXVOTvp2QIegInfrvnGC4j7Qpic7zrFB9HzJx+0HpeE\nyO4gkdzJfEK/gMmolUgJrKX59o+0+Rj+Jq3EtcQxL1fVBVJSx0NvpoR1eYpnHMr/\nrJKZkUUZ2xE86hrtpiP6OEYQTi00rmf4GnZF5QfGGD0xuoQXtR7Tu+XhKibXIhxc\nD4RzPLX1QS040PXvmMPLDb4YlUQ6V3Rs42JDvkkDwIMXZvn8awIDAQABo1MwUTAd\nBgNVHQ4EFgQURuo1CCZZAUv7xi02f2nC5tRbf18wHwYDVR0jBBgwFoAURuo1CCZZ\nAUv7xi02f2nC5tRbf18wDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOC\nAQEAqx3tDxurnYr9EUPhF5/LlDPYM+VI7EgrKdRnuIqUlZI0tm3vOGME0te6dBTC\nYLNaHLW3m/4Tm4M2eg0Kpz6CxJfn3109G31dCi0xwzSDHf5TPUWvqIVhq5WRgMIf\nn8KYBlQSmqdJBRztUIQH/UPFnSbxymlS4s5qwDgTH5ag9EEBcnWsQ2LZjKi0eqve\nMaqAvvB+j8RGZzYY4re94bSJI42zIZ6nMWPtXwRuDc30xl/u+E0jWIgWbPwSd6Km\n3wnJnGiU2ezPGq3zEU+Rc39VVIFKQpciNeYuF3neHPJvYOf58qW2Z8s0VH0MR1x3\n3DoO/e30FIr9j+PRD+s5BPKF2A==\n-----END CERTIFICATE-----", + "pemPrivateKey": "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC85P3bkYbiUpX0\ne8Aext5wyEY8CqOFVELbqJlQkLyhJY673mVYlJflmFuIXo3PX3bAMZX9UCHcvGPx\nFi1yfvl4PFApNwqi4OV35OgIYhK08VZtHqtvKwu5moVURdU5O+nZAh6Aid+u+cYL\niPtCmJzvOsUH0fMnH7Qel4TI7iCR3Ml8Qr+AyaiVSAmspfn2j7T5GP4mrcS1xDEv\nV9UFUlLHQ2+mhHV5imccyv+skpmRRRnbETzqGu2mI/o4RhBOLTSuZ/gadkXlB8YY\nPTG6hBe1HtO75eEqJtciHFwPhHM8tfVBLTjQ9e+Yw8sNvhiVRDpXdGzjYkO+SQPA\ngxdm+fxrAgMBAAECggEAV4/A24TQpV4KFBw/WSTvnRFBeXinB1mhamhztWR6hCrA\nSPcVPKQY632eRI8sJmpGxl3V/Ogl4khT/cA9jfstEl7G++v/WrRsupCaPLSVnlnX\nKdsTNgOauk1WK9P5PMA4rPcuA4Cl91riQpubeWn8KWsxRWg90i+Ak8PB8lBsOaB1\nQzjigWlrRWSpodaw0MBIMZFDL2BYK8HEr+wyATYIyGvDQc9zCnMQIQIZyEPYepLO\n04Dw17YcjgnoJ5gLAFiTvDrCpTMewud1RQzvW5TAvG2piw34sf3QMGPM7aXNrfuZ\n4ZPC/MwVQgq9Nc+jeDsjApQmJKJ+3a8OdIPU89ArTQKBgQDCpHHQe1RzpHmIx47/\n9N5r+NPBhh8flDYmvgi6zPeBfrAaLWhidS8c7Voa6HwvMxbhryDEvc0YqI3vllfy\nxnRF+DfSryozW0gjrkXDGoOzqOJ3EuQwLSJnyX6La2lmufqsRFazwYJ5sxcjoGHK\n/sbwZkIUj1ejuH44ve+ZJQFfpwKBgQD4cLJrJhqImUDhHZRx9jBvxyeHy/RjmHK6\n70xQVDi9ZqeExHwtoSbolhXKLB1RtBnw+t5Csy7IDNBDsbUg9fXU8KyCTIdmsyws\nbDb5hdKsUF76rkKzlpttiXMRVWGS3CMKWahBpnL3lFB3tdtmskemkBTXVn4VgKAH\nxk9XnZ11nQKBgDbQSJ0FnkrSzscOK984/ko50Kh3NNyXyIgwjBTPFASLwNweXX8c\nsR/cV7usLQy9vnvf7cJ6EQAYt5/5Httnt+bceBwE6EV+N1qVAWBoXx6BOQV/dHN8\nwmun+tMYdJ5RUZ6hwCjvHedX3/RQfjnEdhHNOl6/31Zj5mfkVU0zdqeRAoGAcvIh\nerXMfPr7K6y16+xOCMmKHqhc0F/OZXMmSdxNzEPcqe8GzU3MZLxcJIg4oH7FqdtI\nTm/86w4Spd9owHFMZlNcXYTu+LNZcsw2u0gRayxcZXuO3OyHySxZEuIAHSTBCZ7l\n3EoY0zfJ6zk249MEl6n+GouoFmbGpBI6z3zbR3kCgYEAlCNZVH4uJrP5beTOZTTR\nVJRk7BXvEC6HsM140YtIN7NHy2GtzrgmmY/ZAFB/hX8Ft4ex2MxbIp3hvxroTqGn\nbfu7uv97NoPQqbjtc3Mz8h2IaXTVDUnWYY5gDu6rM2w+Z75/sWIGiTWrsdYX4ohb\nujngzJ7Ew7GgKSboj6mtlVM=\n-----END PRIVATE KEY-----\n" + } +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://certificatemanager.googleapis.com/v1/projects/${projectId}/locations/europe-west1/certificates/certificatemanagercertificate${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "createTime": null, + "description": "regional self-managed certificate", + "expireTime": null, + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectId}/locations/europe-west1/certificates/certificatemanagercertificate${uniqueId}", + "pemCertificate": "", + "sanDnsnames": [], + "scope": "DEFAULT", + "selfManaged": { + "pemCertificate": "-----BEGIN CERTIFICATE-----\nMIIDDzCCAfegAwIBAgIUDOiCLH9QNMMYnjPZVf4VwO9blsEwDQYJKoZIhvcNAQEL\nBQAwFjEUMBIGA1UEAwwLZXhhbXBsZS5jb20wIBcNMjIwODI0MDg0MDUxWhgPMzAy\nMTEyMjUwODQwNTFaMBYxFDASBgNVBAMMC2V4YW1wbGUuY29tMIIBIjANBgkqhkiG\n9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvOT925GG4lKV9HvAHsbecMhGPAqjhVRC26iZ\nUJC8oSWOu95lWJSX5ZhbiF6Nz192wDGV/VAh3Lxj8RYtcn75eDxQKTcKouDld+To\nCGIStPFWbR6rbysLuZqFVEXVOTvp2QIegInfrvnGC4j7Qpic7zrFB9HzJx+0HpeE\nyO4gkdzJfEK/gMmolUgJrKX59o+0+Rj+Jq3EtcQxL1fVBVJSx0NvpoR1eYpnHMr/\nrJKZkUUZ2xE86hrtpiP6OEYQTi00rmf4GnZF5QfGGD0xuoQXtR7Tu+XhKibXIhxc\nD4RzPLX1QS040PXvmMPLDb4YlUQ6V3Rs42JDvkkDwIMXZvn8awIDAQABo1MwUTAd\nBgNVHQ4EFgQURuo1CCZZAUv7xi02f2nC5tRbf18wHwYDVR0jBBgwFoAURuo1CCZZ\nAUv7xi02f2nC5tRbf18wDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOC\nAQEAqx3tDxurnYr9EUPhF5/LlDPYM+VI7EgrKdRnuIqUlZI0tm3vOGME0te6dBTC\nYLNaHLW3m/4Tm4M2eg0Kpz6CxJfn3109G31dCi0xwzSDHf5TPUWvqIVhq5WRgMIf\nn8KYBlQSmqdJBRztUIQH/UPFnSbxymlS4s5qwDgTH5ag9EEBcnWsQ2LZjKi0eqve\nMaqAvvB+j8RGZzYY4re94bSJI42zIZ6nMWPtXwRuDc30xl/u+E0jWIgWbPwSd6Km\n3wnJnGiU2ezPGq3zEU+Rc39VVIFKQpciNeYuF3neHPJvYOf58qW2Z8s0VH0MR1x3\n3DoO/e30FIr9j+PRD+s5BPKF2A==\n-----END CERTIFICATE-----", + "pemPrivateKey": "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC85P3bkYbiUpX0\ne8Aext5wyEY8CqOFVELbqJlQkLyhJY673mVYlJflmFuIXo3PX3bAMZX9UCHcvGPx\nFi1yfvl4PFApNwqi4OV35OgIYhK08VZtHqtvKwu5moVURdU5O+nZAh6Aid+u+cYL\niPtCmJzvOsUH0fMnH7Qel4TI7iCR3Ml8Qr+AyaiVSAmspfn2j7T5GP4mrcS1xDEv\nV9UFUlLHQ2+mhHV5imccyv+skpmRRRnbETzqGu2mI/o4RhBOLTSuZ/gadkXlB8YY\nPTG6hBe1HtO75eEqJtciHFwPhHM8tfVBLTjQ9e+Yw8sNvhiVRDpXdGzjYkO+SQPA\ngxdm+fxrAgMBAAECggEAV4/A24TQpV4KFBw/WSTvnRFBeXinB1mhamhztWR6hCrA\nSPcVPKQY632eRI8sJmpGxl3V/Ogl4khT/cA9jfstEl7G++v/WrRsupCaPLSVnlnX\nKdsTNgOauk1WK9P5PMA4rPcuA4Cl91riQpubeWn8KWsxRWg90i+Ak8PB8lBsOaB1\nQzjigWlrRWSpodaw0MBIMZFDL2BYK8HEr+wyATYIyGvDQc9zCnMQIQIZyEPYepLO\n04Dw17YcjgnoJ5gLAFiTvDrCpTMewud1RQzvW5TAvG2piw34sf3QMGPM7aXNrfuZ\n4ZPC/MwVQgq9Nc+jeDsjApQmJKJ+3a8OdIPU89ArTQKBgQDCpHHQe1RzpHmIx47/\n9N5r+NPBhh8flDYmvgi6zPeBfrAaLWhidS8c7Voa6HwvMxbhryDEvc0YqI3vllfy\nxnRF+DfSryozW0gjrkXDGoOzqOJ3EuQwLSJnyX6La2lmufqsRFazwYJ5sxcjoGHK\n/sbwZkIUj1ejuH44ve+ZJQFfpwKBgQD4cLJrJhqImUDhHZRx9jBvxyeHy/RjmHK6\n70xQVDi9ZqeExHwtoSbolhXKLB1RtBnw+t5Csy7IDNBDsbUg9fXU8KyCTIdmsyws\nbDb5hdKsUF76rkKzlpttiXMRVWGS3CMKWahBpnL3lFB3tdtmskemkBTXVn4VgKAH\nxk9XnZ11nQKBgDbQSJ0FnkrSzscOK984/ko50Kh3NNyXyIgwjBTPFASLwNweXX8c\nsR/cV7usLQy9vnvf7cJ6EQAYt5/5Httnt+bceBwE6EV+N1qVAWBoXx6BOQV/dHN8\nwmun+tMYdJ5RUZ6hwCjvHedX3/RQfjnEdhHNOl6/31Zj5mfkVU0zdqeRAoGAcvIh\nerXMfPr7K6y16+xOCMmKHqhc0F/OZXMmSdxNzEPcqe8GzU3MZLxcJIg4oH7FqdtI\nTm/86w4Spd9owHFMZlNcXYTu+LNZcsw2u0gRayxcZXuO3OyHySxZEuIAHSTBCZ7l\n3EoY0zfJ6zk249MEl6n+GouoFmbGpBI6z3zbR3kCgYEAlCNZVH4uJrP5beTOZTTR\nVJRk7BXvEC6HsM140YtIN7NHy2GtzrgmmY/ZAFB/hX8Ft4ex2MxbIp3hvxroTqGn\nbfu7uv97NoPQqbjtc3Mz8h2IaXTVDUnWYY5gDu6rM2w+Z75/sWIGiTWrsdYX4ohb\nujngzJ7Ew7GgKSboj6mtlVM=\n-----END PRIVATE KEY-----\n" + }, + "updateTime": null +} + +--- + +PATCH https://certificatemanager.googleapis.com/v1/projects/${projectId}/locations/europe-west1/certificates/certificatemanagercertificate${uniqueId}?alt=json&updateMask=description%2Clabels +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "description": "updated regional self-managed certificate", + "labels": { + "cnrm-test": "true", + "label-one": "value-two", + "managed-by-cnrm": "true" + } +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://certificatemanager.googleapis.com/v1/projects/${projectId}/locations/europe-west1/certificates/certificatemanagercertificate${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "createTime": null, + "description": "updated regional self-managed certificate", + "expireTime": null, + "labels": { + "cnrm-test": "true", + "label-one": "value-two", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectId}/locations/europe-west1/certificates/certificatemanagercertificate${uniqueId}", + "pemCertificate": "", + "sanDnsnames": [], + "scope": "DEFAULT", + "selfManaged": { + "pemCertificate": "-----BEGIN CERTIFICATE-----\nMIIDDzCCAfegAwIBAgIUDOiCLH9QNMMYnjPZVf4VwO9blsEwDQYJKoZIhvcNAQEL\nBQAwFjEUMBIGA1UEAwwLZXhhbXBsZS5jb20wIBcNMjIwODI0MDg0MDUxWhgPMzAy\nMTEyMjUwODQwNTFaMBYxFDASBgNVBAMMC2V4YW1wbGUuY29tMIIBIjANBgkqhkiG\n9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvOT925GG4lKV9HvAHsbecMhGPAqjhVRC26iZ\nUJC8oSWOu95lWJSX5ZhbiF6Nz192wDGV/VAh3Lxj8RYtcn75eDxQKTcKouDld+To\nCGIStPFWbR6rbysLuZqFVEXVOTvp2QIegInfrvnGC4j7Qpic7zrFB9HzJx+0HpeE\nyO4gkdzJfEK/gMmolUgJrKX59o+0+Rj+Jq3EtcQxL1fVBVJSx0NvpoR1eYpnHMr/\nrJKZkUUZ2xE86hrtpiP6OEYQTi00rmf4GnZF5QfGGD0xuoQXtR7Tu+XhKibXIhxc\nD4RzPLX1QS040PXvmMPLDb4YlUQ6V3Rs42JDvkkDwIMXZvn8awIDAQABo1MwUTAd\nBgNVHQ4EFgQURuo1CCZZAUv7xi02f2nC5tRbf18wHwYDVR0jBBgwFoAURuo1CCZZ\nAUv7xi02f2nC5tRbf18wDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOC\nAQEAqx3tDxurnYr9EUPhF5/LlDPYM+VI7EgrKdRnuIqUlZI0tm3vOGME0te6dBTC\nYLNaHLW3m/4Tm4M2eg0Kpz6CxJfn3109G31dCi0xwzSDHf5TPUWvqIVhq5WRgMIf\nn8KYBlQSmqdJBRztUIQH/UPFnSbxymlS4s5qwDgTH5ag9EEBcnWsQ2LZjKi0eqve\nMaqAvvB+j8RGZzYY4re94bSJI42zIZ6nMWPtXwRuDc30xl/u+E0jWIgWbPwSd6Km\n3wnJnGiU2ezPGq3zEU+Rc39VVIFKQpciNeYuF3neHPJvYOf58qW2Z8s0VH0MR1x3\n3DoO/e30FIr9j+PRD+s5BPKF2A==\n-----END CERTIFICATE-----", + "pemPrivateKey": "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC85P3bkYbiUpX0\ne8Aext5wyEY8CqOFVELbqJlQkLyhJY673mVYlJflmFuIXo3PX3bAMZX9UCHcvGPx\nFi1yfvl4PFApNwqi4OV35OgIYhK08VZtHqtvKwu5moVURdU5O+nZAh6Aid+u+cYL\niPtCmJzvOsUH0fMnH7Qel4TI7iCR3Ml8Qr+AyaiVSAmspfn2j7T5GP4mrcS1xDEv\nV9UFUlLHQ2+mhHV5imccyv+skpmRRRnbETzqGu2mI/o4RhBOLTSuZ/gadkXlB8YY\nPTG6hBe1HtO75eEqJtciHFwPhHM8tfVBLTjQ9e+Yw8sNvhiVRDpXdGzjYkO+SQPA\ngxdm+fxrAgMBAAECggEAV4/A24TQpV4KFBw/WSTvnRFBeXinB1mhamhztWR6hCrA\nSPcVPKQY632eRI8sJmpGxl3V/Ogl4khT/cA9jfstEl7G++v/WrRsupCaPLSVnlnX\nKdsTNgOauk1WK9P5PMA4rPcuA4Cl91riQpubeWn8KWsxRWg90i+Ak8PB8lBsOaB1\nQzjigWlrRWSpodaw0MBIMZFDL2BYK8HEr+wyATYIyGvDQc9zCnMQIQIZyEPYepLO\n04Dw17YcjgnoJ5gLAFiTvDrCpTMewud1RQzvW5TAvG2piw34sf3QMGPM7aXNrfuZ\n4ZPC/MwVQgq9Nc+jeDsjApQmJKJ+3a8OdIPU89ArTQKBgQDCpHHQe1RzpHmIx47/\n9N5r+NPBhh8flDYmvgi6zPeBfrAaLWhidS8c7Voa6HwvMxbhryDEvc0YqI3vllfy\nxnRF+DfSryozW0gjrkXDGoOzqOJ3EuQwLSJnyX6La2lmufqsRFazwYJ5sxcjoGHK\n/sbwZkIUj1ejuH44ve+ZJQFfpwKBgQD4cLJrJhqImUDhHZRx9jBvxyeHy/RjmHK6\n70xQVDi9ZqeExHwtoSbolhXKLB1RtBnw+t5Csy7IDNBDsbUg9fXU8KyCTIdmsyws\nbDb5hdKsUF76rkKzlpttiXMRVWGS3CMKWahBpnL3lFB3tdtmskemkBTXVn4VgKAH\nxk9XnZ11nQKBgDbQSJ0FnkrSzscOK984/ko50Kh3NNyXyIgwjBTPFASLwNweXX8c\nsR/cV7usLQy9vnvf7cJ6EQAYt5/5Httnt+bceBwE6EV+N1qVAWBoXx6BOQV/dHN8\nwmun+tMYdJ5RUZ6hwCjvHedX3/RQfjnEdhHNOl6/31Zj5mfkVU0zdqeRAoGAcvIh\nerXMfPr7K6y16+xOCMmKHqhc0F/OZXMmSdxNzEPcqe8GzU3MZLxcJIg4oH7FqdtI\nTm/86w4Spd9owHFMZlNcXYTu+LNZcsw2u0gRayxcZXuO3OyHySxZEuIAHSTBCZ7l\n3EoY0zfJ6zk249MEl6n+GouoFmbGpBI6z3zbR3kCgYEAlCNZVH4uJrP5beTOZTTR\nVJRk7BXvEC6HsM140YtIN7NHy2GtzrgmmY/ZAFB/hX8Ft4ex2MxbIp3hvxroTqGn\nbfu7uv97NoPQqbjtc3Mz8h2IaXTVDUnWYY5gDu6rM2w+Z75/sWIGiTWrsdYX4ohb\nujngzJ7Ew7GgKSboj6mtlVM=\n-----END PRIVATE KEY-----\n" + }, + "updateTime": null +} + +--- + +DELETE https://certificatemanager.googleapis.com/v1/projects/${projectId}/locations/europe-west1/certificates/certificatemanagercertificate${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/basic/certificatemanager/v1beta1/certificatemanagercertificatemap/_http.log b/pkg/test/resourcefixture/testdata/basic/certificatemanager/v1beta1/certificatemanagercertificatemap/_http.log new file mode 100644 index 00000000000..e3f64685d5f --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/certificatemanager/v1beta1/certificatemanagercertificatemap/_http.log @@ -0,0 +1,124 @@ +GET https://certificatemanager.googleapis.com/v1/projects/${projectId}/locations/global/certificateMaps/certificatemanagercertificatemap${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +404 Not Found +Content-Type: application/json + +{ + "code": 5, + "details": [], + "message": "certificateMap \"projects/${projectId}/locations/global/certificateMaps/certificatemanagercertificatemap${uniqueId}\" not found" +} + +--- + +POST https://certificatemanager.googleapis.com/v1/projects/${projectId}/locations/global/certificateMaps?alt=json&certificateMapId=certificatemanagercertificatemap${uniqueId} +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "description": "sample certificate map", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true", + "value": "cert-map" + } +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://certificatemanager.googleapis.com/v1/projects/${projectId}/locations/global/certificateMaps/certificatemanagercertificatemap${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "createTime": null, + "description": "sample certificate map", + "gclbTargets": [], + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true", + "value": "cert-map" + }, + "name": "projects/${projectId}/locations/global/certificateMaps/certificatemanagercertificatemap${uniqueId}", + "updateTime": null +} + +--- + +PATCH https://certificatemanager.googleapis.com/v1/projects/${projectId}/locations/global/certificateMaps/certificatemanagercertificatemap${uniqueId}?alt=json&updateMask=description%2Clabels +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "description": "updated sample certificate map", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true", + "value": "cert-map-2" + } +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://certificatemanager.googleapis.com/v1/projects/${projectId}/locations/global/certificateMaps/certificatemanagercertificatemap${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "createTime": null, + "description": "updated sample certificate map", + "gclbTargets": [], + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true", + "value": "cert-map-2" + }, + "name": "projects/${projectId}/locations/global/certificateMaps/certificatemanagercertificatemap${uniqueId}", + "updateTime": null +} + +--- + +DELETE https://certificatemanager.googleapis.com/v1/projects/${projectId}/locations/global/certificateMaps/certificatemanagercertificatemap${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/basic/certificatemanager/v1beta1/certificatemanagercertificatemapentry/_http.log b/pkg/test/resourcefixture/testdata/basic/certificatemanager/v1beta1/certificatemanagercertificatemapentry/_http.log new file mode 100644 index 00000000000..dfd35facced --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/certificatemanager/v1beta1/certificatemanagercertificatemapentry/_http.log @@ -0,0 +1,355 @@ +GET https://certificatemanager.googleapis.com/v1/projects/${projectId}/locations/global/certificateMaps/certificatemanagercertificatemap${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +404 Not Found +Content-Type: application/json + +{ + "code": 5, + "details": [], + "message": "certificateMap \"projects/${projectId}/locations/global/certificateMaps/certificatemanagercertificatemap${uniqueId}\" not found" +} + +--- + +POST https://certificatemanager.googleapis.com/v1/projects/${projectId}/locations/global/certificateMaps?alt=json&certificateMapId=certificatemanagercertificatemap${uniqueId} +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "description": "sample certificate-map for creating certificate-map-entry", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + } +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://certificatemanager.googleapis.com/v1/projects/${projectId}/locations/global/certificateMaps/certificatemanagercertificatemap${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "createTime": null, + "description": "sample certificate-map for creating certificate-map-entry", + "gclbTargets": [], + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectId}/locations/global/certificateMaps/certificatemanagercertificatemap${uniqueId}", + "updateTime": null +} + +--- + +GET https://certificatemanager.googleapis.com/v1/projects/${projectId}/locations/global/certificates/certificatemanagercertificate${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +404 Not Found +Content-Type: application/json + +{ + "code": 5, + "details": [], + "message": "certificate \"projects/${projectId}/locations/global/certificates/certificatemanagercertificate${uniqueId}\" not found" +} + +--- + +POST https://certificatemanager.googleapis.com/v1/projects/${projectId}/locations/global/certificates?alt=json&certificateId=certificatemanagercertificate${uniqueId} +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "description": "sample certificate for creating certificate map entry", + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "selfManaged": { + "pemCertificate": "-----BEGIN CERTIFICATE-----\nMIIDDzCCAfegAwIBAgIUDOiCLH9QNMMYnjPZVf4VwO9blsEwDQYJKoZIhvcNAQEL\nBQAwFjEUMBIGA1UEAwwLZXhhbXBsZS5jb20wIBcNMjIwODI0MDg0MDUxWhgPMzAy\nMTEyMjUwODQwNTFaMBYxFDASBgNVBAMMC2V4YW1wbGUuY29tMIIBIjANBgkqhkiG\n9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvOT925GG4lKV9HvAHsbecMhGPAqjhVRC26iZ\nUJC8oSWOu95lWJSX5ZhbiF6Nz192wDGV/VAh3Lxj8RYtcn75eDxQKTcKouDld+To\nCGIStPFWbR6rbysLuZqFVEXVOTvp2QIegInfrvnGC4j7Qpic7zrFB9HzJx+0HpeE\nyO4gkdzJfEK/gMmolUgJrKX59o+0+Rj+Jq3EtcQxL1fVBVJSx0NvpoR1eYpnHMr/\nrJKZkUUZ2xE86hrtpiP6OEYQTi00rmf4GnZF5QfGGD0xuoQXtR7Tu+XhKibXIhxc\nD4RzPLX1QS040PXvmMPLDb4YlUQ6V3Rs42JDvkkDwIMXZvn8awIDAQABo1MwUTAd\nBgNVHQ4EFgQURuo1CCZZAUv7xi02f2nC5tRbf18wHwYDVR0jBBgwFoAURuo1CCZZ\nAUv7xi02f2nC5tRbf18wDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOC\nAQEAqx3tDxurnYr9EUPhF5/LlDPYM+VI7EgrKdRnuIqUlZI0tm3vOGME0te6dBTC\nYLNaHLW3m/4Tm4M2eg0Kpz6CxJfn3109G31dCi0xwzSDHf5TPUWvqIVhq5WRgMIf\nn8KYBlQSmqdJBRztUIQH/UPFnSbxymlS4s5qwDgTH5ag9EEBcnWsQ2LZjKi0eqve\nMaqAvvB+j8RGZzYY4re94bSJI42zIZ6nMWPtXwRuDc30xl/u+E0jWIgWbPwSd6Km\n3wnJnGiU2ezPGq3zEU+Rc39VVIFKQpciNeYuF3neHPJvYOf58qW2Z8s0VH0MR1x3\n3DoO/e30FIr9j+PRD+s5BPKF2A==\n-----END CERTIFICATE-----", + "pemPrivateKey": "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC85P3bkYbiUpX0\ne8Aext5wyEY8CqOFVELbqJlQkLyhJY673mVYlJflmFuIXo3PX3bAMZX9UCHcvGPx\nFi1yfvl4PFApNwqi4OV35OgIYhK08VZtHqtvKwu5moVURdU5O+nZAh6Aid+u+cYL\niPtCmJzvOsUH0fMnH7Qel4TI7iCR3Ml8Qr+AyaiVSAmspfn2j7T5GP4mrcS1xDEv\nV9UFUlLHQ2+mhHV5imccyv+skpmRRRnbETzqGu2mI/o4RhBOLTSuZ/gadkXlB8YY\nPTG6hBe1HtO75eEqJtciHFwPhHM8tfVBLTjQ9e+Yw8sNvhiVRDpXdGzjYkO+SQPA\ngxdm+fxrAgMBAAECggEAV4/A24TQpV4KFBw/WSTvnRFBeXinB1mhamhztWR6hCrA\nSPcVPKQY632eRI8sJmpGxl3V/Ogl4khT/cA9jfstEl7G++v/WrRsupCaPLSVnlnX\nKdsTNgOauk1WK9P5PMA4rPcuA4Cl91riQpubeWn8KWsxRWg90i+Ak8PB8lBsOaB1\nQzjigWlrRWSpodaw0MBIMZFDL2BYK8HEr+wyATYIyGvDQc9zCnMQIQIZyEPYepLO\n04Dw17YcjgnoJ5gLAFiTvDrCpTMewud1RQzvW5TAvG2piw34sf3QMGPM7aXNrfuZ\n4ZPC/MwVQgq9Nc+jeDsjApQmJKJ+3a8OdIPU89ArTQKBgQDCpHHQe1RzpHmIx47/\n9N5r+NPBhh8flDYmvgi6zPeBfrAaLWhidS8c7Voa6HwvMxbhryDEvc0YqI3vllfy\nxnRF+DfSryozW0gjrkXDGoOzqOJ3EuQwLSJnyX6La2lmufqsRFazwYJ5sxcjoGHK\n/sbwZkIUj1ejuH44ve+ZJQFfpwKBgQD4cLJrJhqImUDhHZRx9jBvxyeHy/RjmHK6\n70xQVDi9ZqeExHwtoSbolhXKLB1RtBnw+t5Csy7IDNBDsbUg9fXU8KyCTIdmsyws\nbDb5hdKsUF76rkKzlpttiXMRVWGS3CMKWahBpnL3lFB3tdtmskemkBTXVn4VgKAH\nxk9XnZ11nQKBgDbQSJ0FnkrSzscOK984/ko50Kh3NNyXyIgwjBTPFASLwNweXX8c\nsR/cV7usLQy9vnvf7cJ6EQAYt5/5Httnt+bceBwE6EV+N1qVAWBoXx6BOQV/dHN8\nwmun+tMYdJ5RUZ6hwCjvHedX3/RQfjnEdhHNOl6/31Zj5mfkVU0zdqeRAoGAcvIh\nerXMfPr7K6y16+xOCMmKHqhc0F/OZXMmSdxNzEPcqe8GzU3MZLxcJIg4oH7FqdtI\nTm/86w4Spd9owHFMZlNcXYTu+LNZcsw2u0gRayxcZXuO3OyHySxZEuIAHSTBCZ7l\n3EoY0zfJ6zk249MEl6n+GouoFmbGpBI6z3zbR3kCgYEAlCNZVH4uJrP5beTOZTTR\nVJRk7BXvEC6HsM140YtIN7NHy2GtzrgmmY/ZAFB/hX8Ft4ex2MxbIp3hvxroTqGn\nbfu7uv97NoPQqbjtc3Mz8h2IaXTVDUnWYY5gDu6rM2w+Z75/sWIGiTWrsdYX4ohb\nujngzJ7Ew7GgKSboj6mtlVM=\n-----END PRIVATE KEY-----\n" + } +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://certificatemanager.googleapis.com/v1/projects/${projectId}/locations/global/certificates/certificatemanagercertificate${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "createTime": null, + "description": "sample certificate for creating certificate map entry", + "expireTime": null, + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectId}/locations/global/certificates/certificatemanagercertificate${uniqueId}", + "pemCertificate": "", + "sanDnsnames": [], + "scope": "DEFAULT", + "selfManaged": { + "pemCertificate": "-----BEGIN CERTIFICATE-----\nMIIDDzCCAfegAwIBAgIUDOiCLH9QNMMYnjPZVf4VwO9blsEwDQYJKoZIhvcNAQEL\nBQAwFjEUMBIGA1UEAwwLZXhhbXBsZS5jb20wIBcNMjIwODI0MDg0MDUxWhgPMzAy\nMTEyMjUwODQwNTFaMBYxFDASBgNVBAMMC2V4YW1wbGUuY29tMIIBIjANBgkqhkiG\n9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvOT925GG4lKV9HvAHsbecMhGPAqjhVRC26iZ\nUJC8oSWOu95lWJSX5ZhbiF6Nz192wDGV/VAh3Lxj8RYtcn75eDxQKTcKouDld+To\nCGIStPFWbR6rbysLuZqFVEXVOTvp2QIegInfrvnGC4j7Qpic7zrFB9HzJx+0HpeE\nyO4gkdzJfEK/gMmolUgJrKX59o+0+Rj+Jq3EtcQxL1fVBVJSx0NvpoR1eYpnHMr/\nrJKZkUUZ2xE86hrtpiP6OEYQTi00rmf4GnZF5QfGGD0xuoQXtR7Tu+XhKibXIhxc\nD4RzPLX1QS040PXvmMPLDb4YlUQ6V3Rs42JDvkkDwIMXZvn8awIDAQABo1MwUTAd\nBgNVHQ4EFgQURuo1CCZZAUv7xi02f2nC5tRbf18wHwYDVR0jBBgwFoAURuo1CCZZ\nAUv7xi02f2nC5tRbf18wDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOC\nAQEAqx3tDxurnYr9EUPhF5/LlDPYM+VI7EgrKdRnuIqUlZI0tm3vOGME0te6dBTC\nYLNaHLW3m/4Tm4M2eg0Kpz6CxJfn3109G31dCi0xwzSDHf5TPUWvqIVhq5WRgMIf\nn8KYBlQSmqdJBRztUIQH/UPFnSbxymlS4s5qwDgTH5ag9EEBcnWsQ2LZjKi0eqve\nMaqAvvB+j8RGZzYY4re94bSJI42zIZ6nMWPtXwRuDc30xl/u+E0jWIgWbPwSd6Km\n3wnJnGiU2ezPGq3zEU+Rc39VVIFKQpciNeYuF3neHPJvYOf58qW2Z8s0VH0MR1x3\n3DoO/e30FIr9j+PRD+s5BPKF2A==\n-----END CERTIFICATE-----", + "pemPrivateKey": "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC85P3bkYbiUpX0\ne8Aext5wyEY8CqOFVELbqJlQkLyhJY673mVYlJflmFuIXo3PX3bAMZX9UCHcvGPx\nFi1yfvl4PFApNwqi4OV35OgIYhK08VZtHqtvKwu5moVURdU5O+nZAh6Aid+u+cYL\niPtCmJzvOsUH0fMnH7Qel4TI7iCR3Ml8Qr+AyaiVSAmspfn2j7T5GP4mrcS1xDEv\nV9UFUlLHQ2+mhHV5imccyv+skpmRRRnbETzqGu2mI/o4RhBOLTSuZ/gadkXlB8YY\nPTG6hBe1HtO75eEqJtciHFwPhHM8tfVBLTjQ9e+Yw8sNvhiVRDpXdGzjYkO+SQPA\ngxdm+fxrAgMBAAECggEAV4/A24TQpV4KFBw/WSTvnRFBeXinB1mhamhztWR6hCrA\nSPcVPKQY632eRI8sJmpGxl3V/Ogl4khT/cA9jfstEl7G++v/WrRsupCaPLSVnlnX\nKdsTNgOauk1WK9P5PMA4rPcuA4Cl91riQpubeWn8KWsxRWg90i+Ak8PB8lBsOaB1\nQzjigWlrRWSpodaw0MBIMZFDL2BYK8HEr+wyATYIyGvDQc9zCnMQIQIZyEPYepLO\n04Dw17YcjgnoJ5gLAFiTvDrCpTMewud1RQzvW5TAvG2piw34sf3QMGPM7aXNrfuZ\n4ZPC/MwVQgq9Nc+jeDsjApQmJKJ+3a8OdIPU89ArTQKBgQDCpHHQe1RzpHmIx47/\n9N5r+NPBhh8flDYmvgi6zPeBfrAaLWhidS8c7Voa6HwvMxbhryDEvc0YqI3vllfy\nxnRF+DfSryozW0gjrkXDGoOzqOJ3EuQwLSJnyX6La2lmufqsRFazwYJ5sxcjoGHK\n/sbwZkIUj1ejuH44ve+ZJQFfpwKBgQD4cLJrJhqImUDhHZRx9jBvxyeHy/RjmHK6\n70xQVDi9ZqeExHwtoSbolhXKLB1RtBnw+t5Csy7IDNBDsbUg9fXU8KyCTIdmsyws\nbDb5hdKsUF76rkKzlpttiXMRVWGS3CMKWahBpnL3lFB3tdtmskemkBTXVn4VgKAH\nxk9XnZ11nQKBgDbQSJ0FnkrSzscOK984/ko50Kh3NNyXyIgwjBTPFASLwNweXX8c\nsR/cV7usLQy9vnvf7cJ6EQAYt5/5Httnt+bceBwE6EV+N1qVAWBoXx6BOQV/dHN8\nwmun+tMYdJ5RUZ6hwCjvHedX3/RQfjnEdhHNOl6/31Zj5mfkVU0zdqeRAoGAcvIh\nerXMfPr7K6y16+xOCMmKHqhc0F/OZXMmSdxNzEPcqe8GzU3MZLxcJIg4oH7FqdtI\nTm/86w4Spd9owHFMZlNcXYTu+LNZcsw2u0gRayxcZXuO3OyHySxZEuIAHSTBCZ7l\n3EoY0zfJ6zk249MEl6n+GouoFmbGpBI6z3zbR3kCgYEAlCNZVH4uJrP5beTOZTTR\nVJRk7BXvEC6HsM140YtIN7NHy2GtzrgmmY/ZAFB/hX8Ft4ex2MxbIp3hvxroTqGn\nbfu7uv97NoPQqbjtc3Mz8h2IaXTVDUnWYY5gDu6rM2w+Z75/sWIGiTWrsdYX4ohb\nujngzJ7Ew7GgKSboj6mtlVM=\n-----END PRIVATE KEY-----\n" + }, + "updateTime": null +} + +--- + +GET https://certificatemanager.googleapis.com/v1/projects/${projectId}/locations/global/certificateMaps/certificatemanagercertificatemap${uniqueId}/certificateMapEntries/certificatemanagercertificatemapentry${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +404 Not Found +Content-Type: application/json + +{ + "code": 5, + "details": [], + "message": "certificateMapEntry \"projects/${projectId}/locations/global/certificateMaps/certificatemanagercertificatemap${uniqueId}/certificateMapEntries/certificatemanagercertificatemapentry${uniqueId}\" not found" +} + +--- + +POST https://certificatemanager.googleapis.com/v1/projects/${projectId}/locations/global/certificateMaps/certificatemanagercertificatemap${uniqueId}/certificateMapEntries?alt=json&certificateMapEntryId=certificatemanagercertificatemapentry${uniqueId} +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "certificates": [ + "projects/${projectId}/locations/global/certificates/certificatemanagercertificate${uniqueId}" + ], + "description": "sample certificate map entry", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "matcher": "PRIMARY", + "name": "certificatemanagercertificatemapentry${uniqueId}" +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://certificatemanager.googleapis.com/v1/projects/${projectId}/locations/global/certificateMaps/certificatemanagercertificatemap${uniqueId}/certificateMapEntries/certificatemanagercertificatemapentry${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "certificates": [ + "projects/${projectId}/locations/global/certificates/certificatemanagercertificate${uniqueId}" + ], + "createTime": null, + "description": "sample certificate map entry", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "matcher": "PRIMARY", + "name": "projects/${projectId}/locations/global/certificateMaps/certificatemanagercertificatemap${uniqueId}/certificateMapEntries/certificatemanagercertificatemapentry${uniqueId}", + "state": "SERVING_STATE_UNSPECIFIED", + "updateTime": null +} + +--- + +PATCH https://certificatemanager.googleapis.com/v1/projects/${projectId}/locations/global/certificateMaps/certificatemanagercertificatemap${uniqueId}/certificateMapEntries/certificatemanagercertificatemapentry${uniqueId}?alt=json&updateMask=description +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "certificates": [ + "projects/${projectId}/locations/global/certificates/certificatemanagercertificate${uniqueId}" + ], + "description": "updated certificate map entry", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + } +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://certificatemanager.googleapis.com/v1/projects/${projectId}/locations/global/certificateMaps/certificatemanagercertificatemap${uniqueId}/certificateMapEntries/certificatemanagercertificatemapentry${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "certificates": [ + "projects/${projectId}/locations/global/certificates/certificatemanagercertificate${uniqueId}" + ], + "createTime": null, + "description": "updated certificate map entry", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "matcher": "PRIMARY", + "name": "projects/${projectId}/locations/global/certificateMaps/certificatemanagercertificatemap${uniqueId}/certificateMapEntries/certificatemanagercertificatemapentry${uniqueId}", + "state": "SERVING_STATE_UNSPECIFIED", + "updateTime": null +} + +--- + +DELETE https://certificatemanager.googleapis.com/v1/projects/${projectId}/locations/global/certificateMaps/certificatemanagercertificatemap${uniqueId}/certificateMapEntries/certificatemanagercertificatemapentry${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://certificatemanager.googleapis.com/v1/projects/${projectId}/locations/global/certificates/certificatemanagercertificate${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "createTime": null, + "description": "sample certificate for creating certificate map entry", + "expireTime": null, + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectId}/locations/global/certificates/certificatemanagercertificate${uniqueId}", + "pemCertificate": "", + "sanDnsnames": [], + "scope": "DEFAULT", + "selfManaged": { + "pemCertificate": "-----BEGIN CERTIFICATE-----\nMIIDDzCCAfegAwIBAgIUDOiCLH9QNMMYnjPZVf4VwO9blsEwDQYJKoZIhvcNAQEL\nBQAwFjEUMBIGA1UEAwwLZXhhbXBsZS5jb20wIBcNMjIwODI0MDg0MDUxWhgPMzAy\nMTEyMjUwODQwNTFaMBYxFDASBgNVBAMMC2V4YW1wbGUuY29tMIIBIjANBgkqhkiG\n9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvOT925GG4lKV9HvAHsbecMhGPAqjhVRC26iZ\nUJC8oSWOu95lWJSX5ZhbiF6Nz192wDGV/VAh3Lxj8RYtcn75eDxQKTcKouDld+To\nCGIStPFWbR6rbysLuZqFVEXVOTvp2QIegInfrvnGC4j7Qpic7zrFB9HzJx+0HpeE\nyO4gkdzJfEK/gMmolUgJrKX59o+0+Rj+Jq3EtcQxL1fVBVJSx0NvpoR1eYpnHMr/\nrJKZkUUZ2xE86hrtpiP6OEYQTi00rmf4GnZF5QfGGD0xuoQXtR7Tu+XhKibXIhxc\nD4RzPLX1QS040PXvmMPLDb4YlUQ6V3Rs42JDvkkDwIMXZvn8awIDAQABo1MwUTAd\nBgNVHQ4EFgQURuo1CCZZAUv7xi02f2nC5tRbf18wHwYDVR0jBBgwFoAURuo1CCZZ\nAUv7xi02f2nC5tRbf18wDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOC\nAQEAqx3tDxurnYr9EUPhF5/LlDPYM+VI7EgrKdRnuIqUlZI0tm3vOGME0te6dBTC\nYLNaHLW3m/4Tm4M2eg0Kpz6CxJfn3109G31dCi0xwzSDHf5TPUWvqIVhq5WRgMIf\nn8KYBlQSmqdJBRztUIQH/UPFnSbxymlS4s5qwDgTH5ag9EEBcnWsQ2LZjKi0eqve\nMaqAvvB+j8RGZzYY4re94bSJI42zIZ6nMWPtXwRuDc30xl/u+E0jWIgWbPwSd6Km\n3wnJnGiU2ezPGq3zEU+Rc39VVIFKQpciNeYuF3neHPJvYOf58qW2Z8s0VH0MR1x3\n3DoO/e30FIr9j+PRD+s5BPKF2A==\n-----END CERTIFICATE-----", + "pemPrivateKey": "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC85P3bkYbiUpX0\ne8Aext5wyEY8CqOFVELbqJlQkLyhJY673mVYlJflmFuIXo3PX3bAMZX9UCHcvGPx\nFi1yfvl4PFApNwqi4OV35OgIYhK08VZtHqtvKwu5moVURdU5O+nZAh6Aid+u+cYL\niPtCmJzvOsUH0fMnH7Qel4TI7iCR3Ml8Qr+AyaiVSAmspfn2j7T5GP4mrcS1xDEv\nV9UFUlLHQ2+mhHV5imccyv+skpmRRRnbETzqGu2mI/o4RhBOLTSuZ/gadkXlB8YY\nPTG6hBe1HtO75eEqJtciHFwPhHM8tfVBLTjQ9e+Yw8sNvhiVRDpXdGzjYkO+SQPA\ngxdm+fxrAgMBAAECggEAV4/A24TQpV4KFBw/WSTvnRFBeXinB1mhamhztWR6hCrA\nSPcVPKQY632eRI8sJmpGxl3V/Ogl4khT/cA9jfstEl7G++v/WrRsupCaPLSVnlnX\nKdsTNgOauk1WK9P5PMA4rPcuA4Cl91riQpubeWn8KWsxRWg90i+Ak8PB8lBsOaB1\nQzjigWlrRWSpodaw0MBIMZFDL2BYK8HEr+wyATYIyGvDQc9zCnMQIQIZyEPYepLO\n04Dw17YcjgnoJ5gLAFiTvDrCpTMewud1RQzvW5TAvG2piw34sf3QMGPM7aXNrfuZ\n4ZPC/MwVQgq9Nc+jeDsjApQmJKJ+3a8OdIPU89ArTQKBgQDCpHHQe1RzpHmIx47/\n9N5r+NPBhh8flDYmvgi6zPeBfrAaLWhidS8c7Voa6HwvMxbhryDEvc0YqI3vllfy\nxnRF+DfSryozW0gjrkXDGoOzqOJ3EuQwLSJnyX6La2lmufqsRFazwYJ5sxcjoGHK\n/sbwZkIUj1ejuH44ve+ZJQFfpwKBgQD4cLJrJhqImUDhHZRx9jBvxyeHy/RjmHK6\n70xQVDi9ZqeExHwtoSbolhXKLB1RtBnw+t5Csy7IDNBDsbUg9fXU8KyCTIdmsyws\nbDb5hdKsUF76rkKzlpttiXMRVWGS3CMKWahBpnL3lFB3tdtmskemkBTXVn4VgKAH\nxk9XnZ11nQKBgDbQSJ0FnkrSzscOK984/ko50Kh3NNyXyIgwjBTPFASLwNweXX8c\nsR/cV7usLQy9vnvf7cJ6EQAYt5/5Httnt+bceBwE6EV+N1qVAWBoXx6BOQV/dHN8\nwmun+tMYdJ5RUZ6hwCjvHedX3/RQfjnEdhHNOl6/31Zj5mfkVU0zdqeRAoGAcvIh\nerXMfPr7K6y16+xOCMmKHqhc0F/OZXMmSdxNzEPcqe8GzU3MZLxcJIg4oH7FqdtI\nTm/86w4Spd9owHFMZlNcXYTu+LNZcsw2u0gRayxcZXuO3OyHySxZEuIAHSTBCZ7l\n3EoY0zfJ6zk249MEl6n+GouoFmbGpBI6z3zbR3kCgYEAlCNZVH4uJrP5beTOZTTR\nVJRk7BXvEC6HsM140YtIN7NHy2GtzrgmmY/ZAFB/hX8Ft4ex2MxbIp3hvxroTqGn\nbfu7uv97NoPQqbjtc3Mz8h2IaXTVDUnWYY5gDu6rM2w+Z75/sWIGiTWrsdYX4ohb\nujngzJ7Ew7GgKSboj6mtlVM=\n-----END PRIVATE KEY-----\n" + }, + "updateTime": null +} + +--- + +DELETE https://certificatemanager.googleapis.com/v1/projects/${projectId}/locations/global/certificates/certificatemanagercertificate${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://certificatemanager.googleapis.com/v1/projects/${projectId}/locations/global/certificateMaps/certificatemanagercertificatemap${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "createTime": null, + "description": "sample certificate-map for creating certificate-map-entry", + "gclbTargets": [], + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectId}/locations/global/certificateMaps/certificatemanagercertificatemap${uniqueId}", + "updateTime": null +} + +--- + +DELETE https://certificatemanager.googleapis.com/v1/projects/${projectId}/locations/global/certificateMaps/certificatemanagercertificatemap${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/basic/certificatemanager/v1beta1/certificatemanagerdnsauthorization/_http.log b/pkg/test/resourcefixture/testdata/basic/certificatemanager/v1beta1/certificatemanagerdnsauthorization/_http.log new file mode 100644 index 00000000000..9e20fc84873 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/certificatemanager/v1beta1/certificatemanagerdnsauthorization/_http.log @@ -0,0 +1,131 @@ +GET https://certificatemanager.googleapis.com/v1/projects/${projectId}/locations/global/dnsAuthorizations/certificatemanagerdnsauthorization${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +404 Not Found +Content-Type: application/json + +{ + "code": 5, + "details": [], + "message": "dnsAuthorization \"projects/${projectId}/locations/global/dnsAuthorizations/certificatemanagerdnsauthorization${uniqueId}\" not found" +} + +--- + +POST https://certificatemanager.googleapis.com/v1/projects/${projectId}/locations/global/dnsAuthorizations?alt=json&dnsAuthorizationId=certificatemanagerdnsauthorization${uniqueId} +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "description": "sample dns authorization", + "domain": "${uniqueId}.hashicorptest.com", + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + } +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://certificatemanager.googleapis.com/v1/projects/${projectId}/locations/global/dnsAuthorizations/certificatemanagerdnsauthorization${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "createTime": null, + "description": "sample dns authorization", + "dnsResourceRecord": null, + "domain": "${uniqueId}.hashicorptest.com", + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectId}/locations/global/dnsAuthorizations/certificatemanagerdnsauthorization${uniqueId}", + "type": "TYPE_UNSPECIFIED", + "updateTime": null +} + +--- + +PATCH https://certificatemanager.googleapis.com/v1/projects/${projectId}/locations/global/dnsAuthorizations/certificatemanagerdnsauthorization${uniqueId}?alt=json&updateMask=description%2Clabels +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "description": "updated dns authorization", + "labels": { + "cnrm-test": "true", + "label-one": "value-one-updated", + "label-two": "value-two", + "managed-by-cnrm": "true" + } +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://certificatemanager.googleapis.com/v1/projects/${projectId}/locations/global/dnsAuthorizations/certificatemanagerdnsauthorization${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "createTime": null, + "description": "updated dns authorization", + "dnsResourceRecord": null, + "domain": "${uniqueId}.hashicorptest.com", + "labels": { + "cnrm-test": "true", + "label-one": "value-one-updated", + "label-two": "value-two", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectId}/locations/global/dnsAuthorizations/certificatemanagerdnsauthorization${uniqueId}", + "type": "TYPE_UNSPECIFIED", + "updateTime": null +} + +--- + +DELETE https://certificatemanager.googleapis.com/v1/projects/${projectId}/locations/global/dnsAuthorizations/certificatemanagerdnsauthorization${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/basic/cloudfunctions/v1beta1/cloudfunctionsfunction/httpsfunction/_http.log b/pkg/test/resourcefixture/testdata/basic/cloudfunctions/v1beta1/cloudfunctionsfunction/httpsfunction/_http.log new file mode 100644 index 00000000000..f47d0ec0fe1 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/cloudfunctions/v1beta1/cloudfunctionsfunction/httpsfunction/_http.log @@ -0,0 +1,198 @@ +GET https://cloudfunctions.googleapis.com/v1/projects/${projectId}/locations/us-west2/functions/cloudfunctionsfunction-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 + +404 Not Found +Content-Type: application/json + +{ + "code": 5, + "details": [], + "message": "cloudFunction \"projects/${projectId}/locations/us-west2/functions/cloudfunctionsfunction-${uniqueId}\" not found" +} + +--- + +POST https://cloudfunctions.googleapis.com/v1/projects/${projectId}/locations/us-west2/functions?alt=json +Content-Type: application/json +User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 + +{ + "entryPoint": "helloGET", + "httpsTrigger": { + "securityLevel": "SECURE_OPTIONAL" + }, + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectId}/locations/us-west2/functions/cloudfunctionsfunction-${uniqueId}", + "runtime": "nodejs10", + "sourceArchiveUrl": "gs://config-connector-samples/cloudfunctionsfunction/http_trigger.zip" +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://cloudfunctions.googleapis.com/v1/projects/${projectId}/locations/us-west2/functions/cloudfunctionsfunction-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "availableMemoryMb": 0, + "buildEnvironmentVariables": {}, + "buildId": "", + "buildName": "", + "buildWorkerPool": "", + "description": "", + "dockerRegistry": "DOCKER_REGISTRY_UNSPECIFIED", + "dockerRepository": "", + "entryPoint": "helloGET", + "environmentVariables": {}, + "httpsTrigger": { + "securityLevel": "SECURE_OPTIONAL", + "url": "" + }, + "ingressSettings": "INGRESS_SETTINGS_UNSPECIFIED", + "kmsKeyName": "", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "maxInstances": 0, + "minInstances": 0, + "name": "projects/${projectId}/locations/us-west2/functions/cloudfunctionsfunction-${uniqueId}", + "network": "", + "runtime": "nodejs10", + "secretEnvironmentVariables": [], + "secretVolumes": [], + "serviceAccountEmail": "", + "sourceArchiveUrl": "gs://config-connector-samples/cloudfunctionsfunction/http_trigger.zip", + "sourceToken": "", + "status": "CLOUD_FUNCTION_STATUS_UNSPECIFIED", + "timeout": null, + "updateTime": null, + "versionId": "0", + "vpcConnector": "", + "vpcConnectorEgressSettings": "VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED" +} + +--- + +PATCH https://cloudfunctions.googleapis.com/v1/projects/${projectId}/locations/us-west2/functions/cloudfunctionsfunction-${uniqueId}?alt=json&updateMask=timeout +Content-Type: application/json +User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 + +{ + "ingressSettings": "INGRESS_SETTINGS_UNSPECIFIED", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "runtime": "nodejs10", + "timeout": "120s", + "vpcConnectorEgressSettings": "VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED" +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://cloudfunctions.googleapis.com/v1/projects/${projectId}/locations/us-west2/functions/cloudfunctionsfunction-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "availableMemoryMb": 0, + "buildEnvironmentVariables": {}, + "buildId": "", + "buildName": "", + "buildWorkerPool": "", + "description": "", + "dockerRegistry": "DOCKER_REGISTRY_UNSPECIFIED", + "dockerRepository": "", + "entryPoint": "helloGET", + "environmentVariables": {}, + "httpsTrigger": { + "securityLevel": "SECURE_OPTIONAL", + "url": "" + }, + "ingressSettings": "INGRESS_SETTINGS_UNSPECIFIED", + "kmsKeyName": "", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "maxInstances": 0, + "minInstances": 0, + "name": "projects/${projectId}/locations/us-west2/functions/cloudfunctionsfunction-${uniqueId}", + "network": "", + "runtime": "nodejs10", + "secretEnvironmentVariables": [], + "secretVolumes": [], + "serviceAccountEmail": "", + "sourceArchiveUrl": "gs://config-connector-samples/cloudfunctionsfunction/http_trigger.zip", + "sourceToken": "", + "status": "CLOUD_FUNCTION_STATUS_UNSPECIFIED", + "timeout": "120s", + "updateTime": null, + "versionId": "0", + "vpcConnector": "", + "vpcConnectorEgressSettings": "VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED" +} + +--- + +DELETE https://cloudfunctions.googleapis.com/v1/projects/${projectId}/locations/us-west2/functions/cloudfunctionsfunction-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://cloudfunctions.googleapis.com/v1/projects/${projectId}/locations/us-west2/functions/cloudfunctionsfunction-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 + +404 Not Found +Content-Type: application/json + +{ + "code": 5, + "details": [], + "message": "cloudFunction \"projects/${projectId}/locations/us-west2/functions/cloudfunctionsfunction-${uniqueId}\" not found" +} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeaddress/globalcomputeaddress/_http.log b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeaddress/globalcomputeaddress/_http.log new file mode 100644 index 00000000000..b9aeff33801 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeaddress/globalcomputeaddress/_http.log @@ -0,0 +1,355 @@ +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/default?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "description": "Default network for the project", + "id": "000000000000000000000", + "kind": "compute#network", + "name": "default", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/default", + "selfLinkWithId": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/${networkID}" +} + +--- + +PATCH https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/default?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "networkFirewallPolicyEnforcementOrder": "AFTER_CLASSIC_FIREWALL" +} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "id": "000000000000000000000", + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "compute#operation", + "name": "${operationID}", + "operationType": "compute.networks.patch", + "progress": 0, + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetId": "${networkID}", + "targetLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/${networkID}" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/default?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "description": "Default network for the project", + "id": "000000000000000000000", + "kind": "compute#network", + "name": "default", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/default", + "selfLinkWithId": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/${networkID}" +} + +--- + +PATCH https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/default?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "networkFirewallPolicyEnforcementOrder": "AFTER_CLASSIC_FIREWALL" +} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "id": "000000000000000000000", + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "compute#operation", + "name": "${operationID}", + "operationType": "compute.networks.patch", + "progress": 0, + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetId": "${networkID}", + "targetLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/${networkID}" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/default?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "description": "Default network for the project", + "id": "000000000000000000000", + "kind": "compute#network", + "name": "default", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/default", + "selfLinkWithId": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/${networkID}" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses/computeaddress-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +404 Not Found +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "error": { + "code": 404, + "errors": [ + { + "domain": "global", + "message": "address \"projects/${projectId}/global/networks/computeaddress-${uniqueId}\" not found", + "reason": "notFound" + } + ], + "message": "address \"projects/${projectId}/global/networks/computeaddress-${uniqueId}\" not found", + "status": "NOT_FOUND" + } +} + +--- + +POST https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "addressType": "INTERNAL", + "description": "a test global address", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "computeaddress-${uniqueId}", + "network": "projects/${projectId}/global/networks/default", + "prefixLength": 16, + "purpose": "VPC_PEERING" +} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "id": "000000000000000000000", + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "compute#operation", + "name": "${operationID}", + "progress": 0, + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "DONE" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses/computeaddress-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "address": "8.8.8.8", + "addressType": "INTERNAL", + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "description": "a test global address", + "id": "000000000000000000000", + "kind": "compute#address", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "computeaddress-${uniqueId}", + "network": "projects/${projectId}/global/networks/default", + "prefixLength": 16, + "purpose": "VPC_PEERING", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/computeaddress-${uniqueId}" +} + +--- + +POST https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses/computeaddress-${uniqueId}/setLabels?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "labelFingerprint": "", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + } +} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "id": "000000000000000000000", + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "compute#operation", + "name": "${operationID}", + "progress": 0, + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "DONE" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses/computeaddress-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "address": "8.8.8.8", + "addressType": "INTERNAL", + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "description": "a test global address", + "id": "000000000000000000000", + "kind": "compute#address", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "computeaddress-${uniqueId}", + "network": "projects/${projectId}/global/networks/default", + "prefixLength": 16, + "purpose": "VPC_PEERING", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/computeaddress-${uniqueId}" +} + +--- + +DELETE https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses/computeaddress-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "id": "000000000000000000000", + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "compute#operation", + "name": "${operationID}", + "progress": 0, + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "DONE" +} \ No newline at end of file diff --git a/scripts/github-actions/tests-e2e-fixtures b/scripts/github-actions/tests-e2e-fixtures index 18f961758c4..cdf16c1a1c7 100755 --- a/scripts/github-actions/tests-e2e-fixtures +++ b/scripts/github-actions/tests-e2e-fixtures @@ -27,6 +27,8 @@ export KUBEBUILDER_ASSETS=$(go run sigs.k8s.io/controller-runtime/tools/setup-en echo "Running fixtures in tests/e2e..." RUN_E2E=1 \ +GOLDEN_OBJECT_CHECKS=1 \ +GOLDEN_REQUEST_CHECKS=1 \ E2E_KUBE_TARGET=envtest \ E2E_GCP_TARGET=mock \ go test -test.count=1 -timeout 3600s -v ./tests/e2e -run TestAllInSeries/fixtures \ No newline at end of file diff --git a/scripts/github-actions/tests-e2e-samples b/scripts/github-actions/tests-e2e-samples index a1e7229d9a7..71baeee10bd 100755 --- a/scripts/github-actions/tests-e2e-samples +++ b/scripts/github-actions/tests-e2e-samples @@ -27,6 +27,8 @@ export KUBEBUILDER_ASSETS=$(go run sigs.k8s.io/controller-runtime/tools/setup-en echo "Running fixtures in tests/e2e..." RUN_E2E=1 \ +GOLDEN_OBJECT_CHECKS=1 \ +GOLDEN_REQUEST_CHECKS=1 \ E2E_KUBE_TARGET=envtest \ E2E_GCP_TARGET=mock \ go test -test.count=1 -timeout 3600s -v ./tests/e2e -run TestAllInSeries/samples \ No newline at end of file