From 53be30c9ce13121a24e0acf31f436a02fb8a417c Mon Sep 17 00:00:00 2001 From: Yuwen Ma Date: Wed, 19 Jun 2024 22:13:24 +0000 Subject: [PATCH 1/3] turn on golden log check in e2e --- ...ted_object_basicalloydbcluster.golden.yaml | 51 +- .../basicalloydbcluster/_http.log | 878 +------ ...t_basicalloydbsecondarycluster.golden.yaml | 42 + .../basicalloydbsecondarycluster/_http.log | 1171 +++++++++ ...ed_object_basicalloydbinstance.golden.yaml | 5 +- .../basicalloydbinstance/_http.log | 1008 ++++++++ ..._basicalloydbsecondaryinstance.golden.yaml | 36 + .../basicalloydbsecondaryinstance/_http.log | 1294 ++++++++++ ...ted_object_fullalloydbinstance.golden.yaml | 36 + .../fullalloydbinstance/_http.log | 999 ++++++++ ...ted_object_readalloydbinstance.golden.yaml | 36 + .../readalloydbinstance/_http.log | 1152 +++++++++ ...ed_object_zonalalloydbinstance.golden.yaml | 34 + .../zonalalloydbinstance/_http.log | 931 ++++++++ ...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 | 413 +--- ...erated_object_cloudidsendpoint.golden.yaml | 33 + .../globalcomputeaddress/_http.log | 356 +++ .../regionalcomputeaddress/_http.log | 463 ++++ .../computediskfromsourcedisk/_http.log | 297 +++ .../computedisk/regionalcomputedisk/_http.log | 139 ++ .../computedisk/zonalcomputedisk/_http.log | 131 + .../globalcomputehealthcheck/_http.log | 210 ++ .../regionalcomputehealthcheck/_http.log | 214 ++ .../v1beta1/computenodegroup/_http.log | 265 ++- .../v1beta1/computenodetemplate/_http.log | 148 +- ...rated_object_containernodepool.golden.yaml | 63 + .../v1beta1/containernodepool/_http.log | 891 +++++++ .../containerattachedcluster/_http.log | 167 +- ...ed_object_edgecontainercluster.golden.yaml | 16 +- .../v1beta1/edgecontainercluster/_http.log | 837 +++++++ .../v1beta1/edgecontainernodepool/_http.log | 976 ++++++++ .../v1beta1/edgenetworknetwork/_http.log | 77 + .../v1beta1/edgenetworksubnet/_http.log | 188 ++ .../_generated_object_acmfeature.golden.yaml | 28 + .../gkehubfeature/acmfeature/_http.log | 522 ++++ .../_generated_object_mcifeature.golden.yaml | 32 + .../gkehubfeature/mcifeature/_http.log | 2116 +++++++++++++++++ .../_generated_object_mcsdfeature.golden.yaml | 28 + .../gkehubfeature/mcsdfeature/_http.log | 522 ++++ ...object_gkehubfeaturemembership.golden.yaml | 48 + .../v1beta1/gkehubfeaturemembership/_http.log | 1468 ++++++++++++ ...erated_object_gkehubmembership.golden.yaml | 38 + .../gkehub/v1beta1/gkehubmembership/_http.log | 654 +++++ .../iam/v1beta1/iamserviceaccount/_http.log | 6 - .../projectlogbucket/_http.log | 310 --- .../logmetricprojectref/_http.log | 63 + ...bject_monitoringdashboardbasic.golden.yaml | 1 + .../monitoringdashboardbasic/_http.log | 92 +- ...object_monitoringdashboardrefs.golden.yaml | 1 + .../monitoringdashboardrefs/_http.log | 92 +- ..._monitoringnotificationchannel.golden.yaml | 4 +- .../monitoringnotificationchannel/_http.log | 18 +- .../v1beta1/networkservicesmesh/_http.log | 147 ++ .../privatecacapoolbasic/_http.log | 20 +- ..._generated_object_pubsubschema.golden.yaml | 35 + .../pubsub/v1beta1/pubsubschema/_http.log | 275 --- .../_generated_object_pubsubtopic.golden.yaml | 31 + .../pubsub/v1beta1/pubsubtopic/_http.log | 370 --- ...ct_pubsublitesubscriptionbasic.golden.yaml | 30 + .../pubsublitesubscriptionbasic/_http.log | 262 ++ ...ed_object_pubsublitetopicbasic.golden.yaml | 36 + .../pubsublitetopicbasic/_http.log | 253 ++ ...d_object_pubsublitereservation.golden.yaml | 28 + .../v1beta1/pubsublitereservation/_http.log | 80 +- ...generated_object_redisinstance.golden.yaml | 48 + .../redis/v1beta1/redisinstance/_http.log | 278 +-- ...nerated_object_projectinfolder.golden.yaml | 16 +- .../v1beta1/project/projectinfolder/_http.log | 521 ++++ ..._generated_object_projectinorg.golden.yaml | 16 +- .../v1beta1/project/projectinorg/_http.log | 94 +- ...ect_projectmovedfoldertofolder.golden.yaml | 16 +- .../projectmovedfoldertofolder/_http.log | 468 ++++ ...ted_object_secretmanagersecret.golden.yaml | 35 + .../v1beta1/secretmanagersecret/_http.log | 374 +++ .../secretmanagersecretversion/_http.log | 370 +++ ...ct_servicenetworkingconnection.golden.yaml | 31 + .../servicenetworkingconnection/_http.log | 1098 +++++++++ .../service/_generated_export_service.golden | 8 + .../serviceusage/v1beta1/service/_http.log | 68 + .../v1beta1/serviceidentity/_http.log | 39 + ...nerated_object_spannerinstance.golden.yaml | 8 +- ...generated_object_mysqlinstance.golden.yaml | 69 + .../sqlinstance/mysqlinstance/_http.log | 283 +++ ...erated_object_postgresinstance.golden.yaml | 85 + .../sqlinstance/postgresinstance/_http.log | 1251 ++++++++++ ...rated_object_sqlserverinstance.golden.yaml | 74 + .../sqlinstance/sqlserverinstance/_http.log | 535 +++++ .../_generated_object_sqluser.golden.yaml | 37 + .../basic/sql/v1beta1/sqluser/_http.log | 1099 +++++++++ ...generated_object_storagebucket.golden.yaml | 19 +- .../storage/v1beta1/storagebucket/_http.log | 320 +-- ...enerated_object_tagkeyorgbasic.golden.yaml | 4 +- ...ated_object_tagkeyprojectbasic.golden.yaml | 18 +- .../tagstagkey/tagkeyprojectbasic/_http.log | 56 - ...generated_object_tagvaluebasic.golden.yaml | 31 + .../tagstagvalue/tagvaluebasic/_http.log | 330 +++ ...nerated_object_tagvalueproject.golden.yaml | 32 + .../tagstagvalue/tagvalueproject/_http.log | 106 +- ...ted_object_vertexaitensorboard.golden.yaml | 22 +- .../v1alpha1/vertexaitensorboard/_http.log | 105 +- .../vertexaidatasetbasic/_http.log | 31 - ...d_object_vertexaiendpointbasic.golden.yaml | 32 + .../vertexaiendpointbasic/_http.log | 91 - ...object_vertexaiendpointnetwork.golden.yaml | 34 + .../vertexaiendpointnetwork/_http.log | 1156 +++++++++ .../_generated_object_folderid.golden.yaml | 16 +- .../containerannotations/folderid/_http.log | 468 ++++ .../_generated_export_projectid.golden | 24 + .../_generated_object_projectid.golden.yaml | 42 + .../containerannotations/projectid/_http.log | 307 +++ ..._generated_object_forcedestroy.golden.yaml | 22 +- .../directives/forcedestroy/_http.log | 374 +++ ...d_object_removedefaultnodepool.golden.yaml | 86 + .../removedefaultnodepool/_http.log | 517 ++++ .../billingaccountiampolicy/_http.log | 70 + .../billingaccountiampolicymember/_http.log | 227 ++ .../organizationiampolicy/_http.log | 143 ++ .../organizationiampolicymember/_http.log | 480 ++++ ...rated_object_serviceaccountref.golden.yaml | 30 + .../serviceaccountref/_http.log | 356 +++ ...ated_object_serviceidentityref.golden.yaml | 30 + .../serviceidentityref/_http.log | 233 ++ ...enerated_object_sqlinstanceref.golden.yaml | 30 + .../sqlinstanceref/_http.log | 635 +++++ .../bigquerydataset/_http.log | 230 +- ...nerated_object_pubsubschema#01.golden.yaml | 36 + .../pubsubschema/_http.log | 275 --- ...erated_object_storagebucket#01.golden.yaml | 19 +- .../storagebucket/_http.log | 313 +-- ...ated_export_userspecifiedresourceid.golden | 24 + ...object_userspecifiedresourceid.golden.yaml | 41 + .../userspecifiedresourceid/_http.log | 307 +++ ...resourceidandservergeneratedid.golden.yaml | 16 +- .../_http.log | 466 ++++ ..._userspecifiedresourceidfordcl.golden.yaml | 35 + .../userspecifiedresourceidfordcl/_http.log | 259 ++ .../bigquerydataset/_http.log | 230 +- ...ed_object_clusterleveloverride.golden.yaml | 33 + .../clusterleveloverride/_http.log | 408 ++++ scripts/github-actions/tests-e2e-fixtures | 2 + scripts/github-actions/tests-e2e-samples | 2 + 152 files changed, 34279 insertions(+), 5449 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/cloudids/v1alpha1/cloudidsendpoint/_generated_object_cloudidsendpoint.golden.yaml create mode 100644 pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeaddress/globalcomputeaddress/_http.log create mode 100644 pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeaddress/regionalcomputeaddress/_http.log create mode 100644 pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computedisk/computediskfromsourcedisk/_http.log create mode 100644 pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computedisk/regionalcomputedisk/_http.log create mode 100644 pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computedisk/zonalcomputedisk/_http.log create mode 100644 pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computehealthcheck/globalcomputehealthcheck/_http.log create mode 100644 pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computehealthcheck/regionalcomputehealthcheck/_http.log create mode 100644 pkg/test/resourcefixture/testdata/basic/container/v1beta1/containernodepool/_generated_object_containernodepool.golden.yaml create mode 100644 pkg/test/resourcefixture/testdata/basic/container/v1beta1/containernodepool/_http.log create mode 100644 pkg/test/resourcefixture/testdata/basic/edgecontainer/v1beta1/edgecontainercluster/_http.log create mode 100644 pkg/test/resourcefixture/testdata/basic/edgecontainer/v1beta1/edgecontainernodepool/_http.log create mode 100644 pkg/test/resourcefixture/testdata/basic/edgenetwork/v1beta1/edgenetworknetwork/_http.log create mode 100644 pkg/test/resourcefixture/testdata/basic/edgenetwork/v1beta1/edgenetworksubnet/_http.log create mode 100644 pkg/test/resourcefixture/testdata/basic/gkehub/v1beta1/gkehubfeature/acmfeature/_generated_object_acmfeature.golden.yaml create mode 100644 pkg/test/resourcefixture/testdata/basic/gkehub/v1beta1/gkehubfeature/acmfeature/_http.log create mode 100644 pkg/test/resourcefixture/testdata/basic/gkehub/v1beta1/gkehubfeature/mcifeature/_generated_object_mcifeature.golden.yaml create mode 100644 pkg/test/resourcefixture/testdata/basic/gkehub/v1beta1/gkehubfeature/mcifeature/_http.log create mode 100644 pkg/test/resourcefixture/testdata/basic/gkehub/v1beta1/gkehubfeature/mcsdfeature/_generated_object_mcsdfeature.golden.yaml create mode 100644 pkg/test/resourcefixture/testdata/basic/gkehub/v1beta1/gkehubfeature/mcsdfeature/_http.log create mode 100644 pkg/test/resourcefixture/testdata/basic/gkehub/v1beta1/gkehubfeaturemembership/_generated_object_gkehubfeaturemembership.golden.yaml create mode 100644 pkg/test/resourcefixture/testdata/basic/gkehub/v1beta1/gkehubfeaturemembership/_http.log create mode 100644 pkg/test/resourcefixture/testdata/basic/gkehub/v1beta1/gkehubmembership/_generated_object_gkehubmembership.golden.yaml create mode 100644 pkg/test/resourcefixture/testdata/basic/gkehub/v1beta1/gkehubmembership/_http.log create mode 100644 pkg/test/resourcefixture/testdata/basic/networkservices/v1beta1/networkservicesmesh/_http.log create mode 100644 pkg/test/resourcefixture/testdata/basic/pubsub/v1beta1/pubsubschema/_generated_object_pubsubschema.golden.yaml create mode 100644 pkg/test/resourcefixture/testdata/basic/pubsub/v1beta1/pubsubtopic/_generated_object_pubsubtopic.golden.yaml create mode 100644 pkg/test/resourcefixture/testdata/basic/pubsublite/v1alpha1/pubsublitesubscription/pubsublitesubscriptionbasic/_generated_object_pubsublitesubscriptionbasic.golden.yaml create mode 100644 pkg/test/resourcefixture/testdata/basic/pubsublite/v1alpha1/pubsublitesubscription/pubsublitesubscriptionbasic/_http.log create mode 100644 pkg/test/resourcefixture/testdata/basic/pubsublite/v1alpha1/pubsublitetopic/pubsublitetopicbasic/_generated_object_pubsublitetopicbasic.golden.yaml create mode 100644 pkg/test/resourcefixture/testdata/basic/pubsublite/v1alpha1/pubsublitetopic/pubsublitetopicbasic/_http.log create mode 100644 pkg/test/resourcefixture/testdata/basic/pubsublite/v1beta1/pubsublitereservation/_generated_object_pubsublitereservation.golden.yaml create mode 100644 pkg/test/resourcefixture/testdata/basic/redis/v1beta1/redisinstance/_generated_object_redisinstance.golden.yaml create mode 100644 pkg/test/resourcefixture/testdata/basic/resourcemanager/v1beta1/project/projectinfolder/_http.log create mode 100644 pkg/test/resourcefixture/testdata/basic/resourcemanager/v1beta1/project/projectmovedfoldertofolder/_http.log create mode 100644 pkg/test/resourcefixture/testdata/basic/secretmanager/v1beta1/secretmanagersecret/_generated_object_secretmanagersecret.golden.yaml create mode 100644 pkg/test/resourcefixture/testdata/basic/secretmanager/v1beta1/secretmanagersecret/_http.log create mode 100644 pkg/test/resourcefixture/testdata/basic/secretmanager/v1beta1/secretmanagersecretversion/_http.log create mode 100644 pkg/test/resourcefixture/testdata/basic/servicenetworking/v1beta1/servicenetworkingconnection/_generated_object_servicenetworkingconnection.golden.yaml create mode 100644 pkg/test/resourcefixture/testdata/basic/servicenetworking/v1beta1/servicenetworkingconnection/_http.log create mode 100644 pkg/test/resourcefixture/testdata/basic/serviceusage/v1beta1/service/_generated_export_service.golden create mode 100644 pkg/test/resourcefixture/testdata/basic/serviceusage/v1beta1/service/_http.log create mode 100644 pkg/test/resourcefixture/testdata/basic/serviceusage/v1beta1/serviceidentity/_http.log create mode 100644 pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/mysqlinstance/_generated_object_mysqlinstance.golden.yaml create mode 100644 pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/mysqlinstance/_http.log create mode 100644 pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/postgresinstance/_generated_object_postgresinstance.golden.yaml create mode 100644 pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/postgresinstance/_http.log create mode 100644 pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlserverinstance/_generated_object_sqlserverinstance.golden.yaml create mode 100644 pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlserverinstance/_http.log create mode 100644 pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqluser/_generated_object_sqluser.golden.yaml create mode 100644 pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqluser/_http.log create mode 100644 pkg/test/resourcefixture/testdata/basic/tags/v1beta1/tagstagvalue/tagvaluebasic/_generated_object_tagvaluebasic.golden.yaml create mode 100644 pkg/test/resourcefixture/testdata/basic/tags/v1beta1/tagstagvalue/tagvaluebasic/_http.log create mode 100644 pkg/test/resourcefixture/testdata/basic/tags/v1beta1/tagstagvalue/tagvalueproject/_generated_object_tagvalueproject.golden.yaml create mode 100644 pkg/test/resourcefixture/testdata/basic/vertexai/v1beta1/vertexaiendpoint/vertexaiendpointbasic/_generated_object_vertexaiendpointbasic.golden.yaml create mode 100644 pkg/test/resourcefixture/testdata/basic/vertexai/v1beta1/vertexaiendpoint/vertexaiendpointnetwork/_generated_object_vertexaiendpointnetwork.golden.yaml create mode 100644 pkg/test/resourcefixture/testdata/basic/vertexai/v1beta1/vertexaiendpoint/vertexaiendpointnetwork/_http.log create mode 100644 pkg/test/resourcefixture/testdata/containerannotations/folderid/_http.log create mode 100644 pkg/test/resourcefixture/testdata/containerannotations/projectid/_generated_export_projectid.golden create mode 100644 pkg/test/resourcefixture/testdata/containerannotations/projectid/_generated_object_projectid.golden.yaml create mode 100644 pkg/test/resourcefixture/testdata/containerannotations/projectid/_http.log create mode 100644 pkg/test/resourcefixture/testdata/directives/forcedestroy/_http.log create mode 100644 pkg/test/resourcefixture/testdata/directives/removedefaultnodepool/_generated_object_removedefaultnodepool.golden.yaml create mode 100644 pkg/test/resourcefixture/testdata/directives/removedefaultnodepool/_http.log create mode 100644 pkg/test/resourcefixture/testdata/iamexternalonlyref/billingaccountiampolicy/_http.log create mode 100644 pkg/test/resourcefixture/testdata/iamexternalonlyref/billingaccountiampolicymember/_http.log create mode 100644 pkg/test/resourcefixture/testdata/iamexternalonlyref/organizationiampolicy/_http.log create mode 100644 pkg/test/resourcefixture/testdata/iamexternalonlyref/organizationiampolicymember/_http.log create mode 100644 pkg/test/resourcefixture/testdata/iammemberreferences/serviceaccountref/_generated_object_serviceaccountref.golden.yaml create mode 100644 pkg/test/resourcefixture/testdata/iammemberreferences/serviceaccountref/_http.log create mode 100644 pkg/test/resourcefixture/testdata/iammemberreferences/serviceidentityref/_generated_object_serviceidentityref.golden.yaml create mode 100644 pkg/test/resourcefixture/testdata/iammemberreferences/serviceidentityref/_http.log create mode 100644 pkg/test/resourcefixture/testdata/iammemberreferences/sqlinstanceref/_generated_object_sqlinstanceref.golden.yaml create mode 100644 pkg/test/resourcefixture/testdata/iammemberreferences/sqlinstanceref/_http.log create mode 100644 pkg/test/resourcefixture/testdata/reconcileintervalannotations/pubsubschema/_generated_object_pubsubschema#01.golden.yaml create mode 100644 pkg/test/resourcefixture/testdata/resourceid/userspecifiedresourceid/_generated_export_userspecifiedresourceid.golden create mode 100644 pkg/test/resourcefixture/testdata/resourceid/userspecifiedresourceid/_generated_object_userspecifiedresourceid.golden.yaml create mode 100644 pkg/test/resourcefixture/testdata/resourceid/userspecifiedresourceid/_http.log create mode 100644 pkg/test/resourcefixture/testdata/resourceid/userspecifiedresourceidandservergeneratedid/_http.log create mode 100644 pkg/test/resourcefixture/testdata/resourceid/userspecifiedresourceidfordcl/_generated_object_userspecifiedresourceidfordcl.golden.yaml create mode 100644 pkg/test/resourcefixture/testdata/resourceid/userspecifiedresourceidfordcl/_http.log create mode 100644 pkg/test/resourcefixture/testdata/stateabsentinspec/clusterleveloverride/_generated_object_clusterleveloverride.golden.yaml create mode 100644 pkg/test/resourcefixture/testdata/stateabsentinspec/clusterleveloverride/_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 da0ed9222e..6efbca68e1 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 d2e74b16b2..443ec5af72 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 @@ -1,4 +1,4 @@ -GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/default?alt=json +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}?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 @@ -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" - ] + "name": "${networkID}", + "selfLink": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}", + "selfLinkWithId": "https://www.googleapis.com/compute/beta/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/${networkID}?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,27 @@ 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://www.googleapis.com/compute/beta/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetId": "${networkID}", + "targetLink": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}", + "user": "user@example.com" } --- -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/${networkID}?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 +77,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": "${networkID}", + "selfLink": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}", + "selfLinkWithId": "https://www.googleapis.com/compute/beta/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/${networkID}?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 +108,23 @@ 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://www.googleapis.com/compute/beta/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetId": "${networkID}", + "targetLink": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}", + "user": "user@example.com" } --- -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/${networkID}?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 +140,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": "${networkID}", + "selfLink": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}", + "selfLinkWithId": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}" } --- @@ -318,164 +155,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/${networkID}" + } +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" } --- @@ -485,80 +203,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/${networkID}" }, + "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 +251,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 +265,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/${networkID}" } } 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 +287,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/${networkID}" }, + "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 +341,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 0000000000..e2957fd64b --- /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 0000000000..2b29b09b6a --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbcluster/basicalloydbsecondarycluster/_http.log @@ -0,0 +1,1171 @@ +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}?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": "The resource 'projects/${projectId}/global/networks/computenetwork-${uniqueId}' was not found", + "reason": "notFound" + } + ], + "message": "The resource 'projects/${projectId}/global/networks/computenetwork-${uniqueId}' was 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://www.googleapis.com/compute/beta/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetId": "${networkID}", + "targetLink": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "user": "user@example.com" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}?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://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "selfLinkWithId": "https://www.googleapis.com/compute/beta/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" + } +} + +--- + +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": "10.1.2.3", + "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": "10.1.2.3", + "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/${networkID}/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://www.googleapis.com/compute/beta/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/${networkID}?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://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "selfLinkWithId": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}" +} + +--- + +DELETE https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}?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://www.googleapis.com/compute/beta/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetId": "${networkID}", + "targetLink": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "user": "user@example.com" +} \ 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 a3cced1c36..7fdbb18683 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 0000000000..6fd60a2d7b --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbinstance/basicalloydbinstance/_http.log @@ -0,0 +1,1008 @@ +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}?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": "The resource 'projects/${projectId}/global/networks/computenetwork-${uniqueId}' was not found", + "reason": "notFound" + } + ], + "message": "The resource 'projects/${projectId}/global/networks/computenetwork-${uniqueId}' was 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://www.googleapis.com/compute/beta/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetId": "${networkID}", + "targetLink": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "user": "user@example.com" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}?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://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "selfLinkWithId": "https://www.googleapis.com/compute/beta/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" + } +} + +--- + +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": "10.1.2.3", + "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": "10.1.2.3", + "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/${networkID}/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://www.googleapis.com/compute/beta/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/${networkID}?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://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "selfLinkWithId": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}" +} + +--- + +DELETE https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}?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://www.googleapis.com/compute/beta/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetId": "${networkID}", + "targetLink": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "user": "user@example.com" +} \ 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 0000000000..0770d96fc2 --- /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 0000000000..da8a1deae2 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbinstance/basicalloydbsecondaryinstance/_http.log @@ -0,0 +1,1294 @@ +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}?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": "The resource 'projects/${projectId}/global/networks/computenetwork-${uniqueId}' was not found", + "reason": "notFound" + } + ], + "message": "The resource 'projects/${projectId}/global/networks/computenetwork-${uniqueId}' was 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://www.googleapis.com/compute/beta/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetId": "${networkID}", + "targetLink": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "user": "user@example.com" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}?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://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "selfLinkWithId": "https://www.googleapis.com/compute/beta/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" + } +} + +--- + +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": "10.1.2.3", + "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": "10.1.2.3", + "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": "10.1.2.3", + "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": "10.1.2.3", + "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/${networkID}/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://www.googleapis.com/compute/beta/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/${networkID}?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://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "selfLinkWithId": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}" +} + +--- + +DELETE https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}?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://www.googleapis.com/compute/beta/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetId": "${networkID}", + "targetLink": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "user": "user@example.com" +} \ 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 0000000000..5c755fc9c4 --- /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 0000000000..40f209d5a7 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbinstance/fullalloydbinstance/_http.log @@ -0,0 +1,999 @@ +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}?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": "The resource 'projects/${projectId}/global/networks/computenetwork-${uniqueId}' was not found", + "reason": "notFound" + } + ], + "message": "The resource 'projects/${projectId}/global/networks/computenetwork-${uniqueId}' was 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://www.googleapis.com/compute/beta/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetId": "${networkID}", + "targetLink": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "user": "user@example.com" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}?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://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "selfLinkWithId": "https://www.googleapis.com/compute/beta/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" + } +} + +--- + +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": "10.1.2.3", + "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": "10.1.2.3", + "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/${networkID}/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://www.googleapis.com/compute/beta/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/${networkID}?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://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "selfLinkWithId": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}" +} + +--- + +DELETE https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}?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://www.googleapis.com/compute/beta/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetId": "${networkID}", + "targetLink": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "user": "user@example.com" +} \ 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 0000000000..6928ccb304 --- /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 0000000000..a59e42597c --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbinstance/readalloydbinstance/_http.log @@ -0,0 +1,1152 @@ +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}?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": "The resource 'projects/${projectId}/global/networks/computenetwork${uniqueId}' was not found", + "reason": "notFound" + } + ], + "message": "The resource 'projects/${projectId}/global/networks/computenetwork${uniqueId}' was 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://www.googleapis.com/compute/beta/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetId": "${networkID}", + "targetLink": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork${uniqueId}", + "user": "user@example.com" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}?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://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork${uniqueId}", + "selfLinkWithId": "https://www.googleapis.com/compute/beta/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" + } +} + +--- + +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": "10.1.2.3", + "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": "10.1.2.3", + "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": "10.1.2.3", + "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": "10.1.2.3", + "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/${networkID}/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://www.googleapis.com/compute/beta/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/${networkID}?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://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork${uniqueId}", + "selfLinkWithId": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}" +} + +--- + +DELETE https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}?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://www.googleapis.com/compute/beta/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetId": "${networkID}", + "targetLink": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork${uniqueId}", + "user": "user@example.com" +} \ 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 0000000000..e7ba2fa5a7 --- /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 0000000000..2adb166aa1 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/alloydb/v1beta1/alloydbinstance/zonalalloydbinstance/_http.log @@ -0,0 +1,931 @@ +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}?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": "The resource 'projects/${projectId}/global/networks/computenetwork-${uniqueId}' was not found", + "reason": "notFound" + } + ], + "message": "The resource 'projects/${projectId}/global/networks/computenetwork-${uniqueId}' was 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://www.googleapis.com/compute/beta/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetId": "${networkID}", + "targetLink": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "user": "user@example.com" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}?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://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "selfLinkWithId": "https://www.googleapis.com/compute/beta/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" + } +} + +--- + +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": "10.1.2.3", + "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/${networkID}/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://www.googleapis.com/compute/beta/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/${networkID}?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://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "selfLinkWithId": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}" +} + +--- + +DELETE https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}?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://www.googleapis.com/compute/beta/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetId": "${networkID}", + "targetLink": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "user": "user@example.com" +} \ 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 45bc0737de..87ee249f1a 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 0000000000..b8b2388a0b --- /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 0000000000..8562a65ef6 --- /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 01c8be8591..dd53037c0e 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 2a97bf4c24..e955a3353f 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 087d9a4d70..28d595a03c 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 0000000000..ca4f50c302 --- /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 0000000000..485fe99503 --- /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 0000000000..e3f64685d5 --- /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 0000000000..dfd35facce --- /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 0000000000..9e20fc8487 --- /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 index d095e24759..f47d0ec0fe 100644 --- a/pkg/test/resourcefixture/testdata/basic/cloudfunctions/v1beta1/cloudfunctionsfunction/httpsfunction/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/cloudfunctions/v1beta1/cloudfunctionsfunction/httpsfunction/_http.log @@ -13,36 +13,6 @@ Content-Type: application/json --- -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" -} - ---- - -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 @@ -122,345 +92,29 @@ Grpc-Metadata-Content-Type: application/grpc --- -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" -} - ---- - -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" -} - ---- - -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" -} - ---- - -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" -} - ---- - -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" -} - ---- - -GET https://cloudfunctions.googleapis.com/v1/projects/${projectId}/locations/us-west2/functions/cloudfunctionsfunction-${uniqueId}?alt=json +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 -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": "", + "timeout": "120s", "vpcConnectorEgressSettings": "VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED" } ---- - -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" + "done": true, + "metadata": null, + "name": "${operationID}" } --- @@ -505,7 +159,7 @@ Grpc-Metadata-Content-Type: application/grpc "sourceArchiveUrl": "gs://config-connector-samples/cloudfunctionsfunction/http_trigger.zip", "sourceToken": "", "status": "CLOUD_FUNCTION_STATUS_UNSPECIFIED", - "timeout": null, + "timeout": "120s", "updateTime": null, "versionId": "0", "vpcConnector": "", @@ -514,21 +168,10 @@ Grpc-Metadata-Content-Type: application/grpc --- -PATCH https://cloudfunctions.googleapis.com/v1/projects/${projectId}/locations/us-west2/functions/cloudfunctionsfunction-${uniqueId}?alt=json&updateMask=timeout +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 -{ - "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 @@ -545,45 +188,11 @@ GET https://cloudfunctions.googleapis.com/v1/projects/${projectId}/locations/us- Content-Type: application/json User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 -200 OK +404 Not Found 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" + "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/cloudids/v1alpha1/cloudidsendpoint/_generated_object_cloudidsendpoint.golden.yaml b/pkg/test/resourcefixture/testdata/basic/cloudids/v1alpha1/cloudidsendpoint/_generated_object_cloudidsendpoint.golden.yaml new file mode 100644 index 0000000000..a50a4d7431 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/cloudids/v1alpha1/cloudidsendpoint/_generated_object_cloudidsendpoint.golden.yaml @@ -0,0 +1,33 @@ +apiVersion: cloudids.cnrm.cloud.google.com/v1alpha1 +kind: CloudIDSEndpoint +metadata: + annotations: + cnrm.cloud.google.com/management-conflict-prevention-policy: none + cnrm.cloud.google.com/state-into-spec: absent + finalizers: + - cnrm.cloud.google.com/finalizer + - cnrm.cloud.google.com/deletion-defender + generation: 3 + labels: + cnrm-test: "true" + name: cloudidsendpoint-${uniqueId} + namespace: ${uniqueId} +spec: + location: us-west2-a + networkRef: + external: computenetwork-${uniqueId} + projectRef: + external: ${projectId} + resourceID: cloudidsendpoint-${uniqueId} + severity: INFORMATIONAL + threatExceptions: + - "123" +status: + conditions: + - lastTransitionTime: "1970-01-01T00:00:00Z" + message: The resource is up to date + reason: UpToDate + status: "True" + type: Ready + observedGeneration: 3 + updateTime: "1970-01-01T00:00:00Z" 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 0000000000..a37b90444f --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeaddress/globalcomputeaddress/_http.log @@ -0,0 +1,356 @@ +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}?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": "${networkID}", + "selfLink": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}", + "selfLinkWithId": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}" +} + +--- + +PATCH https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}?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://www.googleapis.com/compute/beta/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetId": "${networkID}", + "targetLink": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}", + "user": "user@example.com" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}?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": "${networkID}", + "selfLink": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}", + "selfLinkWithId": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}" +} + +--- + +PATCH https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}?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://www.googleapis.com/compute/beta/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetId": "${networkID}", + "targetLink": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}", + "user": "user@example.com" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}?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": "${networkID}", + "selfLink": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}", + "selfLinkWithId": "https://www.googleapis.com/compute/beta/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" + } +} + +--- + +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/${networkID}", + "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/${networkID}", + "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/${networkID}", + "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/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeaddress/regionalcomputeaddress/_http.log b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeaddress/regionalcomputeaddress/_http.log new file mode 100644 index 0000000000..f73d82b50b --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeaddress/regionalcomputeaddress/_http.log @@ -0,0 +1,463 @@ +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/${subnetworkID}?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": "${subnetworkID}", + "selfLink": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/${subnetworkID}", + "selfLinkWithId": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}" +} + +--- + +PATCH https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/${subnetworkID}?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://www.googleapis.com/compute/beta/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetId": "${networkID}", + "targetLink": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/${subnetworkID}", + "user": "user@example.com" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/${subnetworkID}?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": "${subnetworkID}", + "selfLink": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/${subnetworkID}", + "selfLinkWithId": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}" +} + +--- + +PATCH https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/${subnetworkID}?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://www.googleapis.com/compute/beta/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetId": "${networkID}", + "targetLink": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/${subnetworkID}", + "user": "user@example.com" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/${subnetworkID}?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": "${subnetworkID}", + "selfLink": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/${subnetworkID}", + "selfLinkWithId": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/regions/us-central1/subnetworks/${subnetworkID}?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": "The resource 'projects/${projectId}/regions/us-central1/subnetworks/${subnetworkID}' was not found", + "reason": "notFound" + } + ], + "message": "The resource 'projects/${projectId}/regions/us-central1/subnetworks/${subnetworkID}' was not found" + } +} + +--- + +POST https://compute.googleapis.com/compute/beta/projects/${projectId}/regions/us-central1/subnetworks?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 + +{ + "ipCidrRange": "10.128.0.0/20", + "logConfig": { + "enable": false + }, + "name": "${subnetworkID}", + "network": "projects/${projectId}/global/networks/${subnetworkID}", + "region": "projects/${projectId}/global/regions/us-central1" +} + +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, + "region": "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/us-central1", + "selfLink": "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/us-central1/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetId": "${subnetworkNumber}", + "targetLink": "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/us-central1/subnetworks/${subnetworkID}", + "user": "user@example.com" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/regions/us-central1/subnetworks/${subnetworkID}?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", + "enableFlowLogs": false, + "fingerprint": "abcdef0123A=", + "gatewayAddress": "10.2.0.1", + "id": "000000000000000000000", + "ipCidrRange": "10.128.0.0/20", + "kind": "compute#subnetwork", + "logConfig": { + "enable": false + }, + "name": "${subnetworkID}", + "network": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/${subnetworkID}", + "privateIpGoogleAccess": false, + "privateIpv6GoogleAccess": "DISABLE_GOOGLE_ACCESS", + "purpose": "PRIVATE", + "region": "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/us-central1", + "selfLink": "https://www.googleapis.com/compute/beta/projects/${projectId}/regions/us-central1/subnetworks/${subnetworkID}", + "stackType": "IPV4_ONLY" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/regions/us-central1/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}/regions/us-central1/networks/computeaddress-${uniqueId}\" not found", + "reason": "notFound" + } + ], + "message": "address \"projects/${projectId}/regions/us-central1/networks/computeaddress-${uniqueId}\" not found" + } +} + +--- + +POST https://compute.googleapis.com/compute/beta/projects/${projectId}/regions/us-central1/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 address", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "computeaddress-${uniqueId}", + "region": "projects/${projectId}/global/regions/us-central1", + "subnetwork": "projects/${projectId}/regions/us-central1/subnetworks/${subnetworkID}" +} + +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}/regions/us-central1/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 + +{ + "addressType": "INTERNAL", + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "description": "a test address", + "id": "000000000000000000000", + "kind": "compute#address", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "computeaddress-${uniqueId}", + "region": "projects/${projectId}/global/regions/us-central1", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/regions/us-central1/networks/computeaddress-${uniqueId}", + "subnetwork": "projects/${projectId}/regions/us-central1/subnetworks/${subnetworkID}" +} + +--- + +POST https://compute.googleapis.com/compute/beta/projects/${projectId}/regions/us-central1/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}/regions/us-central1/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 + +{ + "addressType": "INTERNAL", + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "description": "a test address", + "id": "000000000000000000000", + "kind": "compute#address", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "computeaddress-${uniqueId}", + "region": "projects/${projectId}/global/regions/us-central1", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/regions/us-central1/networks/computeaddress-${uniqueId}", + "subnetwork": "projects/${projectId}/regions/us-central1/subnetworks/${subnetworkID}" +} + +--- + +DELETE https://compute.googleapis.com/compute/beta/projects/${projectId}/regions/us-central1/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/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computedisk/computediskfromsourcedisk/_http.log b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computedisk/computediskfromsourcedisk/_http.log new file mode 100644 index 0000000000..0585766a5a --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computedisk/computediskfromsourcedisk/_http.log @@ -0,0 +1,297 @@ +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/zones/us-central1-a/disks/computedisk-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 +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": "disk \"projects/${projectId}/zones/us-central1-a/disks/computedisk-2-${uniqueId}\" not found", + "reason": "notFound" + } + ], + "message": "disk \"projects/${projectId}/zones/us-central1-a/disks/computedisk-2-${uniqueId}\" not found" + } +} + +--- + +POST https://compute.googleapis.com/compute/beta/projects/${projectId}/zones/us-central1-a/disks?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 + +{ + "description": "an example disk without reference", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "computedisk-2-${uniqueId}", + "type": "projects/${projectId}/zones/us-central1-a/diskTypes/pd-standard", + "zone": "projects/${projectId}/global/zones/us-central1-a" +} + +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}/zones/us-central1-a/disks/computedisk-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 +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": "an example disk without reference", + "id": "000000000000000000000", + "kind": "compute#disk", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "computedisk-2-${uniqueId}", + "physicalBlockSizeBytes": "4096", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/zones/us-central1-a/disks/computedisk-2-${uniqueId}", + "status": "READY", + "type": "projects/${projectId}/zones/us-central1-a/diskTypes/pd-standard", + "zone": "https://www.googleapis.com/compute/v1/projects/${projectId}/zones/us-central1-a" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/zones/us-central1-a/disks/computedisk-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 +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": "disk \"projects/${projectId}/zones/us-central1-a/disks/computedisk-1-${uniqueId}\" not found", + "reason": "notFound" + } + ], + "message": "disk \"projects/${projectId}/zones/us-central1-a/disks/computedisk-1-${uniqueId}\" not found" + } +} + +--- + +POST https://compute.googleapis.com/compute/beta/projects/${projectId}/zones/us-central1-a/disks?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 + +{ + "description": "an example disk from source disk", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "computedisk-1-${uniqueId}", + "sourceDisk": "https://compute.googleapis.com/compute/v1/projects/${projectId}/zones/us-central1-a/disks/computedisk-2-${uniqueId}", + "type": "projects/${projectId}/zones/us-central1-a/diskTypes/pd-standard", + "zone": "projects/${projectId}/global/zones/us-central1-a" +} + +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}/zones/us-central1-a/disks/computedisk-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 +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": "an example disk from source disk", + "id": "000000000000000000000", + "kind": "compute#disk", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "computedisk-1-${uniqueId}", + "physicalBlockSizeBytes": "4096", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/zones/us-central1-a/disks/computedisk-1-${uniqueId}", + "sourceDisk": "https://compute.googleapis.com/compute/v1/projects/${projectId}/zones/us-central1-a/disks/computedisk-2-${uniqueId}", + "status": "READY", + "type": "projects/${projectId}/zones/us-central1-a/diskTypes/pd-standard", + "zone": "https://www.googleapis.com/compute/v1/projects/${projectId}/zones/us-central1-a" +} + +--- + +DELETE https://compute.googleapis.com/compute/beta/projects/${projectId}/zones/us-central1-a/disks/computedisk-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 +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}/zones/us-central1-a/disks/computedisk-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 +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": "an example disk without reference", + "id": "000000000000000000000", + "kind": "compute#disk", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "computedisk-2-${uniqueId}", + "physicalBlockSizeBytes": "4096", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/zones/us-central1-a/disks/computedisk-2-${uniqueId}", + "status": "READY", + "type": "projects/${projectId}/zones/us-central1-a/diskTypes/pd-standard", + "zone": "https://www.googleapis.com/compute/v1/projects/${projectId}/zones/us-central1-a" +} + +--- + +DELETE https://compute.googleapis.com/compute/beta/projects/${projectId}/zones/us-central1-a/disks/computedisk-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 +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/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computedisk/regionalcomputedisk/_http.log b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computedisk/regionalcomputedisk/_http.log new file mode 100644 index 0000000000..edd93698fb --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computedisk/regionalcomputedisk/_http.log @@ -0,0 +1,139 @@ +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/regions/us-central1/disks/computedisk-${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": "disk \"projects/${projectId}/regions/us-central1/disks/computedisk-${uniqueId}\" not found", + "reason": "notFound" + } + ], + "message": "disk \"projects/${projectId}/regions/us-central1/disks/computedisk-${uniqueId}\" not found" + } +} + +--- + +POST https://compute.googleapis.com/compute/beta/projects/${projectId}/regions/us-central1/disks?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 + +{ + "description": "a sample regional disk", + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "name": "computedisk-${uniqueId}", + "region": "projects/${projectId}/global/regions/us-central1", + "replicaZones": [ + "projects/${projectId}/global/zones/us-central1-a", + "projects/${projectId}/global/zones/us-central1-f" + ], + "type": "projects/${projectId}/regions/us-central1/diskTypes/pd-standard" +} + +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}/regions/us-central1/disks/computedisk-${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 + +{ + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "description": "a sample regional disk", + "id": "000000000000000000000", + "kind": "compute#disk", + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "name": "computedisk-${uniqueId}", + "physicalBlockSizeBytes": "4096", + "region": "https://www.googleapis.com/compute/v1/projects/${projectId}/regions/us-central1", + "replicaZones": [ + "projects/${projectId}/global/zones/us-central1-a", + "projects/${projectId}/global/zones/us-central1-f" + ], + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/regions/us-central1/disks/computedisk-${uniqueId}", + "status": "READY", + "type": "projects/${projectId}/regions/us-central1/diskTypes/pd-standard" +} + +--- + +DELETE https://compute.googleapis.com/compute/beta/projects/${projectId}/regions/us-central1/disks/computedisk-${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/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computedisk/zonalcomputedisk/_http.log b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computedisk/zonalcomputedisk/_http.log new file mode 100644 index 0000000000..0eb41711e5 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computedisk/zonalcomputedisk/_http.log @@ -0,0 +1,131 @@ +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/zones/us-central1-a/disks/computedisk-${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": "disk \"projects/${projectId}/zones/us-central1-a/disks/computedisk-${uniqueId}\" not found", + "reason": "notFound" + } + ], + "message": "disk \"projects/${projectId}/zones/us-central1-a/disks/computedisk-${uniqueId}\" not found" + } +} + +--- + +POST https://compute.googleapis.com/compute/beta/projects/${projectId}/zones/us-central1-a/disks?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 + +{ + "description": "an example disk without reference", + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "name": "computedisk-${uniqueId}", + "type": "projects/${projectId}/zones/us-central1-a/diskTypes/pd-standard", + "zone": "projects/${projectId}/global/zones/us-central1-a" +} + +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}/zones/us-central1-a/disks/computedisk-${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 + +{ + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "description": "an example disk without reference", + "id": "000000000000000000000", + "kind": "compute#disk", + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "name": "computedisk-${uniqueId}", + "physicalBlockSizeBytes": "4096", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/zones/us-central1-a/disks/computedisk-${uniqueId}", + "status": "READY", + "type": "projects/${projectId}/zones/us-central1-a/diskTypes/pd-standard", + "zone": "https://www.googleapis.com/compute/v1/projects/${projectId}/zones/us-central1-a" +} + +--- + +DELETE https://compute.googleapis.com/compute/beta/projects/${projectId}/zones/us-central1-a/disks/computedisk-${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/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computehealthcheck/globalcomputehealthcheck/_http.log b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computehealthcheck/globalcomputehealthcheck/_http.log new file mode 100644 index 0000000000..6079d9bb48 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computehealthcheck/globalcomputehealthcheck/_http.log @@ -0,0 +1,210 @@ +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/healthChecks/computehealthcheck-${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": "healthCheck \"projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}\" not found", + "reason": "notFound" + } + ], + "message": "healthCheck \"projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}\" not found" + } +} + +--- + +POST https://compute.googleapis.com/compute/beta/projects/${projectId}/global/healthChecks?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 + +{ + "checkIntervalSec": 10, + "healthyThreshold": 2, + "name": "computehealthcheck-${uniqueId}", + "tcpHealthCheck": { + "port": 80, + "proxyHeader": "NONE" + }, + "timeoutSec": 5, + "type": "TCP", + "unhealthyThreshold": 2 +} + +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/healthChecks/computehealthcheck-${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 + +{ + "checkIntervalSec": 10, + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "healthyThreshold": 2, + "id": "000000000000000000000", + "kind": "compute#healthCheck", + "name": "computehealthcheck-${uniqueId}", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}", + "tcpHealthCheck": { + "port": 80, + "proxyHeader": "NONE" + }, + "timeoutSec": 5, + "type": "TCP", + "unhealthyThreshold": 2 +} + +--- + +PUT https://compute.googleapis.com/compute/beta/projects/${projectId}/global/healthChecks/computehealthcheck-${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 + +{ + "checkIntervalSec": 15, + "description": "", + "healthyThreshold": 2, + "logConfig": {}, + "name": "computehealthcheck-${uniqueId}", + "tcpHealthCheck": { + "port": 88, + "proxyHeader": "NONE" + }, + "timeoutSec": 5, + "type": "TCP", + "unhealthyThreshold": 2 +} + +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/healthChecks/computehealthcheck-${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 + +{ + "checkIntervalSec": 15, + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "description": "", + "healthyThreshold": 2, + "id": "000000000000000000000", + "kind": "compute#healthCheck", + "logConfig": {}, + "name": "computehealthcheck-${uniqueId}", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}", + "tcpHealthCheck": { + "port": 88, + "proxyHeader": "NONE" + }, + "timeoutSec": 5, + "type": "TCP", + "unhealthyThreshold": 2 +} + +--- + +DELETE https://compute.googleapis.com/compute/beta/projects/${projectId}/global/healthChecks/computehealthcheck-${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/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computehealthcheck/regionalcomputehealthcheck/_http.log b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computehealthcheck/regionalcomputehealthcheck/_http.log new file mode 100644 index 0000000000..fd95e8dbde --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computehealthcheck/regionalcomputehealthcheck/_http.log @@ -0,0 +1,214 @@ +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/regions/us-central1/healthChecks/computehealthcheck-${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": "healthCheck \"projects/${projectId}/regions/us-central1/healthChecks/computehealthcheck-${uniqueId}\" not found", + "reason": "notFound" + } + ], + "message": "healthCheck \"projects/${projectId}/regions/us-central1/healthChecks/computehealthcheck-${uniqueId}\" not found" + } +} + +--- + +POST https://compute.googleapis.com/compute/beta/projects/${projectId}/regions/us-central1/healthChecks?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 + +{ + "checkIntervalSec": 10, + "healthyThreshold": 2, + "name": "computehealthcheck-${uniqueId}", + "region": "projects/${projectId}/global/regions/us-central1", + "tcpHealthCheck": { + "port": 80, + "proxyHeader": "NONE" + }, + "timeoutSec": 5, + "type": "TCP", + "unhealthyThreshold": 2 +} + +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}/regions/us-central1/healthChecks/computehealthcheck-${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 + +{ + "checkIntervalSec": 10, + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "healthyThreshold": 2, + "id": "000000000000000000000", + "kind": "compute#healthCheck", + "name": "computehealthcheck-${uniqueId}", + "region": "projects/${projectId}/global/regions/us-central1", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/regions/us-central1/healthChecks/computehealthcheck-${uniqueId}", + "tcpHealthCheck": { + "port": 80, + "proxyHeader": "NONE" + }, + "timeoutSec": 5, + "type": "TCP", + "unhealthyThreshold": 2 +} + +--- + +PUT https://compute.googleapis.com/compute/beta/projects/${projectId}/regions/us-central1/healthChecks/computehealthcheck-${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 + +{ + "checkIntervalSec": 15, + "description": "", + "healthyThreshold": 2, + "logConfig": {}, + "name": "computehealthcheck-${uniqueId}", + "region": "projects/${projectId}/global/regions/us-central1", + "tcpHealthCheck": { + "port": 88, + "proxyHeader": "NONE" + }, + "timeoutSec": 5, + "type": "TCP", + "unhealthyThreshold": 2 +} + +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}/regions/us-central1/healthChecks/computehealthcheck-${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 + +{ + "checkIntervalSec": 15, + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "description": "", + "healthyThreshold": 2, + "id": "000000000000000000000", + "kind": "compute#healthCheck", + "logConfig": {}, + "name": "computehealthcheck-${uniqueId}", + "region": "projects/${projectId}/global/regions/us-central1", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/regions/us-central1/healthChecks/computehealthcheck-${uniqueId}", + "tcpHealthCheck": { + "port": 88, + "proxyHeader": "NONE" + }, + "timeoutSec": 5, + "type": "TCP", + "unhealthyThreshold": 2 +} + +--- + +DELETE https://compute.googleapis.com/compute/beta/projects/${projectId}/regions/us-central1/healthChecks/computehealthcheck-${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/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computenodegroup/_http.log b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computenodegroup/_http.log index cba7b013b3..65f153a288 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computenodegroup/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computenodegroup/_http.log @@ -1,6 +1,37 @@ +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/regions/us-central1/nodeTemplates/computenodetemplate-${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": "nodeTemplate \"projects/${projectId}/regions/us-central1/nodeTemplates/computenodetemplate-${uniqueId}\" not found", + "reason": "notFound" + } + ], + "message": "nodeTemplate \"projects/${projectId}/regions/us-central1/nodeTemplates/computenodetemplate-${uniqueId}\" not found" + } +} + +--- + POST https://compute.googleapis.com/compute/beta/projects/${projectId}/regions/us-central1/nodeTemplates?alt=json Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/dev +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager { "cpuOvercommitType": "NONE", @@ -17,61 +48,47 @@ User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 t } 200 OK -Content-Type: application/json -Grpc-Metadata-Content-Type: application/grpc - -{ - "name": "${operationId}", - "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationId}", - "status": "DONE", - "warnings": [] -} - ---- - -GET https://compute.googleapis.com/compute/beta/projects/${projectId}/regions/us-central1/nodeTemplates/computenodetemplate-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/dev - -200 OK -Content-Type: application/json -Grpc-Metadata-Content-Type: application/grpc +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 { - "accelerators": [], - "cpuOvercommitType": "NONE", - "creationTimestamp": "2024-04-01T12:34:56.123456Z", - "disks": [], "id": "000000000000000000000", - "kind": "compute#nodetemplate", - "name": "computenodetemplate-${uniqueId}", - "nodeAffinityLabels": { - "cnrm-test": "true", - "managed-by-cnrm": "true" - }, - "nodeTypeFlexibility": { - "cpus": "any", - "memory": "any" - }, - "region": "projects/${projectId}/global/regions/us-central1", - "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/regions/us-central1/nodeTemplates/computenodetemplate-${uniqueId}" + "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}/regions/us-central1/nodeTemplates/computenodetemplate-${uniqueId}?alt=json Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/dev +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 +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 { - "accelerators": [], "cpuOvercommitType": "NONE", "creationTimestamp": "2024-04-01T12:34:56.123456Z", - "disks": [], "id": "000000000000000000000", "kind": "compute#nodetemplate", "name": "computenodetemplate-${uniqueId}", @@ -89,85 +106,88 @@ Grpc-Metadata-Content-Type: application/grpc --- -POST https://compute.googleapis.com/compute/beta/projects/${projectId}/zones/us-central1-b/nodeGroups?alt=json&initialNodeCount=1 -Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/dev - -{ - "description": "A single sole-tenant node in the us-central1-b zone.", - "maintenancePolicy": "DEFAULT", - "name": "computenodegroup-${uniqueId}", - "nodeTemplate": "projects/${projectId}/regions/us-central1/nodeTemplates/computenodetemplate-${uniqueId}", - "size": 1, - "zone": "projects/${projectId}/global/zones/us-central1-b" -} - -200 OK +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/zones/us-central1-b/nodeGroups/computenodegroup-${uniqueId}?alt=json Content-Type: application/json -Grpc-Metadata-Content-Type: application/grpc +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 { - "name": "${operationId}", - "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationId}", - "status": "DONE", - "warnings": [] + "error": { + "code": 404, + "errors": [ + { + "domain": "global", + "message": "nodeGroup \"projects/${projectId}/zones/us-central1-b/nodeGroups/computenodegroup-${uniqueId}\" not found", + "reason": "notFound" + } + ], + "message": "nodeGroup \"projects/${projectId}/zones/us-central1-b/nodeGroups/computenodegroup-${uniqueId}\" not found" + } } --- -GET https://compute.googleapis.com/compute/beta/projects/${projectId}/zones/us-central1-b/nodeGroups/computenodegroup-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/dev - -200 OK +POST https://compute.googleapis.com/compute/beta/projects/${projectId}/zones/us-central1-b/nodeGroups?alt=json&initialNodeCount=1 Content-Type: application/json -Grpc-Metadata-Content-Type: application/grpc +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager { - "creationTimestamp": "2024-04-01T12:34:56.123456Z", "description": "A single sole-tenant node in the us-central1-b zone.", - "id": "000000000000000000000", - "kind": "compute#nodegroup", "maintenancePolicy": "DEFAULT", "name": "computenodegroup-${uniqueId}", "nodeTemplate": "projects/${projectId}/regions/us-central1/nodeTemplates/computenodetemplate-${uniqueId}", - "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/zones/us-central1-b/nodeGroups/computenodegroup-${uniqueId}", "size": 1, "zone": "projects/${projectId}/global/zones/us-central1-b" } ---- - -GET https://compute.googleapis.com/compute/beta/projects/${projectId}/zones/us-central1-b/nodeGroups/computenodegroup-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/dev - 200 OK -Content-Type: application/json -Grpc-Metadata-Content-Type: application/grpc +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": "A single sole-tenant node in the us-central1-b zone.", "id": "000000000000000000000", - "kind": "compute#nodegroup", - "maintenancePolicy": "DEFAULT", - "name": "computenodegroup-${uniqueId}", - "nodeTemplate": "projects/${projectId}/regions/us-central1/nodeTemplates/computenodetemplate-${uniqueId}", - "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/zones/us-central1-b/nodeGroups/computenodegroup-${uniqueId}", - "size": 1, - "zone": "projects/${projectId}/global/zones/us-central1-b" + "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}/zones/us-central1-b/nodeGroups/computenodegroup-${uniqueId}?alt=json Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/dev +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 +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", @@ -186,34 +206,50 @@ Grpc-Metadata-Content-Type: application/grpc DELETE https://compute.googleapis.com/compute/beta/projects/${projectId}/zones/us-central1-b/nodeGroups/computenodegroup-${uniqueId}?alt=json Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/dev +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 +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": "${operationId}", - "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationId}", - "status": "DONE", - "warnings": [] + "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}/regions/us-central1/nodeTemplates/computenodetemplate-${uniqueId}?alt=json Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/dev +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 +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 { - "accelerators": [], "cpuOvercommitType": "NONE", "creationTimestamp": "2024-04-01T12:34:56.123456Z", - "disks": [], "id": "000000000000000000000", "kind": "compute#nodetemplate", "name": "computenodetemplate-${uniqueId}", @@ -233,15 +269,26 @@ Grpc-Metadata-Content-Type: application/grpc DELETE https://compute.googleapis.com/compute/beta/projects/${projectId}/regions/us-central1/nodeTemplates/computenodetemplate-${uniqueId}?alt=json Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/dev +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 +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": "${operationId}", - "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationId}", - "status": "DONE", - "warnings": [] + "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/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computenodetemplate/_http.log b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computenodetemplate/_http.log index d1e07b02ba..ce7745b66a 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computenodetemplate/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computenodetemplate/_http.log @@ -1,52 +1,41 @@ -POST https://compute.googleapis.com/compute/beta/projects/${projectId}/regions/us-central1/nodeTemplates?alt=json -Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/dev - -{ - "cpuOvercommitType": "NONE", - "description": "Node template for sole tenant nodes running in us-central1, with 96vCPUs and any amount of memory on any machine type.", - "name": "computenodetemplate-${uniqueId}", - "nodeAffinityLabels": { - "cnrm-test": "true", - "managed-by-cnrm": "true", - "memory_guarantee": "false" - }, - "nodeTypeFlexibility": { - "cpus": "96", - "memory": "any" - }, - "region": "projects/${projectId}/global/regions/us-central1" -} - -200 OK +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/regions/us-central1/nodeTemplates/computenodetemplate-${uniqueId}?alt=json Content-Type: application/json -Grpc-Metadata-Content-Type: application/grpc +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 { - "name": "${operationId}", - "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationId}", - "status": "DONE", - "warnings": [] + "error": { + "code": 404, + "errors": [ + { + "domain": "global", + "message": "nodeTemplate \"projects/${projectId}/regions/us-central1/nodeTemplates/computenodetemplate-${uniqueId}\" not found", + "reason": "notFound" + } + ], + "message": "nodeTemplate \"projects/${projectId}/regions/us-central1/nodeTemplates/computenodetemplate-${uniqueId}\" not found" + } } --- -GET https://compute.googleapis.com/compute/beta/projects/${projectId}/regions/us-central1/nodeTemplates/computenodetemplate-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/dev - -200 OK +POST https://compute.googleapis.com/compute/beta/projects/${projectId}/regions/us-central1/nodeTemplates?alt=json Content-Type: application/json -Grpc-Metadata-Content-Type: application/grpc +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager { - "accelerators": [], "cpuOvercommitType": "NONE", - "creationTimestamp": "2024-04-01T12:34:56.123456Z", "description": "Node template for sole tenant nodes running in us-central1, with 96vCPUs and any amount of memory on any machine type.", - "disks": [], - "id": "000000000000000000000", - "kind": "compute#nodetemplate", "name": "computenodetemplate-${uniqueId}", "nodeAffinityLabels": { "cnrm-test": "true", @@ -57,58 +46,52 @@ Grpc-Metadata-Content-Type: application/grpc "cpus": "96", "memory": "any" }, - "region": "projects/${projectId}/global/regions/us-central1", - "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/regions/us-central1/nodeTemplates/computenodetemplate-${uniqueId}" + "region": "projects/${projectId}/global/regions/us-central1" } ---- - -GET https://compute.googleapis.com/compute/beta/projects/${projectId}/regions/us-central1/nodeTemplates/computenodetemplate-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/dev - 200 OK -Content-Type: application/json -Grpc-Metadata-Content-Type: application/grpc +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 { - "accelerators": [], - "cpuOvercommitType": "NONE", - "creationTimestamp": "2024-04-01T12:34:56.123456Z", - "description": "Node template for sole tenant nodes running in us-central1, with 96vCPUs and any amount of memory on any machine type.", - "disks": [], "id": "000000000000000000000", - "kind": "compute#nodetemplate", - "name": "computenodetemplate-${uniqueId}", - "nodeAffinityLabels": { - "cnrm-test": "true", - "managed-by-cnrm": "true", - "memory_guarantee": "false" - }, - "nodeTypeFlexibility": { - "cpus": "96", - "memory": "any" - }, - "region": "projects/${projectId}/global/regions/us-central1", - "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/regions/us-central1/nodeTemplates/computenodetemplate-${uniqueId}" + "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}/regions/us-central1/nodeTemplates/computenodetemplate-${uniqueId}?alt=json Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/dev +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 +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 { - "accelerators": [], "cpuOvercommitType": "NONE", "creationTimestamp": "2024-04-01T12:34:56.123456Z", "description": "Node template for sole tenant nodes running in us-central1, with 96vCPUs and any amount of memory on any machine type.", - "disks": [], "id": "000000000000000000000", "kind": "compute#nodetemplate", "name": "computenodetemplate-${uniqueId}", @@ -129,15 +112,26 @@ Grpc-Metadata-Content-Type: application/grpc DELETE https://compute.googleapis.com/compute/beta/projects/${projectId}/regions/us-central1/nodeTemplates/computenodetemplate-${uniqueId}?alt=json Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/dev +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 +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": "${operationId}", - "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationId}", - "status": "DONE", - "warnings": [] + "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/pkg/test/resourcefixture/testdata/basic/container/v1beta1/containernodepool/_generated_object_containernodepool.golden.yaml b/pkg/test/resourcefixture/testdata/basic/container/v1beta1/containernodepool/_generated_object_containernodepool.golden.yaml new file mode 100644 index 0000000000..4ed75bfc0b --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/container/v1beta1/containernodepool/_generated_object_containernodepool.golden.yaml @@ -0,0 +1,63 @@ +apiVersion: container.cnrm.cloud.google.com/v1beta1 +kind: ContainerNodePool +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: nodepool-sample-${uniqueId} + namespace: ${uniqueId} +spec: + autoscaling: + maxNodeCount: 5 + minNodeCount: 1 + clusterRef: + name: cluster-sample-${uniqueId} + initialNodeCount: 1 + location: us-central1-a + management: + autoRepair: true + autoUpgrade: true + maxPodsPerNode: 110 + nodeConfig: + diskSizeGb: 100 + diskType: pd-balanced + imageType: COS_CONTAINERD + loggingVariant: DEFAULT + machineType: e2-standard-4 + metadata: + disable-legacy-endpoints: "true" + oauthScopes: + - https://www.googleapis.com/auth/monitoring + - https://www.googleapis.com/auth/service.management.readonly + - https://www.googleapis.com/auth/servicecontrol + - https://www.googleapis.com/auth/trace.append + - https://www.googleapis.com/auth/devstorage.read_only + - https://www.googleapis.com/auth/logging.write + serviceAccountRef: + external: default + shieldedInstanceConfig: + enableIntegrityMonitoring: true + nodeCount: 0 + resourceID: nodepool-sample-${uniqueId} + upgradeSettings: + maxSurge: 1 + strategy: SURGE + version: "" +status: + conditions: + - lastTransitionTime: "1970-01-01T00:00:00Z" + message: The resource is up to date + reason: UpToDate + status: "True" + type: Ready + observedGeneration: 3 + observedState: + version: "" diff --git a/pkg/test/resourcefixture/testdata/basic/container/v1beta1/containernodepool/_http.log b/pkg/test/resourcefixture/testdata/basic/container/v1beta1/containernodepool/_http.log new file mode 100644 index 0000000000..8e1e1cf6fb --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/container/v1beta1/containernodepool/_http.log @@ -0,0 +1,891 @@ +GET https://container.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1-a/clusters/cluster-sample-${uniqueId}?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 + +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": "cluster \"projects/${projectId}/locations/us-central1-a/clusters/cluster-sample-${uniqueId}\" not found", + "reason": "notFound" + } + ], + "message": "cluster \"projects/${projectId}/locations/us-central1-a/clusters/cluster-sample-${uniqueId}\" not found", + "status": "NOT_FOUND" + } +} + +--- + +POST https://container.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1-a/clusters?alt=json&prettyPrint=false +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 + +{ + "cluster": { + "autopilot": { + "enabled": false + }, + "autoscaling": { + "enableNodeAutoprovisioning": false + }, + "binaryAuthorization": { + "enabled": false + }, + "initialNodeCount": 1, + "ipAllocationPolicy": { + "stackType": "IPV4", + "useIpAliases": false + }, + "legacyAbac": { + "enabled": false + }, + "loggingService": "logging.googleapis.com/kubernetes", + "maintenancePolicy": { + "window": {} + }, + "masterAuthorizedNetworksConfig": {}, + "monitoringService": "monitoring.googleapis.com/kubernetes", + "name": "cluster-sample-${uniqueId}", + "network": "projects/${projectId}/global/networks/default", + "networkConfig": {}, + "networkPolicy": {}, + "nodeConfig": { + "oauthScopes": [ + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/logging.write", + "https://www.googleapis.com/auth/monitoring", + "https://www.googleapis.com/auth/service.management.readonly", + "https://www.googleapis.com/auth/servicecontrol", + "https://www.googleapis.com/auth/trace.append" + ] + }, + "notificationConfig": { + "pubsub": {} + }, + "resourceLabels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "shieldedNodes": { + "enabled": 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 + +{ + "name": "${operationID}", + "operationType": "CREATE_CLUSTER", + "selfLink": "https://container.googleapis.com/v1beta1/projects/${projectNumber}/locations/us-central1-a/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetLink": "https://container.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1-a/clusters/cluster-sample-${uniqueId}", + "zone": "us-central1-a" +} + +--- + +GET https://container.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1-a/clusters/cluster-sample-${uniqueId}?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 + +{ + "addonsConfig": { + "gcePersistentDiskCsiDriverConfig": { + "enabled": true + }, + "kubernetesDashboard": { + "disabled": true + }, + "networkPolicyConfig": { + "disabled": true + } + }, + "autopilot": {}, + "autoscaling": { + "autoscalingProfile": "BALANCED" + }, + "binaryAuthorization": {}, + "clusterTelemetry": { + "type": "ENABLED" + }, + "createTime": "2024-04-01T12:34:56.123456Z", + "databaseEncryption": { + "state": "DECRYPTED" + }, + "enterpriseConfig": { + "clusterTier": "STANDARD" + }, + "initialNodeCount": 1, + "ipAllocationPolicy": { + "stackType": "IPV4" + }, + "legacyAbac": {}, + "location": "us-central1-a", + "locations": [ + "us-central1-a" + ], + "loggingConfig": { + "componentConfig": { + "enableComponents": [ + "SYSTEM_COMPONENTS", + "WORKLOADS" + ] + } + }, + "loggingService": "logging.googleapis.com/kubernetes", + "maintenancePolicy": { + "window": {} + }, + "masterAuthorizedNetworksConfig": {}, + "monitoringConfig": { + "advancedDatapathObservabilityConfig": {}, + "componentConfig": { + "enableComponents": [ + "SYSTEM_COMPONENTS" + ] + }, + "managedPrometheusConfig": { + "enabled": true + } + }, + "monitoringService": "monitoring.googleapis.com/kubernetes", + "name": "cluster-sample-${uniqueId}", + "network": "projects/${projectId}/global/networks/default", + "networkConfig": { + "network": "projects/${projectId}/global/networks/default", + "subnetwork": "projects/${projectId}/regions/us-central1-a/subnetworks/default" + }, + "networkPolicy": {}, + "nodeConfig": { + "oauthScopes": [ + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/logging.write", + "https://www.googleapis.com/auth/monitoring", + "https://www.googleapis.com/auth/service.management.readonly", + "https://www.googleapis.com/auth/servicecontrol", + "https://www.googleapis.com/auth/trace.append" + ] + }, + "nodePools": [ + { + "config": { + "diskSizeGb": 100, + "diskType": "pd-balanced", + "imageType": "COS_CONTAINERD", + "machineType": "e2-standard-4", + "metadata": { + "disable-legacy-endpoints": "true" + }, + "oauthScopes": [ + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/logging.write", + "https://www.googleapis.com/auth/monitoring", + "https://www.googleapis.com/auth/service.management.readonly", + "https://www.googleapis.com/auth/servicecontrol", + "https://www.googleapis.com/auth/trace.append" + ], + "serviceAccount": "default", + "shieldedInstanceConfig": { + "enableIntegrityMonitoring": true + }, + "windowsNodeConfig": {} + }, + "initialNodeCount": 1, + "locations": [ + "us-central1-a" + ], + "management": { + "autoRepair": true, + "autoUpgrade": true + }, + "maxPodsConstraint": { + "maxPodsPerNode": "110" + }, + "name": "default-pool", + "networkConfig": { + "enablePrivateNodes": false + }, + "status": "RUNNING", + "upgradeSettings": { + "maxSurge": 1, + "strategy": "SURGE" + } + } + ], + "notificationConfig": { + "pubsub": {} + }, + "releaseChannel": { + "channel": "REGULAR" + }, + "resourceLabels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "securityPostureConfig": { + "mode": "BASIC", + "vulnerabilityMode": "VULNERABILITY_MODE_UNSPECIFIED" + }, + "selfLink": "https://container.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1-a/clusters/cluster-sample-${uniqueId}", + "shieldedNodes": { + "enabled": true + }, + "status": "RUNNING" +} + +--- + +GET https://container.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1-a/clusters/cluster-sample-${uniqueId}/nodePools/nodepool-sample-${uniqueId}?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 + +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": "nodePool \"projects/${projectId}/locations/us-central1-a/clusters/cluster-sample-${uniqueId}/nodePools/nodepool-sample-${uniqueId}\" not found", + "reason": "notFound" + } + ], + "message": "nodePool \"projects/${projectId}/locations/us-central1-a/clusters/cluster-sample-${uniqueId}/nodePools/nodepool-sample-${uniqueId}\" not found", + "status": "NOT_FOUND" + } +} + +--- + +POST https://container.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1-a/clusters/cluster-sample-${uniqueId}/nodePools?alt=json&prettyPrint=false +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 + +{ + "nodePool": { + "autoscaling": { + "enabled": true, + "maxNodeCount": 3, + "minNodeCount": 1, + "totalMaxNodeCount": 0, + "totalMinNodeCount": 0 + }, + "config": { + "oauthScopes": [ + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/logging.write", + "https://www.googleapis.com/auth/monitoring", + "https://www.googleapis.com/auth/service.management.readonly", + "https://www.googleapis.com/auth/servicecontrol", + "https://www.googleapis.com/auth/trace.append" + ] + }, + "name": "nodepool-sample-${uniqueId}", + "networkConfig": {} + } +} + +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": "${operationID}", + "operationType": "CREATE_NODE_POOL", + "selfLink": "https://container.googleapis.com/v1beta1/projects/${projectNumber}/locations/us-central1-a/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "zone": "us-central1-a" +} + +--- + +GET https://container.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1-a/clusters/cluster-sample-${uniqueId}/nodePools/nodepool-sample-${uniqueId}?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 + +{ + "autoscaling": { + "enabled": true, + "maxNodeCount": 3, + "minNodeCount": 1 + }, + "config": { + "diskSizeGb": 100, + "diskType": "pd-balanced", + "imageType": "COS_CONTAINERD", + "machineType": "e2-standard-4", + "metadata": { + "disable-legacy-endpoints": "true" + }, + "oauthScopes": [ + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/logging.write", + "https://www.googleapis.com/auth/monitoring", + "https://www.googleapis.com/auth/service.management.readonly", + "https://www.googleapis.com/auth/servicecontrol", + "https://www.googleapis.com/auth/trace.append" + ], + "serviceAccount": "default", + "shieldedInstanceConfig": { + "enableIntegrityMonitoring": true + }, + "windowsNodeConfig": {} + }, + "initialNodeCount": 1, + "management": { + "autoRepair": true, + "autoUpgrade": true + }, + "maxPodsConstraint": { + "maxPodsPerNode": "110" + }, + "name": "nodepool-sample-${uniqueId}", + "networkConfig": { + "enablePrivateNodes": false + }, + "status": "RUNNING", + "upgradeSettings": { + "maxSurge": 1, + "strategy": "SURGE" + } +} + +--- + +PUT https://container.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1-a/clusters/cluster-sample-${uniqueId}?alt=json&prettyPrint=false +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 + +{ + "update": { + "desiredNodePoolAutoscaling": { + "enabled": true, + "maxNodeCount": 5, + "minNodeCount": 1, + "totalMinNodeCount": 0 + }, + "desiredNodePoolId": "nodepool-sample-${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": "${operationID}", + "operationType": "UPDATE_CLUSTER", + "selfLink": "https://container.googleapis.com/v1beta1/projects/${projectNumber}/locations/us-central1-a/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetLink": "https://container.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1-a/clusters/cluster-sample-${uniqueId}", + "zone": "us-central1-a" +} + +--- + +GET https://container.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1-a/clusters/cluster-sample-${uniqueId}?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 + +{ + "addonsConfig": { + "gcePersistentDiskCsiDriverConfig": { + "enabled": true + }, + "kubernetesDashboard": { + "disabled": true + }, + "networkPolicyConfig": { + "disabled": true + } + }, + "autopilot": {}, + "autoscaling": { + "autoscalingProfile": "BALANCED" + }, + "binaryAuthorization": {}, + "clusterTelemetry": { + "type": "ENABLED" + }, + "createTime": "2024-04-01T12:34:56.123456Z", + "databaseEncryption": { + "state": "DECRYPTED" + }, + "enterpriseConfig": { + "clusterTier": "STANDARD" + }, + "initialNodeCount": 1, + "ipAllocationPolicy": { + "stackType": "IPV4" + }, + "legacyAbac": {}, + "location": "us-central1-a", + "locations": [ + "us-central1-a" + ], + "loggingConfig": { + "componentConfig": { + "enableComponents": [ + "SYSTEM_COMPONENTS", + "WORKLOADS" + ] + } + }, + "loggingService": "logging.googleapis.com/kubernetes", + "maintenancePolicy": { + "window": {} + }, + "masterAuthorizedNetworksConfig": {}, + "monitoringConfig": { + "advancedDatapathObservabilityConfig": {}, + "componentConfig": { + "enableComponents": [ + "SYSTEM_COMPONENTS" + ] + }, + "managedPrometheusConfig": { + "enabled": true + } + }, + "monitoringService": "monitoring.googleapis.com/kubernetes", + "name": "cluster-sample-${uniqueId}", + "network": "projects/${projectId}/global/networks/default", + "networkConfig": { + "network": "projects/${projectId}/global/networks/default", + "subnetwork": "projects/${projectId}/regions/us-central1-a/subnetworks/default" + }, + "networkPolicy": {}, + "nodeConfig": { + "oauthScopes": [ + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/logging.write", + "https://www.googleapis.com/auth/monitoring", + "https://www.googleapis.com/auth/service.management.readonly", + "https://www.googleapis.com/auth/servicecontrol", + "https://www.googleapis.com/auth/trace.append" + ] + }, + "nodePools": [ + { + "config": { + "diskSizeGb": 100, + "diskType": "pd-balanced", + "imageType": "COS_CONTAINERD", + "machineType": "e2-standard-4", + "metadata": { + "disable-legacy-endpoints": "true" + }, + "oauthScopes": [ + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/logging.write", + "https://www.googleapis.com/auth/monitoring", + "https://www.googleapis.com/auth/service.management.readonly", + "https://www.googleapis.com/auth/servicecontrol", + "https://www.googleapis.com/auth/trace.append" + ], + "serviceAccount": "default", + "shieldedInstanceConfig": { + "enableIntegrityMonitoring": true + }, + "windowsNodeConfig": {} + }, + "initialNodeCount": 1, + "locations": [ + "us-central1-a" + ], + "management": { + "autoRepair": true, + "autoUpgrade": true + }, + "maxPodsConstraint": { + "maxPodsPerNode": "110" + }, + "name": "default-pool", + "networkConfig": { + "enablePrivateNodes": false + }, + "status": "RUNNING", + "upgradeSettings": { + "maxSurge": 1, + "strategy": "SURGE" + } + } + ], + "notificationConfig": { + "pubsub": {} + }, + "releaseChannel": { + "channel": "REGULAR" + }, + "resourceLabels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "securityPostureConfig": { + "mode": "BASIC", + "vulnerabilityMode": "VULNERABILITY_MODE_UNSPECIFIED" + }, + "selfLink": "https://container.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1-a/clusters/cluster-sample-${uniqueId}", + "shieldedNodes": { + "enabled": true + }, + "status": "RUNNING" +} + +--- + +GET https://container.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1-a/clusters/cluster-sample-${uniqueId}/nodePools/nodepool-sample-${uniqueId}?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 + +{ + "autoscaling": { + "enabled": true, + "maxNodeCount": 5, + "minNodeCount": 1 + }, + "config": { + "diskSizeGb": 100, + "diskType": "pd-balanced", + "imageType": "COS_CONTAINERD", + "machineType": "e2-standard-4", + "metadata": { + "disable-legacy-endpoints": "true" + }, + "oauthScopes": [ + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/logging.write", + "https://www.googleapis.com/auth/monitoring", + "https://www.googleapis.com/auth/service.management.readonly", + "https://www.googleapis.com/auth/servicecontrol", + "https://www.googleapis.com/auth/trace.append" + ], + "serviceAccount": "default", + "shieldedInstanceConfig": { + "enableIntegrityMonitoring": true + }, + "windowsNodeConfig": {} + }, + "initialNodeCount": 1, + "management": { + "autoRepair": true, + "autoUpgrade": true + }, + "maxPodsConstraint": { + "maxPodsPerNode": "110" + }, + "name": "nodepool-sample-${uniqueId}", + "networkConfig": { + "enablePrivateNodes": false + }, + "status": "RUNNING", + "upgradeSettings": { + "maxSurge": 1, + "strategy": "SURGE" + } +} + +--- + +DELETE https://container.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1-a/clusters/cluster-sample-${uniqueId}/nodePools/nodepool-sample-${uniqueId}?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 + +{ + "name": "${operationID}", + "operationType": "DELETE_NODE_POOL", + "selfLink": "https://container.googleapis.com/v1beta1/projects/${projectNumber}/locations/us-central1-a/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "zone": "us-central1-a" +} + +--- + +GET https://container.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1-a/clusters/cluster-sample-${uniqueId}?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 + +{ + "addonsConfig": { + "gcePersistentDiskCsiDriverConfig": { + "enabled": true + }, + "kubernetesDashboard": { + "disabled": true + }, + "networkPolicyConfig": { + "disabled": true + } + }, + "autopilot": {}, + "autoscaling": { + "autoscalingProfile": "BALANCED" + }, + "binaryAuthorization": {}, + "clusterTelemetry": { + "type": "ENABLED" + }, + "createTime": "2024-04-01T12:34:56.123456Z", + "databaseEncryption": { + "state": "DECRYPTED" + }, + "enterpriseConfig": { + "clusterTier": "STANDARD" + }, + "initialNodeCount": 1, + "ipAllocationPolicy": { + "stackType": "IPV4" + }, + "legacyAbac": {}, + "location": "us-central1-a", + "locations": [ + "us-central1-a" + ], + "loggingConfig": { + "componentConfig": { + "enableComponents": [ + "SYSTEM_COMPONENTS", + "WORKLOADS" + ] + } + }, + "loggingService": "logging.googleapis.com/kubernetes", + "maintenancePolicy": { + "window": {} + }, + "masterAuthorizedNetworksConfig": {}, + "monitoringConfig": { + "advancedDatapathObservabilityConfig": {}, + "componentConfig": { + "enableComponents": [ + "SYSTEM_COMPONENTS" + ] + }, + "managedPrometheusConfig": { + "enabled": true + } + }, + "monitoringService": "monitoring.googleapis.com/kubernetes", + "name": "cluster-sample-${uniqueId}", + "network": "projects/${projectId}/global/networks/default", + "networkConfig": { + "network": "projects/${projectId}/global/networks/default", + "subnetwork": "projects/${projectId}/regions/us-central1-a/subnetworks/default" + }, + "networkPolicy": {}, + "nodeConfig": { + "oauthScopes": [ + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/logging.write", + "https://www.googleapis.com/auth/monitoring", + "https://www.googleapis.com/auth/service.management.readonly", + "https://www.googleapis.com/auth/servicecontrol", + "https://www.googleapis.com/auth/trace.append" + ] + }, + "nodePools": [ + { + "config": { + "diskSizeGb": 100, + "diskType": "pd-balanced", + "imageType": "COS_CONTAINERD", + "machineType": "e2-standard-4", + "metadata": { + "disable-legacy-endpoints": "true" + }, + "oauthScopes": [ + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/logging.write", + "https://www.googleapis.com/auth/monitoring", + "https://www.googleapis.com/auth/service.management.readonly", + "https://www.googleapis.com/auth/servicecontrol", + "https://www.googleapis.com/auth/trace.append" + ], + "serviceAccount": "default", + "shieldedInstanceConfig": { + "enableIntegrityMonitoring": true + }, + "windowsNodeConfig": {} + }, + "initialNodeCount": 1, + "locations": [ + "us-central1-a" + ], + "management": { + "autoRepair": true, + "autoUpgrade": true + }, + "maxPodsConstraint": { + "maxPodsPerNode": "110" + }, + "name": "default-pool", + "networkConfig": { + "enablePrivateNodes": false + }, + "status": "RUNNING", + "upgradeSettings": { + "maxSurge": 1, + "strategy": "SURGE" + } + } + ], + "notificationConfig": { + "pubsub": {} + }, + "releaseChannel": { + "channel": "REGULAR" + }, + "resourceLabels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "securityPostureConfig": { + "mode": "BASIC", + "vulnerabilityMode": "VULNERABILITY_MODE_UNSPECIFIED" + }, + "selfLink": "https://container.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1-a/clusters/cluster-sample-${uniqueId}", + "shieldedNodes": { + "enabled": true + }, + "status": "RUNNING" +} + +--- + +DELETE https://container.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1-a/clusters/cluster-sample-${uniqueId}?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 + +{ + "name": "${operationID}", + "operationType": "DELETE_CLUSTER", + "selfLink": "https://container.googleapis.com/v1beta1/projects/${projectNumber}/locations/us-central1-a/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetLink": "https://container.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1-a/clusters/cluster-sample-${uniqueId}", + "zone": "us-central1-a" +} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/basic/containerattached/v1beta1/containerattachedcluster/_http.log b/pkg/test/resourcefixture/testdata/basic/containerattached/v1beta1/containerattachedcluster/_http.log index dce342ac3c..18aa5eb65b 100644 --- a/pkg/test/resourcefixture/testdata/basic/containerattached/v1beta1/containerattachedcluster/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/containerattached/v1beta1/containerattachedcluster/_http.log @@ -1,6 +1,5 @@ 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/dev -X-Goog-Api-Client: gl-go/1.21.5 gdcl/0.139.0 +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 @@ -23,12 +22,18 @@ X-Xss-Protection: 0 --- GET https://cloudbilling.googleapis.com/v1/projects/${projectId}/billingInfo?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/dev -X-Goog-Api-Client: gl-go/1.21.5 gdcl/0.139.0 +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 -Content-Type: application/json -Grpc-Metadata-Content-Type: application/grpc +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 { "billingAccountName": "", @@ -40,8 +45,7 @@ Grpc-Metadata-Content-Type: application/grpc --- 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/dev -X-Goog-Api-Client: gl-go/1.21.5 gdcl/0.139.0 +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 @@ -65,8 +69,7 @@ X-Xss-Protection: 0 PUT https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}?alt=json&prettyPrint=false 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/dev -X-Goog-Api-Client: gl-go/1.21.5 gdcl/0.139.0 +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 { "createTime": "2024-04-01T12:34:56.123456Z", @@ -99,8 +102,7 @@ X-Xss-Protection: 0 PUT https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}?alt=json&prettyPrint=false 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/dev -X-Goog-Api-Client: gl-go/1.21.5 gdcl/0.139.0 +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 { "createTime": "2024-04-01T12:34:56.123456Z", @@ -137,8 +139,7 @@ X-Xss-Protection: 0 PUT https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}?alt=json&prettyPrint=false 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/dev -X-Goog-Api-Client: gl-go/1.21.5 gdcl/0.139.0 +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 { "createTime": "2024-04-01T12:34:56.123456Z", @@ -178,8 +179,7 @@ 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/dev -X-Goog-Api-Client: gl-go/1.21.5 gdcl/0.139.0 +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 @@ -207,12 +207,18 @@ X-Xss-Protection: 0 --- GET https://cloudbilling.googleapis.com/v1/projects/${projectId}/billingInfo?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/dev -X-Goog-Api-Client: gl-go/1.21.5 gdcl/0.139.0 +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 -Content-Type: application/json -Grpc-Metadata-Content-Type: application/grpc +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 { "billingAccountName": "", @@ -223,9 +229,24 @@ Grpc-Metadata-Content-Type: application/grpc --- +GET https://us-west1-gkemulticloud.googleapis.com/v1/projects/${projectId}/locations/us-west1/attachedClusters/kcc-attached-cluster-127?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": "attachedCluster \"projects/${projectId}/locations/us-west1/attachedClusters/kcc-attached-cluster-127\" not found" +} + +--- + POST https://us-west1-gkemulticloud.googleapis.com/v1/projects/${projectId}/locations/us-west1/attachedClusters?alt=json&attached_cluster_id=kcc-attached-cluster-127 Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/dev +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager { "description": "Test attached cluster", @@ -248,57 +269,14 @@ Grpc-Metadata-Content-Type: application/grpc { "done": true, "metadata": null, - "name": "operations/${operationId}" -} - ---- - -GET https://us-west1-gkemulticloud.googleapis.com/v1/projects/${projectId}/locations/us-west1/attachedClusters/kcc-attached-cluster-127?alt=json -Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/dev - -200 OK -Content-Type: application/json -Grpc-Metadata-Content-Type: application/grpc - -{ - "annotations": {}, - "authorization": null, - "binaryAuthorization": null, - "clusterRegion": "", - "createTime": null, - "description": "Test attached cluster", - "distribution": "eks", - "errors": [], - "etag": "abcdef0123A=", - "fleet": { - "membership": "", - "project": "projects/${projectNumber}" - }, - "kubernetesVersion": "", - "loggingConfig": { - "componentConfig": null - }, - "monitoringConfig": null, - "name": "projects/${projectId}/locations/us-west1/attachedClusters/kcc-attached-cluster-127", - "oidcConfig": { - "issuerUrl": "https://oidc.eks.us-west-2.amazonaws.com/id/A115FE1C770C2452C75219524036FC0F", - "jwks": "" - }, - "platformVersion": "1.27.0-gke.2", - "proxyConfig": null, - "reconciling": false, - "state": "STATE_UNSPECIFIED", - "uid": "", - "updateTime": null, - "workloadIdentityConfig": null + "name": "${operationID}" } --- GET https://us-west1-gkemulticloud.googleapis.com/v1/projects/${projectId}/locations/us-west1/attachedClusters/kcc-attached-cluster-127?alt=json Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/dev +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 @@ -332,7 +310,7 @@ Grpc-Metadata-Content-Type: application/grpc "proxyConfig": null, "reconciling": false, "state": "STATE_UNSPECIFIED", - "uid": "", + "uid": "111111111111111111111", "updateTime": null, "workloadIdentityConfig": null } @@ -341,7 +319,7 @@ Grpc-Metadata-Content-Type: application/grpc PATCH https://us-west1-gkemulticloud.googleapis.com/v1/projects/${projectId}/locations/us-west1/attachedClusters/kcc-attached-cluster-127?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/dev +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager { "description": "Test attached cluster update", @@ -364,57 +342,14 @@ Grpc-Metadata-Content-Type: application/grpc { "done": true, "metadata": null, - "name": "operations/${operationId}" -} - ---- - -GET https://us-west1-gkemulticloud.googleapis.com/v1/projects/${projectId}/locations/us-west1/attachedClusters/kcc-attached-cluster-127?alt=json -Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/dev - -200 OK -Content-Type: application/json -Grpc-Metadata-Content-Type: application/grpc - -{ - "annotations": {}, - "authorization": null, - "binaryAuthorization": null, - "clusterRegion": "", - "createTime": null, - "description": "Test attached cluster update", - "distribution": "eks", - "errors": [], - "etag": "abcdef0123A=", - "fleet": { - "membership": "", - "project": "projects/${projectNumber}" - }, - "kubernetesVersion": "", - "loggingConfig": { - "componentConfig": null - }, - "monitoringConfig": null, - "name": "projects/${projectId}/locations/us-west1/attachedClusters/kcc-attached-cluster-127", - "oidcConfig": { - "issuerUrl": "https://oidc.eks.us-west-2.amazonaws.com/id/A115FE1C770C2452C75219524036FC0F", - "jwks": "" - }, - "platformVersion": "1.27.0-gke.2", - "proxyConfig": null, - "reconciling": false, - "state": "STATE_UNSPECIFIED", - "uid": "", - "updateTime": null, - "workloadIdentityConfig": null + "name": "${operationID}" } --- GET https://us-west1-gkemulticloud.googleapis.com/v1/projects/${projectId}/locations/us-west1/attachedClusters/kcc-attached-cluster-127?alt=json Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/dev +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 @@ -448,7 +383,7 @@ Grpc-Metadata-Content-Type: application/grpc "proxyConfig": null, "reconciling": false, "state": "STATE_UNSPECIFIED", - "uid": "", + "uid": "111111111111111111111", "updateTime": null, "workloadIdentityConfig": null } @@ -457,7 +392,7 @@ Grpc-Metadata-Content-Type: application/grpc DELETE https://us-west1-gkemulticloud.googleapis.com/v1/projects/${projectId}/locations/us-west1/attachedClusters/kcc-attached-cluster-127?alt=json&ignore_errors=true Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/dev +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 @@ -466,5 +401,5 @@ Grpc-Metadata-Content-Type: application/grpc { "done": true, "metadata": null, - "name": "operations/${operationId}" + "name": "${operationID}" } \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/basic/edgecontainer/v1beta1/edgecontainercluster/_generated_object_edgecontainercluster.golden.yaml b/pkg/test/resourcefixture/testdata/basic/edgecontainer/v1beta1/edgecontainercluster/_generated_object_edgecontainercluster.golden.yaml index 79475e2f33..5e160313c7 100644 --- a/pkg/test/resourcefixture/testdata/basic/edgecontainer/v1beta1/edgecontainercluster/_generated_object_edgecontainercluster.golden.yaml +++ b/pkg/test/resourcefixture/testdata/basic/edgecontainer/v1beta1/edgecontainercluster/_generated_object_edgecontainercluster.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: edgecontainer.cnrm.cloud.google.com/v1beta1 kind: EdgeContainerCluster metadata: @@ -44,6 +30,7 @@ spec: - 10.1.0.0/16 projectRef: external: ${projectId} + releaseChannel: RELEASE_CHANNEL_UNSPECIFIED resourceID: edgecontainercluster-${uniqueId} status: conditions: @@ -53,3 +40,4 @@ status: status: "True" type: Ready observedGeneration: 2 + status: STATUS_UNSPECIFIED diff --git a/pkg/test/resourcefixture/testdata/basic/edgecontainer/v1beta1/edgecontainercluster/_http.log b/pkg/test/resourcefixture/testdata/basic/edgecontainer/v1beta1/edgecontainercluster/_http.log new file mode 100644 index 0000000000..cb5f6213a3 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/edgecontainer/v1beta1/edgecontainercluster/_http.log @@ -0,0 +1,837 @@ +GET https://iam.googleapis.com/v1/projects/${projectId}/serviceAccounts/gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com?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 + +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": "Unknown service account", + "reason": "notFound" + } + ], + "message": "Unknown service account", + "status": "NOT_FOUND" + } +} + +--- + +POST https://iam.googleapis.com/v1/projects/${projectId}/serviceAccounts?alt=json&prettyPrint=false +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 + +{ + "accountId": "gsa-${uniqueId}", + "serviceAccount": {} +} + +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 + +{ + "email": "gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com", + "etag": "abcdef0123A=", + "name": "projects/${projectId}/serviceAccounts/gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com", + "oauth2ClientId": "888888888888888888888", + "projectId": "${projectId}", + "uniqueId": "111111111111111111111" +} + +--- + +GET https://iam.googleapis.com/v1/projects/${projectId}/serviceAccounts/gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com?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 + +{ + "email": "gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com", + "etag": "abcdef0123A=", + "name": "projects/${projectId}/serviceAccounts/gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com", + "oauth2ClientId": "888888888888888888888", + "projectId": "${projectId}", + "uniqueId": "111111111111111111111" +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}:getIamPolicy?alt=json&prettyPrint=false +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 + +{ + "options": { + "requestedPolicyVersion": 3 + } +} + + + +{ + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}:getIamPolicy?alt=json&prettyPrint=false +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 + +{ + "options": { + "requestedPolicyVersion": 3 + } +} + + + +{ + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}:getIamPolicy?alt=json&prettyPrint=false +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 + +{ + "options": { + "requestedPolicyVersion": 3 + } +} + + + +{ + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}:setIamPolicy?alt=json&prettyPrint=false +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 + +{ + "policy": { + "bindings": [ + { + "members": [ + "serviceAccount:gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com" + ], + "role": "roles/editor" + } + ], + "etag": "abcdef0123A=", + "version": 3 + }, + "updateMask": "bindings,etag,auditConfigs" +} + + + +{ + "bindings": [ + { + "members": [ + "serviceAccount:gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com" + ], + "role": "roles/editor" + } + ], + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}:getIamPolicy?alt=json&prettyPrint=false +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 + +{ + "options": { + "requestedPolicyVersion": 3 + } +} + + + +{ + "bindings": [ + { + "members": [ + "serviceAccount:gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com" + ], + "role": "roles/editor" + } + ], + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}:getIamPolicy?alt=json&prettyPrint=false +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 + +{ + "options": { + "requestedPolicyVersion": 3 + } +} + + + +{ + "bindings": [ + { + "members": [ + "serviceAccount:gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com" + ], + "role": "roles/editor" + } + ], + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}:getIamPolicy?alt=json&prettyPrint=false +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 + +{ + "options": { + "requestedPolicyVersion": 3 + } +} + + + +{ + "bindings": [ + { + "members": [ + "serviceAccount:gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com" + ], + "role": "roles/editor" + } + ], + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}:getIamPolicy?alt=json&prettyPrint=false +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 + +{ + "options": { + "requestedPolicyVersion": 3 + } +} + + + +{ + "bindings": [ + { + "members": [ + "serviceAccount:gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com" + ], + "role": "roles/editor" + } + ], + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +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://cloudbilling.googleapis.com/v1/projects/${projectId}/billingInfo?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 + +{ + "billingAccountName": "", + "billingEnabled": false, + "name": "projects/${projectId}/billingInfo", + "projectId": "${projectId}" +} + +--- + +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}" +} + +--- + +PUT https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}?alt=json&prettyPrint=false +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 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "lifecycleState": "ACTIVE", + "name": "${projectId}", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +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", + "name": "projects/${projectId}", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +--- + +PUT https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}?alt=json&prettyPrint=false +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 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "lifecycleState": "ACTIVE", + "name": "projects/${projectId}", + "parent": { + "id": "123450001", + "type": "organization" + }, + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +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", + "name": "projects/${projectId}", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +--- + +PUT https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}?alt=json&prettyPrint=false +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 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "projects/${projectId}", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +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", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "projects/${projectId}", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +--- + +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", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "projects/${projectId}", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +--- + +GET https://cloudbilling.googleapis.com/v1/projects/${projectId}/billingInfo?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 + +{ + "billingAccountName": "", + "billingEnabled": false, + "name": "projects/${projectId}/billingInfo", + "projectId": "${projectId}" +} + +--- + +GET https://edgecontainer.googleapis.com/v1/projects/${projectId}/locations/us-central1/clusters/edgecontainercluster-${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-central1/clusters/edgecontainercluster-${uniqueId}\" not found" +} + +--- + +POST https://edgecontainer.googleapis.com/v1/projects/${projectId}/locations/us-central1/clusters?alt=json&cluster_id=edgecontainercluster-${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 + +{ + "authorization": { + "adminUsers": { + "username": "gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com" + } + }, + "fleet": { + "project": "projects/${projectNumber}" + }, + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "networking": { + "clusterIpv4CidrBlocks": [ + "10.0.0.0/16" + ], + "servicesIpv4CidrBlocks": [ + "10.1.0.0/16" + ] + } +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://edgecontainer.googleapis.com/v1/projects/${projectId}/locations/us-central1/clusters/edgecontainercluster-${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 + +{ + "authorization": { + "adminUsers": { + "username": "gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com" + } + }, + "clusterCaCertificate": "", + "controlPlane": null, + "controlPlaneEncryption": null, + "controlPlaneVersion": "", + "createTime": null, + "defaultMaxPodsPerNode": 0, + "endpoint": "", + "externalLoadBalancerIpv4AddressPools": [], + "externalLoadBalancerIpv6AddressPools": [], + "fleet": { + "membership": "", + "project": "projects/${projectNumber}" + }, + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "maintenanceEvents": [], + "maintenancePolicy": null, + "name": "projects/${projectId}/locations/us-central1/clusters/edgecontainercluster-${uniqueId}", + "networking": { + "clusterIpv4CidrBlocks": [ + "10.0.0.0/16" + ], + "servicesIpv4CidrBlocks": [ + "10.1.0.0/16" + ] + }, + "nodeVersion": "", + "port": 0, + "releaseChannel": "RELEASE_CHANNEL_UNSPECIFIED", + "status": "STATUS_UNSPECIFIED", + "survivabilityConfig": null, + "systemAddonsConfig": null, + "targetVersion": "", + "updateTime": null +} + +--- + +DELETE https://edgecontainer.googleapis.com/v1/projects/${projectId}/locations/us-central1/clusters/edgecontainercluster-${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}" +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}:getIamPolicy?alt=json&prettyPrint=false +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 + +{ + "options": { + "requestedPolicyVersion": 3 + } +} + + + +{ + "bindings": [ + { + "members": [ + "serviceAccount:gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com" + ], + "role": "roles/editor" + } + ], + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}:getIamPolicy?alt=json&prettyPrint=false +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 + +{ + "options": { + "requestedPolicyVersion": 3 + } +} + + + +{ + "bindings": [ + { + "members": [ + "serviceAccount:gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com" + ], + "role": "roles/editor" + } + ], + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}:setIamPolicy?alt=json&prettyPrint=false +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 + +{ + "policy": { + "etag": "abcdef0123A=", + "version": 3 + }, + "updateMask": "bindings,etag,auditConfigs" +} + + + +{ + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}:getIamPolicy?alt=json&prettyPrint=false +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 + +{ + "options": { + "requestedPolicyVersion": 3 + } +} + + + +{ + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}:getIamPolicy?alt=json&prettyPrint=false +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 + +{ + "options": { + "requestedPolicyVersion": 3 + } +} + + + +{ + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}:getIamPolicy?alt=json&prettyPrint=false +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 + +{ + "options": { + "requestedPolicyVersion": 3 + } +} + + + +{ + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}:getIamPolicy?alt=json&prettyPrint=false +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 + +{ + "options": { + "requestedPolicyVersion": 3 + } +} + + + +{ + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +GET https://iam.googleapis.com/v1/projects/${projectId}/serviceAccounts/gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com?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 + +{ + "email": "gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com", + "etag": "abcdef0123A=", + "name": "projects/${projectId}/serviceAccounts/gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com", + "oauth2ClientId": "888888888888888888888", + "projectId": "${projectId}", + "uniqueId": "111111111111111111111" +} + +--- + +DELETE https://iam.googleapis.com/v1/projects/${projectId}/serviceAccounts/gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com?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 + +{} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/basic/edgecontainer/v1beta1/edgecontainernodepool/_http.log b/pkg/test/resourcefixture/testdata/basic/edgecontainer/v1beta1/edgecontainernodepool/_http.log new file mode 100644 index 0000000000..1ad7fd6839 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/edgecontainer/v1beta1/edgecontainernodepool/_http.log @@ -0,0 +1,976 @@ +GET https://iam.googleapis.com/v1/projects/${projectId}/serviceAccounts/gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com?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 + +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": "Unknown service account", + "reason": "notFound" + } + ], + "message": "Unknown service account", + "status": "NOT_FOUND" + } +} + +--- + +POST https://iam.googleapis.com/v1/projects/${projectId}/serviceAccounts?alt=json&prettyPrint=false +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 + +{ + "accountId": "gsa-${uniqueId}", + "serviceAccount": {} +} + +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 + +{ + "email": "gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com", + "etag": "abcdef0123A=", + "name": "projects/${projectId}/serviceAccounts/gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com", + "oauth2ClientId": "888888888888888888888", + "projectId": "${projectId}", + "uniqueId": "111111111111111111111" +} + +--- + +GET https://iam.googleapis.com/v1/projects/${projectId}/serviceAccounts/gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com?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 + +{ + "email": "gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com", + "etag": "abcdef0123A=", + "name": "projects/${projectId}/serviceAccounts/gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com", + "oauth2ClientId": "888888888888888888888", + "projectId": "${projectId}", + "uniqueId": "111111111111111111111" +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}:getIamPolicy?alt=json&prettyPrint=false +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 + +{ + "options": { + "requestedPolicyVersion": 3 + } +} + + + +{ + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}:getIamPolicy?alt=json&prettyPrint=false +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 + +{ + "options": { + "requestedPolicyVersion": 3 + } +} + + + +{ + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}:getIamPolicy?alt=json&prettyPrint=false +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 + +{ + "options": { + "requestedPolicyVersion": 3 + } +} + + + +{ + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}:setIamPolicy?alt=json&prettyPrint=false +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 + +{ + "policy": { + "bindings": [ + { + "members": [ + "serviceAccount:gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com" + ], + "role": "roles/editor" + } + ], + "etag": "abcdef0123A=", + "version": 3 + }, + "updateMask": "bindings,etag,auditConfigs" +} + + + +{ + "bindings": [ + { + "members": [ + "serviceAccount:gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com" + ], + "role": "roles/editor" + } + ], + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}:getIamPolicy?alt=json&prettyPrint=false +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 + +{ + "options": { + "requestedPolicyVersion": 3 + } +} + + + +{ + "bindings": [ + { + "members": [ + "serviceAccount:gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com" + ], + "role": "roles/editor" + } + ], + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}:getIamPolicy?alt=json&prettyPrint=false +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 + +{ + "options": { + "requestedPolicyVersion": 3 + } +} + + + +{ + "bindings": [ + { + "members": [ + "serviceAccount:gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com" + ], + "role": "roles/editor" + } + ], + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}:getIamPolicy?alt=json&prettyPrint=false +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 + +{ + "options": { + "requestedPolicyVersion": 3 + } +} + + + +{ + "bindings": [ + { + "members": [ + "serviceAccount:gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com" + ], + "role": "roles/editor" + } + ], + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}:getIamPolicy?alt=json&prettyPrint=false +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 + +{ + "options": { + "requestedPolicyVersion": 3 + } +} + + + +{ + "bindings": [ + { + "members": [ + "serviceAccount:gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com" + ], + "role": "roles/editor" + } + ], + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +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://cloudbilling.googleapis.com/v1/projects/${projectId}/billingInfo?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 + +{ + "billingAccountName": "", + "billingEnabled": false, + "name": "projects/${projectId}/billingInfo", + "projectId": "${projectId}" +} + +--- + +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}" +} + +--- + +PUT https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}?alt=json&prettyPrint=false +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 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "lifecycleState": "ACTIVE", + "name": "${projectId}", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +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", + "name": "projects/${projectId}", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +--- + +PUT https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}?alt=json&prettyPrint=false +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 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "lifecycleState": "ACTIVE", + "name": "projects/${projectId}", + "parent": { + "id": "123450001", + "type": "organization" + }, + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +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", + "name": "projects/${projectId}", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +--- + +PUT https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}?alt=json&prettyPrint=false +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 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "projects/${projectId}", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +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", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "projects/${projectId}", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +--- + +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", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "projects/${projectId}", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +--- + +GET https://cloudbilling.googleapis.com/v1/projects/${projectId}/billingInfo?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 + +{ + "billingAccountName": "", + "billingEnabled": false, + "name": "projects/${projectId}/billingInfo", + "projectId": "${projectId}" +} + +--- + +GET https://edgecontainer.googleapis.com/v1/projects/${projectId}/locations/us-central1/clusters/edgecontainercluster-${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-central1/clusters/edgecontainercluster-${uniqueId}\" not found" +} + +--- + +POST https://edgecontainer.googleapis.com/v1/projects/${projectId}/locations/us-central1/clusters?alt=json&cluster_id=edgecontainercluster-${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 + +{ + "authorization": { + "adminUsers": { + "username": "gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com" + } + }, + "fleet": { + "project": "projects/${projectNumber}" + }, + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "networking": { + "clusterIpv4CidrBlocks": [ + "10.0.0.0/16" + ], + "servicesIpv4CidrBlocks": [ + "10.1.0.0/16" + ] + } +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://edgecontainer.googleapis.com/v1/projects/${projectId}/locations/us-central1/clusters/edgecontainercluster-${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 + +{ + "authorization": { + "adminUsers": { + "username": "gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com" + } + }, + "clusterCaCertificate": "", + "controlPlane": null, + "controlPlaneEncryption": null, + "controlPlaneVersion": "", + "createTime": null, + "defaultMaxPodsPerNode": 0, + "endpoint": "", + "externalLoadBalancerIpv4AddressPools": [], + "externalLoadBalancerIpv6AddressPools": [], + "fleet": { + "membership": "", + "project": "projects/${projectNumber}" + }, + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "maintenanceEvents": [], + "maintenancePolicy": null, + "name": "projects/${projectId}/locations/us-central1/clusters/edgecontainercluster-${uniqueId}", + "networking": { + "clusterIpv4CidrBlocks": [ + "10.0.0.0/16" + ], + "servicesIpv4CidrBlocks": [ + "10.1.0.0/16" + ] + }, + "nodeVersion": "", + "port": 0, + "releaseChannel": "RELEASE_CHANNEL_UNSPECIFIED", + "status": "STATUS_UNSPECIFIED", + "survivabilityConfig": null, + "systemAddonsConfig": null, + "targetVersion": "", + "updateTime": null +} + +--- + +GET https://edgecontainer.googleapis.com/v1/projects/${projectId}/locations/us-central1/clusters/edgecontainercluster-${uniqueId}/nodePools/edgecontainernodepools-${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": "nodePool \"projects/${projectId}/locations/us-central1/clusters/edgecontainercluster-${uniqueId}/nodePools/edgecontainernodepools-${uniqueId}\" not found" +} + +--- + +POST https://edgecontainer.googleapis.com/v1/projects/${projectId}/locations/us-central1/clusters/edgecontainercluster-${uniqueId}/nodePools?alt=json&nodePoolId=edgecontainernodepools-${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 + +{ + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "nodeCount": 1, + "nodeLocation": "edge-site-node-123" +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://edgecontainer.googleapis.com/v1/projects/${projectId}/locations/us-central1/clusters/edgecontainercluster-${uniqueId}/nodePools/edgecontainernodepools-${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, + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "localDiskEncryption": null, + "machineFilter": "", + "name": "projects/${projectId}/locations/us-central1/clusters/edgecontainercluster-${uniqueId}/nodePools/edgecontainernodepools-${uniqueId}", + "nodeConfig": null, + "nodeCount": 1, + "nodeLocation": "edge-site-node-123", + "nodeVersion": "", + "updateTime": null +} + +--- + +DELETE https://edgecontainer.googleapis.com/v1/projects/${projectId}/locations/us-central1/clusters/edgecontainercluster-${uniqueId}/nodePools/edgecontainernodepools-${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://edgecontainer.googleapis.com/v1/projects/${projectId}/locations/us-central1/clusters/edgecontainercluster-${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 + +{ + "authorization": { + "adminUsers": { + "username": "gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com" + } + }, + "clusterCaCertificate": "", + "controlPlane": null, + "controlPlaneEncryption": null, + "controlPlaneVersion": "", + "createTime": null, + "defaultMaxPodsPerNode": 0, + "endpoint": "", + "externalLoadBalancerIpv4AddressPools": [], + "externalLoadBalancerIpv6AddressPools": [], + "fleet": { + "membership": "", + "project": "projects/${projectNumber}" + }, + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "maintenanceEvents": [], + "maintenancePolicy": null, + "name": "projects/${projectId}/locations/us-central1/clusters/edgecontainercluster-${uniqueId}", + "networking": { + "clusterIpv4CidrBlocks": [ + "10.0.0.0/16" + ], + "servicesIpv4CidrBlocks": [ + "10.1.0.0/16" + ] + }, + "nodeVersion": "", + "port": 0, + "releaseChannel": "RELEASE_CHANNEL_UNSPECIFIED", + "status": "STATUS_UNSPECIFIED", + "survivabilityConfig": null, + "systemAddonsConfig": null, + "targetVersion": "", + "updateTime": null +} + +--- + +DELETE https://edgecontainer.googleapis.com/v1/projects/${projectId}/locations/us-central1/clusters/edgecontainercluster-${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}" +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}:getIamPolicy?alt=json&prettyPrint=false +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 + +{ + "options": { + "requestedPolicyVersion": 3 + } +} + + + +{ + "bindings": [ + { + "members": [ + "serviceAccount:gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com" + ], + "role": "roles/editor" + } + ], + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}:getIamPolicy?alt=json&prettyPrint=false +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 + +{ + "options": { + "requestedPolicyVersion": 3 + } +} + + + +{ + "bindings": [ + { + "members": [ + "serviceAccount:gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com" + ], + "role": "roles/editor" + } + ], + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}:setIamPolicy?alt=json&prettyPrint=false +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 + +{ + "policy": { + "etag": "abcdef0123A=", + "version": 3 + }, + "updateMask": "bindings,etag,auditConfigs" +} + + + +{ + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}:getIamPolicy?alt=json&prettyPrint=false +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 + +{ + "options": { + "requestedPolicyVersion": 3 + } +} + + + +{ + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}:getIamPolicy?alt=json&prettyPrint=false +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 + +{ + "options": { + "requestedPolicyVersion": 3 + } +} + + + +{ + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}:getIamPolicy?alt=json&prettyPrint=false +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 + +{ + "options": { + "requestedPolicyVersion": 3 + } +} + + + +{ + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}:getIamPolicy?alt=json&prettyPrint=false +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 + +{ + "options": { + "requestedPolicyVersion": 3 + } +} + + + +{ + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +GET https://iam.googleapis.com/v1/projects/${projectId}/serviceAccounts/gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com?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 + +{ + "email": "gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com", + "etag": "abcdef0123A=", + "name": "projects/${projectId}/serviceAccounts/gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com", + "oauth2ClientId": "888888888888888888888", + "projectId": "${projectId}", + "uniqueId": "111111111111111111111" +} + +--- + +DELETE https://iam.googleapis.com/v1/projects/${projectId}/serviceAccounts/gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com?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 + +{} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/basic/edgenetwork/v1beta1/edgenetworknetwork/_http.log b/pkg/test/resourcefixture/testdata/basic/edgenetwork/v1beta1/edgenetworknetwork/_http.log new file mode 100644 index 0000000000..16bb09159e --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/edgenetwork/v1beta1/edgenetworknetwork/_http.log @@ -0,0 +1,77 @@ +GET https://edgenetwork.googleapis.com/v1/projects/${projectId}/locations/us-central1/zones/us-central1-test-zone/networks/${networkID}?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": "network \"projects/${projectId}/locations/us-central1/zones/us-central1-test-zone/networks/edgenetworknetwork-${uniqueId}\" not found" +} + +--- + +POST https://edgenetwork.googleapis.com/v1/projects/${projectId}/locations/us-central1/zones/us-central1-test-zone/networks?alt=json&networkId=edgenetworknetwork-${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": "Basic Network", + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "mtu": 9000 +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://edgenetwork.googleapis.com/v1/projects/${projectId}/locations/us-central1/zones/us-central1-test-zone/networks/${networkID}?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": "Basic Network", + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "mtu": 9000, + "name": "projects/${projectId}/locations/us-central1/zones/us-central1-test-zone/networks/edgenetworknetwork-${uniqueId}", + "updateTime": null +} + +--- + +DELETE https://edgenetwork.googleapis.com/v1/projects/${projectId}/locations/us-central1/zones/us-central1-test-zone/networks/${networkID}?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/edgenetwork/v1beta1/edgenetworksubnet/_http.log b/pkg/test/resourcefixture/testdata/basic/edgenetwork/v1beta1/edgenetworksubnet/_http.log new file mode 100644 index 0000000000..f0179af461 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/edgenetwork/v1beta1/edgenetworksubnet/_http.log @@ -0,0 +1,188 @@ +GET https://edgenetwork.googleapis.com/v1/projects/${projectId}/locations/us-central1/zones/us-central1-test-zone/networks/${networkID}?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": "network \"projects/${projectId}/locations/us-central1/zones/us-central1-test-zone/networks/edgenetworknetwork-${uniqueId}\" not found" +} + +--- + +POST https://edgenetwork.googleapis.com/v1/projects/${projectId}/locations/us-central1/zones/us-central1-test-zone/networks?alt=json&networkId=edgenetworknetwork-${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": "Basic Network", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "mtu": 9000 +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://edgenetwork.googleapis.com/v1/projects/${projectId}/locations/us-central1/zones/us-central1-test-zone/networks/${networkID}?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": "Basic Network", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "mtu": 9000, + "name": "projects/${projectId}/locations/us-central1/zones/us-central1-test-zone/networks/edgenetworknetwork-${uniqueId}", + "updateTime": null +} + +--- + +GET https://edgenetwork.googleapis.com/v1/projects/${projectId}/locations/us-central1/zones/us-central1-test-zone/subnets/edgenetworksubnet-${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": "subnet \"projects/${projectId}/locations/us-central1/zones/us-central1-test-zone/subnets/edgenetworksubnet-${uniqueId}\" not found" +} + +--- + +POST https://edgenetwork.googleapis.com/v1/projects/${projectId}/locations/us-central1/zones/us-central1-test-zone/subnets?alt=json&subnetId=edgenetworksubnet-${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": "Basic Subnet", + "ipv4Cidr": [ + "1.1.1.1/24", + "2.2.2.2/32" + ], + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "network": "projects/${projectId}/locations/us-central1/zones/us-central1-test-zone/networks/edgenetworknetwork-${uniqueId}" +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://edgenetwork.googleapis.com/v1/projects/${projectId}/locations/us-central1/zones/us-central1-test-zone/subnets/edgenetworksubnet-${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": "Basic Subnet", + "ipv4Cidr": [ + "1.1.1.1/24", + "2.2.2.2/32" + ], + "ipv6Cidr": [], + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectId}/locations/us-central1/zones/us-central1-test-zone/subnets/edgenetworksubnet-${uniqueId}", + "network": "projects/${projectId}/locations/us-central1/zones/us-central1-test-zone/networks/edgenetworknetwork-${uniqueId}", + "state": "STATE_UNKNOWN", + "updateTime": null, + "vlanId": 0 +} + +--- + +DELETE https://edgenetwork.googleapis.com/v1/projects/${projectId}/locations/us-central1/zones/us-central1-test-zone/subnets/edgenetworksubnet-${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://edgenetwork.googleapis.com/v1/projects/${projectId}/locations/us-central1/zones/us-central1-test-zone/networks/${networkID}?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": "Basic Network", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "mtu": 9000, + "name": "projects/${projectId}/locations/us-central1/zones/us-central1-test-zone/networks/edgenetworknetwork-${uniqueId}", + "updateTime": null +} + +--- + +DELETE https://edgenetwork.googleapis.com/v1/projects/${projectId}/locations/us-central1/zones/us-central1-test-zone/networks/${networkID}?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/gkehub/v1beta1/gkehubfeature/acmfeature/_generated_object_acmfeature.golden.yaml b/pkg/test/resourcefixture/testdata/basic/gkehub/v1beta1/gkehubfeature/acmfeature/_generated_object_acmfeature.golden.yaml new file mode 100644 index 0000000000..ae57b8a85f --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/gkehub/v1beta1/gkehubfeature/acmfeature/_generated_object_acmfeature.golden.yaml @@ -0,0 +1,28 @@ +apiVersion: gkehub.cnrm.cloud.google.com/v1beta1 +kind: GKEHubFeature +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: 1 + labels: + cnrm-test: "true" + label-one: value-two + name: gkehubfeature-${uniqueId} + namespace: ${uniqueId} +spec: + location: global + projectRef: + name: acm-${uniqueId} + resourceID: configmanagement +status: + conditions: + - lastTransitionTime: "1970-01-01T00:00:00Z" + message: The resource is up to date + reason: UpToDate + status: "True" + type: Ready + observedGeneration: 1 diff --git a/pkg/test/resourcefixture/testdata/basic/gkehub/v1beta1/gkehubfeature/acmfeature/_http.log b/pkg/test/resourcefixture/testdata/basic/gkehub/v1beta1/gkehubfeature/acmfeature/_http.log new file mode 100644 index 0000000000..d87796c93f --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/gkehub/v1beta1/gkehubfeature/acmfeature/_http.log @@ -0,0 +1,522 @@ +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://cloudbilling.googleapis.com/v1/projects/${projectId}/billingInfo?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 + +{ + "billingAccountName": "", + "billingEnabled": false, + "name": "projects/${projectId}/billingInfo", + "projectId": "${projectId}" +} + +--- + +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}" +} + +--- + +PUT https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}?alt=json&prettyPrint=false +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 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "lifecycleState": "ACTIVE", + "name": "Dependent Project", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +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", + "name": "projects/${projectId}", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +--- + +PUT https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}?alt=json&prettyPrint=false +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 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "lifecycleState": "ACTIVE", + "name": "projects/${projectId}", + "parent": { + "id": "${testFolderId}", + "type": "folder" + }, + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +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", + "name": "projects/${projectId}", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +--- + +PUT https://cloudbilling.googleapis.com/v1/projects/${projectId}/billingInfo?alt=json&prettyPrint=false +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 + +{ + "billingAccountName": "billingAccounts/123456-777777-000001" +} + +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 + +{ + "billingAccountName": "billingAccounts/123456-777777-000001", + "billingEnabled": true, + "name": "projects/${projectId}/billingInfo", + "projectId": "${projectId}" +} + +--- + +GET https://cloudbilling.googleapis.com/v1/projects/${projectId}/billingInfo?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 + +{ + "billingAccountName": "billingAccounts/123456-777777-000001", + "billingEnabled": true, + "name": "projects/${projectId}/billingInfo", + "projectId": "${projectId}" +} + +--- + +PUT https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}?alt=json&prettyPrint=false +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 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "projects/${projectId}", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +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", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "projects/${projectId}", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +--- + +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", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "projects/${projectId}", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +--- + +GET https://cloudbilling.googleapis.com/v1/projects/${projectId}/billingInfo?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 + +{ + "billingAccountName": "billingAccounts/123456-777777-000001", + "billingEnabled": true, + "name": "projects/${projectId}/billingInfo", + "projectId": "${projectId}" +} + +--- + +GET https://serviceusage.googleapis.com/v1/projects/${projectId}/services?alt=json&fields=services%2Fname%2CnextPageToken&filter=state%3AENABLED&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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "nextPageToken": "", + "services": [] +} + +--- + +POST https://serviceusage.googleapis.com/v1/projects/${projectId}/services/gkehub.googleapis.com:enable?alt=json&prettyPrint=false +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 + +{} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://serviceusage.googleapis.com/v1/projects/${projectId}/services?alt=json&fields=services%2Fname%2CnextPageToken&filter=state%3AENABLED&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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "nextPageToken": "", + "services": [ + { + "config": null, + "name": "projects/${projectNumber}/services/gkehub.googleapis.com", + "parent": "projects/${projectNumber}", + "state": "ENABLED" + } + ] +} + +--- + +POST https://serviceusage.googleapis.com/v1/projects/${projectId}/services/anthosconfigmanagement.googleapis.com:enable?alt=json&prettyPrint=false +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 + +{} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://serviceusage.googleapis.com/v1/projects/${projectId}/services?alt=json&fields=services%2Fname%2CnextPageToken&filter=state%3AENABLED&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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "nextPageToken": "", + "services": [ + { + "config": null, + "name": "projects/${projectNumber}/services/gkehub.googleapis.com", + "parent": "projects/${projectNumber}", + "state": "ENABLED" + }, + { + "config": null, + "name": "projects/${projectNumber}/services/anthosconfigmanagement.googleapis.com", + "parent": "projects/${projectNumber}", + "state": "ENABLED" + } + ] +} + +--- + +GET https://gkehub.googleapis.com/v1beta/projects/${projectId}/locations/global/features/configmanagement?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": "feature \"projects/${projectId}/locations/global/features/configmanagement\" not found" +} + +--- + +POST https://gkehub.googleapis.com/v1beta/projects/${projectId}/locations/global/features?alt=json&featureId=configmanagement +Content-Type: application/json +User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 + +{ + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectId}/locations/global/features/configmanagement" +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://gkehub.googleapis.com/v1beta/projects/${projectId}/locations/global/features/configmanagement?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 + +{ + "createTime": null, + "deleteTime": null, + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "membershipSpecs": {}, + "membershipStates": {}, + "name": "projects/${projectId}/locations/global/features/configmanagement", + "resourceState": null, + "spec": null, + "state": null, + "updateTime": null +} + +--- + +DELETE https://gkehub.googleapis.com/v1beta/projects/${projectId}/locations/global/features/configmanagement?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://gkehub.googleapis.com/v1beta/projects/${projectId}/locations/global/features/configmanagement?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": "feature \"projects/${projectId}/locations/global/features/configmanagement\" not found" +} + +--- + +GET https://serviceusage.googleapis.com/v1/projects/${projectId}/services?alt=json&fields=services%2Fname%2CnextPageToken&filter=state%3AENABLED&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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "nextPageToken": "", + "services": [ + { + "config": null, + "name": "projects/${projectNumber}/services/gkehub.googleapis.com", + "parent": "projects/${projectNumber}", + "state": "ENABLED" + }, + { + "config": null, + "name": "projects/${projectNumber}/services/anthosconfigmanagement.googleapis.com", + "parent": "projects/${projectNumber}", + "state": "ENABLED" + } + ] +} + +--- + +POST https://serviceusage.googleapis.com/v1/projects/${projectId}/services/gkehub.googleapis.com:disable?alt=json&prettyPrint=false +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 + +{ + "disableDependentServices": true +} + +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/gkehub/v1beta1/gkehubfeature/mcifeature/_generated_object_mcifeature.golden.yaml b/pkg/test/resourcefixture/testdata/basic/gkehub/v1beta1/gkehubfeature/mcifeature/_generated_object_mcifeature.golden.yaml new file mode 100644 index 0000000000..f6928f2fd3 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/gkehub/v1beta1/gkehubfeature/mcifeature/_generated_object_mcifeature.golden.yaml @@ -0,0 +1,32 @@ +apiVersion: gkehub.cnrm.cloud.google.com/v1beta1 +kind: GKEHubFeature +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" + label-one: two + name: gkehubfeature-${uniqueId} + namespace: ${uniqueId} +spec: + location: global + projectRef: + name: mci-${uniqueId} + resourceID: multiclusteringress + spec: + multiclusteringress: + configMembershipRef: + name: gkehubmembership2-${uniqueId} +status: + conditions: + - lastTransitionTime: "1970-01-01T00:00:00Z" + message: The resource is up to date + reason: UpToDate + status: "True" + type: Ready + observedGeneration: 2 diff --git a/pkg/test/resourcefixture/testdata/basic/gkehub/v1beta1/gkehubfeature/mcifeature/_http.log b/pkg/test/resourcefixture/testdata/basic/gkehub/v1beta1/gkehubfeature/mcifeature/_http.log new file mode 100644 index 0000000000..1cdada292f --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/gkehub/v1beta1/gkehubfeature/mcifeature/_http.log @@ -0,0 +1,2116 @@ +GET https://cloudresourcemanager.googleapis.com/v1/projects/mci-${uniqueId}?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 + +403 Forbidden +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": 403, + "message": "The caller does not have permission", + "status": "PERMISSION_DENIED" + } +} + +--- + +POST https://cloudbilling.googleapis.com/v1/billingAccounts/123456-777777-000001:testIamPermissions?alt=json&prettyPrint=false +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 + +{ + "permissions": [ + "billing.resourceAssociations.create" + ] +} + +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 + +{ + "permissions": [ + "billing.resourceAssociations.create" + ] +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/projects?alt=json&prettyPrint=false +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 + +{ + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "mci-${uniqueId}", + "parent": { + "id": "123450001", + "type": "organization" + }, + "projectId": "mci-${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://cloudresourcemanager.googleapis.com/v1/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 + +{ + "done": true, + "metadata": { + "@type": "type.googleapis.com/google.cloud.resourcemanager.v3.CreateProjectMetadata" + }, + "name": "operations/${operationID}", + "response": { + "@type": "type.googleapis.com/google.cloud.resourcemanager.v3.Project", + "createTime": "2024-04-01T12:34:56.123456Z", + "displayName": "mci-${uniqueId}", + "etag": "abcdef0123A=", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectNumber}", + "parent": "organizations/${organizationID}", + "projectId": "mci-${uniqueId}", + "state": "ACTIVE" + } +} + +--- + +PUT https://cloudbilling.googleapis.com/v1/projects/mci-${uniqueId}/billingInfo?alt=json&prettyPrint=false +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 + +{ + "billingAccountName": "billingAccounts/123456-777777-000001" +} + +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 + +{ + "billingAccountName": "billingAccounts/123456-777777-000001", + "billingEnabled": true, + "name": "projects/mci-${uniqueId}/billingInfo", + "projectId": "mci-${uniqueId}" +} + +--- + +GET https://cloudbilling.googleapis.com/v1/projects/mci-${uniqueId}/billingInfo?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 + +{ + "billingAccountName": "billingAccounts/123456-777777-000001", + "billingEnabled": true, + "name": "projects/mci-${uniqueId}/billingInfo", + "projectId": "mci-${uniqueId}" +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/mci-${uniqueId}?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", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "mci-${uniqueId}", + "parent": { + "id": "123450001", + "type": "organization" + }, + "projectId": "mci-${uniqueId}", + "projectNumber": "${projectNumber}" +} + +--- + +GET https://cloudbilling.googleapis.com/v1/projects/mci-${uniqueId}/billingInfo?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 + +{ + "billingAccountName": "billingAccounts/123456-777777-000001", + "billingEnabled": true, + "name": "projects/mci-${uniqueId}/billingInfo", + "projectId": "mci-${uniqueId}" +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/mci-${uniqueId}?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", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "mci-${uniqueId}", + "parent": { + "id": "123450001", + "type": "organization" + }, + "projectId": "mci-${uniqueId}", + "projectNumber": "${projectNumber}" +} + +--- + +GET https://cloudbilling.googleapis.com/v1/projects/mci-${uniqueId}/billingInfo?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 + +{ + "billingAccountName": "billingAccounts/123456-777777-000001", + "billingEnabled": true, + "name": "projects/mci-${uniqueId}/billingInfo", + "projectId": "mci-${uniqueId}" +} + +--- + +GET https://serviceusage.googleapis.com/v1/projects/mci-${uniqueId}/services?alt=json&fields=services%2Fname%2CnextPageToken&filter=state%3AENABLED&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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "nextPageToken": "", + "services": [] +} + +--- + +POST https://serviceusage.googleapis.com/v1/projects/mci-${uniqueId}/services/container.googleapis.com:enable?alt=json&prettyPrint=false +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 + +{} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://serviceusage.googleapis.com/v1/projects/mci-${uniqueId}/services?alt=json&fields=services%2Fname%2CnextPageToken&filter=state%3AENABLED&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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "nextPageToken": "", + "services": [ + { + "config": null, + "name": "projects/${projectNumber}/services/container.googleapis.com", + "parent": "projects/${projectNumber}", + "state": "ENABLED" + } + ] +} + +--- + +POST https://serviceusage.googleapis.com/v1/projects/mci-${uniqueId}/services/gkehub.googleapis.com:enable?alt=json&prettyPrint=false +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 + +{} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://serviceusage.googleapis.com/v1/projects/mci-${uniqueId}/services?alt=json&fields=services%2Fname%2CnextPageToken&filter=state%3AENABLED&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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "nextPageToken": "", + "services": [ + { + "config": null, + "name": "projects/${projectNumber}/services/gkehub.googleapis.com", + "parent": "projects/${projectNumber}", + "state": "ENABLED" + }, + { + "config": null, + "name": "projects/${projectNumber}/services/container.googleapis.com", + "parent": "projects/${projectNumber}", + "state": "ENABLED" + } + ] +} + +--- + +GET https://container.googleapis.com/v1beta1/projects/mci-${uniqueId}/locations/us-central1-a/clusters/containercluster1-${uniqueId}?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 + +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": "cluster \"projects/mci-${uniqueId}/locations/us-central1-a/clusters/containercluster1-${uniqueId}\" not found", + "reason": "notFound" + } + ], + "message": "cluster \"projects/mci-${uniqueId}/locations/us-central1-a/clusters/containercluster1-${uniqueId}\" not found", + "status": "NOT_FOUND" + } +} + +--- + +POST https://container.googleapis.com/v1beta1/projects/mci-${uniqueId}/locations/us-central1-a/clusters?alt=json&prettyPrint=false +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 + +{ + "cluster": { + "autopilot": { + "enabled": false + }, + "autoscaling": { + "enableNodeAutoprovisioning": false + }, + "binaryAuthorization": { + "enabled": false + }, + "initialNodeCount": 1, + "ipAllocationPolicy": { + "stackType": "IPV4", + "useIpAliases": false + }, + "legacyAbac": { + "enabled": false + }, + "maintenancePolicy": { + "window": {} + }, + "masterAuthorizedNetworksConfig": {}, + "name": "containercluster1-${uniqueId}", + "network": "projects/mci-${uniqueId}/global/networks/default", + "networkConfig": {}, + "networkPolicy": {}, + "nodeConfig": { + "oauthScopes": [ + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/logging.write", + "https://www.googleapis.com/auth/monitoring", + "https://www.googleapis.com/auth/service.management.readonly", + "https://www.googleapis.com/auth/servicecontrol", + "https://www.googleapis.com/auth/trace.append" + ] + }, + "notificationConfig": { + "pubsub": {} + }, + "resourceLabels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "shieldedNodes": { + "enabled": 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 + +{ + "name": "${operationID}", + "operationType": "CREATE_CLUSTER", + "selfLink": "https://container.googleapis.com/v1beta1/projects/${projectNumber}/locations/us-central1-a/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetLink": "https://container.googleapis.com/v1beta1/projects/mci-${uniqueId}/locations/us-central1-a/clusters/containercluster1-${uniqueId}", + "zone": "us-central1-a" +} + +--- + +GET https://container.googleapis.com/v1beta1/projects/mci-${uniqueId}/locations/us-central1-a/clusters/containercluster1-${uniqueId}?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 + +{ + "addonsConfig": { + "gcePersistentDiskCsiDriverConfig": { + "enabled": true + }, + "kubernetesDashboard": { + "disabled": true + }, + "networkPolicyConfig": { + "disabled": true + } + }, + "autopilot": {}, + "autoscaling": { + "autoscalingProfile": "BALANCED" + }, + "binaryAuthorization": {}, + "clusterTelemetry": { + "type": "ENABLED" + }, + "createTime": "2024-04-01T12:34:56.123456Z", + "databaseEncryption": { + "state": "DECRYPTED" + }, + "enterpriseConfig": { + "clusterTier": "STANDARD" + }, + "initialNodeCount": 1, + "ipAllocationPolicy": { + "stackType": "IPV4" + }, + "legacyAbac": {}, + "location": "us-central1-a", + "locations": [ + "us-central1-a" + ], + "loggingConfig": { + "componentConfig": { + "enableComponents": [ + "SYSTEM_COMPONENTS", + "WORKLOADS" + ] + } + }, + "maintenancePolicy": { + "window": {} + }, + "masterAuthorizedNetworksConfig": {}, + "monitoringConfig": { + "advancedDatapathObservabilityConfig": {}, + "componentConfig": { + "enableComponents": [ + "SYSTEM_COMPONENTS" + ] + }, + "managedPrometheusConfig": { + "enabled": true + } + }, + "name": "containercluster1-${uniqueId}", + "network": "projects/mci-${uniqueId}/global/networks/default", + "networkConfig": { + "network": "projects/mci-${uniqueId}/global/networks/default", + "subnetwork": "projects/mci-${uniqueId}/regions/us-central1-a/subnetworks/default" + }, + "networkPolicy": {}, + "nodeConfig": { + "oauthScopes": [ + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/logging.write", + "https://www.googleapis.com/auth/monitoring", + "https://www.googleapis.com/auth/service.management.readonly", + "https://www.googleapis.com/auth/servicecontrol", + "https://www.googleapis.com/auth/trace.append" + ] + }, + "nodePools": [ + { + "config": { + "diskSizeGb": 100, + "diskType": "pd-balanced", + "imageType": "COS_CONTAINERD", + "machineType": "e2-standard-4", + "metadata": { + "disable-legacy-endpoints": "true" + }, + "oauthScopes": [ + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/logging.write", + "https://www.googleapis.com/auth/monitoring", + "https://www.googleapis.com/auth/service.management.readonly", + "https://www.googleapis.com/auth/servicecontrol", + "https://www.googleapis.com/auth/trace.append" + ], + "serviceAccount": "default", + "shieldedInstanceConfig": { + "enableIntegrityMonitoring": true + }, + "windowsNodeConfig": {} + }, + "initialNodeCount": 1, + "locations": [ + "us-central1-a" + ], + "management": { + "autoRepair": true, + "autoUpgrade": true + }, + "maxPodsConstraint": { + "maxPodsPerNode": "110" + }, + "name": "default-pool", + "networkConfig": { + "enablePrivateNodes": false + }, + "status": "RUNNING", + "upgradeSettings": { + "maxSurge": 1, + "strategy": "SURGE" + } + } + ], + "notificationConfig": { + "pubsub": {} + }, + "releaseChannel": { + "channel": "REGULAR" + }, + "resourceLabels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "securityPostureConfig": { + "mode": "BASIC", + "vulnerabilityMode": "VULNERABILITY_MODE_UNSPECIFIED" + }, + "selfLink": "https://container.googleapis.com/v1beta1/projects/mci-${uniqueId}/locations/us-central1-a/clusters/containercluster1-${uniqueId}", + "shieldedNodes": { + "enabled": true + }, + "status": "RUNNING" +} + +--- + +GET https://container.googleapis.com/v1beta1/projects/mci-${uniqueId}/locations/us-central1-a/clusters/containercluster2-${uniqueId}?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 + +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": "cluster \"projects/mci-${uniqueId}/locations/us-central1-a/clusters/containercluster2-${uniqueId}\" not found", + "reason": "notFound" + } + ], + "message": "cluster \"projects/mci-${uniqueId}/locations/us-central1-a/clusters/containercluster2-${uniqueId}\" not found", + "status": "NOT_FOUND" + } +} + +--- + +POST https://container.googleapis.com/v1beta1/projects/mci-${uniqueId}/locations/us-central1-a/clusters?alt=json&prettyPrint=false +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 + +{ + "cluster": { + "autopilot": { + "enabled": false + }, + "autoscaling": { + "enableNodeAutoprovisioning": false + }, + "binaryAuthorization": { + "enabled": false + }, + "initialNodeCount": 1, + "ipAllocationPolicy": { + "stackType": "IPV4", + "useIpAliases": false + }, + "legacyAbac": { + "enabled": false + }, + "maintenancePolicy": { + "window": {} + }, + "masterAuthorizedNetworksConfig": {}, + "name": "containercluster2-${uniqueId}", + "network": "projects/mci-${uniqueId}/global/networks/default", + "networkConfig": {}, + "networkPolicy": {}, + "nodeConfig": { + "oauthScopes": [ + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/logging.write", + "https://www.googleapis.com/auth/monitoring", + "https://www.googleapis.com/auth/service.management.readonly", + "https://www.googleapis.com/auth/servicecontrol", + "https://www.googleapis.com/auth/trace.append" + ] + }, + "notificationConfig": { + "pubsub": {} + }, + "resourceLabels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "shieldedNodes": { + "enabled": 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 + +{ + "name": "${operationID}", + "operationType": "CREATE_CLUSTER", + "selfLink": "https://container.googleapis.com/v1beta1/projects/${projectNumber}/locations/us-central1-a/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetLink": "https://container.googleapis.com/v1beta1/projects/mci-${uniqueId}/locations/us-central1-a/clusters/containercluster2-${uniqueId}", + "zone": "us-central1-a" +} + +--- + +GET https://container.googleapis.com/v1beta1/projects/mci-${uniqueId}/locations/us-central1-a/clusters/containercluster2-${uniqueId}?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 + +{ + "addonsConfig": { + "gcePersistentDiskCsiDriverConfig": { + "enabled": true + }, + "kubernetesDashboard": { + "disabled": true + }, + "networkPolicyConfig": { + "disabled": true + } + }, + "autopilot": {}, + "autoscaling": { + "autoscalingProfile": "BALANCED" + }, + "binaryAuthorization": {}, + "clusterTelemetry": { + "type": "ENABLED" + }, + "createTime": "2024-04-01T12:34:56.123456Z", + "databaseEncryption": { + "state": "DECRYPTED" + }, + "enterpriseConfig": { + "clusterTier": "STANDARD" + }, + "initialNodeCount": 1, + "ipAllocationPolicy": { + "stackType": "IPV4" + }, + "legacyAbac": {}, + "location": "us-central1-a", + "locations": [ + "us-central1-a" + ], + "loggingConfig": { + "componentConfig": { + "enableComponents": [ + "SYSTEM_COMPONENTS", + "WORKLOADS" + ] + } + }, + "maintenancePolicy": { + "window": {} + }, + "masterAuthorizedNetworksConfig": {}, + "monitoringConfig": { + "advancedDatapathObservabilityConfig": {}, + "componentConfig": { + "enableComponents": [ + "SYSTEM_COMPONENTS" + ] + }, + "managedPrometheusConfig": { + "enabled": true + } + }, + "name": "containercluster2-${uniqueId}", + "network": "projects/mci-${uniqueId}/global/networks/default", + "networkConfig": { + "network": "projects/mci-${uniqueId}/global/networks/default", + "subnetwork": "projects/mci-${uniqueId}/regions/us-central1-a/subnetworks/default" + }, + "networkPolicy": {}, + "nodeConfig": { + "oauthScopes": [ + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/logging.write", + "https://www.googleapis.com/auth/monitoring", + "https://www.googleapis.com/auth/service.management.readonly", + "https://www.googleapis.com/auth/servicecontrol", + "https://www.googleapis.com/auth/trace.append" + ] + }, + "nodePools": [ + { + "config": { + "diskSizeGb": 100, + "diskType": "pd-balanced", + "imageType": "COS_CONTAINERD", + "machineType": "e2-standard-4", + "metadata": { + "disable-legacy-endpoints": "true" + }, + "oauthScopes": [ + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/logging.write", + "https://www.googleapis.com/auth/monitoring", + "https://www.googleapis.com/auth/service.management.readonly", + "https://www.googleapis.com/auth/servicecontrol", + "https://www.googleapis.com/auth/trace.append" + ], + "serviceAccount": "default", + "shieldedInstanceConfig": { + "enableIntegrityMonitoring": true + }, + "windowsNodeConfig": {} + }, + "initialNodeCount": 1, + "locations": [ + "us-central1-a" + ], + "management": { + "autoRepair": true, + "autoUpgrade": true + }, + "maxPodsConstraint": { + "maxPodsPerNode": "110" + }, + "name": "default-pool", + "networkConfig": { + "enablePrivateNodes": false + }, + "status": "RUNNING", + "upgradeSettings": { + "maxSurge": 1, + "strategy": "SURGE" + } + } + ], + "notificationConfig": { + "pubsub": {} + }, + "releaseChannel": { + "channel": "REGULAR" + }, + "resourceLabels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "securityPostureConfig": { + "mode": "BASIC", + "vulnerabilityMode": "VULNERABILITY_MODE_UNSPECIFIED" + }, + "selfLink": "https://container.googleapis.com/v1beta1/projects/mci-${uniqueId}/locations/us-central1-a/clusters/containercluster2-${uniqueId}", + "shieldedNodes": { + "enabled": true + }, + "status": "RUNNING" +} + +--- + +GET https://gkehub.googleapis.com/v1beta1/projects/mci-${uniqueId}/locations/global/memberships/gkehubmembership1-${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": "membership \"projects/mci-${uniqueId}/locations/global/memberships/gkehubmembership1-${uniqueId}\" not found" +} + +--- + +POST https://gkehub.googleapis.com/v1beta1/projects/mci-${uniqueId}/locations/global/memberships?alt=json&membershipId=gkehubmembership1-${uniqueId} +Content-Type: application/json +User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 + +{ + "description": "description", + "endpoint": { + "gkeCluster": { + "resourceLink": "//container.googleapis.com/projects/mci-${uniqueId}/locations/us-central1-a/clusters/containercluster1-${uniqueId}" + } + }, + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "projects/mci-${uniqueId}/locations/global/memberships/gkehubmembership1-${uniqueId}" +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://gkehub.googleapis.com/v1beta1/projects/mci-${uniqueId}/locations/global/memberships/gkehubmembership1-${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 + +{ + "authority": null, + "createTime": null, + "deleteTime": null, + "description": "description", + "endpoint": { + "gkeCluster": { + "clusterMissing": false, + "resourceLink": "//container.googleapis.com/projects/mci-${uniqueId}/locations/us-central1-a/clusters/containercluster1-${uniqueId}" + }, + "kubernetesMetadata": null, + "kubernetesResource": null + }, + "externalId": "", + "infrastructureType": "INFRASTRUCTURE_TYPE_UNSPECIFIED", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lastConnectionTime": null, + "monitoringConfig": null, + "name": "projects/mci-${uniqueId}/locations/global/memberships/gkehubmembership1-${uniqueId}", + "state": null, + "uniqueId": "111111111111111111111", + "updateTime": null +} + +--- + +GET https://gkehub.googleapis.com/v1beta1/projects/mci-${uniqueId}/locations/global/memberships/gkehubmembership2-${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": "membership \"projects/mci-${uniqueId}/locations/global/memberships/gkehubmembership2-${uniqueId}\" not found" +} + +--- + +POST https://gkehub.googleapis.com/v1beta1/projects/mci-${uniqueId}/locations/global/memberships?alt=json&membershipId=gkehubmembership2-${uniqueId} +Content-Type: application/json +User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 + +{ + "description": "description", + "endpoint": { + "gkeCluster": { + "resourceLink": "//container.googleapis.com/projects/mci-${uniqueId}/locations/us-central1-a/clusters/containercluster2-${uniqueId}" + } + }, + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "projects/mci-${uniqueId}/locations/global/memberships/gkehubmembership2-${uniqueId}" +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://gkehub.googleapis.com/v1beta1/projects/mci-${uniqueId}/locations/global/memberships/gkehubmembership2-${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 + +{ + "authority": null, + "createTime": null, + "deleteTime": null, + "description": "description", + "endpoint": { + "gkeCluster": { + "clusterMissing": false, + "resourceLink": "//container.googleapis.com/projects/mci-${uniqueId}/locations/us-central1-a/clusters/containercluster2-${uniqueId}" + }, + "kubernetesMetadata": null, + "kubernetesResource": null + }, + "externalId": "", + "infrastructureType": "INFRASTRUCTURE_TYPE_UNSPECIFIED", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lastConnectionTime": null, + "monitoringConfig": null, + "name": "projects/mci-${uniqueId}/locations/global/memberships/gkehubmembership2-${uniqueId}", + "state": null, + "uniqueId": "111111111111111111111", + "updateTime": null +} + +--- + +GET https://serviceusage.googleapis.com/v1/projects/mci-${uniqueId}/services?alt=json&fields=services%2Fname%2CnextPageToken&filter=state%3AENABLED&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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "nextPageToken": "", + "services": [ + { + "config": null, + "name": "projects/${projectNumber}/services/gkehub.googleapis.com", + "parent": "projects/${projectNumber}", + "state": "ENABLED" + }, + { + "config": null, + "name": "projects/${projectNumber}/services/container.googleapis.com", + "parent": "projects/${projectNumber}", + "state": "ENABLED" + } + ] +} + +--- + +POST https://serviceusage.googleapis.com/v1/projects/mci-${uniqueId}/services/multiclusteringress.googleapis.com:enable?alt=json&prettyPrint=false +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 + +{} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://serviceusage.googleapis.com/v1/projects/mci-${uniqueId}/services?alt=json&fields=services%2Fname%2CnextPageToken&filter=state%3AENABLED&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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "nextPageToken": "", + "services": [ + { + "config": null, + "name": "projects/${projectNumber}/services/gkehub.googleapis.com", + "parent": "projects/${projectNumber}", + "state": "ENABLED" + }, + { + "config": null, + "name": "projects/${projectNumber}/services/multiclusteringress.googleapis.com", + "parent": "projects/${projectNumber}", + "state": "ENABLED" + }, + { + "config": null, + "name": "projects/${projectNumber}/services/container.googleapis.com", + "parent": "projects/${projectNumber}", + "state": "ENABLED" + } + ] +} + +--- + +POST https://serviceusage.googleapis.com/v1/projects/mci-${uniqueId}/services/multiclusterservicediscovery.googleapis.com:enable?alt=json&prettyPrint=false +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 + +{} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://serviceusage.googleapis.com/v1/projects/mci-${uniqueId}/services?alt=json&fields=services%2Fname%2CnextPageToken&filter=state%3AENABLED&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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "nextPageToken": "", + "services": [ + { + "config": null, + "name": "projects/${projectNumber}/services/gkehub.googleapis.com", + "parent": "projects/${projectNumber}", + "state": "ENABLED" + }, + { + "config": null, + "name": "projects/${projectNumber}/services/multiclusteringress.googleapis.com", + "parent": "projects/${projectNumber}", + "state": "ENABLED" + }, + { + "config": null, + "name": "projects/${projectNumber}/services/multiclusterservicediscovery.googleapis.com", + "parent": "projects/${projectNumber}", + "state": "ENABLED" + }, + { + "config": null, + "name": "projects/${projectNumber}/services/container.googleapis.com", + "parent": "projects/${projectNumber}", + "state": "ENABLED" + } + ] +} + +--- + +GET https://gkehub.googleapis.com/v1beta/projects/mci-${uniqueId}/locations/global/features/multiclusteringress?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": "feature \"projects/mci-${uniqueId}/locations/global/features/multiclusteringress\" not found" +} + +--- + +POST https://gkehub.googleapis.com/v1beta/projects/mci-${uniqueId}/locations/global/features?alt=json&featureId=multiclusteringress +Content-Type: application/json +User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 + +{ + "labels": { + "cnrm-test": "true", + "label-one": "one", + "managed-by-cnrm": "true" + }, + "name": "projects/mci-${uniqueId}/locations/global/features/multiclusteringress", + "spec": { + "multiclusteringress": { + "configMembership": "projects/mci-${uniqueId}/locations/global/memberships/gkehubmembership1-${uniqueId}" + } + } +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://gkehub.googleapis.com/v1beta/projects/mci-${uniqueId}/locations/global/features/multiclusteringress?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 + +{ + "createTime": null, + "deleteTime": null, + "labels": { + "cnrm-test": "true", + "label-one": "one", + "managed-by-cnrm": "true" + }, + "membershipSpecs": {}, + "membershipStates": {}, + "name": "projects/mci-${uniqueId}/locations/global/features/multiclusteringress", + "resourceState": null, + "spec": { + "multiclusteringress": { + "billing": "BILLING_UNSPECIFIED", + "configMembership": "projects/mci-${uniqueId}/locations/global/memberships/gkehubmembership1-${uniqueId}" + } + }, + "state": null, + "updateTime": null +} + +--- + +PATCH https://gkehub.googleapis.com/v1beta/projects/mci-${uniqueId}/locations/global/features/multiclusteringress?alt=json&updateMask=labels%2Cspec +Content-Type: application/json +User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 + +{ + "labels": { + "cnrm-test": "true", + "label-one": "two", + "managed-by-cnrm": "true" + }, + "spec": { + "multiclusteringress": { + "configMembership": "projects/mci-${uniqueId}/locations/global/memberships/gkehubmembership2-${uniqueId}" + } + } +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://gkehub.googleapis.com/v1beta/projects/mci-${uniqueId}/locations/global/features/multiclusteringress?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 + +{ + "createTime": null, + "deleteTime": null, + "labels": { + "cnrm-test": "true", + "label-one": "two", + "managed-by-cnrm": "true" + }, + "membershipSpecs": {}, + "membershipStates": {}, + "name": "projects/mci-${uniqueId}/locations/global/features/multiclusteringress", + "resourceState": null, + "spec": { + "multiclusteringress": { + "billing": "BILLING_UNSPECIFIED", + "configMembership": "projects/mci-${uniqueId}/locations/global/memberships/gkehubmembership2-${uniqueId}" + } + }, + "state": null, + "updateTime": null +} + +--- + +DELETE https://gkehub.googleapis.com/v1beta/projects/mci-${uniqueId}/locations/global/features/multiclusteringress?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://gkehub.googleapis.com/v1beta/projects/mci-${uniqueId}/locations/global/features/multiclusteringress?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": "feature \"projects/mci-${uniqueId}/locations/global/features/multiclusteringress\" not found" +} + +--- + +GET https://serviceusage.googleapis.com/v1/projects/mci-${uniqueId}/services?alt=json&fields=services%2Fname%2CnextPageToken&filter=state%3AENABLED&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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "nextPageToken": "", + "services": [ + { + "config": null, + "name": "projects/${projectNumber}/services/gkehub.googleapis.com", + "parent": "projects/${projectNumber}", + "state": "ENABLED" + }, + { + "config": null, + "name": "projects/${projectNumber}/services/multiclusteringress.googleapis.com", + "parent": "projects/${projectNumber}", + "state": "ENABLED" + }, + { + "config": null, + "name": "projects/${projectNumber}/services/multiclusterservicediscovery.googleapis.com", + "parent": "projects/${projectNumber}", + "state": "ENABLED" + }, + { + "config": null, + "name": "projects/${projectNumber}/services/container.googleapis.com", + "parent": "projects/${projectNumber}", + "state": "ENABLED" + } + ] +} + +--- + +POST https://serviceusage.googleapis.com/v1/projects/mci-${uniqueId}/services/multiclusterservicediscovery.googleapis.com:disable?alt=json&prettyPrint=false +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 + +{} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://serviceusage.googleapis.com/v1/projects/mci-${uniqueId}/services?alt=json&fields=services%2Fname%2CnextPageToken&filter=state%3AENABLED&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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "nextPageToken": "", + "services": [ + { + "config": null, + "name": "projects/${projectNumber}/services/gkehub.googleapis.com", + "parent": "projects/${projectNumber}", + "state": "ENABLED" + }, + { + "config": null, + "name": "projects/${projectNumber}/services/multiclusteringress.googleapis.com", + "parent": "projects/${projectNumber}", + "state": "ENABLED" + }, + { + "config": null, + "name": "projects/${projectNumber}/services/container.googleapis.com", + "parent": "projects/${projectNumber}", + "state": "ENABLED" + } + ] +} + +--- + +POST https://serviceusage.googleapis.com/v1/projects/mci-${uniqueId}/services/multiclusteringress.googleapis.com:disable?alt=json&prettyPrint=false +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 + +{} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://gkehub.googleapis.com/v1beta1/projects/mci-${uniqueId}/locations/global/memberships/gkehubmembership2-${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 + +{ + "authority": null, + "createTime": null, + "deleteTime": null, + "description": "description", + "endpoint": { + "gkeCluster": { + "clusterMissing": false, + "resourceLink": "//container.googleapis.com/projects/mci-${uniqueId}/locations/us-central1-a/clusters/containercluster2-${uniqueId}" + }, + "kubernetesMetadata": null, + "kubernetesResource": null + }, + "externalId": "", + "infrastructureType": "INFRASTRUCTURE_TYPE_UNSPECIFIED", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lastConnectionTime": null, + "monitoringConfig": null, + "name": "projects/mci-${uniqueId}/locations/global/memberships/gkehubmembership2-${uniqueId}", + "state": null, + "uniqueId": "111111111111111111111", + "updateTime": null +} + +--- + +DELETE https://gkehub.googleapis.com/v1beta1/projects/mci-${uniqueId}/locations/global/memberships/gkehubmembership2-${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://gkehub.googleapis.com/v1beta1/projects/mci-${uniqueId}/locations/global/memberships/gkehubmembership2-${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": "membership \"projects/mci-${uniqueId}/locations/global/memberships/gkehubmembership2-${uniqueId}\" not found" +} + +--- + +GET https://gkehub.googleapis.com/v1beta1/projects/mci-${uniqueId}/locations/global/memberships/gkehubmembership1-${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 + +{ + "authority": null, + "createTime": null, + "deleteTime": null, + "description": "description", + "endpoint": { + "gkeCluster": { + "clusterMissing": false, + "resourceLink": "//container.googleapis.com/projects/mci-${uniqueId}/locations/us-central1-a/clusters/containercluster1-${uniqueId}" + }, + "kubernetesMetadata": null, + "kubernetesResource": null + }, + "externalId": "", + "infrastructureType": "INFRASTRUCTURE_TYPE_UNSPECIFIED", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lastConnectionTime": null, + "monitoringConfig": null, + "name": "projects/mci-${uniqueId}/locations/global/memberships/gkehubmembership1-${uniqueId}", + "state": null, + "uniqueId": "111111111111111111111", + "updateTime": null +} + +--- + +DELETE https://gkehub.googleapis.com/v1beta1/projects/mci-${uniqueId}/locations/global/memberships/gkehubmembership1-${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://gkehub.googleapis.com/v1beta1/projects/mci-${uniqueId}/locations/global/memberships/gkehubmembership1-${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": "membership \"projects/mci-${uniqueId}/locations/global/memberships/gkehubmembership1-${uniqueId}\" not found" +} + +--- + +GET https://container.googleapis.com/v1beta1/projects/mci-${uniqueId}/locations/us-central1-a/clusters/containercluster2-${uniqueId}?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 + +{ + "addonsConfig": { + "gcePersistentDiskCsiDriverConfig": { + "enabled": true + }, + "kubernetesDashboard": { + "disabled": true + }, + "networkPolicyConfig": { + "disabled": true + } + }, + "autopilot": {}, + "autoscaling": { + "autoscalingProfile": "BALANCED" + }, + "binaryAuthorization": {}, + "clusterTelemetry": { + "type": "ENABLED" + }, + "createTime": "2024-04-01T12:34:56.123456Z", + "databaseEncryption": { + "state": "DECRYPTED" + }, + "enterpriseConfig": { + "clusterTier": "STANDARD" + }, + "initialNodeCount": 1, + "ipAllocationPolicy": { + "stackType": "IPV4" + }, + "legacyAbac": {}, + "location": "us-central1-a", + "locations": [ + "us-central1-a" + ], + "loggingConfig": { + "componentConfig": { + "enableComponents": [ + "SYSTEM_COMPONENTS", + "WORKLOADS" + ] + } + }, + "maintenancePolicy": { + "window": {} + }, + "masterAuthorizedNetworksConfig": {}, + "monitoringConfig": { + "advancedDatapathObservabilityConfig": {}, + "componentConfig": { + "enableComponents": [ + "SYSTEM_COMPONENTS" + ] + }, + "managedPrometheusConfig": { + "enabled": true + } + }, + "name": "containercluster2-${uniqueId}", + "network": "projects/mci-${uniqueId}/global/networks/default", + "networkConfig": { + "network": "projects/mci-${uniqueId}/global/networks/default", + "subnetwork": "projects/mci-${uniqueId}/regions/us-central1-a/subnetworks/default" + }, + "networkPolicy": {}, + "nodeConfig": { + "oauthScopes": [ + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/logging.write", + "https://www.googleapis.com/auth/monitoring", + "https://www.googleapis.com/auth/service.management.readonly", + "https://www.googleapis.com/auth/servicecontrol", + "https://www.googleapis.com/auth/trace.append" + ] + }, + "nodePools": [ + { + "config": { + "diskSizeGb": 100, + "diskType": "pd-balanced", + "imageType": "COS_CONTAINERD", + "machineType": "e2-standard-4", + "metadata": { + "disable-legacy-endpoints": "true" + }, + "oauthScopes": [ + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/logging.write", + "https://www.googleapis.com/auth/monitoring", + "https://www.googleapis.com/auth/service.management.readonly", + "https://www.googleapis.com/auth/servicecontrol", + "https://www.googleapis.com/auth/trace.append" + ], + "serviceAccount": "default", + "shieldedInstanceConfig": { + "enableIntegrityMonitoring": true + }, + "windowsNodeConfig": {} + }, + "initialNodeCount": 1, + "locations": [ + "us-central1-a" + ], + "management": { + "autoRepair": true, + "autoUpgrade": true + }, + "maxPodsConstraint": { + "maxPodsPerNode": "110" + }, + "name": "default-pool", + "networkConfig": { + "enablePrivateNodes": false + }, + "status": "RUNNING", + "upgradeSettings": { + "maxSurge": 1, + "strategy": "SURGE" + } + } + ], + "notificationConfig": { + "pubsub": {} + }, + "releaseChannel": { + "channel": "REGULAR" + }, + "resourceLabels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "securityPostureConfig": { + "mode": "BASIC", + "vulnerabilityMode": "VULNERABILITY_MODE_UNSPECIFIED" + }, + "selfLink": "https://container.googleapis.com/v1beta1/projects/mci-${uniqueId}/locations/us-central1-a/clusters/containercluster2-${uniqueId}", + "shieldedNodes": { + "enabled": true + }, + "status": "RUNNING" +} + +--- + +DELETE https://container.googleapis.com/v1beta1/projects/mci-${uniqueId}/locations/us-central1-a/clusters/containercluster2-${uniqueId}?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 + +{ + "name": "${operationID}", + "operationType": "DELETE_CLUSTER", + "selfLink": "https://container.googleapis.com/v1beta1/projects/${projectNumber}/locations/us-central1-a/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetLink": "https://container.googleapis.com/v1beta1/projects/mci-${uniqueId}/locations/us-central1-a/clusters/containercluster2-${uniqueId}", + "zone": "us-central1-a" +} + +--- + +GET https://container.googleapis.com/v1beta1/projects/mci-${uniqueId}/locations/us-central1-a/clusters/containercluster1-${uniqueId}?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 + +{ + "addonsConfig": { + "gcePersistentDiskCsiDriverConfig": { + "enabled": true + }, + "kubernetesDashboard": { + "disabled": true + }, + "networkPolicyConfig": { + "disabled": true + } + }, + "autopilot": {}, + "autoscaling": { + "autoscalingProfile": "BALANCED" + }, + "binaryAuthorization": {}, + "clusterTelemetry": { + "type": "ENABLED" + }, + "createTime": "2024-04-01T12:34:56.123456Z", + "databaseEncryption": { + "state": "DECRYPTED" + }, + "enterpriseConfig": { + "clusterTier": "STANDARD" + }, + "initialNodeCount": 1, + "ipAllocationPolicy": { + "stackType": "IPV4" + }, + "legacyAbac": {}, + "location": "us-central1-a", + "locations": [ + "us-central1-a" + ], + "loggingConfig": { + "componentConfig": { + "enableComponents": [ + "SYSTEM_COMPONENTS", + "WORKLOADS" + ] + } + }, + "maintenancePolicy": { + "window": {} + }, + "masterAuthorizedNetworksConfig": {}, + "monitoringConfig": { + "advancedDatapathObservabilityConfig": {}, + "componentConfig": { + "enableComponents": [ + "SYSTEM_COMPONENTS" + ] + }, + "managedPrometheusConfig": { + "enabled": true + } + }, + "name": "containercluster1-${uniqueId}", + "network": "projects/mci-${uniqueId}/global/networks/default", + "networkConfig": { + "network": "projects/mci-${uniqueId}/global/networks/default", + "subnetwork": "projects/mci-${uniqueId}/regions/us-central1-a/subnetworks/default" + }, + "networkPolicy": {}, + "nodeConfig": { + "oauthScopes": [ + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/logging.write", + "https://www.googleapis.com/auth/monitoring", + "https://www.googleapis.com/auth/service.management.readonly", + "https://www.googleapis.com/auth/servicecontrol", + "https://www.googleapis.com/auth/trace.append" + ] + }, + "nodePools": [ + { + "config": { + "diskSizeGb": 100, + "diskType": "pd-balanced", + "imageType": "COS_CONTAINERD", + "machineType": "e2-standard-4", + "metadata": { + "disable-legacy-endpoints": "true" + }, + "oauthScopes": [ + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/logging.write", + "https://www.googleapis.com/auth/monitoring", + "https://www.googleapis.com/auth/service.management.readonly", + "https://www.googleapis.com/auth/servicecontrol", + "https://www.googleapis.com/auth/trace.append" + ], + "serviceAccount": "default", + "shieldedInstanceConfig": { + "enableIntegrityMonitoring": true + }, + "windowsNodeConfig": {} + }, + "initialNodeCount": 1, + "locations": [ + "us-central1-a" + ], + "management": { + "autoRepair": true, + "autoUpgrade": true + }, + "maxPodsConstraint": { + "maxPodsPerNode": "110" + }, + "name": "default-pool", + "networkConfig": { + "enablePrivateNodes": false + }, + "status": "RUNNING", + "upgradeSettings": { + "maxSurge": 1, + "strategy": "SURGE" + } + } + ], + "notificationConfig": { + "pubsub": {} + }, + "releaseChannel": { + "channel": "REGULAR" + }, + "resourceLabels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "securityPostureConfig": { + "mode": "BASIC", + "vulnerabilityMode": "VULNERABILITY_MODE_UNSPECIFIED" + }, + "selfLink": "https://container.googleapis.com/v1beta1/projects/mci-${uniqueId}/locations/us-central1-a/clusters/containercluster1-${uniqueId}", + "shieldedNodes": { + "enabled": true + }, + "status": "RUNNING" +} + +--- + +DELETE https://container.googleapis.com/v1beta1/projects/mci-${uniqueId}/locations/us-central1-a/clusters/containercluster1-${uniqueId}?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 + +{ + "name": "${operationID}", + "operationType": "DELETE_CLUSTER", + "selfLink": "https://container.googleapis.com/v1beta1/projects/${projectNumber}/locations/us-central1-a/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetLink": "https://container.googleapis.com/v1beta1/projects/mci-${uniqueId}/locations/us-central1-a/clusters/containercluster1-${uniqueId}", + "zone": "us-central1-a" +} + +--- + +GET https://serviceusage.googleapis.com/v1/projects/mci-${uniqueId}/services?alt=json&fields=services%2Fname%2CnextPageToken&filter=state%3AENABLED&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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "nextPageToken": "", + "services": [ + { + "config": null, + "name": "projects/${projectNumber}/services/gkehub.googleapis.com", + "parent": "projects/${projectNumber}", + "state": "ENABLED" + }, + { + "config": null, + "name": "projects/${projectNumber}/services/container.googleapis.com", + "parent": "projects/${projectNumber}", + "state": "ENABLED" + } + ] +} + +--- + +POST https://serviceusage.googleapis.com/v1/projects/mci-${uniqueId}/services/container.googleapis.com:disable?alt=json&prettyPrint=false +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 + +{} + +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/mci-${uniqueId}?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", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "mci-${uniqueId}", + "parent": { + "id": "123450001", + "type": "organization" + }, + "projectId": "mci-${uniqueId}", + "projectNumber": "${projectNumber}" +} + +--- + +GET https://cloudbilling.googleapis.com/v1/projects/mci-${uniqueId}/billingInfo?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 + +{ + "billingAccountName": "billingAccounts/123456-777777-000001", + "billingEnabled": true, + "name": "projects/mci-${uniqueId}/billingInfo", + "projectId": "mci-${uniqueId}" +} + +--- + +DELETE https://cloudresourcemanager.googleapis.com/v1/projects/mci-${uniqueId}?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 + +{} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/basic/gkehub/v1beta1/gkehubfeature/mcsdfeature/_generated_object_mcsdfeature.golden.yaml b/pkg/test/resourcefixture/testdata/basic/gkehub/v1beta1/gkehubfeature/mcsdfeature/_generated_object_mcsdfeature.golden.yaml new file mode 100644 index 0000000000..b162146ff5 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/gkehub/v1beta1/gkehubfeature/mcsdfeature/_generated_object_mcsdfeature.golden.yaml @@ -0,0 +1,28 @@ +apiVersion: gkehub.cnrm.cloud.google.com/v1beta1 +kind: GKEHubFeature +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: 1 + labels: + cnrm-test: "true" + label-one: value-two + name: gkehubfeature-${uniqueId} + namespace: ${uniqueId} +spec: + location: global + projectRef: + name: mcsd-${uniqueId} + resourceID: multiclusterservicediscovery +status: + conditions: + - lastTransitionTime: "1970-01-01T00:00:00Z" + message: The resource is up to date + reason: UpToDate + status: "True" + type: Ready + observedGeneration: 1 diff --git a/pkg/test/resourcefixture/testdata/basic/gkehub/v1beta1/gkehubfeature/mcsdfeature/_http.log b/pkg/test/resourcefixture/testdata/basic/gkehub/v1beta1/gkehubfeature/mcsdfeature/_http.log new file mode 100644 index 0000000000..6069582c96 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/gkehub/v1beta1/gkehubfeature/mcsdfeature/_http.log @@ -0,0 +1,522 @@ +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://cloudbilling.googleapis.com/v1/projects/${projectId}/billingInfo?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 + +{ + "billingAccountName": "", + "billingEnabled": false, + "name": "projects/${projectId}/billingInfo", + "projectId": "${projectId}" +} + +--- + +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}" +} + +--- + +PUT https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}?alt=json&prettyPrint=false +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 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "lifecycleState": "ACTIVE", + "name": "Dependent Project", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +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", + "name": "projects/${projectId}", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +--- + +PUT https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}?alt=json&prettyPrint=false +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 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "lifecycleState": "ACTIVE", + "name": "projects/${projectId}", + "parent": { + "id": "${testFolderId}", + "type": "folder" + }, + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +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", + "name": "projects/${projectId}", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +--- + +PUT https://cloudbilling.googleapis.com/v1/projects/${projectId}/billingInfo?alt=json&prettyPrint=false +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 + +{ + "billingAccountName": "billingAccounts/123456-777777-000001" +} + +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 + +{ + "billingAccountName": "billingAccounts/123456-777777-000001", + "billingEnabled": true, + "name": "projects/${projectId}/billingInfo", + "projectId": "${projectId}" +} + +--- + +GET https://cloudbilling.googleapis.com/v1/projects/${projectId}/billingInfo?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 + +{ + "billingAccountName": "billingAccounts/123456-777777-000001", + "billingEnabled": true, + "name": "projects/${projectId}/billingInfo", + "projectId": "${projectId}" +} + +--- + +PUT https://cloudresourcemanager.googleapis.com/v1/projects/${projectId}?alt=json&prettyPrint=false +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 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "projects/${projectId}", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +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", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "projects/${projectId}", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +--- + +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", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "projects/${projectId}", + "projectId": "${projectId}", + "projectNumber": "${projectNumber}" +} + +--- + +GET https://cloudbilling.googleapis.com/v1/projects/${projectId}/billingInfo?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 + +{ + "billingAccountName": "billingAccounts/123456-777777-000001", + "billingEnabled": true, + "name": "projects/${projectId}/billingInfo", + "projectId": "${projectId}" +} + +--- + +GET https://serviceusage.googleapis.com/v1/projects/${projectId}/services?alt=json&fields=services%2Fname%2CnextPageToken&filter=state%3AENABLED&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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "nextPageToken": "", + "services": [] +} + +--- + +POST https://serviceusage.googleapis.com/v1/projects/${projectId}/services/gkehub.googleapis.com:enable?alt=json&prettyPrint=false +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 + +{} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://serviceusage.googleapis.com/v1/projects/${projectId}/services?alt=json&fields=services%2Fname%2CnextPageToken&filter=state%3AENABLED&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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "nextPageToken": "", + "services": [ + { + "config": null, + "name": "projects/${projectNumber}/services/gkehub.googleapis.com", + "parent": "projects/${projectNumber}", + "state": "ENABLED" + } + ] +} + +--- + +POST https://serviceusage.googleapis.com/v1/projects/${projectId}/services/multiclusterservicediscovery.googleapis.com:enable?alt=json&prettyPrint=false +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 + +{} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://serviceusage.googleapis.com/v1/projects/${projectId}/services?alt=json&fields=services%2Fname%2CnextPageToken&filter=state%3AENABLED&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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "nextPageToken": "", + "services": [ + { + "config": null, + "name": "projects/${projectNumber}/services/gkehub.googleapis.com", + "parent": "projects/${projectNumber}", + "state": "ENABLED" + }, + { + "config": null, + "name": "projects/${projectNumber}/services/multiclusterservicediscovery.googleapis.com", + "parent": "projects/${projectNumber}", + "state": "ENABLED" + } + ] +} + +--- + +GET https://gkehub.googleapis.com/v1beta/projects/${projectId}/locations/global/features/multiclusterservicediscovery?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": "feature \"projects/${projectId}/locations/global/features/multiclusterservicediscovery\" not found" +} + +--- + +POST https://gkehub.googleapis.com/v1beta/projects/${projectId}/locations/global/features?alt=json&featureId=multiclusterservicediscovery +Content-Type: application/json +User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 + +{ + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectId}/locations/global/features/multiclusterservicediscovery" +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://gkehub.googleapis.com/v1beta/projects/${projectId}/locations/global/features/multiclusterservicediscovery?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 + +{ + "createTime": null, + "deleteTime": null, + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "membershipSpecs": {}, + "membershipStates": {}, + "name": "projects/${projectId}/locations/global/features/multiclusterservicediscovery", + "resourceState": null, + "spec": null, + "state": null, + "updateTime": null +} + +--- + +DELETE https://gkehub.googleapis.com/v1beta/projects/${projectId}/locations/global/features/multiclusterservicediscovery?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://gkehub.googleapis.com/v1beta/projects/${projectId}/locations/global/features/multiclusterservicediscovery?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": "feature \"projects/${projectId}/locations/global/features/multiclusterservicediscovery\" not found" +} + +--- + +GET https://serviceusage.googleapis.com/v1/projects/${projectId}/services?alt=json&fields=services%2Fname%2CnextPageToken&filter=state%3AENABLED&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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "nextPageToken": "", + "services": [ + { + "config": null, + "name": "projects/${projectNumber}/services/gkehub.googleapis.com", + "parent": "projects/${projectNumber}", + "state": "ENABLED" + }, + { + "config": null, + "name": "projects/${projectNumber}/services/multiclusterservicediscovery.googleapis.com", + "parent": "projects/${projectNumber}", + "state": "ENABLED" + } + ] +} + +--- + +POST https://serviceusage.googleapis.com/v1/projects/${projectId}/services/gkehub.googleapis.com:disable?alt=json&prettyPrint=false +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 + +{ + "disableDependentServices": true +} + +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/gkehub/v1beta1/gkehubfeaturemembership/_generated_object_gkehubfeaturemembership.golden.yaml b/pkg/test/resourcefixture/testdata/basic/gkehub/v1beta1/gkehubfeaturemembership/_generated_object_gkehubfeaturemembership.golden.yaml new file mode 100644 index 0000000000..0193521c2c --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/gkehub/v1beta1/gkehubfeaturemembership/_generated_object_gkehubfeaturemembership.golden.yaml @@ -0,0 +1,48 @@ +apiVersion: gkehub.cnrm.cloud.google.com/v1beta1 +kind: GKEHubFeatureMembership +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: gkehubfeaturemembership-${uniqueId} + namespace: ${uniqueId} +spec: + configmanagement: + configSync: + git: + gcpServiceAccountRef: + external: "" + httpsProxy: "" + policyDir: config-connector + secretType: none + syncBranch: master + syncRepo: https://github.com/GoogleCloudPlatform/cloud-foundation-toolkit + syncRev: HEAD + syncWaitSecs: "20" + sourceFormat: unstructured + hierarchyController: + enableHierarchicalResourceQuota: true + enablePodTreeLabels: true + enabled: true + version: "" + featureRef: + name: gkehubfeature-${uniqueId} + location: global + membershipRef: + name: gkehubmembership-${uniqueId} + projectRef: + name: gkehubfm-${uniqueId} +status: + conditions: + - lastTransitionTime: "1970-01-01T00:00:00Z" + message: The resource is up to date + reason: UpToDate + status: "True" + type: Ready + observedGeneration: 3 diff --git a/pkg/test/resourcefixture/testdata/basic/gkehub/v1beta1/gkehubfeaturemembership/_http.log b/pkg/test/resourcefixture/testdata/basic/gkehub/v1beta1/gkehubfeaturemembership/_http.log new file mode 100644 index 0000000000..03be75af05 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/gkehub/v1beta1/gkehubfeaturemembership/_http.log @@ -0,0 +1,1468 @@ +GET https://cloudresourcemanager.googleapis.com/v1/projects/example-project-01?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 + +403 Forbidden +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": 403, + "message": "The caller does not have permission", + "status": "PERMISSION_DENIED" + } +} + +--- + +POST https://cloudbilling.googleapis.com/v1/billingAccounts/123456-777777-000001:testIamPermissions?alt=json&prettyPrint=false +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 + +{ + "permissions": [ + "billing.resourceAssociations.create" + ] +} + +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 + +{ + "permissions": [ + "billing.resourceAssociations.create" + ] +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/projects?alt=json&prettyPrint=false +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 + +{ + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "Dependent Project", + "parent": { + "id": "123450001", + "type": "organization" + }, + "projectId": "example-project-01" +} + +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://cloudresourcemanager.googleapis.com/v1/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 + +{ + "done": true, + "metadata": { + "@type": "type.googleapis.com/google.cloud.resourcemanager.v3.CreateProjectMetadata" + }, + "name": "operations/${operationID}", + "response": { + "@type": "type.googleapis.com/google.cloud.resourcemanager.v3.Project", + "createTime": "2024-04-01T12:34:56.123456Z", + "displayName": "Dependent Project", + "etag": "abcdef0123A=", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectNumber}", + "parent": "organizations/${organizationID}", + "projectId": "example-project-01", + "state": "ACTIVE" + } +} + +--- + +PUT https://cloudbilling.googleapis.com/v1/projects/example-project-01/billingInfo?alt=json&prettyPrint=false +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 + +{ + "billingAccountName": "billingAccounts/123456-777777-000001" +} + +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 + +{ + "billingAccountName": "billingAccounts/123456-777777-000001", + "billingEnabled": true, + "name": "projects/example-project-01/billingInfo", + "projectId": "example-project-01" +} + +--- + +GET https://cloudbilling.googleapis.com/v1/projects/example-project-01/billingInfo?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 + +{ + "billingAccountName": "billingAccounts/123456-777777-000001", + "billingEnabled": true, + "name": "projects/example-project-01/billingInfo", + "projectId": "example-project-01" +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/example-project-01?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", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "Dependent Project", + "parent": { + "id": "123450001", + "type": "organization" + }, + "projectId": "example-project-01", + "projectNumber": "${projectNumber}" +} + +--- + +GET https://cloudbilling.googleapis.com/v1/projects/example-project-01/billingInfo?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 + +{ + "billingAccountName": "billingAccounts/123456-777777-000001", + "billingEnabled": true, + "name": "projects/example-project-01/billingInfo", + "projectId": "example-project-01" +} + +--- + +GET https://serviceusage.googleapis.com/v1/projects/example-project-01/services?alt=json&fields=services%2Fname%2CnextPageToken&filter=state%3AENABLED&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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "nextPageToken": "", + "services": [] +} + +--- + +POST https://serviceusage.googleapis.com/v1/projects/example-project-01/services/container.googleapis.com:enable?alt=json&prettyPrint=false +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 + +{} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://serviceusage.googleapis.com/v1/projects/example-project-01/services?alt=json&fields=services%2Fname%2CnextPageToken&filter=state%3AENABLED&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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "nextPageToken": "", + "services": [ + { + "config": null, + "name": "projects/${projectNumber}/services/container.googleapis.com", + "parent": "projects/${projectNumber}", + "state": "ENABLED" + } + ] +} + +--- + +GET https://container.googleapis.com/v1beta1/projects/example-project-01/locations/us-central1-a/clusters/containercluster-${uniqueId}?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 + +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": "cluster \"projects/example-project-01/locations/us-central1-a/clusters/containercluster-${uniqueId}\" not found", + "reason": "notFound" + } + ], + "message": "cluster \"projects/example-project-01/locations/us-central1-a/clusters/containercluster-${uniqueId}\" not found", + "status": "NOT_FOUND" + } +} + +--- + +POST https://container.googleapis.com/v1beta1/projects/example-project-01/locations/us-central1-a/clusters?alt=json&prettyPrint=false +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 + +{ + "cluster": { + "autopilot": { + "enabled": false + }, + "autoscaling": { + "enableNodeAutoprovisioning": false + }, + "binaryAuthorization": { + "enabled": false + }, + "initialNodeCount": 1, + "ipAllocationPolicy": { + "stackType": "IPV4", + "useIpAliases": false + }, + "legacyAbac": { + "enabled": false + }, + "maintenancePolicy": { + "window": {} + }, + "masterAuthorizedNetworksConfig": {}, + "name": "containercluster-${uniqueId}", + "network": "projects/example-project-01/global/networks/default", + "networkConfig": {}, + "networkPolicy": {}, + "nodeConfig": { + "oauthScopes": [ + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/logging.write", + "https://www.googleapis.com/auth/monitoring", + "https://www.googleapis.com/auth/service.management.readonly", + "https://www.googleapis.com/auth/servicecontrol", + "https://www.googleapis.com/auth/trace.append" + ] + }, + "notificationConfig": { + "pubsub": {} + }, + "resourceLabels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "shieldedNodes": { + "enabled": true + }, + "workloadIdentityConfig": { + "workloadPool": "example-project-01.svc.id.goog" + } + } +} + +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": "${operationID}", + "operationType": "CREATE_CLUSTER", + "selfLink": "https://container.googleapis.com/v1beta1/projects/${projectNumber}/locations/us-central1-a/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetLink": "https://container.googleapis.com/v1beta1/projects/example-project-01/locations/us-central1-a/clusters/containercluster-${uniqueId}", + "zone": "us-central1-a" +} + +--- + +GET https://container.googleapis.com/v1beta1/projects/example-project-01/locations/us-central1-a/clusters/containercluster-${uniqueId}?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 + +{ + "addonsConfig": { + "gcePersistentDiskCsiDriverConfig": { + "enabled": true + }, + "kubernetesDashboard": { + "disabled": true + }, + "networkPolicyConfig": { + "disabled": true + } + }, + "autopilot": {}, + "autoscaling": { + "autoscalingProfile": "BALANCED" + }, + "binaryAuthorization": {}, + "clusterTelemetry": { + "type": "ENABLED" + }, + "createTime": "2024-04-01T12:34:56.123456Z", + "databaseEncryption": { + "state": "DECRYPTED" + }, + "enterpriseConfig": { + "clusterTier": "STANDARD" + }, + "initialNodeCount": 1, + "ipAllocationPolicy": { + "stackType": "IPV4" + }, + "legacyAbac": {}, + "location": "us-central1-a", + "locations": [ + "us-central1-a" + ], + "loggingConfig": { + "componentConfig": { + "enableComponents": [ + "SYSTEM_COMPONENTS", + "WORKLOADS" + ] + } + }, + "maintenancePolicy": { + "window": {} + }, + "masterAuthorizedNetworksConfig": {}, + "monitoringConfig": { + "advancedDatapathObservabilityConfig": {}, + "componentConfig": { + "enableComponents": [ + "SYSTEM_COMPONENTS" + ] + }, + "managedPrometheusConfig": { + "enabled": true + } + }, + "name": "containercluster-${uniqueId}", + "network": "projects/example-project-01/global/networks/default", + "networkConfig": { + "network": "projects/example-project-01/global/networks/default", + "subnetwork": "projects/example-project-01/regions/us-central1-a/subnetworks/default" + }, + "networkPolicy": {}, + "nodeConfig": { + "oauthScopes": [ + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/logging.write", + "https://www.googleapis.com/auth/monitoring", + "https://www.googleapis.com/auth/service.management.readonly", + "https://www.googleapis.com/auth/servicecontrol", + "https://www.googleapis.com/auth/trace.append" + ] + }, + "nodePools": [ + { + "config": { + "diskSizeGb": 100, + "diskType": "pd-balanced", + "imageType": "COS_CONTAINERD", + "machineType": "e2-standard-4", + "metadata": { + "disable-legacy-endpoints": "true" + }, + "oauthScopes": [ + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/logging.write", + "https://www.googleapis.com/auth/monitoring", + "https://www.googleapis.com/auth/service.management.readonly", + "https://www.googleapis.com/auth/servicecontrol", + "https://www.googleapis.com/auth/trace.append" + ], + "serviceAccount": "default", + "shieldedInstanceConfig": { + "enableIntegrityMonitoring": true + }, + "windowsNodeConfig": {} + }, + "initialNodeCount": 1, + "locations": [ + "us-central1-a" + ], + "management": { + "autoRepair": true, + "autoUpgrade": true + }, + "maxPodsConstraint": { + "maxPodsPerNode": "110" + }, + "name": "default-pool", + "networkConfig": { + "enablePrivateNodes": false + }, + "status": "RUNNING", + "upgradeSettings": { + "maxSurge": 1, + "strategy": "SURGE" + } + } + ], + "notificationConfig": { + "pubsub": {} + }, + "releaseChannel": { + "channel": "REGULAR" + }, + "resourceLabels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "securityPostureConfig": { + "mode": "BASIC", + "vulnerabilityMode": "VULNERABILITY_MODE_UNSPECIFIED" + }, + "selfLink": "https://container.googleapis.com/v1beta1/projects/example-project-01/locations/us-central1-a/clusters/containercluster-${uniqueId}", + "shieldedNodes": { + "enabled": true + }, + "status": "RUNNING", + "workloadIdentityConfig": { + "workloadPool": "example-project-01.svc.id.goog" + } +} + +--- + +GET https://serviceusage.googleapis.com/v1/projects/example-project-01/services?alt=json&fields=services%2Fname%2CnextPageToken&filter=state%3AENABLED&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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "nextPageToken": "", + "services": [ + { + "config": null, + "name": "projects/${projectNumber}/services/container.googleapis.com", + "parent": "projects/${projectNumber}", + "state": "ENABLED" + } + ] +} + +--- + +POST https://serviceusage.googleapis.com/v1/projects/example-project-01/services/gkehub.googleapis.com:enable?alt=json&prettyPrint=false +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 + +{} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://serviceusage.googleapis.com/v1/projects/example-project-01/services?alt=json&fields=services%2Fname%2CnextPageToken&filter=state%3AENABLED&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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "nextPageToken": "", + "services": [ + { + "config": null, + "name": "projects/${projectNumber}/services/gkehub.googleapis.com", + "parent": "projects/${projectNumber}", + "state": "ENABLED" + }, + { + "config": null, + "name": "projects/${projectNumber}/services/container.googleapis.com", + "parent": "projects/${projectNumber}", + "state": "ENABLED" + } + ] +} + +--- + +POST https://serviceusage.googleapis.com/v1/projects/example-project-01/services/anthosconfigmanagement.googleapis.com:enable?alt=json&prettyPrint=false +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 + +{} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://serviceusage.googleapis.com/v1/projects/example-project-01/services?alt=json&fields=services%2Fname%2CnextPageToken&filter=state%3AENABLED&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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "nextPageToken": "", + "services": [ + { + "config": null, + "name": "projects/${projectNumber}/services/gkehub.googleapis.com", + "parent": "projects/${projectNumber}", + "state": "ENABLED" + }, + { + "config": null, + "name": "projects/${projectNumber}/services/anthosconfigmanagement.googleapis.com", + "parent": "projects/${projectNumber}", + "state": "ENABLED" + }, + { + "config": null, + "name": "projects/${projectNumber}/services/container.googleapis.com", + "parent": "projects/${projectNumber}", + "state": "ENABLED" + } + ] +} + +--- + +GET https://gkehub.googleapis.com/v1beta/projects/example-project-01/locations/global/features/configmanagement?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": "feature \"projects/example-project-01/locations/global/features/configmanagement\" not found" +} + +--- + +POST https://gkehub.googleapis.com/v1beta/projects/example-project-01/locations/global/features?alt=json&featureId=configmanagement +Content-Type: application/json +User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 + +{ + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "projects/example-project-01/locations/global/features/configmanagement" +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://gkehub.googleapis.com/v1beta/projects/example-project-01/locations/global/features/configmanagement?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 + +{ + "createTime": null, + "deleteTime": null, + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "membershipSpecs": {}, + "membershipStates": {}, + "name": "projects/example-project-01/locations/global/features/configmanagement", + "resourceState": null, + "spec": null, + "state": null, + "updateTime": null +} + +--- + +GET https://gkehub.googleapis.com/v1beta1/projects/example-project-01/locations/global/memberships/gkehubmembership-${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": "membership \"projects/example-project-01/locations/global/memberships/gkehubmembership-${uniqueId}\" not found" +} + +--- + +POST https://gkehub.googleapis.com/v1beta1/projects/example-project-01/locations/global/memberships?alt=json&membershipId=gkehubmembership-${uniqueId} +Content-Type: application/json +User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 + +{ + "authority": { + "issuer": "https://container.googleapis.com/v1/projects/example-project-01/locations/us-central1-a/clusters/containercluster-${uniqueId}" + }, + "description": "A sample GKE Hub membership", + "endpoint": { + "gkeCluster": { + "resourceLink": "//container.googleapis.com/projects/example-project-01/locations/us-central1-a/clusters/containercluster-${uniqueId}" + } + }, + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "projects/example-project-01/locations/global/memberships/gkehubmembership-${uniqueId}" +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://gkehub.googleapis.com/v1beta1/projects/example-project-01/locations/global/memberships/gkehubmembership-${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 + +{ + "authority": { + "identityProvider": "", + "issuer": "https://container.googleapis.com/v1/projects/example-project-01/locations/us-central1-a/clusters/containercluster-${uniqueId}", + "oidcJwks": "", + "workloadIdentityPool": "" + }, + "createTime": null, + "deleteTime": null, + "description": "A sample GKE Hub membership", + "endpoint": { + "gkeCluster": { + "clusterMissing": false, + "resourceLink": "//container.googleapis.com/projects/example-project-01/locations/us-central1-a/clusters/containercluster-${uniqueId}" + }, + "kubernetesMetadata": null, + "kubernetesResource": null + }, + "externalId": "", + "infrastructureType": "INFRASTRUCTURE_TYPE_UNSPECIFIED", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lastConnectionTime": null, + "monitoringConfig": null, + "name": "projects/example-project-01/locations/global/memberships/gkehubmembership-${uniqueId}", + "state": null, + "uniqueId": "111111111111111111111", + "updateTime": null +} + +--- + +GET https://gkehub.googleapis.com/v1beta/projects/example-project-01/locations/global/features/configmanagement?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 + +{ + "createTime": null, + "deleteTime": null, + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "membershipSpecs": {}, + "membershipStates": {}, + "name": "projects/example-project-01/locations/global/features/configmanagement", + "resourceState": null, + "spec": null, + "state": null, + "updateTime": null +} + +--- + +PATCH https://gkehub.googleapis.com/v1beta/projects/example-project-01/locations/global/features/configmanagement?alt=json&updateMask=membershipSpecs +Content-Type: application/json +User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 + +{ + "membershipSpecs": { + "projects/example-project-01/locations/global/memberships/gkehubmembership-${uniqueId}": { + "configmanagement": { + "configSync": { + "git": { + "policyDir": "config-connector", + "secretType": "none", + "syncBranch": "master", + "syncRepo": "https://github.com/GoogleCloudPlatform/cloud-foundation-toolkit", + "syncRev": "HEAD", + "syncWaitSecs": "20" + }, + "sourceFormat": "hierarchy" + } + } + } + } +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://gkehub.googleapis.com/v1beta/projects/example-project-01/locations/global/features/configmanagement?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 + +{ + "createTime": null, + "deleteTime": null, + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "membershipSpecs": { + "projects/example-project-01/locations/global/memberships/gkehubmembership-${uniqueId}": { + "configmanagement": { + "binauthz": null, + "configSync": { + "git": { + "gcpServiceAccountEmail": "", + "httpsProxy": "", + "policyDir": "config-connector", + "secretType": "none", + "syncBranch": "master", + "syncRepo": "https://github.com/GoogleCloudPlatform/cloud-foundation-toolkit", + "syncRev": "HEAD", + "syncWaitSecs": "20" + }, + "sourceFormat": "hierarchy" + }, + "hierarchyController": null, + "policyController": null, + "version": "" + } + } + }, + "membershipStates": {}, + "name": "projects/example-project-01/locations/global/features/configmanagement", + "resourceState": null, + "spec": null, + "state": null, + "updateTime": null +} + +--- + +PATCH https://gkehub.googleapis.com/v1beta/projects/example-project-01/locations/global/features/configmanagement?alt=json&updateMask=membershipSpecs +Content-Type: application/json +User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 + +{ + "membershipSpecs": { + "projects/example-project-01/locations/global/memberships/gkehubmembership-${uniqueId}": { + "configmanagement": { + "configSync": { + "git": { + "policyDir": "config-connector", + "secretType": "none", + "syncBranch": "master", + "syncRepo": "https://github.com/GoogleCloudPlatform/cloud-foundation-toolkit", + "syncRev": "HEAD", + "syncWaitSecs": "20" + }, + "sourceFormat": "unstructured" + }, + "hierarchyController": { + "enableHierarchicalResourceQuota": true, + "enablePodTreeLabels": true, + "enabled": true + } + } + } + } +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://gkehub.googleapis.com/v1beta/projects/example-project-01/locations/global/features/configmanagement?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 + +{ + "createTime": null, + "deleteTime": null, + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "membershipSpecs": { + "projects/example-project-01/locations/global/memberships/gkehubmembership-${uniqueId}": { + "configmanagement": { + "binauthz": null, + "configSync": { + "git": { + "gcpServiceAccountEmail": "", + "httpsProxy": "", + "policyDir": "config-connector", + "secretType": "none", + "syncBranch": "master", + "syncRepo": "https://github.com/GoogleCloudPlatform/cloud-foundation-toolkit", + "syncRev": "HEAD", + "syncWaitSecs": "20" + }, + "sourceFormat": "unstructured" + }, + "hierarchyController": { + "enableHierarchicalResourceQuota": true, + "enablePodTreeLabels": true, + "enabled": true + }, + "policyController": null, + "version": "" + } + } + }, + "membershipStates": {}, + "name": "projects/example-project-01/locations/global/features/configmanagement", + "resourceState": null, + "spec": null, + "state": null, + "updateTime": null +} + +--- + +PATCH https://gkehub.googleapis.com/v1beta/projects/example-project-01/locations/global/features/configmanagement?alt=json&updateMask=membershipSpecs +Content-Type: application/json +User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 + +{ + "membershipSpecs": { + "projects/example-project-01/locations/global/memberships/gkehubmembership-${uniqueId}": {} + } +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://gkehub.googleapis.com/v1beta1/projects/example-project-01/locations/global/memberships/gkehubmembership-${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 + +{ + "authority": { + "identityProvider": "", + "issuer": "https://container.googleapis.com/v1/projects/example-project-01/locations/us-central1-a/clusters/containercluster-${uniqueId}", + "oidcJwks": "", + "workloadIdentityPool": "" + }, + "createTime": null, + "deleteTime": null, + "description": "A sample GKE Hub membership", + "endpoint": { + "gkeCluster": { + "clusterMissing": false, + "resourceLink": "//container.googleapis.com/projects/example-project-01/locations/us-central1-a/clusters/containercluster-${uniqueId}" + }, + "kubernetesMetadata": null, + "kubernetesResource": null + }, + "externalId": "", + "infrastructureType": "INFRASTRUCTURE_TYPE_UNSPECIFIED", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lastConnectionTime": null, + "monitoringConfig": null, + "name": "projects/example-project-01/locations/global/memberships/gkehubmembership-${uniqueId}", + "state": null, + "uniqueId": "111111111111111111111", + "updateTime": null +} + +--- + +DELETE https://gkehub.googleapis.com/v1beta1/projects/example-project-01/locations/global/memberships/gkehubmembership-${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://gkehub.googleapis.com/v1beta1/projects/example-project-01/locations/global/memberships/gkehubmembership-${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": "membership \"projects/example-project-01/locations/global/memberships/gkehubmembership-${uniqueId}\" not found" +} + +--- + +GET https://gkehub.googleapis.com/v1beta/projects/example-project-01/locations/global/features/configmanagement?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 + +{ + "createTime": null, + "deleteTime": null, + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "membershipSpecs": { + "projects/example-project-01/locations/global/memberships/gkehubmembership-${uniqueId}": {} + }, + "membershipStates": {}, + "name": "projects/example-project-01/locations/global/features/configmanagement", + "resourceState": null, + "spec": null, + "state": null, + "updateTime": null +} + +--- + +DELETE https://gkehub.googleapis.com/v1beta/projects/example-project-01/locations/global/features/configmanagement?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://gkehub.googleapis.com/v1beta/projects/example-project-01/locations/global/features/configmanagement?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": "feature \"projects/example-project-01/locations/global/features/configmanagement\" not found" +} + +--- + +GET https://serviceusage.googleapis.com/v1/projects/example-project-01/services?alt=json&fields=services%2Fname%2CnextPageToken&filter=state%3AENABLED&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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "nextPageToken": "", + "services": [ + { + "config": null, + "name": "projects/${projectNumber}/services/gkehub.googleapis.com", + "parent": "projects/${projectNumber}", + "state": "ENABLED" + }, + { + "config": null, + "name": "projects/${projectNumber}/services/anthosconfigmanagement.googleapis.com", + "parent": "projects/${projectNumber}", + "state": "ENABLED" + }, + { + "config": null, + "name": "projects/${projectNumber}/services/container.googleapis.com", + "parent": "projects/${projectNumber}", + "state": "ENABLED" + } + ] +} + +--- + +POST https://serviceusage.googleapis.com/v1/projects/example-project-01/services/anthosconfigmanagement.googleapis.com:disable?alt=json&prettyPrint=false +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 + +{} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://container.googleapis.com/v1beta1/projects/example-project-01/locations/us-central1-a/clusters/containercluster-${uniqueId}?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 + +{ + "addonsConfig": { + "gcePersistentDiskCsiDriverConfig": { + "enabled": true + }, + "kubernetesDashboard": { + "disabled": true + }, + "networkPolicyConfig": { + "disabled": true + } + }, + "autopilot": {}, + "autoscaling": { + "autoscalingProfile": "BALANCED" + }, + "binaryAuthorization": {}, + "clusterTelemetry": { + "type": "ENABLED" + }, + "createTime": "2024-04-01T12:34:56.123456Z", + "databaseEncryption": { + "state": "DECRYPTED" + }, + "enterpriseConfig": { + "clusterTier": "STANDARD" + }, + "initialNodeCount": 1, + "ipAllocationPolicy": { + "stackType": "IPV4" + }, + "legacyAbac": {}, + "location": "us-central1-a", + "locations": [ + "us-central1-a" + ], + "loggingConfig": { + "componentConfig": { + "enableComponents": [ + "SYSTEM_COMPONENTS", + "WORKLOADS" + ] + } + }, + "maintenancePolicy": { + "window": {} + }, + "masterAuthorizedNetworksConfig": {}, + "monitoringConfig": { + "advancedDatapathObservabilityConfig": {}, + "componentConfig": { + "enableComponents": [ + "SYSTEM_COMPONENTS" + ] + }, + "managedPrometheusConfig": { + "enabled": true + } + }, + "name": "containercluster-${uniqueId}", + "network": "projects/example-project-01/global/networks/default", + "networkConfig": { + "network": "projects/example-project-01/global/networks/default", + "subnetwork": "projects/example-project-01/regions/us-central1-a/subnetworks/default" + }, + "networkPolicy": {}, + "nodeConfig": { + "oauthScopes": [ + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/logging.write", + "https://www.googleapis.com/auth/monitoring", + "https://www.googleapis.com/auth/service.management.readonly", + "https://www.googleapis.com/auth/servicecontrol", + "https://www.googleapis.com/auth/trace.append" + ] + }, + "nodePools": [ + { + "config": { + "diskSizeGb": 100, + "diskType": "pd-balanced", + "imageType": "COS_CONTAINERD", + "machineType": "e2-standard-4", + "metadata": { + "disable-legacy-endpoints": "true" + }, + "oauthScopes": [ + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/logging.write", + "https://www.googleapis.com/auth/monitoring", + "https://www.googleapis.com/auth/service.management.readonly", + "https://www.googleapis.com/auth/servicecontrol", + "https://www.googleapis.com/auth/trace.append" + ], + "serviceAccount": "default", + "shieldedInstanceConfig": { + "enableIntegrityMonitoring": true + }, + "windowsNodeConfig": {} + }, + "initialNodeCount": 1, + "locations": [ + "us-central1-a" + ], + "management": { + "autoRepair": true, + "autoUpgrade": true + }, + "maxPodsConstraint": { + "maxPodsPerNode": "110" + }, + "name": "default-pool", + "networkConfig": { + "enablePrivateNodes": false + }, + "status": "RUNNING", + "upgradeSettings": { + "maxSurge": 1, + "strategy": "SURGE" + } + } + ], + "notificationConfig": { + "pubsub": {} + }, + "releaseChannel": { + "channel": "REGULAR" + }, + "resourceLabels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "securityPostureConfig": { + "mode": "BASIC", + "vulnerabilityMode": "VULNERABILITY_MODE_UNSPECIFIED" + }, + "selfLink": "https://container.googleapis.com/v1beta1/projects/example-project-01/locations/us-central1-a/clusters/containercluster-${uniqueId}", + "shieldedNodes": { + "enabled": true + }, + "status": "RUNNING", + "workloadIdentityConfig": { + "workloadPool": "example-project-01.svc.id.goog" + } +} + +--- + +DELETE https://container.googleapis.com/v1beta1/projects/example-project-01/locations/us-central1-a/clusters/containercluster-${uniqueId}?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 + +{ + "name": "${operationID}", + "operationType": "DELETE_CLUSTER", + "selfLink": "https://container.googleapis.com/v1beta1/projects/${projectNumber}/locations/us-central1-a/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetLink": "https://container.googleapis.com/v1beta1/projects/example-project-01/locations/us-central1-a/clusters/containercluster-${uniqueId}", + "zone": "us-central1-a" +} + +--- + +GET https://serviceusage.googleapis.com/v1/projects/example-project-01/services?alt=json&fields=services%2Fname%2CnextPageToken&filter=state%3AENABLED&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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "nextPageToken": "", + "services": [ + { + "config": null, + "name": "projects/${projectNumber}/services/gkehub.googleapis.com", + "parent": "projects/${projectNumber}", + "state": "ENABLED" + }, + { + "config": null, + "name": "projects/${projectNumber}/services/container.googleapis.com", + "parent": "projects/${projectNumber}", + "state": "ENABLED" + } + ] +} + +--- + +POST https://serviceusage.googleapis.com/v1/projects/example-project-01/services/container.googleapis.com:disable?alt=json&prettyPrint=false +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 + +{} + +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/gkehub/v1beta1/gkehubmembership/_generated_object_gkehubmembership.golden.yaml b/pkg/test/resourcefixture/testdata/basic/gkehub/v1beta1/gkehubmembership/_generated_object_gkehubmembership.golden.yaml new file mode 100644 index 0000000000..50e7dbb000 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/gkehub/v1beta1/gkehubmembership/_generated_object_gkehubmembership.golden.yaml @@ -0,0 +1,38 @@ +apiVersion: gkehub.cnrm.cloud.google.com/v1beta1 +kind: GKEHubMembership +metadata: + annotations: + cnrm.cloud.google.com/management-conflict-prevention-policy: none + cnrm.cloud.google.com/mutable-but-unreadable-fields: '{}' + 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" + name: gkehubmembership-${uniqueId} + namespace: ${uniqueId} +spec: + authority: + issuer: https://container.googleapis.com/v1/projects/${projectId}/locations/us-central1-a/clusters/containercluster-${uniqueId} + description: A simpler GKE Hub membership update + endpoint: + gkeCluster: + resourceRef: + name: containercluster-${uniqueId} + infrastructureType: INFRASTRUCTURE_TYPE_UNSPECIFIED + location: global + resourceID: gkehubmembership-${uniqueId} +status: + authority: + identityProvider: "" + workloadIdentityPool: "" + conditions: + - lastTransitionTime: "1970-01-01T00:00:00Z" + message: The resource is up to date + reason: UpToDate + status: "True" + type: Ready + observedGeneration: 3 diff --git a/pkg/test/resourcefixture/testdata/basic/gkehub/v1beta1/gkehubmembership/_http.log b/pkg/test/resourcefixture/testdata/basic/gkehub/v1beta1/gkehubmembership/_http.log new file mode 100644 index 0000000000..8391e0ec14 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/gkehub/v1beta1/gkehubmembership/_http.log @@ -0,0 +1,654 @@ +GET https://container.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1-a/clusters/containercluster-${uniqueId}?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 + +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": "cluster \"projects/${projectId}/locations/us-central1-a/clusters/containercluster-${uniqueId}\" not found", + "reason": "notFound" + } + ], + "message": "cluster \"projects/${projectId}/locations/us-central1-a/clusters/containercluster-${uniqueId}\" not found", + "status": "NOT_FOUND" + } +} + +--- + +POST https://container.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1-a/clusters?alt=json&prettyPrint=false +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 + +{ + "cluster": { + "autopilot": { + "enabled": false + }, + "autoscaling": { + "enableNodeAutoprovisioning": false + }, + "binaryAuthorization": { + "enabled": false + }, + "initialNodeCount": 1, + "ipAllocationPolicy": { + "stackType": "IPV4", + "useIpAliases": false + }, + "legacyAbac": { + "enabled": false + }, + "maintenancePolicy": { + "window": {} + }, + "masterAuthorizedNetworksConfig": {}, + "name": "containercluster-${uniqueId}", + "network": "projects/${projectId}/global/networks/default", + "networkConfig": {}, + "networkPolicy": {}, + "nodeConfig": { + "oauthScopes": [ + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/logging.write", + "https://www.googleapis.com/auth/monitoring", + "https://www.googleapis.com/auth/service.management.readonly", + "https://www.googleapis.com/auth/servicecontrol", + "https://www.googleapis.com/auth/trace.append" + ] + }, + "notificationConfig": { + "pubsub": {} + }, + "resourceLabels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "shieldedNodes": { + "enabled": true + }, + "workloadIdentityConfig": { + "workloadPool": "${projectId}.svc.id.goog" + } + } +} + +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": "${operationID}", + "operationType": "CREATE_CLUSTER", + "selfLink": "https://container.googleapis.com/v1beta1/projects/${projectNumber}/locations/us-central1-a/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetLink": "https://container.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1-a/clusters/containercluster-${uniqueId}", + "zone": "us-central1-a" +} + +--- + +GET https://container.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1-a/clusters/containercluster-${uniqueId}?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 + +{ + "addonsConfig": { + "gcePersistentDiskCsiDriverConfig": { + "enabled": true + }, + "kubernetesDashboard": { + "disabled": true + }, + "networkPolicyConfig": { + "disabled": true + } + }, + "autopilot": {}, + "autoscaling": { + "autoscalingProfile": "BALANCED" + }, + "binaryAuthorization": {}, + "clusterTelemetry": { + "type": "ENABLED" + }, + "createTime": "2024-04-01T12:34:56.123456Z", + "databaseEncryption": { + "state": "DECRYPTED" + }, + "enterpriseConfig": { + "clusterTier": "STANDARD" + }, + "initialNodeCount": 1, + "ipAllocationPolicy": { + "stackType": "IPV4" + }, + "legacyAbac": {}, + "location": "us-central1-a", + "locations": [ + "us-central1-a" + ], + "loggingConfig": { + "componentConfig": { + "enableComponents": [ + "SYSTEM_COMPONENTS", + "WORKLOADS" + ] + } + }, + "maintenancePolicy": { + "window": {} + }, + "masterAuthorizedNetworksConfig": {}, + "monitoringConfig": { + "advancedDatapathObservabilityConfig": {}, + "componentConfig": { + "enableComponents": [ + "SYSTEM_COMPONENTS" + ] + }, + "managedPrometheusConfig": { + "enabled": true + } + }, + "name": "containercluster-${uniqueId}", + "network": "projects/${projectId}/global/networks/default", + "networkConfig": { + "network": "projects/${projectId}/global/networks/default", + "subnetwork": "projects/${projectId}/regions/us-central1-a/subnetworks/default" + }, + "networkPolicy": {}, + "nodeConfig": { + "oauthScopes": [ + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/logging.write", + "https://www.googleapis.com/auth/monitoring", + "https://www.googleapis.com/auth/service.management.readonly", + "https://www.googleapis.com/auth/servicecontrol", + "https://www.googleapis.com/auth/trace.append" + ] + }, + "nodePools": [ + { + "config": { + "diskSizeGb": 100, + "diskType": "pd-balanced", + "imageType": "COS_CONTAINERD", + "machineType": "e2-standard-4", + "metadata": { + "disable-legacy-endpoints": "true" + }, + "oauthScopes": [ + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/logging.write", + "https://www.googleapis.com/auth/monitoring", + "https://www.googleapis.com/auth/service.management.readonly", + "https://www.googleapis.com/auth/servicecontrol", + "https://www.googleapis.com/auth/trace.append" + ], + "serviceAccount": "default", + "shieldedInstanceConfig": { + "enableIntegrityMonitoring": true + }, + "windowsNodeConfig": {} + }, + "initialNodeCount": 1, + "locations": [ + "us-central1-a" + ], + "management": { + "autoRepair": true, + "autoUpgrade": true + }, + "maxPodsConstraint": { + "maxPodsPerNode": "110" + }, + "name": "default-pool", + "networkConfig": { + "enablePrivateNodes": false + }, + "status": "RUNNING", + "upgradeSettings": { + "maxSurge": 1, + "strategy": "SURGE" + } + } + ], + "notificationConfig": { + "pubsub": {} + }, + "releaseChannel": { + "channel": "REGULAR" + }, + "resourceLabels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "securityPostureConfig": { + "mode": "BASIC", + "vulnerabilityMode": "VULNERABILITY_MODE_UNSPECIFIED" + }, + "selfLink": "https://container.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1-a/clusters/containercluster-${uniqueId}", + "shieldedNodes": { + "enabled": true + }, + "status": "RUNNING", + "workloadIdentityConfig": { + "workloadPool": "${projectId}.svc.id.goog" + } +} + +--- + +GET https://gkehub.googleapis.com/v1beta1/projects/${projectId}/locations/global/memberships/gkehubmembership-${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": "membership \"projects/${projectId}/locations/global/memberships/gkehubmembership-${uniqueId}\" not found" +} + +--- + +POST https://gkehub.googleapis.com/v1beta1/projects/${projectId}/locations/global/memberships?alt=json&membershipId=gkehubmembership-${uniqueId} +Content-Type: application/json +User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 + +{ + "authority": { + "issuer": "https://container.googleapis.com/v1/projects/${projectId}/locations/us-central1-a/clusters/containercluster-${uniqueId}" + }, + "description": "A sample GKE Hub membership", + "endpoint": { + "gkeCluster": { + "resourceLink": "//container.googleapis.com/projects/${projectId}/locations/us-central1-a/clusters/containercluster-${uniqueId}" + } + }, + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectId}/locations/global/memberships/gkehubmembership-${uniqueId}" +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://gkehub.googleapis.com/v1beta1/projects/${projectId}/locations/global/memberships/gkehubmembership-${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 + +{ + "authority": { + "identityProvider": "", + "issuer": "https://container.googleapis.com/v1/projects/${projectId}/locations/us-central1-a/clusters/containercluster-${uniqueId}", + "oidcJwks": "", + "workloadIdentityPool": "" + }, + "createTime": null, + "deleteTime": null, + "description": "A sample GKE Hub membership", + "endpoint": { + "gkeCluster": { + "clusterMissing": false, + "resourceLink": "//container.googleapis.com/projects/${projectId}/locations/us-central1-a/clusters/containercluster-${uniqueId}" + }, + "kubernetesMetadata": null, + "kubernetesResource": null + }, + "externalId": "", + "infrastructureType": "INFRASTRUCTURE_TYPE_UNSPECIFIED", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lastConnectionTime": null, + "monitoringConfig": null, + "name": "projects/${projectId}/locations/global/memberships/gkehubmembership-${uniqueId}", + "state": null, + "uniqueId": "111111111111111111111", + "updateTime": null +} + +--- + +PATCH https://gkehub.googleapis.com/v1beta1/projects/${projectId}/locations/global/memberships/gkehubmembership-${uniqueId}?alt=json&updateMask=description +Content-Type: application/json +User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 + +{ + "authority": { + "issuer": "https://container.googleapis.com/v1/projects/${projectId}/locations/us-central1-a/clusters/containercluster-${uniqueId}" + }, + "description": "A simpler GKE Hub membership update", + "endpoint": { + "gkeCluster": { + "resourceLink": "//container.googleapis.com/projects/${projectId}/locations/us-central1-a/clusters/containercluster-${uniqueId}" + } + }, + "infrastructureType": "INFRASTRUCTURE_TYPE_UNSPECIFIED", + "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://gkehub.googleapis.com/v1beta1/projects/${projectId}/locations/global/memberships/gkehubmembership-${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 + +{ + "authority": { + "identityProvider": "", + "issuer": "https://container.googleapis.com/v1/projects/${projectId}/locations/us-central1-a/clusters/containercluster-${uniqueId}", + "oidcJwks": "", + "workloadIdentityPool": "" + }, + "createTime": null, + "deleteTime": null, + "description": "A simpler GKE Hub membership update", + "endpoint": { + "gkeCluster": { + "clusterMissing": false, + "resourceLink": "//container.googleapis.com/projects/${projectId}/locations/us-central1-a/clusters/containercluster-${uniqueId}" + }, + "kubernetesMetadata": null, + "kubernetesResource": null + }, + "externalId": "", + "infrastructureType": "INFRASTRUCTURE_TYPE_UNSPECIFIED", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lastConnectionTime": null, + "monitoringConfig": null, + "name": "projects/${projectId}/locations/global/memberships/gkehubmembership-${uniqueId}", + "state": null, + "uniqueId": "111111111111111111111", + "updateTime": null +} + +--- + +DELETE https://gkehub.googleapis.com/v1beta1/projects/${projectId}/locations/global/memberships/gkehubmembership-${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://gkehub.googleapis.com/v1beta1/projects/${projectId}/locations/global/memberships/gkehubmembership-${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": "membership \"projects/${projectId}/locations/global/memberships/gkehubmembership-${uniqueId}\" not found" +} + +--- + +GET https://container.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1-a/clusters/containercluster-${uniqueId}?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 + +{ + "addonsConfig": { + "gcePersistentDiskCsiDriverConfig": { + "enabled": true + }, + "kubernetesDashboard": { + "disabled": true + }, + "networkPolicyConfig": { + "disabled": true + } + }, + "autopilot": {}, + "autoscaling": { + "autoscalingProfile": "BALANCED" + }, + "binaryAuthorization": {}, + "clusterTelemetry": { + "type": "ENABLED" + }, + "createTime": "2024-04-01T12:34:56.123456Z", + "databaseEncryption": { + "state": "DECRYPTED" + }, + "enterpriseConfig": { + "clusterTier": "STANDARD" + }, + "initialNodeCount": 1, + "ipAllocationPolicy": { + "stackType": "IPV4" + }, + "legacyAbac": {}, + "location": "us-central1-a", + "locations": [ + "us-central1-a" + ], + "loggingConfig": { + "componentConfig": { + "enableComponents": [ + "SYSTEM_COMPONENTS", + "WORKLOADS" + ] + } + }, + "maintenancePolicy": { + "window": {} + }, + "masterAuthorizedNetworksConfig": {}, + "monitoringConfig": { + "advancedDatapathObservabilityConfig": {}, + "componentConfig": { + "enableComponents": [ + "SYSTEM_COMPONENTS" + ] + }, + "managedPrometheusConfig": { + "enabled": true + } + }, + "name": "containercluster-${uniqueId}", + "network": "projects/${projectId}/global/networks/default", + "networkConfig": { + "network": "projects/${projectId}/global/networks/default", + "subnetwork": "projects/${projectId}/regions/us-central1-a/subnetworks/default" + }, + "networkPolicy": {}, + "nodeConfig": { + "oauthScopes": [ + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/logging.write", + "https://www.googleapis.com/auth/monitoring", + "https://www.googleapis.com/auth/service.management.readonly", + "https://www.googleapis.com/auth/servicecontrol", + "https://www.googleapis.com/auth/trace.append" + ] + }, + "nodePools": [ + { + "config": { + "diskSizeGb": 100, + "diskType": "pd-balanced", + "imageType": "COS_CONTAINERD", + "machineType": "e2-standard-4", + "metadata": { + "disable-legacy-endpoints": "true" + }, + "oauthScopes": [ + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/logging.write", + "https://www.googleapis.com/auth/monitoring", + "https://www.googleapis.com/auth/service.management.readonly", + "https://www.googleapis.com/auth/servicecontrol", + "https://www.googleapis.com/auth/trace.append" + ], + "serviceAccount": "default", + "shieldedInstanceConfig": { + "enableIntegrityMonitoring": true + }, + "windowsNodeConfig": {} + }, + "initialNodeCount": 1, + "locations": [ + "us-central1-a" + ], + "management": { + "autoRepair": true, + "autoUpgrade": true + }, + "maxPodsConstraint": { + "maxPodsPerNode": "110" + }, + "name": "default-pool", + "networkConfig": { + "enablePrivateNodes": false + }, + "status": "RUNNING", + "upgradeSettings": { + "maxSurge": 1, + "strategy": "SURGE" + } + } + ], + "notificationConfig": { + "pubsub": {} + }, + "releaseChannel": { + "channel": "REGULAR" + }, + "resourceLabels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "securityPostureConfig": { + "mode": "BASIC", + "vulnerabilityMode": "VULNERABILITY_MODE_UNSPECIFIED" + }, + "selfLink": "https://container.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1-a/clusters/containercluster-${uniqueId}", + "shieldedNodes": { + "enabled": true + }, + "status": "RUNNING", + "workloadIdentityConfig": { + "workloadPool": "${projectId}.svc.id.goog" + } +} + +--- + +DELETE https://container.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1-a/clusters/containercluster-${uniqueId}?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 + +{ + "name": "${operationID}", + "operationType": "DELETE_CLUSTER", + "selfLink": "https://container.googleapis.com/v1beta1/projects/${projectNumber}/locations/us-central1-a/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetLink": "https://container.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1-a/clusters/containercluster-${uniqueId}", + "zone": "us-central1-a" +} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/basic/iam/v1beta1/iamserviceaccount/_http.log b/pkg/test/resourcefixture/testdata/basic/iam/v1beta1/iamserviceaccount/_http.log index def7ebf773..c2a27869e1 100644 --- a/pkg/test/resourcefixture/testdata/basic/iam/v1beta1/iamserviceaccount/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/iam/v1beta1/iamserviceaccount/_http.log @@ -1,6 +1,5 @@ GET https://iam.googleapis.com/v1/projects/${projectId}/serviceAccounts/gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com?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 -X-Goog-Api-Client: gl-go/1.22.2 gdcl/0.160.0 404 Not Found Cache-Control: private @@ -33,7 +32,6 @@ X-Xss-Protection: 0 POST https://iam.googleapis.com/v1/projects/${projectId}/serviceAccounts?alt=json&prettyPrint=false 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 -X-Goog-Api-Client: gl-go/1.22.2 gdcl/0.160.0 { "accountId": "gsa-${uniqueId}", @@ -67,7 +65,6 @@ X-Xss-Protection: 0 GET https://iam.googleapis.com/v1/projects/${projectId}/serviceAccounts/gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com?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 -X-Goog-Api-Client: gl-go/1.22.2 gdcl/0.160.0 200 OK Cache-Control: private @@ -95,7 +92,6 @@ X-Xss-Protection: 0 PATCH https://iam.googleapis.com/v1/projects/${projectId}/serviceAccounts/gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com?alt=json&prettyPrint=false 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 -X-Goog-Api-Client: gl-go/1.22.2 gdcl/0.160.0 { "serviceAccount": { @@ -125,7 +121,6 @@ X-Xss-Protection: 0 GET https://iam.googleapis.com/v1/projects/${projectId}/serviceAccounts/gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com?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 -X-Goog-Api-Client: gl-go/1.22.2 gdcl/0.160.0 200 OK Cache-Control: private @@ -152,7 +147,6 @@ X-Xss-Protection: 0 DELETE https://iam.googleapis.com/v1/projects/${projectId}/serviceAccounts/gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com?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 -X-Goog-Api-Client: gl-go/1.22.2 gdcl/0.160.0 200 OK Cache-Control: private diff --git a/pkg/test/resourcefixture/testdata/basic/logging/v1beta1/logginglogbucket/projectlogbucket/_http.log b/pkg/test/resourcefixture/testdata/basic/logging/v1beta1/logginglogbucket/projectlogbucket/_http.log index f2ba06d2da..df5aec3245 100644 --- a/pkg/test/resourcefixture/testdata/basic/logging/v1beta1/logginglogbucket/projectlogbucket/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/logging/v1beta1/logginglogbucket/projectlogbucket/_http.log @@ -23,56 +23,6 @@ X-Xss-Protection: 0 --- -GET https://logging.googleapis.com/v2/projects/${projectId}/locations/global/buckets/logginglogbucket-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: 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, - "message": "Bucket `logginglogbucket-${uniqueId}` does not exist", - "status": "NOT_FOUND" - } -} - ---- - -GET https://logging.googleapis.com/v2/projects/${projectId}/locations/global/buckets/logginglogbucket-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: 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, - "message": "Bucket `logginglogbucket-${uniqueId}` does not exist", - "status": "NOT_FOUND" - } -} - ---- - POST https://logging.googleapis.com/v2/projects/${projectId}/locations/global/buckets?alt=json&bucketId=logginglogbucket-${uniqueId} Content-Type: application/json User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 @@ -132,214 +82,6 @@ X-Xss-Protection: 0 --- -GET https://logging.googleapis.com/v2/projects/${projectId}/locations/global/buckets/logginglogbucket-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: 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 - -{ - "createTime": "2024-04-01T12:34:56.123456Z", - "description": "A sample log bucket", - "lifecycleState": "ACTIVE", - "name": "projects/${projectId}/locations/global/buckets/logginglogbucket-${uniqueId}", - "retentionDays": 30, - "updateTime": "2024-04-01T12:34:56.123456Z" -} - ---- - -GET https://logging.googleapis.com/v2/projects/${projectId}/locations/global/buckets/logginglogbucket-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: 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 - -{ - "createTime": "2024-04-01T12:34:56.123456Z", - "description": "A sample log bucket", - "lifecycleState": "ACTIVE", - "name": "projects/${projectId}/locations/global/buckets/logginglogbucket-${uniqueId}", - "retentionDays": 30, - "updateTime": "2024-04-01T12:34:56.123456Z" -} - ---- - -GET https://logging.googleapis.com/v2/projects/${projectId}/locations/global/buckets/logginglogbucket-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: 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 - -{ - "createTime": "2024-04-01T12:34:56.123456Z", - "description": "A sample log bucket", - "lifecycleState": "ACTIVE", - "name": "projects/${projectId}/locations/global/buckets/logginglogbucket-${uniqueId}", - "retentionDays": 30, - "updateTime": "2024-04-01T12:34:56.123456Z" -} - ---- - -GET https://logging.googleapis.com/v2/projects/${projectId}/locations/global/buckets/logginglogbucket-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: 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 - -{ - "createTime": "2024-04-01T12:34:56.123456Z", - "description": "A sample log bucket", - "lifecycleState": "ACTIVE", - "name": "projects/${projectId}/locations/global/buckets/logginglogbucket-${uniqueId}", - "retentionDays": 30, - "updateTime": "2024-04-01T12:34:56.123456Z" -} - ---- - -GET https://logging.googleapis.com/v2/projects/${projectId}/locations/global/buckets/logginglogbucket-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: 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 - -{ - "createTime": "2024-04-01T12:34:56.123456Z", - "description": "A sample log bucket", - "lifecycleState": "ACTIVE", - "name": "projects/${projectId}/locations/global/buckets/logginglogbucket-${uniqueId}", - "retentionDays": 30, - "updateTime": "2024-04-01T12:34:56.123456Z" -} - ---- - -GET https://logging.googleapis.com/v2/projects/${projectId}/locations/global/buckets/logginglogbucket-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: 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 - -{ - "createTime": "2024-04-01T12:34:56.123456Z", - "description": "A sample log bucket", - "lifecycleState": "ACTIVE", - "name": "projects/${projectId}/locations/global/buckets/logginglogbucket-${uniqueId}", - "retentionDays": 30, - "updateTime": "2024-04-01T12:34:56.123456Z" -} - ---- - -GET https://logging.googleapis.com/v2/projects/${projectId}/locations/global/buckets/logginglogbucket-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: 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 - -{ - "createTime": "2024-04-01T12:34:56.123456Z", - "description": "A sample log bucket", - "lifecycleState": "ACTIVE", - "name": "projects/${projectId}/locations/global/buckets/logginglogbucket-${uniqueId}", - "retentionDays": 30, - "updateTime": "2024-04-01T12:34:56.123456Z" -} - ---- - -GET https://logging.googleapis.com/v2/projects/${projectId}/locations/global/buckets/logginglogbucket-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: 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 - -{ - "createTime": "2024-04-01T12:34:56.123456Z", - "description": "A sample log bucket", - "lifecycleState": "ACTIVE", - "name": "projects/${projectId}/locations/global/buckets/logginglogbucket-${uniqueId}", - "retentionDays": 30, - "updateTime": "2024-04-01T12:34:56.123456Z" -} - ---- - PATCH https://logging.googleapis.com/v2/projects/${projectId}/locations/global/buckets/logginglogbucket-${uniqueId}?alt=json&updateMask=description%2CretentionDays Content-Type: application/json User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 @@ -398,58 +140,6 @@ X-Xss-Protection: 0 --- -GET https://logging.googleapis.com/v2/projects/${projectId}/locations/global/buckets/logginglogbucket-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: 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 - -{ - "createTime": "2024-04-01T12:34:56.123456Z", - "description": "An updated sample of a log bucket.", - "lifecycleState": "ACTIVE", - "name": "projects/${projectId}/locations/global/buckets/logginglogbucket-${uniqueId}", - "retentionDays": 100, - "updateTime": "2024-04-01T12:34:56.123456Z" -} - ---- - -GET https://logging.googleapis.com/v2/projects/${projectId}/locations/global/buckets/logginglogbucket-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: 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 - -{ - "createTime": "2024-04-01T12:34:56.123456Z", - "description": "An updated sample of a log bucket.", - "lifecycleState": "ACTIVE", - "name": "projects/${projectId}/locations/global/buckets/logginglogbucket-${uniqueId}", - "retentionDays": 100, - "updateTime": "2024-04-01T12:34:56.123456Z" -} - ---- - DELETE https://logging.googleapis.com/v2/projects/${projectId}/locations/global/buckets/logginglogbucket-${uniqueId}?alt=json Content-Type: application/json User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 diff --git a/pkg/test/resourcefixture/testdata/basic/logging/v1beta1/logginglogmetric/logmetricprojectref/_http.log b/pkg/test/resourcefixture/testdata/basic/logging/v1beta1/logginglogmetric/logmetricprojectref/_http.log index cdbb797916..7f1d06de1c 100644 --- a/pkg/test/resourcefixture/testdata/basic/logging/v1beta1/logginglogmetric/logmetricprojectref/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/logging/v1beta1/logginglogmetric/logmetricprojectref/_http.log @@ -546,6 +546,69 @@ X-Xss-Protection: 0 --- +GET https://logging.googleapis.com/v2/projects/example-project-02/metrics/linearlogmetric-${uniqueId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 + +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 + +{ + "bucketOptions": { + "linearBuckets": { + "numFiniteBuckets": 4, + "offset": 0.5, + "width": 2.5 + } + }, + "createTime": "2024-04-01T12:34:56.123456Z", + "description": "An updated sample log metric", + "disabled": true, + "filter": "resource.type=gae_app AND severity\u003e=ERROR", + "labelExtractors": { + "hasMass": "REGEXP_EXTRACT(jsonPayload.request, \".*([1-9]).*\")", + "mass": "EXTRACT(jsonPayload.request)", + "sku": "EXTRACT(jsonPayload.id)" + }, + "metricDescriptor": { + "description": "An updated sample log metric", + "displayName": "updated-sample-descriptor", + "labels": [ + { + "description": "amount of matter", + "key": "mass" + }, + { + "description": "whether the item has a mass", + "key": "hasMass", + "valueType": "BOOL" + }, + { + "description": "identifying number for item", + "key": "sku", + "valueType": "INT64" + } + ], + "metricKind": "DELTA", + "name": "projects/example-project-02/metricDescriptors/logging.googleapis.com/user/linearlogmetric-${uniqueId}", + "type": "logging.googleapis.com/user/linearlogmetric-${uniqueId}", + "unit": "s", + "valueType": "DISTRIBUTION" + }, + "name": "linearlogmetric-${uniqueId}", + "updateTime": "2024-04-01T12:34:56.123456Z", + "valueExtractor": "EXTRACT(jsonPayload.response)" +} + +--- + DELETE https://logging.googleapis.com/v2/projects/example-project-02/metrics/linearlogmetric-${uniqueId}?alt=json&prettyPrint=false User-Agent: google-api-go-client/0.5 diff --git a/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardbasic/_generated_object_monitoringdashboardbasic.golden.yaml b/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardbasic/_generated_object_monitoringdashboardbasic.golden.yaml index 81e1f8d473..138280de99 100644 --- a/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardbasic/_generated_object_monitoringdashboardbasic.golden.yaml +++ b/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardbasic/_generated_object_monitoringdashboardbasic.golden.yaml @@ -3,6 +3,7 @@ kind: MonitoringDashboard 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 diff --git a/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardbasic/_http.log b/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardbasic/_http.log index a81a02ff3a..caf1a0e4cb 100644 --- a/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardbasic/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardbasic/_http.log @@ -1,7 +1,6 @@ -GET https://monitoring.googleapis.com/v1/projects/${projectId}/dashboards/monitoringdashboard-${uniqueId}?%24alt=json%3Benum-encoding%3Dint +GET https://monitoring.googleapis.com/v1/projects/${projectId}/dashboards/monitoringdashboard-${uniqueId}?alt=json Content-Type: application/json -User-Agent: kcc/controller-manager -x-goog-request-params: name=projects%2F${projectId}%2Fdashboards%2Fmonitoringdashboard-${uniqueId} +User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 404 Not Found Cache-Control: private @@ -24,27 +23,26 @@ X-Xss-Protection: 0 --- -POST https://monitoring.googleapis.com/v1/projects/${projectId}/dashboards?%24alt=json%3Benum-encoding%3Dint +POST https://monitoring.googleapis.com/v1/projects/${projectId}/dashboards?alt=json Content-Type: application/json -User-Agent: kcc/controller-manager -x-goog-request-params: parent=projects%2F${projectId} +User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 { "columnLayout": { "columns": [ { - "weight": "2", + "weight": 2, "widgets": [ { "title": "Widget 1", "xyChart": { "dataSets": [ { - "plotType": 1, + "plotType": "LINE", "timeSeriesQuery": { "timeSeriesFilter": { "aggregation": { - "perSeriesAligner": 2 + "perSeriesAligner": "ALIGN_RATE" }, "filter": "metric.type=\"agent.googleapis.com/nginx/connections/accepted_count\"" }, @@ -55,14 +53,14 @@ x-goog-request-params: parent=projects%2F${projectId} "timeshiftDuration": "0s", "yAxis": { "label": "y1Axis", - "scale": 1 + "scale": "LINEAR" } } }, { "text": { "content": "Widget 2", - "format": 1 + "format": "MARKDOWN" } }, { @@ -70,11 +68,11 @@ x-goog-request-params: parent=projects%2F${projectId} "xyChart": { "dataSets": [ { - "plotType": 3, + "plotType": "STACKED_BAR", "timeSeriesQuery": { "timeSeriesFilter": { "aggregation": { - "perSeriesAligner": 2 + "perSeriesAligner": "ALIGN_RATE" }, "filter": "metric.type=\"agent.googleapis.com/nginx/connections/accepted_count\"" }, @@ -85,7 +83,7 @@ x-goog-request-params: parent=projects%2F${projectId} "timeshiftDuration": "0s", "yAxis": { "label": "y1Axis", - "scale": 1 + "scale": "LINEAR" } } }, @@ -200,10 +198,9 @@ X-Xss-Protection: 0 --- -GET https://monitoring.googleapis.com/v1/projects/${projectId}/dashboards/monitoringdashboard-${uniqueId}?%24alt=json%3Benum-encoding%3Dint +GET https://monitoring.googleapis.com/v1/projects/${projectId}/dashboards/monitoringdashboard-${uniqueId}?alt=json Content-Type: application/json -User-Agent: kcc/controller-manager -x-goog-request-params: name=projects%2F${projectId}%2Fdashboards%2Fmonitoringdashboard-${uniqueId} +User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 200 OK Cache-Control: private @@ -299,27 +296,26 @@ X-Xss-Protection: 0 --- -PATCH https://monitoring.googleapis.com/v1/projects/${projectId}/dashboards/monitoringdashboard-${uniqueId}?%24alt=json%3Benum-encoding%3Dint +PATCH https://monitoring.googleapis.com/v1/projects/${projectId}/dashboards/monitoringdashboard-${uniqueId}?alt=json Content-Type: application/json -User-Agent: kcc/controller-manager -x-goog-request-params: dashboard.name=projects%2F${projectId}%2Fdashboards%2Fmonitoringdashboard-${uniqueId} +User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 { "columnLayout": { "columns": [ { - "weight": "2", + "weight": 2, "widgets": [ { "title": "Widget 1", "xyChart": { "dataSets": [ { - "plotType": 1, + "plotType": "LINE", "timeSeriesQuery": { "timeSeriesFilter": { "aggregation": { - "perSeriesAligner": 2 + "perSeriesAligner": "ALIGN_RATE" }, "filter": "metric.type=\"agent.googleapis.com/nginx/connections/accepted_count\"" }, @@ -327,17 +323,18 @@ x-goog-request-params: dashboard.name=projects%2F${projectId}%2Fdashboards%2Fmon } } ], + "thresholds": [], "timeshiftDuration": "0s", "yAxis": { "label": "y1Axis", - "scale": 1 + "scale": "LINEAR" } } }, { "text": { "content": "Widget 2", - "format": 1 + "format": "MARKDOWN" } }, { @@ -345,11 +342,11 @@ x-goog-request-params: dashboard.name=projects%2F${projectId}%2Fdashboards%2Fmon "xyChart": { "dataSets": [ { - "plotType": 3, + "plotType": "STACKED_BAR", "timeSeriesQuery": { "timeSeriesFilter": { "aggregation": { - "perSeriesAligner": 2 + "perSeriesAligner": "ALIGN_RATE" }, "filter": "metric.type=\"agent.googleapis.com/nginx/connections/accepted_count\"" }, @@ -357,10 +354,11 @@ x-goog-request-params: dashboard.name=projects%2F${projectId}%2Fdashboards%2Fmon } } ], + "thresholds": [], "timeshiftDuration": "0s", "yAxis": { "label": "y1Axis", - "scale": 1 + "scale": "LINEAR" } } }, @@ -375,6 +373,7 @@ x-goog-request-params: dashboard.name=projects%2F${projectId}%2Fdashboards%2Fmon ] }, "displayName": "monitoringdashboard-updated", + "etag": "abcdef0123A=", "name": "projects/${projectId}/dashboards/monitoringdashboard-${uniqueId}" } @@ -469,10 +468,9 @@ X-Xss-Protection: 0 --- -GET https://monitoring.googleapis.com/v1/projects/${projectId}/dashboards/monitoringdashboard-${uniqueId}?%24alt=json%3Benum-encoding%3Dint +GET https://monitoring.googleapis.com/v1/projects/${projectId}/dashboards/monitoringdashboard-${uniqueId}?alt=json Content-Type: application/json -User-Agent: kcc/controller-manager -x-goog-request-params: name=projects%2F${projectId}%2Fdashboards%2Fmonitoringdashboard-${uniqueId} +User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 200 OK Cache-Control: private @@ -565,10 +563,9 @@ X-Xss-Protection: 0 --- -DELETE https://monitoring.googleapis.com/v1/projects/${projectId}/dashboards/monitoringdashboard-${uniqueId}?%24alt=json%3Benum-encoding%3Dint +DELETE https://monitoring.googleapis.com/v1/projects/${projectId}/dashboards/monitoringdashboard-${uniqueId}?alt=json Content-Type: application/json -User-Agent: kcc/controller-manager -x-goog-request-params: name=projects%2F${projectId}%2Fdashboards%2Fmonitoringdashboard-${uniqueId} +User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 200 OK Cache-Control: private @@ -581,4 +578,29 @@ X-Content-Type-Options: nosniff X-Frame-Options: SAMEORIGIN X-Xss-Protection: 0 -{} \ No newline at end of file +{} + +--- + +GET https://monitoring.googleapis.com/v1/projects/${projectId}/dashboards/monitoringdashboard-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: 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, + "message": "Requested entity was not found.", + "status": "NOT_FOUND" + } +} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardrefs/_generated_object_monitoringdashboardrefs.golden.yaml b/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardrefs/_generated_object_monitoringdashboardrefs.golden.yaml index f3ebe5fcc7..61ef98a721 100644 --- a/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardrefs/_generated_object_monitoringdashboardrefs.golden.yaml +++ b/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardrefs/_generated_object_monitoringdashboardrefs.golden.yaml @@ -3,6 +3,7 @@ kind: MonitoringDashboard 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 diff --git a/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardrefs/_http.log b/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardrefs/_http.log index 7d05004891..ea27a856ec 100644 --- a/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardrefs/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardrefs/_http.log @@ -150,10 +150,9 @@ X-Xss-Protection: 0 --- -GET https://monitoring.googleapis.com/v1/projects/other${uniqueId}/dashboards/monitoringdashboard-${uniqueId}?%24alt=json%3Benum-encoding%3Dint +GET https://monitoring.googleapis.com/v1/projects/other${uniqueId}/dashboards/monitoringdashboard-${uniqueId}?alt=json Content-Type: application/json -User-Agent: kcc/controller-manager -x-goog-request-params: name=projects%2Fother${uniqueId}%2Fdashboards%2Fmonitoringdashboard-${uniqueId} +User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 404 Not Found Cache-Control: private @@ -176,27 +175,26 @@ X-Xss-Protection: 0 --- -POST https://monitoring.googleapis.com/v1/projects/other${uniqueId}/dashboards?%24alt=json%3Benum-encoding%3Dint +POST https://monitoring.googleapis.com/v1/projects/other${uniqueId}/dashboards?alt=json Content-Type: application/json -User-Agent: kcc/controller-manager -x-goog-request-params: parent=projects%2Fother${uniqueId} +User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 { "columnLayout": { "columns": [ { - "weight": "2", + "weight": 2, "widgets": [ { "title": "Widget 1", "xyChart": { "dataSets": [ { - "plotType": 1, + "plotType": "LINE", "timeSeriesQuery": { "timeSeriesFilter": { "aggregation": { - "perSeriesAligner": 2 + "perSeriesAligner": "ALIGN_RATE" }, "filter": "metric.type=\"agent.googleapis.com/nginx/connections/accepted_count\"" }, @@ -207,14 +205,14 @@ x-goog-request-params: parent=projects%2Fother${uniqueId} "timeshiftDuration": "0s", "yAxis": { "label": "y1Axis", - "scale": 1 + "scale": "LINEAR" } } }, { "text": { "content": "Widget 2", - "format": 1 + "format": "MARKDOWN" } }, { @@ -222,11 +220,11 @@ x-goog-request-params: parent=projects%2Fother${uniqueId} "xyChart": { "dataSets": [ { - "plotType": 3, + "plotType": "STACKED_BAR", "timeSeriesQuery": { "timeSeriesFilter": { "aggregation": { - "perSeriesAligner": 2 + "perSeriesAligner": "ALIGN_RATE" }, "filter": "metric.type=\"agent.googleapis.com/nginx/connections/accepted_count\"" }, @@ -237,7 +235,7 @@ x-goog-request-params: parent=projects%2Fother${uniqueId} "timeshiftDuration": "0s", "yAxis": { "label": "y1Axis", - "scale": 1 + "scale": "LINEAR" } } }, @@ -352,10 +350,9 @@ X-Xss-Protection: 0 --- -GET https://monitoring.googleapis.com/v1/projects/other${uniqueId}/dashboards/monitoringdashboard-${uniqueId}?%24alt=json%3Benum-encoding%3Dint +GET https://monitoring.googleapis.com/v1/projects/other${uniqueId}/dashboards/monitoringdashboard-${uniqueId}?alt=json Content-Type: application/json -User-Agent: kcc/controller-manager -x-goog-request-params: name=projects%2Fother${uniqueId}%2Fdashboards%2Fmonitoringdashboard-${uniqueId} +User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 200 OK Cache-Control: private @@ -451,27 +448,26 @@ X-Xss-Protection: 0 --- -PATCH https://monitoring.googleapis.com/v1/projects/other${uniqueId}/dashboards/monitoringdashboard-${uniqueId}?%24alt=json%3Benum-encoding%3Dint +PATCH https://monitoring.googleapis.com/v1/projects/other${uniqueId}/dashboards/monitoringdashboard-${uniqueId}?alt=json Content-Type: application/json -User-Agent: kcc/controller-manager -x-goog-request-params: dashboard.name=projects%2Fother${uniqueId}%2Fdashboards%2Fmonitoringdashboard-${uniqueId} +User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 { "columnLayout": { "columns": [ { - "weight": "2", + "weight": 2, "widgets": [ { "title": "Widget 1", "xyChart": { "dataSets": [ { - "plotType": 1, + "plotType": "LINE", "timeSeriesQuery": { "timeSeriesFilter": { "aggregation": { - "perSeriesAligner": 2 + "perSeriesAligner": "ALIGN_RATE" }, "filter": "metric.type=\"agent.googleapis.com/nginx/connections/accepted_count\"" }, @@ -479,17 +475,18 @@ x-goog-request-params: dashboard.name=projects%2Fother${uniqueId}%2Fdashboards%2 } } ], + "thresholds": [], "timeshiftDuration": "0s", "yAxis": { "label": "y1Axis", - "scale": 1 + "scale": "LINEAR" } } }, { "text": { "content": "Widget 2", - "format": 1 + "format": "MARKDOWN" } }, { @@ -497,11 +494,11 @@ x-goog-request-params: dashboard.name=projects%2Fother${uniqueId}%2Fdashboards%2 "xyChart": { "dataSets": [ { - "plotType": 3, + "plotType": "STACKED_BAR", "timeSeriesQuery": { "timeSeriesFilter": { "aggregation": { - "perSeriesAligner": 2 + "perSeriesAligner": "ALIGN_RATE" }, "filter": "metric.type=\"agent.googleapis.com/nginx/connections/accepted_count\"" }, @@ -509,10 +506,11 @@ x-goog-request-params: dashboard.name=projects%2Fother${uniqueId}%2Fdashboards%2 } } ], + "thresholds": [], "timeshiftDuration": "0s", "yAxis": { "label": "y1Axis", - "scale": 1 + "scale": "LINEAR" } } }, @@ -527,7 +525,8 @@ x-goog-request-params: dashboard.name=projects%2Fother${uniqueId}%2Fdashboards%2 ] }, "displayName": "monitoringdashboard updated", - "name": "projects/other${uniqueId}/dashboards/monitoringdashboard-${uniqueId}" + "etag": "abcdef0123A=", + "name": "projects/projects/other${uniqueId}/dashboards/monitoringdashboard-${uniqueId}" } 200 OK @@ -621,10 +620,9 @@ X-Xss-Protection: 0 --- -GET https://monitoring.googleapis.com/v1/projects/other${uniqueId}/dashboards/monitoringdashboard-${uniqueId}?%24alt=json%3Benum-encoding%3Dint +GET https://monitoring.googleapis.com/v1/projects/other${uniqueId}/dashboards/monitoringdashboard-${uniqueId}?alt=json Content-Type: application/json -User-Agent: kcc/controller-manager -x-goog-request-params: name=projects%2Fother${uniqueId}%2Fdashboards%2Fmonitoringdashboard-${uniqueId} +User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 200 OK Cache-Control: private @@ -717,10 +715,9 @@ X-Xss-Protection: 0 --- -DELETE https://monitoring.googleapis.com/v1/projects/other${uniqueId}/dashboards/monitoringdashboard-${uniqueId}?%24alt=json%3Benum-encoding%3Dint +DELETE https://monitoring.googleapis.com/v1/projects/other${uniqueId}/dashboards/monitoringdashboard-${uniqueId}?alt=json Content-Type: application/json -User-Agent: kcc/controller-manager -x-goog-request-params: name=projects%2Fother${uniqueId}%2Fdashboards%2Fmonitoringdashboard-${uniqueId} +User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 200 OK Cache-Control: private @@ -737,6 +734,31 @@ X-Xss-Protection: 0 --- +GET https://monitoring.googleapis.com/v1/projects/other${uniqueId}/dashboards/monitoringdashboard-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: 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, + "message": "Requested entity was not found.", + "status": "NOT_FOUND" + } +} + +--- + GET https://cloudresourcemanager.googleapis.com/v1/projects/other${uniqueId}?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 diff --git a/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringnotificationchannel/_generated_object_monitoringnotificationchannel.golden.yaml b/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringnotificationchannel/_generated_object_monitoringnotificationchannel.golden.yaml index 68ee556aac..bc693efdb0 100644 --- a/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringnotificationchannel/_generated_object_monitoringnotificationchannel.golden.yaml +++ b/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringnotificationchannel/_generated_object_monitoringnotificationchannel.golden.yaml @@ -26,7 +26,7 @@ spec: labels: url: http://hooks.example.com/notification username: user - resourceID: "3168202067122960695" + resourceID: "1718837116591979324" sensitiveLabels: password: valueFrom: @@ -41,5 +41,5 @@ status: reason: UpToDate status: "True" type: Ready - name: projects/${projectId}/notificationChannels/3168202067122960695 + name: projects/${projectId}/notificationChannels/1718837116591979324 observedGeneration: 3 diff --git a/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringnotificationchannel/_http.log b/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringnotificationchannel/_http.log index 5c285ea803..661db2b42f 100644 --- a/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringnotificationchannel/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringnotificationchannel/_http.log @@ -39,7 +39,7 @@ X-Xss-Protection: 0 "displayName": "monitoringnotificationchannel-${uniqueId}", "enabled": true, "labels": { - "password": "*********", + "password": "password\n", "url": "http://hooks.example.com/notifications", "username": "admin" }, @@ -83,7 +83,7 @@ X-Xss-Protection: 0 "displayName": "monitoringnotificationchannel-${uniqueId}", "enabled": true, "labels": { - "password": "*********", + "password": "password\n", "url": "http://hooks.example.com/notifications", "username": "admin" }, @@ -142,18 +142,15 @@ X-Xss-Protection: 0 "creationRecord": { "mutateTime": "2024-04-01T12:34:56.123456Z" }, - "description": "Sends notifications to newly indicated webhook URL using HTTP-standard basic authentication. Should be used in conjunction with SSL/TLS to reduce the risk of attackers snooping the credentials.", + "description": "Sends notifications to indicated webhook URL using HTTP-standard basic authentication. Should be used in conjunction with SSL/TLS to reduce the risk of attackers snooping the credentials.", "displayName": "monitoringnotificationchannel-${uniqueId}", "enabled": true, "labels": { - "password": "*********", + "password": "password\n", "url": "http://hooks.example.com/notification", "username": "user" }, "mutationRecords": [ - { - "mutateTime": "2024-04-01T12:34:56.123456Z" - }, { "mutateTime": "2024-04-01T12:34:56.123456Z" } @@ -190,18 +187,15 @@ X-Xss-Protection: 0 "creationRecord": { "mutateTime": "2024-04-01T12:34:56.123456Z" }, - "description": "Sends notifications to newly indicated webhook URL using HTTP-standard basic authentication. Should be used in conjunction with SSL/TLS to reduce the risk of attackers snooping the credentials.", + "description": "Sends notifications to indicated webhook URL using HTTP-standard basic authentication. Should be used in conjunction with SSL/TLS to reduce the risk of attackers snooping the credentials.", "displayName": "monitoringnotificationchannel-${uniqueId}", "enabled": true, "labels": { - "password": "*********", + "password": "password\n", "url": "http://hooks.example.com/notification", "username": "user" }, "mutationRecords": [ - { - "mutateTime": "2024-04-01T12:34:56.123456Z" - }, { "mutateTime": "2024-04-01T12:34:56.123456Z" } diff --git a/pkg/test/resourcefixture/testdata/basic/networkservices/v1beta1/networkservicesmesh/_http.log b/pkg/test/resourcefixture/testdata/basic/networkservices/v1beta1/networkservicesmesh/_http.log new file mode 100644 index 0000000000..aabab1ab22 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/networkservices/v1beta1/networkservicesmesh/_http.log @@ -0,0 +1,147 @@ +GET https://networkservices.googleapis.com/v1/projects/${projectId}/locations/global/meshes/networkservicesmesh-${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": "mesh \"projects/${projectId}/locations/global/meshes/networkservicesmesh-${uniqueId}\" not found" +} + +--- + +POST https://networkservices.googleapis.com/v1/projects/${projectId}/locations/global/meshes?alt=json&meshId=networkservicesmesh-${uniqueId} +Content-Type: application/json +User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 + +{ + "description": "Original description", + "interceptionPort": 80, + "labels": { + "cnrm-test": "true", + "foo": "bar", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectId}/locations/global/meshes/networkservicesmesh-${uniqueId}" +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://networkservices.googleapis.com/v1/projects/${projectId}/locations/global/meshes/networkservicesmesh-${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 + +{ + "createTime": null, + "description": "Original description", + "interceptionPort": 80, + "labels": { + "cnrm-test": "true", + "foo": "bar", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectId}/locations/global/meshes/networkservicesmesh-${uniqueId}", + "selfLink": "", + "updateTime": null +} + +--- + +PATCH https://networkservices.googleapis.com/v1/projects/${projectId}/locations/global/meshes/networkservicesmesh-${uniqueId}?alt=json&updateMask=description%2CinterceptionPort%2Clabels +Content-Type: application/json +User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 + +{ + "description": "Updated description", + "interceptionPort": 81, + "labels": { + "cnrm-test": "true", + "foo": "bar", + "foo1": "bar1", + "managed-by-cnrm": "true" + }, + "name": "projects/projects/${projectId}/locations/global/meshes/networkservicesmesh-${uniqueId}" +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://networkservices.googleapis.com/v1/projects/${projectId}/locations/global/meshes/networkservicesmesh-${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 + +{ + "createTime": null, + "description": "Updated description", + "interceptionPort": 81, + "labels": { + "cnrm-test": "true", + "foo": "bar", + "foo1": "bar1", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectId}/locations/global/meshes/networkservicesmesh-${uniqueId}", + "selfLink": "", + "updateTime": null +} + +--- + +DELETE https://networkservices.googleapis.com/v1/projects/${projectId}/locations/global/meshes/networkservicesmesh-${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://networkservices.googleapis.com/v1/projects/${projectId}/locations/global/meshes/networkservicesmesh-${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": "mesh \"projects/${projectId}/locations/global/meshes/networkservicesmesh-${uniqueId}\" not found" +} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/basic/privateca/v1beta1/privatecacapool/privatecacapoolbasic/_http.log b/pkg/test/resourcefixture/testdata/basic/privateca/v1beta1/privatecacapool/privatecacapoolbasic/_http.log index 77c01e62dc..dc29fc1147 100644 --- a/pkg/test/resourcefixture/testdata/basic/privateca/v1beta1/privatecacapool/privatecacapoolbasic/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/privateca/v1beta1/privatecacapool/privatecacapoolbasic/_http.log @@ -150,12 +150,10 @@ X-Frame-Options: SAMEORIGIN X-Xss-Protection: 0 { - "done": false, "metadata": { "@type": "type.googleapis.com/google.cloud.security.privateca.v1.OperationMetadata", "apiVersion": "v1", "createTime": "2024-04-01T12:34:56.123456Z", - "requestedCancellation": false, "target": "projects/${projectId}/locations/us-central1/caPools/privatecacapool-${uniqueId}", "verb": "create" }, @@ -186,7 +184,6 @@ X-Xss-Protection: 0 "apiVersion": "v1", "createTime": "2024-04-01T12:34:56.123456Z", "endTime": "2024-04-01T12:34:56.123456Z", - "requestedCancellation": false, "target": "projects/${projectId}/locations/us-central1/caPools/privatecacapool-${uniqueId}", "verb": "create" }, @@ -273,6 +270,11 @@ X-Xss-Protection: 0 ] } }, + "labels": { + "cnrm-test": "true", + "label-two": "value-two", + "managed-by-cnrm": "true" + }, "name": "projects/${projectId}/locations/us-central1/caPools/privatecacapool-${uniqueId}", "tier": "ENTERPRISE" } @@ -518,12 +520,10 @@ X-Frame-Options: SAMEORIGIN X-Xss-Protection: 0 { - "done": false, "metadata": { "@type": "type.googleapis.com/google.cloud.security.privateca.v1.OperationMetadata", "apiVersion": "v1", "createTime": "2024-04-01T12:34:56.123456Z", - "requestedCancellation": false, "target": "projects/${projectId}/locations/us-central1/caPools/privatecacapool-${uniqueId}", "verb": "update" }, @@ -554,7 +554,6 @@ X-Xss-Protection: 0 "apiVersion": "v1", "createTime": "2024-04-01T12:34:56.123456Z", "endTime": "2024-04-01T12:34:56.123456Z", - "requestedCancellation": false, "target": "projects/${projectId}/locations/us-central1/caPools/privatecacapool-${uniqueId}", "verb": "update" }, @@ -661,6 +660,12 @@ X-Xss-Protection: 0 ] } }, + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "label-two": "value-two", + "managed-by-cnrm": "true" + }, "name": "projects/${projectId}/locations/us-central1/caPools/privatecacapool-${uniqueId}", "publishingOptions": { "publishCaCert": true, @@ -820,12 +825,10 @@ X-Frame-Options: SAMEORIGIN X-Xss-Protection: 0 { - "done": false, "metadata": { "@type": "type.googleapis.com/google.cloud.security.privateca.v1.OperationMetadata", "apiVersion": "v1", "createTime": "2024-04-01T12:34:56.123456Z", - "requestedCancellation": false, "target": "projects/${projectId}/locations/us-central1/caPools/privatecacapool-${uniqueId}", "verb": "delete" }, @@ -856,7 +859,6 @@ X-Xss-Protection: 0 "apiVersion": "v1", "createTime": "2024-04-01T12:34:56.123456Z", "endTime": "2024-04-01T12:34:56.123456Z", - "requestedCancellation": false, "target": "projects/${projectId}/locations/us-central1/caPools/privatecacapool-${uniqueId}", "verb": "delete" }, diff --git a/pkg/test/resourcefixture/testdata/basic/pubsub/v1beta1/pubsubschema/_generated_object_pubsubschema.golden.yaml b/pkg/test/resourcefixture/testdata/basic/pubsub/v1beta1/pubsubschema/_generated_object_pubsubschema.golden.yaml new file mode 100644 index 0000000000..47efd15914 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/pubsub/v1beta1/pubsubschema/_generated_object_pubsubschema.golden.yaml @@ -0,0 +1,35 @@ +apiVersion: pubsub.cnrm.cloud.google.com/v1beta1 +kind: PubSubSchema +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: pubsubschema-${uniqueId} + namespace: ${uniqueId} +spec: + definition: |- + syntax = "proto3"; + message Results { + string message_request = 1; + string message_response = 2; + string timestamp_request = 3; + string timestamp_response = 4; + } + projectRef: + external: ${projectId} + resourceID: pubsubschema-${uniqueId} + type: PROTOCOL_BUFFER +status: + conditions: + - lastTransitionTime: "1970-01-01T00:00:00Z" + message: The resource is up to date + reason: UpToDate + status: "True" + type: Ready + observedGeneration: 2 diff --git a/pkg/test/resourcefixture/testdata/basic/pubsub/v1beta1/pubsubschema/_http.log b/pkg/test/resourcefixture/testdata/basic/pubsub/v1beta1/pubsubschema/_http.log index 1d90b7033a..e2b1219a09 100644 --- a/pkg/test/resourcefixture/testdata/basic/pubsub/v1beta1/pubsubschema/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/pubsub/v1beta1/pubsubschema/_http.log @@ -79,56 +79,6 @@ X-Xss-Protection: 0 --- -GET https://pubsub.googleapis.com/v1/projects/${projectId}/schemas/pubsubschema-${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 - -{ - "definition": "syntax = \"proto3\";\nmessage Results {\nstring message_request = 1;\nstring message_response = 2;\nstring timestamp_request = 3;\nstring timestamp_response = 4;\n}", - "name": "projects/${projectId}/schemas/pubsubschema-${uniqueId}", - "revisionCreateTime": "2024-04-01T12:34:56.123456Z", - "revisionId": "revision-id-placeholder", - "type": "PROTOCOL_BUFFER" -} - ---- - -GET https://pubsub.googleapis.com/v1/projects/${projectId}/schemas/pubsubschema-${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 - -{ - "definition": "syntax = \"proto3\";\nmessage Results {\nstring message_request = 1;\nstring message_response = 2;\nstring timestamp_request = 3;\nstring timestamp_response = 4;\n}", - "name": "projects/${projectId}/schemas/pubsubschema-${uniqueId}", - "revisionCreateTime": "2024-04-01T12:34:56.123456Z", - "revisionId": "revision-id-placeholder", - "type": "PROTOCOL_BUFFER" -} - ---- - DELETE https://pubsub.googleapis.com/v1/projects/${projectId}/schemas/pubsubschema-${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 @@ -163,231 +113,6 @@ X-Content-Type-Options: nosniff X-Frame-Options: SAMEORIGIN X-Xss-Protection: 0 -{ - "error": { - "code": 404, - "message": "Resource not found (resource=projects/${projectId}/schemas/pubsubschema-${uniqueId}).", - "status": "NOT_FOUND" - } -} - ---- - -GET https://pubsub.googleapis.com/v1/projects/${projectId}/schemas/pubsubschema-${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, - "message": "Resource not found (resource=projects/${projectId}/schemas/pubsubschema-${uniqueId}).", - "status": "NOT_FOUND" - } -} - ---- - -GET https://pubsub.googleapis.com/v1/projects/${projectId}/schemas/pubsubschema-${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, - "message": "Resource not found (resource=projects/${projectId}/schemas/pubsubschema-${uniqueId}).", - "status": "NOT_FOUND" - } -} - ---- - -GET https://pubsub.googleapis.com/v1/projects/${projectId}/schemas/pubsubschema-${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, - "message": "Resource not found (resource=projects/${projectId}/schemas/pubsubschema-${uniqueId}).", - "status": "NOT_FOUND" - } -} - ---- - -GET https://pubsub.googleapis.com/v1/projects/${projectId}/schemas/pubsubschema-${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, - "message": "Resource not found (resource=projects/${projectId}/schemas/pubsubschema-${uniqueId}).", - "status": "NOT_FOUND" - } -} - ---- - -GET https://pubsub.googleapis.com/v1/projects/${projectId}/schemas/pubsubschema-${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, - "message": "Resource not found (resource=projects/${projectId}/schemas/pubsubschema-${uniqueId}).", - "status": "NOT_FOUND" - } -} - ---- - -GET https://pubsub.googleapis.com/v1/projects/${projectId}/schemas/pubsubschema-${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, - "message": "Resource not found (resource=projects/${projectId}/schemas/pubsubschema-${uniqueId}).", - "status": "NOT_FOUND" - } -} - ---- - -GET https://pubsub.googleapis.com/v1/projects/${projectId}/schemas/pubsubschema-${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, - "message": "Resource not found (resource=projects/${projectId}/schemas/pubsubschema-${uniqueId}).", - "status": "NOT_FOUND" - } -} - ---- - -GET https://pubsub.googleapis.com/v1/projects/${projectId}/schemas/pubsubschema-${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, - "message": "Resource not found (resource=projects/${projectId}/schemas/pubsubschema-${uniqueId}).", - "status": "NOT_FOUND" - } -} - ---- - -GET https://pubsub.googleapis.com/v1/projects/${projectId}/schemas/pubsubschema-${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, diff --git a/pkg/test/resourcefixture/testdata/basic/pubsub/v1beta1/pubsubtopic/_generated_object_pubsubtopic.golden.yaml b/pkg/test/resourcefixture/testdata/basic/pubsub/v1beta1/pubsubtopic/_generated_object_pubsubtopic.golden.yaml new file mode 100644 index 0000000000..8334e0f7b9 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/pubsub/v1beta1/pubsubtopic/_generated_object_pubsubtopic.golden.yaml @@ -0,0 +1,31 @@ +apiVersion: pubsub.cnrm.cloud.google.com/v1beta1 +kind: PubSubTopic +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: 2 + labels: + cnrm-test: "true" + label-one: value-one + newkey: newval + name: pubsubtopic-sample-${uniqueId} + namespace: ${uniqueId} +spec: + resourceID: pubsubtopic-sample-${uniqueId} + schemaSettings: + encoding: JSON + schemaRef: + name: pubsubschema-${uniqueId} +status: + conditions: + - lastTransitionTime: "1970-01-01T00:00:00Z" + message: The resource is up to date + reason: UpToDate + status: "True" + type: Ready + observedGeneration: 2 diff --git a/pkg/test/resourcefixture/testdata/basic/pubsub/v1beta1/pubsubtopic/_http.log b/pkg/test/resourcefixture/testdata/basic/pubsub/v1beta1/pubsubtopic/_http.log index 8a5a12c574..5d670032b4 100644 --- a/pkg/test/resourcefixture/testdata/basic/pubsub/v1beta1/pubsubtopic/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/pubsub/v1beta1/pubsubtopic/_http.log @@ -79,31 +79,6 @@ X-Xss-Protection: 0 --- -GET https://pubsub.googleapis.com/v1/projects/${projectId}/schemas/pubsubschema-${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 - -{ - "definition": "syntax = \"proto3\";\nmessage Results {\nstring message_request = 1;\nstring message_response = 2;\nstring timestamp_request = 3;\nstring timestamp_response = 4;\n}", - "name": "projects/${projectId}/schemas/pubsubschema-${uniqueId}", - "revisionCreateTime": "2024-04-01T12:34:56.123456Z", - "revisionId": "revision-id-placeholder", - "type": "PROTOCOL_BUFFER" -} - ---- - GET https://pubsub.googleapis.com/v1/projects/${projectId}/topics/pubsubtopic-sample-${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 @@ -201,126 +176,6 @@ X-Xss-Protection: 0 --- -GET https://pubsub.googleapis.com/v1/projects/${projectId}/topics/pubsubtopic-sample-${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 - -{ - "labels": { - "cnrm-test": "true", - "label-one": "value-one", - "managed-by-cnrm": "true" - }, - "name": "projects/${projectId}/topics/pubsubtopic-sample-${uniqueId}", - "schemaSettings": { - "encoding": "JSON", - "schema": "projects/${projectId}/schemas/pubsubschema-${uniqueId}" - } -} - ---- - -GET https://pubsub.googleapis.com/v1/projects/${projectId}/topics/pubsubtopic-sample-${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 - -{ - "labels": { - "cnrm-test": "true", - "label-one": "value-one", - "managed-by-cnrm": "true" - }, - "name": "projects/${projectId}/topics/pubsubtopic-sample-${uniqueId}", - "schemaSettings": { - "encoding": "JSON", - "schema": "projects/${projectId}/schemas/pubsubschema-${uniqueId}" - } -} - ---- - -GET https://pubsub.googleapis.com/v1/projects/${projectId}/topics/pubsubtopic-sample-${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 - -{ - "labels": { - "cnrm-test": "true", - "label-one": "value-one", - "managed-by-cnrm": "true" - }, - "name": "projects/${projectId}/topics/pubsubtopic-sample-${uniqueId}", - "schemaSettings": { - "encoding": "JSON", - "schema": "projects/${projectId}/schemas/pubsubschema-${uniqueId}" - } -} - ---- - -GET https://pubsub.googleapis.com/v1/projects/${projectId}/topics/pubsubtopic-sample-${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 - -{ - "labels": { - "cnrm-test": "true", - "label-one": "value-one", - "managed-by-cnrm": "true" - }, - "name": "projects/${projectId}/topics/pubsubtopic-sample-${uniqueId}", - "schemaSettings": { - "encoding": "JSON", - "schema": "projects/${projectId}/schemas/pubsubschema-${uniqueId}" - } -} - ---- - DELETE https://pubsub.googleapis.com/v1/projects/${projectId}/topics/pubsubtopic-sample-${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 @@ -399,231 +254,6 @@ X-Content-Type-Options: nosniff X-Frame-Options: SAMEORIGIN X-Xss-Protection: 0 -{ - "error": { - "code": 404, - "message": "Resource not found (resource=projects/${projectId}/schemas/pubsubschema-${uniqueId}).", - "status": "NOT_FOUND" - } -} - ---- - -GET https://pubsub.googleapis.com/v1/projects/${projectId}/schemas/pubsubschema-${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, - "message": "Resource not found (resource=projects/${projectId}/schemas/pubsubschema-${uniqueId}).", - "status": "NOT_FOUND" - } -} - ---- - -GET https://pubsub.googleapis.com/v1/projects/${projectId}/schemas/pubsubschema-${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, - "message": "Resource not found (resource=projects/${projectId}/schemas/pubsubschema-${uniqueId}).", - "status": "NOT_FOUND" - } -} - ---- - -GET https://pubsub.googleapis.com/v1/projects/${projectId}/schemas/pubsubschema-${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, - "message": "Resource not found (resource=projects/${projectId}/schemas/pubsubschema-${uniqueId}).", - "status": "NOT_FOUND" - } -} - ---- - -GET https://pubsub.googleapis.com/v1/projects/${projectId}/schemas/pubsubschema-${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, - "message": "Resource not found (resource=projects/${projectId}/schemas/pubsubschema-${uniqueId}).", - "status": "NOT_FOUND" - } -} - ---- - -GET https://pubsub.googleapis.com/v1/projects/${projectId}/schemas/pubsubschema-${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, - "message": "Resource not found (resource=projects/${projectId}/schemas/pubsubschema-${uniqueId}).", - "status": "NOT_FOUND" - } -} - ---- - -GET https://pubsub.googleapis.com/v1/projects/${projectId}/schemas/pubsubschema-${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, - "message": "Resource not found (resource=projects/${projectId}/schemas/pubsubschema-${uniqueId}).", - "status": "NOT_FOUND" - } -} - ---- - -GET https://pubsub.googleapis.com/v1/projects/${projectId}/schemas/pubsubschema-${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, - "message": "Resource not found (resource=projects/${projectId}/schemas/pubsubschema-${uniqueId}).", - "status": "NOT_FOUND" - } -} - ---- - -GET https://pubsub.googleapis.com/v1/projects/${projectId}/schemas/pubsubschema-${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, - "message": "Resource not found (resource=projects/${projectId}/schemas/pubsubschema-${uniqueId}).", - "status": "NOT_FOUND" - } -} - ---- - -GET https://pubsub.googleapis.com/v1/projects/${projectId}/schemas/pubsubschema-${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, diff --git a/pkg/test/resourcefixture/testdata/basic/pubsublite/v1alpha1/pubsublitesubscription/pubsublitesubscriptionbasic/_generated_object_pubsublitesubscriptionbasic.golden.yaml b/pkg/test/resourcefixture/testdata/basic/pubsublite/v1alpha1/pubsublitesubscription/pubsublitesubscriptionbasic/_generated_object_pubsublitesubscriptionbasic.golden.yaml new file mode 100644 index 0000000000..6b1687fd74 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/pubsublite/v1alpha1/pubsublitesubscription/pubsublitesubscriptionbasic/_generated_object_pubsublitesubscriptionbasic.golden.yaml @@ -0,0 +1,30 @@ +apiVersion: pubsublite.cnrm.cloud.google.com/v1alpha1 +kind: PubSubLiteSubscription +metadata: + annotations: + cnrm.cloud.google.com/management-conflict-prevention-policy: none + cnrm.cloud.google.com/state-into-spec: absent + finalizers: + - cnrm.cloud.google.com/finalizer + - cnrm.cloud.google.com/deletion-defender + generation: 1 + labels: + cnrm-test: "true" + name: pubsublitesubscription-${uniqueId} + namespace: ${uniqueId} +spec: + deliveryConfig: + deliveryRequirement: DELIVER_AFTER_STORED + projectRef: + external: ${projectId} + resourceID: pubsublitesubscription${uniqueId} + topic: "" + zone: us-central1-a +status: + conditions: + - lastTransitionTime: "1970-01-01T00:00:00Z" + message: The resource is up to date + reason: UpToDate + status: "True" + type: Ready + observedGeneration: 1 diff --git a/pkg/test/resourcefixture/testdata/basic/pubsublite/v1alpha1/pubsublitesubscription/pubsublitesubscriptionbasic/_http.log b/pkg/test/resourcefixture/testdata/basic/pubsublite/v1alpha1/pubsublitesubscription/pubsublitesubscriptionbasic/_http.log new file mode 100644 index 0000000000..ef9cb57f1a --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/pubsublite/v1alpha1/pubsublitesubscription/pubsublitesubscriptionbasic/_http.log @@ -0,0 +1,262 @@ +GET https://us-central1-pubsublite.googleapis.com/v1/admin/projects/${projectId}/locations/us-central1-a/topics/pubsublitetopic${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": "topic \"projects/${projectId}/locations/us-central1-a/topics/pubsublitetopic${uniqueId}\" not found", + "reason": "notFound" + } + ], + "message": "topic \"projects/${projectId}/locations/us-central1-a/topics/pubsublitetopic${uniqueId}\" not found", + "status": "NOT_FOUND" + } +} + +--- + +POST https://us-central1-pubsublite.googleapis.com/v1/admin/projects/${projectId}/locations/us-central1-a/topics?alt=json&topicId=pubsublitetopic${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 + +{ + "partitionConfig": { + "capacity": { + "publishMibPerSec": 4, + "subscribeMibPerSec": 8 + }, + "count": 1 + }, + "retentionConfig": { + "perPartitionBytes": "32212254720" + } +} + +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": "projects/${projectId}/locations/us-central1-a/topics/pubsublitetopic${uniqueId}", + "partitionConfig": { + "capacity": { + "publishMibPerSec": 4, + "subscribeMibPerSec": 8 + }, + "count": "1" + }, + "retentionConfig": { + "perPartitionBytes": "32212254720" + } +} + +--- + +GET https://us-central1-pubsublite.googleapis.com/v1/admin/projects/${projectId}/locations/us-central1-a/topics/pubsublitetopic${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 + +{ + "name": "projects/${projectId}/locations/us-central1-a/topics/pubsublitetopic${uniqueId}", + "partitionConfig": { + "capacity": { + "publishMibPerSec": 4, + "subscribeMibPerSec": 8 + }, + "count": "1" + }, + "retentionConfig": { + "perPartitionBytes": "32212254720" + } +} + +--- + +GET https://us-central1-pubsublite.googleapis.com/v1/admin/projects/${projectId}/locations/us-central1-a/subscriptions/pubsublitesubscription${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": "subscription \"projects/${projectId}/locations/us-central1-a/subscriptions/pubsublitesubscription${uniqueId}\" not found", + "reason": "notFound" + } + ], + "message": "subscription \"projects/${projectId}/locations/us-central1-a/subscriptions/pubsublitesubscription${uniqueId}\" not found", + "status": "NOT_FOUND" + } +} + +--- + +POST https://us-central1-pubsublite.googleapis.com/v1/admin/projects/${projectId}/locations/us-central1-a/subscriptions?alt=json&subscriptionId=pubsublitesubscription${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 + +{ + "deliveryConfig": { + "deliveryRequirement": "DELIVER_AFTER_STORED" + }, + "topic": "projects/${projectId}/locations/us-central1-a/topics/" +} + +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 + +{ + "deliveryConfig": { + "deliveryRequirement": "DELIVER_AFTER_STORED" + }, + "name": "projects/${projectId}/locations/us-central1-a/subscriptions/pubsublitesubscription${uniqueId}", + "topic": "projects/${projectId}/locations/us-central1-a/topics/" +} + +--- + +GET https://us-central1-pubsublite.googleapis.com/v1/admin/projects/${projectId}/locations/us-central1-a/subscriptions/pubsublitesubscription${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 + +{ + "deliveryConfig": { + "deliveryRequirement": "DELIVER_AFTER_STORED" + }, + "name": "projects/${projectId}/locations/us-central1-a/subscriptions/pubsublitesubscription${uniqueId}", + "topic": "projects/${projectId}/locations/us-central1-a/topics/" +} + +--- + +DELETE https://us-central1-pubsublite.googleapis.com/v1/admin/projects/${projectId}/locations/us-central1-a/subscriptions/pubsublitesubscription${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 + +{} + +--- + +GET https://us-central1-pubsublite.googleapis.com/v1/admin/projects/${projectId}/locations/us-central1-a/topics/pubsublitetopic${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 + +{ + "name": "projects/${projectId}/locations/us-central1-a/topics/pubsublitetopic${uniqueId}", + "partitionConfig": { + "capacity": { + "publishMibPerSec": 4, + "subscribeMibPerSec": 8 + }, + "count": "1" + }, + "retentionConfig": { + "perPartitionBytes": "32212254720" + } +} + +--- + +DELETE https://us-central1-pubsublite.googleapis.com/v1/admin/projects/${projectId}/locations/us-central1-a/topics/pubsublitetopic${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 + +{} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/basic/pubsublite/v1alpha1/pubsublitetopic/pubsublitetopicbasic/_generated_object_pubsublitetopicbasic.golden.yaml b/pkg/test/resourcefixture/testdata/basic/pubsublite/v1alpha1/pubsublitetopic/pubsublitetopicbasic/_generated_object_pubsublitetopicbasic.golden.yaml new file mode 100644 index 0000000000..1c6386bdf3 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/pubsublite/v1alpha1/pubsublitetopic/pubsublitetopicbasic/_generated_object_pubsublitetopicbasic.golden.yaml @@ -0,0 +1,36 @@ +apiVersion: pubsublite.cnrm.cloud.google.com/v1alpha1 +kind: PubSubLiteTopic +metadata: + annotations: + cnrm.cloud.google.com/management-conflict-prevention-policy: none + cnrm.cloud.google.com/state-into-spec: absent + finalizers: + - cnrm.cloud.google.com/finalizer + - cnrm.cloud.google.com/deletion-defender + generation: 1 + labels: + cnrm-test: "true" + name: pubsublitetopic-${uniqueId} + namespace: ${uniqueId} +spec: + partitionConfig: + capacity: + publishMibPerSec: 4 + subscribeMibPerSec: 8 + count: 1 + projectRef: + external: ${projectId} + reservationConfig: + throughputReservation: pubsublitereservation${uniqueId} + resourceID: pubsublitetopic${uniqueId} + retentionConfig: + perPartitionBytes: "32212254720" + zone: us-central1-a +status: + conditions: + - lastTransitionTime: "1970-01-01T00:00:00Z" + message: The resource is up to date + reason: UpToDate + status: "True" + type: Ready + observedGeneration: 1 diff --git a/pkg/test/resourcefixture/testdata/basic/pubsublite/v1alpha1/pubsublitetopic/pubsublitetopicbasic/_http.log b/pkg/test/resourcefixture/testdata/basic/pubsublite/v1alpha1/pubsublitetopic/pubsublitetopicbasic/_http.log new file mode 100644 index 0000000000..c6975b7664 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/pubsublite/v1alpha1/pubsublitetopic/pubsublitetopicbasic/_http.log @@ -0,0 +1,253 @@ +GET https://us-central1-pubsublite.googleapis.com/v1/admin/projects/${projectId}/locations/us-central1/reservations/pubsublitereservation${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": "reservation \"projects/${projectNumber}/locations/us-central1/reservations/pubsublitereservation${uniqueId}\" not found", + "reason": "notFound" + } + ], + "message": "reservation \"projects/${projectNumber}/locations/us-central1/reservations/pubsublitereservation${uniqueId}\" not found", + "status": "NOT_FOUND" + } +} + +--- + +POST https://us-central1-pubsublite.googleapis.com/v1/admin/projects/${projectId}/locations/us-central1/reservations?alt=json&reservationId=pubsublitereservation${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 + +{ + "throughputCapacity": 2 +} + +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": "projects/${projectNumber}/locations/us-central1/reservations/pubsublitereservation${uniqueId}", + "throughputCapacity": "2" +} + +--- + +GET https://us-central1-pubsublite.googleapis.com/v1/admin/projects/${projectId}/locations/us-central1/reservations/pubsublitereservation${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 + +{ + "name": "projects/${projectNumber}/locations/us-central1/reservations/pubsublitereservation${uniqueId}", + "throughputCapacity": "2" +} + +--- + +GET https://us-central1-pubsublite.googleapis.com/v1/admin/projects/${projectId}/locations/us-central1-a/topics/pubsublitetopic${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": "topic \"projects/${projectId}/locations/us-central1-a/topics/pubsublitetopic${uniqueId}\" not found", + "reason": "notFound" + } + ], + "message": "topic \"projects/${projectId}/locations/us-central1-a/topics/pubsublitetopic${uniqueId}\" not found", + "status": "NOT_FOUND" + } +} + +--- + +POST https://us-central1-pubsublite.googleapis.com/v1/admin/projects/${projectId}/locations/us-central1-a/topics?alt=json&topicId=pubsublitetopic${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 + +{ + "partitionConfig": { + "capacity": { + "publishMibPerSec": 4, + "subscribeMibPerSec": 8 + }, + "count": 1 + }, + "reservationConfig": { + "throughputReservation": "projects/${projectId}/locations/us-central1/reservations/pubsublitereservation${uniqueId}" + }, + "retentionConfig": { + "perPartitionBytes": "32212254720" + } +} + +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": "projects/${projectId}/locations/us-central1-a/topics/pubsublitetopic${uniqueId}", + "partitionConfig": { + "capacity": { + "publishMibPerSec": 4, + "subscribeMibPerSec": 8 + }, + "count": "1" + }, + "reservationConfig": { + "throughputReservation": "projects/${projectId}/locations/us-central1/reservations/pubsublitereservation${uniqueId}" + }, + "retentionConfig": { + "perPartitionBytes": "32212254720" + } +} + +--- + +GET https://us-central1-pubsublite.googleapis.com/v1/admin/projects/${projectId}/locations/us-central1-a/topics/pubsublitetopic${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 + +{ + "name": "projects/${projectId}/locations/us-central1-a/topics/pubsublitetopic${uniqueId}", + "partitionConfig": { + "capacity": { + "publishMibPerSec": 4, + "subscribeMibPerSec": 8 + }, + "count": "1" + }, + "reservationConfig": { + "throughputReservation": "projects/${projectId}/locations/us-central1/reservations/pubsublitereservation${uniqueId}" + }, + "retentionConfig": { + "perPartitionBytes": "32212254720" + } +} + +--- + +DELETE https://us-central1-pubsublite.googleapis.com/v1/admin/projects/${projectId}/locations/us-central1-a/topics/pubsublitetopic${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 + +{} + +--- + +GET https://us-central1-pubsublite.googleapis.com/v1/admin/projects/${projectId}/locations/us-central1/reservations/pubsublitereservation${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 + +{ + "name": "projects/${projectNumber}/locations/us-central1/reservations/pubsublitereservation${uniqueId}", + "throughputCapacity": "2" +} + +--- + +DELETE https://us-central1-pubsublite.googleapis.com/v1/admin/projects/${projectId}/locations/us-central1/reservations/pubsublitereservation${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 + +{} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/basic/pubsublite/v1beta1/pubsublitereservation/_generated_object_pubsublitereservation.golden.yaml b/pkg/test/resourcefixture/testdata/basic/pubsublite/v1beta1/pubsublitereservation/_generated_object_pubsublitereservation.golden.yaml new file mode 100644 index 0000000000..0403323503 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/pubsublite/v1beta1/pubsublitereservation/_generated_object_pubsublitereservation.golden.yaml @@ -0,0 +1,28 @@ +apiVersion: pubsublite.cnrm.cloud.google.com/v1beta1 +kind: PubSubLiteReservation +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: pubsublitereservation-${uniqueId} + namespace: ${uniqueId} +spec: + projectRef: + external: ${projectId} + region: us-central1 + resourceID: pubsublitereservation-${uniqueId} + throughputCapacity: 3 +status: + conditions: + - lastTransitionTime: "1970-01-01T00:00:00Z" + message: The resource is up to date + reason: UpToDate + status: "True" + type: Ready + observedGeneration: 3 diff --git a/pkg/test/resourcefixture/testdata/basic/pubsublite/v1beta1/pubsublitereservation/_http.log b/pkg/test/resourcefixture/testdata/basic/pubsublite/v1beta1/pubsublitereservation/_http.log index 04f1c5dbcb..7a9b44aafb 100644 --- a/pkg/test/resourcefixture/testdata/basic/pubsublite/v1beta1/pubsublitereservation/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/pubsublite/v1beta1/pubsublitereservation/_http.log @@ -16,18 +16,14 @@ X-Xss-Protection: 0 { "error": { "code": 404, - "details": [ + "errors": [ { - "@type": "type.googleapis.com/google.rpc.ErrorInfo", - "domain": "pubsublite.googleapis.com", - "metadata": { - "resource_identifier": "projects/${projectNumber}/locations/us-central1/reservations/pubsublitereservation-${uniqueId}", - "resource_type": "RESERVATION" - }, - "reason": "RESOURCE_NOT_EXIST" + "domain": "global", + "message": "reservation \"projects/${projectNumber}/locations/us-central1/reservations/pubsublitereservation-${uniqueId}\" not found", + "reason": "notFound" } ], - "message": "Resource projects/${projectNumber}/locations/us-central1/reservations/pubsublitereservation-${uniqueId} of type RESERVATION does not exist.", + "message": "reservation \"projects/${projectNumber}/locations/us-central1/reservations/pubsublitereservation-${uniqueId}\" not found", "status": "NOT_FOUND" } } @@ -82,50 +78,6 @@ X-Xss-Protection: 0 --- -GET https://us-central1-pubsublite.googleapis.com/v1/admin/projects/${projectId}/locations/us-central1/reservations/pubsublitereservation-${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 - -{ - "name": "projects/${projectNumber}/locations/us-central1/reservations/pubsublitereservation-${uniqueId}", - "throughputCapacity": "2" -} - ---- - -GET https://us-central1-pubsublite.googleapis.com/v1/admin/projects/${projectId}/locations/us-central1/reservations/pubsublitereservation-${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 - -{ - "name": "projects/${projectNumber}/locations/us-central1/reservations/pubsublitereservation-${uniqueId}", - "throughputCapacity": "2" -} - ---- - PATCH https://us-central1-pubsublite.googleapis.com/v1/admin/projects/${projectId}/locations/us-central1/reservations/pubsublitereservation-${uniqueId}?alt=json&updateMask=throughputCapacity Content-Type: application/json User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager @@ -174,28 +126,6 @@ X-Xss-Protection: 0 --- -GET https://us-central1-pubsublite.googleapis.com/v1/admin/projects/${projectId}/locations/us-central1/reservations/pubsublitereservation-${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 - -{ - "name": "projects/${projectNumber}/locations/us-central1/reservations/pubsublitereservation-${uniqueId}", - "throughputCapacity": "3" -} - ---- - DELETE https://us-central1-pubsublite.googleapis.com/v1/admin/projects/${projectId}/locations/us-central1/reservations/pubsublitereservation-${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/redis/v1beta1/redisinstance/_generated_object_redisinstance.golden.yaml b/pkg/test/resourcefixture/testdata/basic/redis/v1beta1/redisinstance/_generated_object_redisinstance.golden.yaml new file mode 100644 index 0000000000..271de67148 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/redis/v1beta1/redisinstance/_generated_object_redisinstance.golden.yaml @@ -0,0 +1,48 @@ +apiVersion: redis.cnrm.cloud.google.com/v1beta1 +kind: RedisInstance +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: 4 + labels: + cnrm-test: "true" + label-one: value-one + newkey: newval + name: redisinstances-${uniqueId} + namespace: ${uniqueId} +spec: + authorizedNetworkRef: + external: projects/${projectId}/global/networks/default + connectMode: DIRECT_PEERING + displayName: newDisplayName + locationId: us-central1-a + memorySizeGb: 20 + persistenceConfig: + persistenceMode: DISABLED + readReplicasMode: READ_REPLICAS_DISABLED + redisVersion: REDIS_7_0 + region: us-central1 + resourceID: redisinstances-${uniqueId} + tier: BASIC + transitEncryptionMode: DISABLED +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" + currentLocationId: us-central1-a + host: 10.20.30.40 + nodes: + - id: node-0 + zone: us-central1-a + observedGeneration: 4 + persistenceIamIdentity: serviceAccount:service-${projectNumber}@cloud-redis.iam.gserviceaccount.com + port: 6379 diff --git a/pkg/test/resourcefixture/testdata/basic/redis/v1beta1/redisinstance/_http.log b/pkg/test/resourcefixture/testdata/basic/redis/v1beta1/redisinstance/_http.log index d1cc53dfd5..5b570324cc 100644 --- a/pkg/test/resourcefixture/testdata/basic/redis/v1beta1/redisinstance/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/redis/v1beta1/redisinstance/_http.log @@ -16,10 +16,11 @@ X-Xss-Protection: 0 { "error": { "code": 404, - "details": [ + "errors": [ { - "@type": "type.googleapis.com/google.rpc.ResourceInfo", - "resourceName": "projects/${projectId}/locations/us-central1/instances/redisinstances-${uniqueId}" + "domain": "global", + "message": "Resource 'projects/${projectId}/locations/us-central1/instances/redisinstances-${uniqueId}' was not found", + "reason": "notFound" } ], "message": "Resource 'projects/${projectId}/locations/us-central1/instances/redisinstances-${uniqueId}' was not found", @@ -59,11 +60,9 @@ X-Frame-Options: SAMEORIGIN X-Xss-Protection: 0 { - "done": false, "metadata": { "@type": "type.googleapis.com/google.cloud.common.OperationMetadata", "apiVersion": "v1beta1", - "cancelRequested": false, "createTime": "2024-04-01T12:34:56.123456Z", "target": "projects/${projectId}/locations/us-central1/instances/redisinstances-${uniqueId}", "verb": "create" @@ -93,7 +92,6 @@ X-Xss-Protection: 0 "metadata": { "@type": "type.googleapis.com/google.cloud.common.OperationMetadata", "apiVersion": "v1beta1", - "cancelRequested": false, "createTime": "2024-04-01T12:34:56.123456Z", "endTime": "2024-04-01T12:34:56.123456Z", "target": "projects/${projectId}/locations/us-central1/instances/redisinstances-${uniqueId}", @@ -103,12 +101,6 @@ X-Xss-Protection: 0 "response": { "@type": "type.googleapis.com/google.cloud.redis.v1beta1.Instance", "authorizedNetwork": "projects/${projectId}/global/networks/default", - "availableMaintenanceVersions": [ - "20231114_00_00", - "20240220_00_00", - "20240328_00_00", - "20240411_00_00" - ], "connectMode": "DIRECT_PEERING", "createTime": "2024-04-01T12:34:56.123456Z", "currentLocationId": "us-central1-a", @@ -120,7 +112,6 @@ X-Xss-Protection: 0 "managed-by-cnrm": "true" }, "locationId": "us-central1-a", - "maintenanceVersion": "20230821_00_00", "memorySizeGb": 16, "name": "projects/${projectId}/locations/us-central1/instances/redisinstances-${uniqueId}", "nodes": [ @@ -162,70 +153,6 @@ X-Xss-Protection: 0 { "authorizedNetwork": "projects/${projectId}/global/networks/default", - "availableMaintenanceVersions": [ - "20231114_00_00", - "20240220_00_00", - "20240328_00_00", - "20240411_00_00" - ], - "connectMode": "DIRECT_PEERING", - "createTime": "2024-04-01T12:34:56.123456Z", - "currentLocationId": "us-central1-a", - "displayName": "Sample Redis Instance", - "host": "10.1.2.3", - "labels": { - "cnrm-test": "true", - "label-one": "value-one", - "managed-by-cnrm": "true" - }, - "locationId": "us-central1-a", - "maintenanceVersion": "20230821_00_00", - "memorySizeGb": 16, - "name": "projects/${projectId}/locations/us-central1/instances/redisinstances-${uniqueId}", - "nodes": [ - { - "id": "node-0", - "zone": "us-central1-a" - } - ], - "persistenceConfig": { - "persistenceMode": "DISABLED" - }, - "persistenceIamIdentity": "serviceAccount:service-${projectNumber}@cloud-redis.iam.gserviceaccount.com", - "port": 6379, - "readReplicasMode": "READ_REPLICAS_DISABLED", - "redisVersion": "REDIS_7_0", - "reservedIpRange": "10.1.2.0/24", - "state": "READY", - "tier": "BASIC", - "transitEncryptionMode": "DISABLED" -} - ---- - -GET https://redis.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1/instances/redisinstances-${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 - -{ - "authorizedNetwork": "projects/${projectId}/global/networks/default", - "availableMaintenanceVersions": [ - "20231114_00_00", - "20240220_00_00", - "20240328_00_00", - "20240411_00_00" - ], "connectMode": "DIRECT_PEERING", "createTime": "2024-04-01T12:34:56.123456Z", "currentLocationId": "us-central1-a", @@ -237,65 +164,6 @@ X-Xss-Protection: 0 "managed-by-cnrm": "true" }, "locationId": "us-central1-a", - "maintenanceVersion": "20230821_00_00", - "memorySizeGb": 16, - "name": "projects/${projectId}/locations/us-central1/instances/redisinstances-${uniqueId}", - "nodes": [ - { - "id": "node-0", - "zone": "us-central1-a" - } - ], - "persistenceConfig": { - "persistenceMode": "DISABLED" - }, - "persistenceIamIdentity": "serviceAccount:service-${projectNumber}@cloud-redis.iam.gserviceaccount.com", - "port": 6379, - "readReplicasMode": "READ_REPLICAS_DISABLED", - "redisVersion": "REDIS_7_0", - "reservedIpRange": "10.1.2.0/24", - "state": "READY", - "tier": "BASIC", - "transitEncryptionMode": "DISABLED" -} - ---- - -GET https://redis.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1/instances/redisinstances-${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 - -{ - "authorizedNetwork": "projects/${projectId}/global/networks/default", - "availableMaintenanceVersions": [ - "20231114_00_00", - "20240220_00_00", - "20240328_00_00", - "20240411_00_00" - ], - "connectMode": "DIRECT_PEERING", - "createTime": "2024-04-01T12:34:56.123456Z", - "currentLocationId": "us-central1-a", - "displayName": "Sample Redis Instance", - "host": "10.1.2.3", - "labels": { - "cnrm-test": "true", - "label-one": "value-one", - "managed-by-cnrm": "true" - }, - "locationId": "us-central1-a", - "maintenanceVersion": "20230821_00_00", "memorySizeGb": 16, "name": "projects/${projectId}/locations/us-central1/instances/redisinstances-${uniqueId}", "nodes": [ @@ -350,11 +218,9 @@ X-Frame-Options: SAMEORIGIN X-Xss-Protection: 0 { - "done": false, "metadata": { "@type": "type.googleapis.com/google.cloud.common.OperationMetadata", "apiVersion": "v1beta1", - "cancelRequested": false, "createTime": "2024-04-01T12:34:56.123456Z", "target": "projects/${projectId}/locations/us-central1/instances/redisinstances-${uniqueId}", "verb": "update" @@ -384,7 +250,6 @@ X-Xss-Protection: 0 "metadata": { "@type": "type.googleapis.com/google.cloud.common.OperationMetadata", "apiVersion": "v1beta1", - "cancelRequested": false, "createTime": "2024-04-01T12:34:56.123456Z", "endTime": "2024-04-01T12:34:56.123456Z", "target": "projects/${projectId}/locations/us-central1/instances/redisinstances-${uniqueId}", @@ -394,12 +259,6 @@ X-Xss-Protection: 0 "response": { "@type": "type.googleapis.com/google.cloud.redis.v1beta1.Instance", "authorizedNetwork": "projects/${projectId}/global/networks/default", - "availableMaintenanceVersions": [ - "20231114_00_00", - "20240220_00_00", - "20240328_00_00", - "20240411_00_00" - ], "connectMode": "DIRECT_PEERING", "createTime": "2024-04-01T12:34:56.123456Z", "currentLocationId": "us-central1-a", @@ -412,7 +271,6 @@ X-Xss-Protection: 0 "newkey": "newval" }, "locationId": "us-central1-a", - "maintenanceVersion": "20230821_00_00", "memorySizeGb": 20, "name": "projects/${projectId}/locations/us-central1/instances/redisinstances-${uniqueId}", "nodes": [ @@ -454,130 +312,6 @@ X-Xss-Protection: 0 { "authorizedNetwork": "projects/${projectId}/global/networks/default", - "availableMaintenanceVersions": [ - "20231114_00_00", - "20240220_00_00", - "20240328_00_00", - "20240411_00_00" - ], - "connectMode": "DIRECT_PEERING", - "createTime": "2024-04-01T12:34:56.123456Z", - "currentLocationId": "us-central1-a", - "displayName": "newDisplayName", - "host": "10.1.2.3", - "labels": { - "cnrm-test": "true", - "label-one": "value-one", - "managed-by-cnrm": "true", - "newkey": "newval" - }, - "locationId": "us-central1-a", - "maintenanceVersion": "20230821_00_00", - "memorySizeGb": 20, - "name": "projects/${projectId}/locations/us-central1/instances/redisinstances-${uniqueId}", - "nodes": [ - { - "id": "node-0", - "zone": "us-central1-a" - } - ], - "persistenceConfig": { - "persistenceMode": "DISABLED" - }, - "persistenceIamIdentity": "serviceAccount:service-${projectNumber}@cloud-redis.iam.gserviceaccount.com", - "port": 6379, - "readReplicasMode": "READ_REPLICAS_DISABLED", - "redisVersion": "REDIS_7_0", - "reservedIpRange": "10.1.2.0/24", - "state": "READY", - "tier": "BASIC", - "transitEncryptionMode": "DISABLED" -} - ---- - -GET https://redis.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1/instances/redisinstances-${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 - -{ - "authorizedNetwork": "projects/${projectId}/global/networks/default", - "availableMaintenanceVersions": [ - "20231114_00_00", - "20240220_00_00", - "20240328_00_00", - "20240411_00_00" - ], - "connectMode": "DIRECT_PEERING", - "createTime": "2024-04-01T12:34:56.123456Z", - "currentLocationId": "us-central1-a", - "displayName": "newDisplayName", - "host": "10.1.2.3", - "labels": { - "cnrm-test": "true", - "label-one": "value-one", - "managed-by-cnrm": "true", - "newkey": "newval" - }, - "locationId": "us-central1-a", - "maintenanceVersion": "20230821_00_00", - "memorySizeGb": 20, - "name": "projects/${projectId}/locations/us-central1/instances/redisinstances-${uniqueId}", - "nodes": [ - { - "id": "node-0", - "zone": "us-central1-a" - } - ], - "persistenceConfig": { - "persistenceMode": "DISABLED" - }, - "persistenceIamIdentity": "serviceAccount:service-${projectNumber}@cloud-redis.iam.gserviceaccount.com", - "port": 6379, - "readReplicasMode": "READ_REPLICAS_DISABLED", - "redisVersion": "REDIS_7_0", - "reservedIpRange": "10.1.2.0/24", - "state": "READY", - "tier": "BASIC", - "transitEncryptionMode": "DISABLED" -} - ---- - -GET https://redis.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1/instances/redisinstances-${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 - -{ - "authorizedNetwork": "projects/${projectId}/global/networks/default", - "availableMaintenanceVersions": [ - "20231114_00_00", - "20240220_00_00", - "20240328_00_00", - "20240411_00_00" - ], "connectMode": "DIRECT_PEERING", "createTime": "2024-04-01T12:34:56.123456Z", "currentLocationId": "us-central1-a", @@ -590,7 +324,6 @@ X-Xss-Protection: 0 "newkey": "newval" }, "locationId": "us-central1-a", - "maintenanceVersion": "20230821_00_00", "memorySizeGb": 20, "name": "projects/${projectId}/locations/us-central1/instances/redisinstances-${uniqueId}", "nodes": [ @@ -630,11 +363,9 @@ X-Frame-Options: SAMEORIGIN X-Xss-Protection: 0 { - "done": false, "metadata": { "@type": "type.googleapis.com/google.cloud.common.OperationMetadata", "apiVersion": "v1beta1", - "cancelRequested": false, "createTime": "2024-04-01T12:34:56.123456Z", "target": "projects/${projectId}/locations/us-central1/instances/redisinstances-${uniqueId}", "verb": "delete" @@ -664,7 +395,6 @@ X-Xss-Protection: 0 "metadata": { "@type": "type.googleapis.com/google.cloud.common.OperationMetadata", "apiVersion": "v1beta1", - "cancelRequested": false, "createTime": "2024-04-01T12:34:56.123456Z", "endTime": "2024-04-01T12:34:56.123456Z", "target": "projects/${projectId}/locations/us-central1/instances/redisinstances-${uniqueId}", diff --git a/pkg/test/resourcefixture/testdata/basic/resourcemanager/v1beta1/project/projectinfolder/_generated_object_projectinfolder.golden.yaml b/pkg/test/resourcefixture/testdata/basic/resourcemanager/v1beta1/project/projectinfolder/_generated_object_projectinfolder.golden.yaml index 0ccd409eb5..2bbedc3a25 100644 --- a/pkg/test/resourcefixture/testdata/basic/resourcemanager/v1beta1/project/projectinfolder/_generated_object_projectinfolder.golden.yaml +++ b/pkg/test/resourcefixture/testdata/basic/resourcemanager/v1beta1/project/projectinfolder/_generated_object_projectinfolder.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: resourcemanager.cnrm.cloud.google.com/v1beta1 kind: Project metadata: @@ -39,5 +25,5 @@ status: reason: UpToDate status: "True" type: Ready - number: "2739014477" + number: "2727742225" observedGeneration: 3 diff --git a/pkg/test/resourcefixture/testdata/basic/resourcemanager/v1beta1/project/projectinfolder/_http.log b/pkg/test/resourcefixture/testdata/basic/resourcemanager/v1beta1/project/projectinfolder/_http.log new file mode 100644 index 0000000000..b6c1576e13 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/resourcemanager/v1beta1/project/projectinfolder/_http.log @@ -0,0 +1,521 @@ +GET https://cloudresourcemanager.googleapis.com/v1/projects/project-${uniqueId}?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 + +403 Forbidden +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": 403, + "message": "The caller does not have permission", + "status": "PERMISSION_DENIED" + } +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/projects?alt=json&prettyPrint=false +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 + +{ + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "KCC ${uniqueId}", + "parent": { + "id": "${testFolderId}", + "type": "folder" + }, + "projectId": "project-${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://cloudresourcemanager.googleapis.com/v1/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 + +{ + "done": true, + "metadata": { + "@type": "type.googleapis.com/google.cloud.resourcemanager.v3.CreateProjectMetadata" + }, + "name": "operations/${operationID}", + "response": { + "@type": "type.googleapis.com/google.cloud.resourcemanager.v3.Project", + "createTime": "2024-04-01T12:34:56.123456Z", + "displayName": "KCC ${uniqueId}", + "etag": "abcdef0123A=", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectNumber}", + "parent": "folders/${testFolderId}", + "projectId": "project-${uniqueId}", + "state": "ACTIVE" + } +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/project-${uniqueId}?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", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "KCC ${uniqueId}", + "parent": { + "id": "${testFolderId}", + "type": "folder" + }, + "projectId": "project-${uniqueId}", + "projectNumber": "${projectNumber}" +} + +--- + +GET https://cloudbilling.googleapis.com/v1/projects/project-${uniqueId}/billingInfo?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 + +{ + "billingAccountName": "", + "billingEnabled": false, + "name": "projects/project-${uniqueId}/billingInfo", + "projectId": "project-${uniqueId}" +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/project-${uniqueId}?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", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "KCC ${uniqueId}", + "parent": { + "id": "${testFolderId}", + "type": "folder" + }, + "projectId": "project-${uniqueId}", + "projectNumber": "${projectNumber}" +} + +--- + +GET https://cloudbilling.googleapis.com/v1/projects/project-${uniqueId}/billingInfo?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 + +{ + "billingAccountName": "", + "billingEnabled": false, + "name": "projects/project-${uniqueId}/billingInfo", + "projectId": "project-${uniqueId}" +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/project-${uniqueId}?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", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "KCC ${uniqueId}", + "parent": { + "id": "${testFolderId}", + "type": "folder" + }, + "projectId": "project-${uniqueId}", + "projectNumber": "${projectNumber}" +} + +--- + +GET https://cloudbilling.googleapis.com/v1/projects/project-${uniqueId}/billingInfo?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 + +{ + "billingAccountName": "", + "billingEnabled": false, + "name": "projects/project-${uniqueId}/billingInfo", + "projectId": "project-${uniqueId}" +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/project-${uniqueId}?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", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "KCC ${uniqueId}", + "parent": { + "id": "${testFolderId}", + "type": "folder" + }, + "projectId": "project-${uniqueId}", + "projectNumber": "${projectNumber}" +} + +--- + +PUT https://cloudresourcemanager.googleapis.com/v1/projects/project-${uniqueId}?alt=json&prettyPrint=false +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 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "KCC-2 ${uniqueId}", + "parent": { + "id": "${testFolderId}", + "type": "folder" + }, + "projectId": "project-${uniqueId}", + "projectNumber": "${projectNumber}" +} + +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", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "projects/project-${uniqueId}", + "parent": { + "id": "${testFolderId}", + "type": "folder" + }, + "projectId": "project-${uniqueId}", + "projectNumber": "${projectNumber}" +} + +--- + +PUT https://cloudresourcemanager.googleapis.com/v1/projects/project-${uniqueId}?alt=json&prettyPrint=false +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 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "projects/project-${uniqueId}", + "parent": { + "id": "${testFolderId}", + "type": "folder" + }, + "projectId": "project-${uniqueId}", + "projectNumber": "${projectNumber}" +} + +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", + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "projects/project-${uniqueId}", + "parent": { + "id": "${testFolderId}", + "type": "folder" + }, + "projectId": "project-${uniqueId}", + "projectNumber": "${projectNumber}" +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/project-${uniqueId}?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", + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "projects/project-${uniqueId}", + "parent": { + "id": "${testFolderId}", + "type": "folder" + }, + "projectId": "project-${uniqueId}", + "projectNumber": "${projectNumber}" +} + +--- + +GET https://cloudbilling.googleapis.com/v1/projects/project-${uniqueId}/billingInfo?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 + +{ + "billingAccountName": "", + "billingEnabled": false, + "name": "projects/project-${uniqueId}/billingInfo", + "projectId": "project-${uniqueId}" +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/project-${uniqueId}?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", + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "projects/project-${uniqueId}", + "parent": { + "id": "${testFolderId}", + "type": "folder" + }, + "projectId": "project-${uniqueId}", + "projectNumber": "${projectNumber}" +} + +--- + +GET https://cloudbilling.googleapis.com/v1/projects/project-${uniqueId}/billingInfo?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 + +{ + "billingAccountName": "", + "billingEnabled": false, + "name": "projects/project-${uniqueId}/billingInfo", + "projectId": "project-${uniqueId}" +} + +--- + +DELETE https://cloudresourcemanager.googleapis.com/v1/projects/project-${uniqueId}?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 + +{} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/basic/resourcemanager/v1beta1/project/projectinorg/_generated_object_projectinorg.golden.yaml b/pkg/test/resourcefixture/testdata/basic/resourcemanager/v1beta1/project/projectinorg/_generated_object_projectinorg.golden.yaml index 18c3b8e961..d8ce0c0fe3 100644 --- a/pkg/test/resourcefixture/testdata/basic/resourcemanager/v1beta1/project/projectinorg/_generated_object_projectinorg.golden.yaml +++ b/pkg/test/resourcefixture/testdata/basic/resourcemanager/v1beta1/project/projectinorg/_generated_object_projectinorg.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: resourcemanager.cnrm.cloud.google.com/v1beta1 kind: Project metadata: @@ -39,5 +25,5 @@ status: reason: UpToDate status: "True" type: Ready - number: "2645428866" + number: "2713651918" observedGeneration: 3 diff --git a/pkg/test/resourcefixture/testdata/basic/resourcemanager/v1beta1/project/projectinorg/_http.log b/pkg/test/resourcefixture/testdata/basic/resourcemanager/v1beta1/project/projectinorg/_http.log index bfded0dc87..9b3d53fc20 100644 --- a/pkg/test/resourcefixture/testdata/basic/resourcemanager/v1beta1/project/projectinorg/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/resourcemanager/v1beta1/project/projectinorg/_http.log @@ -1,6 +1,5 @@ GET https://cloudresourcemanager.googleapis.com/v1/projects/project-${uniqueId}?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 -X-Goog-Api-Client: gl-go/1.22.1 gdcl/0.160.0 403 Forbidden Cache-Control: private @@ -16,14 +15,6 @@ X-Xss-Protection: 0 { "error": { "code": 403, - "errors": [ - { - "debugInfo": "detail: \"[ORIGINAL ERROR] generic::permission_denied: Not authorized to access project: project-${uniqueId}\\nProjectServiceException: PERMISSION_DENIED, Not authorized to access project: project-${uniqueId}\"\n", - "domain": "global", - "message": "The caller does not have permission", - "reason": "forbidden" - } - ], "message": "The caller does not have permission", "status": "PERMISSION_DENIED" } @@ -34,7 +25,6 @@ X-Xss-Protection: 0 POST https://cloudresourcemanager.googleapis.com/v1/projects?alt=json&prettyPrint=false 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 -X-Goog-Api-Client: gl-go/1.22.1 gdcl/0.160.0 { "labels": { @@ -43,7 +33,7 @@ X-Goog-Api-Client: gl-go/1.22.1 gdcl/0.160.0 }, "name": "KCC ${uniqueId}", "parent": { - "id": "128653134652", + "id": "123450001", "type": "organization" }, "projectId": "project-${uniqueId}" @@ -84,26 +74,22 @@ X-Xss-Protection: 0 { "done": true, "metadata": { - "@type": "type.googleapis.com/google.cloudresourcemanager.v1.ProjectCreationStatus", - "gettable": true, - "ready": true + "@type": "type.googleapis.com/google.cloud.resourcemanager.v3.CreateProjectMetadata" }, "name": "operations/${operationID}", "response": { - "@type": "type.googleapis.com/google.cloudresourcemanager.v1.Project", + "@type": "type.googleapis.com/google.cloud.resourcemanager.v3.Project", "createTime": "2024-04-01T12:34:56.123456Z", + "displayName": "KCC ${uniqueId}", + "etag": "abcdef0123A=", "labels": { "cnrm-test": "true", "managed-by-cnrm": "true" }, - "lifecycleState": "ACTIVE", - "name": "KCC ${uniqueId}", - "parent": { - "id": "128653134652", - "type": "organization" - }, + "name": "projects/${projectNumber}", + "parent": "organizations/${organizationID}", "projectId": "project-${uniqueId}", - "projectNumber": "105323842526" + "state": "ACTIVE" } } @@ -111,7 +97,6 @@ X-Xss-Protection: 0 GET https://cloudresourcemanager.googleapis.com/v1/projects/project-${uniqueId}?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 -X-Goog-Api-Client: gl-go/1.22.1 gdcl/0.160.0 200 OK Cache-Control: private @@ -133,18 +118,17 @@ X-Xss-Protection: 0 "lifecycleState": "ACTIVE", "name": "KCC ${uniqueId}", "parent": { - "id": "128653134652", + "id": "123450001", "type": "organization" }, "projectId": "project-${uniqueId}", - "projectNumber": "105323842526" + "projectNumber": "${projectNumber}" } --- GET https://cloudbilling.googleapis.com/v1/projects/project-${uniqueId}/billingInfo?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 -X-Goog-Api-Client: gl-go/1.22.1 gdcl/0.160.0 200 OK Cache-Control: private @@ -168,7 +152,6 @@ X-Xss-Protection: 0 GET https://cloudresourcemanager.googleapis.com/v1/projects/project-${uniqueId}?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 -X-Goog-Api-Client: gl-go/1.22.1 gdcl/0.160.0 200 OK Cache-Control: private @@ -190,18 +173,17 @@ X-Xss-Protection: 0 "lifecycleState": "ACTIVE", "name": "KCC ${uniqueId}", "parent": { - "id": "128653134652", + "id": "123450001", "type": "organization" }, "projectId": "project-${uniqueId}", - "projectNumber": "105323842526" + "projectNumber": "${projectNumber}" } --- GET https://cloudbilling.googleapis.com/v1/projects/project-${uniqueId}/billingInfo?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 -X-Goog-Api-Client: gl-go/1.22.1 gdcl/0.160.0 200 OK Cache-Control: private @@ -225,7 +207,6 @@ X-Xss-Protection: 0 GET https://cloudresourcemanager.googleapis.com/v1/projects/project-${uniqueId}?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 -X-Goog-Api-Client: gl-go/1.22.1 gdcl/0.160.0 200 OK Cache-Control: private @@ -247,18 +228,17 @@ X-Xss-Protection: 0 "lifecycleState": "ACTIVE", "name": "KCC ${uniqueId}", "parent": { - "id": "128653134652", + "id": "123450001", "type": "organization" }, "projectId": "project-${uniqueId}", - "projectNumber": "105323842526" + "projectNumber": "${projectNumber}" } --- GET https://cloudbilling.googleapis.com/v1/projects/project-${uniqueId}/billingInfo?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 -X-Goog-Api-Client: gl-go/1.22.1 gdcl/0.160.0 200 OK Cache-Control: private @@ -282,7 +262,6 @@ X-Xss-Protection: 0 GET https://cloudresourcemanager.googleapis.com/v1/projects/project-${uniqueId}?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 -X-Goog-Api-Client: gl-go/1.22.1 gdcl/0.160.0 200 OK Cache-Control: private @@ -304,11 +283,11 @@ X-Xss-Protection: 0 "lifecycleState": "ACTIVE", "name": "KCC ${uniqueId}", "parent": { - "id": "128653134652", + "id": "123450001", "type": "organization" }, "projectId": "project-${uniqueId}", - "projectNumber": "105323842526" + "projectNumber": "${projectNumber}" } --- @@ -316,7 +295,6 @@ X-Xss-Protection: 0 PUT https://cloudresourcemanager.googleapis.com/v1/projects/project-${uniqueId}?alt=json&prettyPrint=false 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 -X-Goog-Api-Client: gl-go/1.22.1 gdcl/0.160.0 { "createTime": "2024-04-01T12:34:56.123456Z", @@ -327,11 +305,11 @@ X-Goog-Api-Client: gl-go/1.22.1 gdcl/0.160.0 "lifecycleState": "ACTIVE", "name": "KCC-2 ${uniqueId}", "parent": { - "id": "128653134652", + "id": "123450001", "type": "organization" }, "projectId": "project-${uniqueId}", - "projectNumber": "105323842526" + "projectNumber": "${projectNumber}" } 200 OK @@ -352,13 +330,13 @@ X-Xss-Protection: 0 "managed-by-cnrm": "true" }, "lifecycleState": "ACTIVE", - "name": "KCC-2 ${uniqueId}", + "name": "projects/project-${uniqueId}", "parent": { - "id": "128653134652", + "id": "123450001", "type": "organization" }, "projectId": "project-${uniqueId}", - "projectNumber": "105323842526" + "projectNumber": "${projectNumber}" } --- @@ -366,7 +344,6 @@ X-Xss-Protection: 0 PUT https://cloudresourcemanager.googleapis.com/v1/projects/project-${uniqueId}?alt=json&prettyPrint=false 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 -X-Goog-Api-Client: gl-go/1.22.1 gdcl/0.160.0 { "createTime": "2024-04-01T12:34:56.123456Z", @@ -376,13 +353,13 @@ X-Goog-Api-Client: gl-go/1.22.1 gdcl/0.160.0 "managed-by-cnrm": "true" }, "lifecycleState": "ACTIVE", - "name": "KCC-2 ${uniqueId}", + "name": "projects/project-${uniqueId}", "parent": { - "id": "128653134652", + "id": "123450001", "type": "organization" }, "projectId": "project-${uniqueId}", - "projectNumber": "105323842526" + "projectNumber": "${projectNumber}" } 200 OK @@ -404,20 +381,19 @@ X-Xss-Protection: 0 "managed-by-cnrm": "true" }, "lifecycleState": "ACTIVE", - "name": "KCC-2 ${uniqueId}", + "name": "projects/project-${uniqueId}", "parent": { - "id": "128653134652", + "id": "123450001", "type": "organization" }, "projectId": "project-${uniqueId}", - "projectNumber": "105323842526" + "projectNumber": "${projectNumber}" } --- GET https://cloudresourcemanager.googleapis.com/v1/projects/project-${uniqueId}?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 -X-Goog-Api-Client: gl-go/1.22.1 gdcl/0.160.0 200 OK Cache-Control: private @@ -438,20 +414,19 @@ X-Xss-Protection: 0 "managed-by-cnrm": "true" }, "lifecycleState": "ACTIVE", - "name": "KCC-2 ${uniqueId}", + "name": "projects/project-${uniqueId}", "parent": { - "id": "128653134652", + "id": "123450001", "type": "organization" }, "projectId": "project-${uniqueId}", - "projectNumber": "105323842526" + "projectNumber": "${projectNumber}" } --- GET https://cloudbilling.googleapis.com/v1/projects/project-${uniqueId}/billingInfo?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 -X-Goog-Api-Client: gl-go/1.22.1 gdcl/0.160.0 200 OK Cache-Control: private @@ -475,7 +450,6 @@ X-Xss-Protection: 0 GET https://cloudresourcemanager.googleapis.com/v1/projects/project-${uniqueId}?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 -X-Goog-Api-Client: gl-go/1.22.1 gdcl/0.160.0 200 OK Cache-Control: private @@ -496,20 +470,19 @@ X-Xss-Protection: 0 "managed-by-cnrm": "true" }, "lifecycleState": "ACTIVE", - "name": "KCC-2 ${uniqueId}", + "name": "projects/project-${uniqueId}", "parent": { - "id": "128653134652", + "id": "123450001", "type": "organization" }, "projectId": "project-${uniqueId}", - "projectNumber": "105323842526" + "projectNumber": "${projectNumber}" } --- GET https://cloudbilling.googleapis.com/v1/projects/project-${uniqueId}/billingInfo?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 -X-Goog-Api-Client: gl-go/1.22.1 gdcl/0.160.0 200 OK Cache-Control: private @@ -533,7 +506,6 @@ X-Xss-Protection: 0 DELETE https://cloudresourcemanager.googleapis.com/v1/projects/project-${uniqueId}?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 -X-Goog-Api-Client: gl-go/1.22.1 gdcl/0.160.0 200 OK Cache-Control: private diff --git a/pkg/test/resourcefixture/testdata/basic/resourcemanager/v1beta1/project/projectmovedfoldertofolder/_generated_object_projectmovedfoldertofolder.golden.yaml b/pkg/test/resourcefixture/testdata/basic/resourcemanager/v1beta1/project/projectmovedfoldertofolder/_generated_object_projectmovedfoldertofolder.golden.yaml index 4da634eca8..9872b41b50 100644 --- a/pkg/test/resourcefixture/testdata/basic/resourcemanager/v1beta1/project/projectmovedfoldertofolder/_generated_object_projectmovedfoldertofolder.golden.yaml +++ b/pkg/test/resourcefixture/testdata/basic/resourcemanager/v1beta1/project/projectmovedfoldertofolder/_generated_object_projectmovedfoldertofolder.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: resourcemanager.cnrm.cloud.google.com/v1beta1 kind: Project metadata: @@ -38,5 +24,5 @@ status: reason: UpToDate status: "True" type: Ready - number: "2682587953" + number: "2589592254" observedGeneration: 3 diff --git a/pkg/test/resourcefixture/testdata/basic/resourcemanager/v1beta1/project/projectmovedfoldertofolder/_http.log b/pkg/test/resourcefixture/testdata/basic/resourcemanager/v1beta1/project/projectmovedfoldertofolder/_http.log new file mode 100644 index 0000000000..eb3f58b115 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/resourcemanager/v1beta1/project/projectmovedfoldertofolder/_http.log @@ -0,0 +1,468 @@ +GET https://cloudresourcemanager.googleapis.com/v1/projects/project-${uniqueId}?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 + +403 Forbidden +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": 403, + "message": "The caller does not have permission", + "status": "PERMISSION_DENIED" + } +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/projects?alt=json&prettyPrint=false +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 + +{ + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "KCC ${uniqueId}", + "parent": { + "id": "${testFolderId}", + "type": "folder" + }, + "projectId": "project-${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://cloudresourcemanager.googleapis.com/v1/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 + +{ + "done": true, + "metadata": { + "@type": "type.googleapis.com/google.cloud.resourcemanager.v3.CreateProjectMetadata" + }, + "name": "operations/${operationID}", + "response": { + "@type": "type.googleapis.com/google.cloud.resourcemanager.v3.Project", + "createTime": "2024-04-01T12:34:56.123456Z", + "displayName": "KCC ${uniqueId}", + "etag": "abcdef0123A=", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectNumber}", + "parent": "folders/${testFolderId}", + "projectId": "project-${uniqueId}", + "state": "ACTIVE" + } +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/project-${uniqueId}?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", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "KCC ${uniqueId}", + "parent": { + "id": "${testFolderId}", + "type": "folder" + }, + "projectId": "project-${uniqueId}", + "projectNumber": "${projectNumber}" +} + +--- + +GET https://cloudbilling.googleapis.com/v1/projects/project-${uniqueId}/billingInfo?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 + +{ + "billingAccountName": "", + "billingEnabled": false, + "name": "projects/project-${uniqueId}/billingInfo", + "projectId": "project-${uniqueId}" +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/project-${uniqueId}?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", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "KCC ${uniqueId}", + "parent": { + "id": "${testFolderId}", + "type": "folder" + }, + "projectId": "project-${uniqueId}", + "projectNumber": "${projectNumber}" +} + +--- + +GET https://cloudbilling.googleapis.com/v1/projects/project-${uniqueId}/billingInfo?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 + +{ + "billingAccountName": "", + "billingEnabled": false, + "name": "projects/project-${uniqueId}/billingInfo", + "projectId": "project-${uniqueId}" +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/project-${uniqueId}?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", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "KCC ${uniqueId}", + "parent": { + "id": "${testFolderId}", + "type": "folder" + }, + "projectId": "project-${uniqueId}", + "projectNumber": "${projectNumber}" +} + +--- + +GET https://cloudbilling.googleapis.com/v1/projects/project-${uniqueId}/billingInfo?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 + +{ + "billingAccountName": "", + "billingEnabled": false, + "name": "projects/project-${uniqueId}/billingInfo", + "projectId": "project-${uniqueId}" +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/project-${uniqueId}?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", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "KCC ${uniqueId}", + "parent": { + "id": "${testFolderId}", + "type": "folder" + }, + "projectId": "project-${uniqueId}", + "projectNumber": "${projectNumber}" +} + +--- + +PUT https://cloudresourcemanager.googleapis.com/v1/projects/project-${uniqueId}?alt=json&prettyPrint=false +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 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "KCC ${uniqueId}", + "parent": { + "id": "123451002", + "type": "folder" + }, + "projectId": "project-${uniqueId}", + "projectNumber": "${projectNumber}" +} + +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", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "projects/project-${uniqueId}", + "parent": { + "id": "${testFolderId}", + "type": "folder" + }, + "projectId": "project-${uniqueId}", + "projectNumber": "${projectNumber}" +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/project-${uniqueId}?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", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "projects/project-${uniqueId}", + "parent": { + "id": "${testFolderId}", + "type": "folder" + }, + "projectId": "project-${uniqueId}", + "projectNumber": "${projectNumber}" +} + +--- + +GET https://cloudbilling.googleapis.com/v1/projects/project-${uniqueId}/billingInfo?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 + +{ + "billingAccountName": "", + "billingEnabled": false, + "name": "projects/project-${uniqueId}/billingInfo", + "projectId": "project-${uniqueId}" +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/project-${uniqueId}?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", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "projects/project-${uniqueId}", + "parent": { + "id": "${testFolderId}", + "type": "folder" + }, + "projectId": "project-${uniqueId}", + "projectNumber": "${projectNumber}" +} + +--- + +GET https://cloudbilling.googleapis.com/v1/projects/project-${uniqueId}/billingInfo?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 + +{ + "billingAccountName": "", + "billingEnabled": false, + "name": "projects/project-${uniqueId}/billingInfo", + "projectId": "project-${uniqueId}" +} + +--- + +DELETE https://cloudresourcemanager.googleapis.com/v1/projects/project-${uniqueId}?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 + +{} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/basic/secretmanager/v1beta1/secretmanagersecret/_generated_object_secretmanagersecret.golden.yaml b/pkg/test/resourcefixture/testdata/basic/secretmanager/v1beta1/secretmanagersecret/_generated_object_secretmanagersecret.golden.yaml new file mode 100644 index 0000000000..6cf2b7d133 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/secretmanager/v1beta1/secretmanagersecret/_generated_object_secretmanagersecret.golden.yaml @@ -0,0 +1,35 @@ +apiVersion: secretmanager.cnrm.cloud.google.com/v1beta1 +kind: SecretManagerSecret +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: 2 + labels: + cnrm-test: "true" + label-one: value-one + name: secretmanagersecret-${uniqueId} + namespace: ${uniqueId} +spec: + replication: + userManaged: + replicas: + - location: us-central1 + resourceID: secretmanagersecret-${uniqueId} + topics: + - topicRef: + name: topic-${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/${projectNumber}/secrets/secretmanagersecret-${uniqueId} + observedGeneration: 2 diff --git a/pkg/test/resourcefixture/testdata/basic/secretmanager/v1beta1/secretmanagersecret/_http.log b/pkg/test/resourcefixture/testdata/basic/secretmanager/v1beta1/secretmanagersecret/_http.log new file mode 100644 index 0000000000..b875915d46 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/secretmanager/v1beta1/secretmanagersecret/_http.log @@ -0,0 +1,374 @@ +GET https://pubsub.googleapis.com/v1/projects/${projectId}/topics/topic-${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, + "message": "Resource not found (resource=topic-${uniqueId}).", + "status": "NOT_FOUND" + } +} + +--- + +PUT https://pubsub.googleapis.com/v1/projects/${projectId}/topics/topic-${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 + +{ + "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 + +{ + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectId}/topics/topic-${uniqueId}" +} + +--- + +GET https://pubsub.googleapis.com/v1/projects/${projectId}/topics/topic-${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 + +{ + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectId}/topics/topic-${uniqueId}" +} + +--- + +GET https://pubsub.googleapis.com/v1/projects/${projectId}/topics/topic-${uniqueId}:getIamPolicy?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 + + + +{ + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://pubsub.googleapis.com/v1/projects/${projectId}/topics/topic-${uniqueId}:setIamPolicy?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 + +{ + "policy": { + "bindings": [ + { + "members": [ + "serviceAccount:service-${projectNumber}@gcp-sa-secretmanager.iam.gserviceaccount.com" + ], + "role": "roles/pubsub.publisher" + } + ], + "etag": "abcdef0123A=", + "version": 3 + } +} + + + +{ + "bindings": [ + { + "members": [ + "serviceAccount:service-${projectNumber}@gcp-sa-secretmanager.iam.gserviceaccount.com" + ], + "role": "roles/pubsub.publisher" + } + ], + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +GET https://pubsub.googleapis.com/v1/projects/${projectId}/topics/topic-${uniqueId}:getIamPolicy?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 + + + +{ + "bindings": [ + { + "members": [ + "serviceAccount:service-${projectNumber}@gcp-sa-secretmanager.iam.gserviceaccount.com" + ], + "role": "roles/pubsub.publisher" + } + ], + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +GET https://secretmanager.googleapis.com/v1/projects/${projectId}/secrets/secretmanagersecret-${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": "secret \"projects/${projectNumber}/secrets/secretmanagersecret-${uniqueId}\" not found" +} + +--- + +POST https://secretmanager.googleapis.com/v1/projects/${projectId}/secrets?alt=json&secretId=secretmanagersecret-${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 + +{ + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "replication": { + "userManaged": { + "replicas": [ + { + "location": "us-central1" + } + ] + } + }, + "topics": [ + { + "name": "projects/${projectId}/topics/topic-${uniqueId}" + } + ] +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "annotations": {}, + "createTime": "2024-04-01T12:34:56.123456Z", + "etag": "abcdef0123A=", + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectNumber}/secrets/secretmanagersecret-${uniqueId}", + "replication": { + "userManaged": { + "replicas": [ + { + "customerManagedEncryption": null, + "location": "us-central1" + } + ] + } + }, + "rotation": null, + "topics": [ + { + "name": "projects/${projectId}/topics/topic-${uniqueId}" + } + ], + "versionAliases": {} +} + +--- + +GET https://secretmanager.googleapis.com/v1/projects/${projectId}/secrets/secretmanagersecret-${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": {}, + "createTime": "2024-04-01T12:34:56.123456Z", + "etag": "abcdef0123A=", + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectNumber}/secrets/secretmanagersecret-${uniqueId}", + "replication": { + "userManaged": { + "replicas": [ + { + "customerManagedEncryption": null, + "location": "us-central1" + } + ] + } + }, + "rotation": null, + "topics": [ + { + "name": "projects/${projectId}/topics/topic-${uniqueId}" + } + ], + "versionAliases": {} +} + +--- + +DELETE https://secretmanager.googleapis.com/v1/projects/${projectId}/secrets/secretmanagersecret-${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 + +{} + +--- + +GET https://pubsub.googleapis.com/v1/projects/${projectId}/topics/topic-${uniqueId}:getIamPolicy?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 + + + +{ + "bindings": [ + { + "members": [ + "serviceAccount:service-${projectNumber}@gcp-sa-secretmanager.iam.gserviceaccount.com" + ], + "role": "roles/pubsub.publisher" + } + ], + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://pubsub.googleapis.com/v1/projects/${projectId}/topics/topic-${uniqueId}:setIamPolicy?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 + +{ + "policy": { + "etag": "abcdef0123A=", + "version": 3 + } +} + + + +{ + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +GET https://pubsub.googleapis.com/v1/projects/${projectId}/topics/topic-${uniqueId}:getIamPolicy?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 + + + +{ + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +GET https://pubsub.googleapis.com/v1/projects/${projectId}/topics/topic-${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 + +{ + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectId}/topics/topic-${uniqueId}" +} + +--- + +DELETE https://pubsub.googleapis.com/v1/projects/${projectId}/topics/topic-${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 + +{} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/basic/secretmanager/v1beta1/secretmanagersecretversion/_http.log b/pkg/test/resourcefixture/testdata/basic/secretmanager/v1beta1/secretmanagersecretversion/_http.log new file mode 100644 index 0000000000..fbf22acd58 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/secretmanager/v1beta1/secretmanagersecretversion/_http.log @@ -0,0 +1,370 @@ +GET https://secretmanager.googleapis.com/v1/projects/${projectId}/secrets/secretmanagersecretversion-dep-${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": "secret \"projects/${projectNumber}/secrets/secretmanagersecretversion-dep-${uniqueId}\" not found" +} + +--- + +POST https://secretmanager.googleapis.com/v1/projects/${projectId}/secrets?alt=json&secretId=secretmanagersecretversion-dep-${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 + +{ + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "replication": { + "automatic": {} + } +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "annotations": {}, + "createTime": "2024-04-01T12:34:56.123456Z", + "etag": "abcdef0123A=", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectNumber}/secrets/secretmanagersecretversion-dep-${uniqueId}", + "replication": { + "automatic": { + "customerManagedEncryption": null + } + }, + "rotation": null, + "topics": [], + "versionAliases": {} +} + +--- + +GET https://secretmanager.googleapis.com/v1/projects/${projectId}/secrets/secretmanagersecretversion-dep-${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": {}, + "createTime": "2024-04-01T12:34:56.123456Z", + "etag": "abcdef0123A=", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectNumber}/secrets/secretmanagersecretversion-dep-${uniqueId}", + "replication": { + "automatic": { + "customerManagedEncryption": null + } + }, + "rotation": null, + "topics": [], + "versionAliases": {} +} + +--- + +POST https://secretmanager.googleapis.com/v1/projects/${projectNumber}/secrets/secretmanagersecretversion-dep-${uniqueId}:addVersion?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 + +{ + "payload": { + "data": "SSBhbHdheXMgbG92ZWQgc3BhcnJpbmcgd2l0aCBnaWFudCBjYW5keSBzd29yZHMsIGJ1dCBJIGhhZCBubyBpZGVhIHRoYXQgd2FzIG15IHN1cGVyIHNlY3JldCBpbmZvcm1hdGlvbiE=" + } +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "clientSpecifiedPayloadChecksum": false, + "createTime": "2024-04-01T12:34:56.123456Z", + "destroyTime": null, + "etag": "abcdef0123A=", + "name": "projects/${projectNumber}/secrets/secretmanagersecretversion-dep-${uniqueId}/versions/1", + "replicationStatus": { + "automatic": { + "customerManagedEncryption": null + } + }, + "state": "ENABLED" +} + +--- + +POST https://secretmanager.googleapis.com/v1/projects/${projectNumber}/secrets/secretmanagersecretversion-dep-${uniqueId}/versions/1:enable?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 + +{ + "clientSpecifiedPayloadChecksum": false, + "createTime": "2024-04-01T12:34:56.123456Z", + "destroyTime": null, + "etag": "abcdef0123A=", + "name": "projects/${projectNumber}/secrets/secretmanagersecretversion-dep-${uniqueId}/versions/1", + "replicationStatus": { + "automatic": { + "customerManagedEncryption": null + } + }, + "state": "ENABLED" +} + +--- + +GET https://secretmanager.googleapis.com/v1/projects/${projectNumber}/secrets/secretmanagersecretversion-dep-${uniqueId}/versions/1?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 + +{ + "clientSpecifiedPayloadChecksum": false, + "createTime": "2024-04-01T12:34:56.123456Z", + "destroyTime": null, + "etag": "abcdef0123A=", + "name": "projects/${projectNumber}/secrets/secretmanagersecretversion-dep-${uniqueId}/versions/1", + "replicationStatus": { + "automatic": { + "customerManagedEncryption": null + } + }, + "state": "ENABLED" +} + +--- + +GET https://secretmanager.googleapis.com/v1/projects/${projectNumber}/secrets/secretmanagersecretversion-dep-${uniqueId}/versions/1:access?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 + +{ + "name": "projects/${projectNumber}/secrets/secretmanagersecretversion-dep-${uniqueId}/versions/1", + "payload": { + "data": "SSBhbHdheXMgbG92ZWQgc3BhcnJpbmcgd2l0aCBnaWFudCBjYW5keSBzd29yZHMsIGJ1dCBJIGhhZCBubyBpZGVhIHRoYXQgd2FzIG15IHN1cGVyIHNlY3JldCBpbmZvcm1hdGlvbiE=" + } +} + +--- + +GET https://secretmanager.googleapis.com/v1/projects/${projectNumber}/secrets/secretmanagersecretversion-dep-${uniqueId}/versions/1?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 + +{ + "clientSpecifiedPayloadChecksum": false, + "createTime": "2024-04-01T12:34:56.123456Z", + "destroyTime": null, + "etag": "abcdef0123A=", + "name": "projects/${projectNumber}/secrets/secretmanagersecretversion-dep-${uniqueId}/versions/1", + "replicationStatus": { + "automatic": { + "customerManagedEncryption": null + } + }, + "state": "ENABLED" +} + +--- + +GET https://secretmanager.googleapis.com/v1/projects/${projectNumber}/secrets/secretmanagersecretversion-dep-${uniqueId}/versions/1:access?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 + +{ + "name": "projects/${projectNumber}/secrets/secretmanagersecretversion-dep-${uniqueId}/versions/1", + "payload": { + "data": "SSBhbHdheXMgbG92ZWQgc3BhcnJpbmcgd2l0aCBnaWFudCBjYW5keSBzd29yZHMsIGJ1dCBJIGhhZCBubyBpZGVhIHRoYXQgd2FzIG15IHN1cGVyIHNlY3JldCBpbmZvcm1hdGlvbiE=" + } +} + +--- + +GET https://secretmanager.googleapis.com/v1/projects/${projectNumber}/secrets/secretmanagersecretversion-dep-${uniqueId}/versions/1?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 + +{ + "clientSpecifiedPayloadChecksum": false, + "createTime": "2024-04-01T12:34:56.123456Z", + "destroyTime": null, + "etag": "abcdef0123A=", + "name": "projects/${projectNumber}/secrets/secretmanagersecretversion-dep-${uniqueId}/versions/1", + "replicationStatus": { + "automatic": { + "customerManagedEncryption": null + } + }, + "state": "ENABLED" +} + +--- + +GET https://secretmanager.googleapis.com/v1/projects/${projectNumber}/secrets/secretmanagersecretversion-dep-${uniqueId}/versions/1:access?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 + +{ + "name": "projects/${projectNumber}/secrets/secretmanagersecretversion-dep-${uniqueId}/versions/1", + "payload": { + "data": "SSBhbHdheXMgbG92ZWQgc3BhcnJpbmcgd2l0aCBnaWFudCBjYW5keSBzd29yZHMsIGJ1dCBJIGhhZCBubyBpZGVhIHRoYXQgd2FzIG15IHN1cGVyIHNlY3JldCBpbmZvcm1hdGlvbiE=" + } +} + +--- + +POST https://secretmanager.googleapis.com/v1/projects/${projectNumber}/secrets/secretmanagersecretversion-dep-${uniqueId}/versions/1:disable?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 + +{ + "clientSpecifiedPayloadChecksum": false, + "createTime": "2024-04-01T12:34:56.123456Z", + "destroyTime": null, + "etag": "abcdef0123A=", + "name": "projects/${projectNumber}/secrets/secretmanagersecretversion-dep-${uniqueId}/versions/1", + "replicationStatus": { + "automatic": { + "customerManagedEncryption": null + } + }, + "state": "DISABLED" +} + +--- + +GET https://secretmanager.googleapis.com/v1/projects/${projectNumber}/secrets/secretmanagersecretversion-dep-${uniqueId}/versions/1?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 + +{ + "clientSpecifiedPayloadChecksum": false, + "createTime": "2024-04-01T12:34:56.123456Z", + "destroyTime": null, + "etag": "abcdef0123A=", + "name": "projects/${projectNumber}/secrets/secretmanagersecretversion-dep-${uniqueId}/versions/1", + "replicationStatus": { + "automatic": { + "customerManagedEncryption": null + } + }, + "state": "DISABLED" +} + +--- + +POST https://secretmanager.googleapis.com/v1/projects/${projectNumber}/secrets/secretmanagersecretversion-dep-${uniqueId}/versions/1:destroy?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 + +{ + "clientSpecifiedPayloadChecksum": false, + "createTime": "2024-04-01T12:34:56.123456Z", + "destroyTime": null, + "etag": "abcdef0123A=", + "name": "projects/${projectNumber}/secrets/secretmanagersecretversion-dep-${uniqueId}/versions/1", + "replicationStatus": { + "automatic": { + "customerManagedEncryption": null + } + }, + "state": "DESTROYED" +} + +--- + +GET https://secretmanager.googleapis.com/v1/projects/${projectId}/secrets/secretmanagersecretversion-dep-${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": {}, + "createTime": "2024-04-01T12:34:56.123456Z", + "etag": "abcdef0123A=", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectNumber}/secrets/secretmanagersecretversion-dep-${uniqueId}", + "replication": { + "automatic": { + "customerManagedEncryption": null + } + }, + "rotation": null, + "topics": [], + "versionAliases": {} +} + +--- + +DELETE https://secretmanager.googleapis.com/v1/projects/${projectId}/secrets/secretmanagersecretversion-dep-${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 + +{} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/basic/servicenetworking/v1beta1/servicenetworkingconnection/_generated_object_servicenetworkingconnection.golden.yaml b/pkg/test/resourcefixture/testdata/basic/servicenetworking/v1beta1/servicenetworkingconnection/_generated_object_servicenetworkingconnection.golden.yaml new file mode 100644 index 0000000000..a26ff2531e --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/servicenetworking/v1beta1/servicenetworkingconnection/_generated_object_servicenetworkingconnection.golden.yaml @@ -0,0 +1,31 @@ +apiVersion: servicenetworking.cnrm.cloud.google.com/v1beta1 +kind: ServiceNetworkingConnection +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: 2 + labels: + cnrm-test: "true" + name: servicenetworkingconnection-${uniqueId} + namespace: ${uniqueId} +spec: + networkRef: + name: computenetwork-${uniqueId} + reservedPeeringRanges: + - name: computeaddress1-${uniqueId} + - name: computeaddress2-${uniqueId} + service: servicenetworking.googleapis.com +status: + conditions: + - lastTransitionTime: "1970-01-01T00:00:00Z" + message: The resource is up to date + reason: UpToDate + status: "True" + type: Ready + observedGeneration: 2 + peering: servicenetworking-googleapis-com diff --git a/pkg/test/resourcefixture/testdata/basic/servicenetworking/v1beta1/servicenetworkingconnection/_http.log b/pkg/test/resourcefixture/testdata/basic/servicenetworking/v1beta1/servicenetworkingconnection/_http.log new file mode 100644 index 0000000000..de06994a66 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/servicenetworking/v1beta1/servicenetworkingconnection/_http.log @@ -0,0 +1,1098 @@ +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}?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": "The resource 'projects/${projectId}/global/networks/computenetwork-${uniqueId}' was not found", + "reason": "notFound" + } + ], + "message": "The resource 'projects/${projectId}/global/networks/computenetwork-${uniqueId}' was 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://www.googleapis.com/compute/beta/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetId": "${networkID}", + "targetLink": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "user": "user@example.com" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}?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://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "selfLinkWithId": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses/computeaddress1-${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/computeaddress1-${uniqueId}\" not found", + "reason": "notFound" + } + ], + "message": "address \"projects/${projectId}/global/networks/computeaddress1-${uniqueId}\" 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": "computeaddress1-${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/computeaddress1-${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": "computeaddress1-${uniqueId}", + "network": "projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "prefixLength": 16, + "purpose": "VPC_PEERING", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/computeaddress1-${uniqueId}" +} + +--- + +POST https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses/computeaddress1-${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/computeaddress1-${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": "computeaddress1-${uniqueId}", + "network": "projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "prefixLength": 16, + "purpose": "VPC_PEERING", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/computeaddress1-${uniqueId}" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses/computeaddress2-${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/computeaddress2-${uniqueId}\" not found", + "reason": "notFound" + } + ], + "message": "address \"projects/${projectId}/global/networks/computeaddress2-${uniqueId}\" 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": "computeaddress2-${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/computeaddress2-${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": "computeaddress2-${uniqueId}", + "network": "projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "prefixLength": 16, + "purpose": "VPC_PEERING", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/computeaddress2-${uniqueId}" +} + +--- + +POST https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses/computeaddress2-${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/computeaddress2-${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": "computeaddress2-${uniqueId}", + "network": "projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "prefixLength": 16, + "purpose": "VPC_PEERING", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/computeaddress2-${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": [ + "computeaddress1-${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": [ + "computeaddress1-${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": [ + "computeaddress1-${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": [ + "computeaddress1-${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}" +} + +--- + +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": [ + "computeaddress1-${uniqueId}", + "computeaddress2-${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": [ + "computeaddress1-${uniqueId}", + "computeaddress2-${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": [ + "computeaddress1-${uniqueId}", + "computeaddress2-${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": [ + "computeaddress1-${uniqueId}", + "computeaddress2-${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/${networkID}/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://www.googleapis.com/compute/beta/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/computeaddress2-${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": "computeaddress2-${uniqueId}", + "network": "projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "prefixLength": 16, + "purpose": "VPC_PEERING", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/computeaddress2-${uniqueId}" +} + +--- + +DELETE https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses/computeaddress2-${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://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses/computeaddress1-${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": "computeaddress1-${uniqueId}", + "network": "projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "prefixLength": 16, + "purpose": "VPC_PEERING", + "selfLink": "https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/computeaddress1-${uniqueId}" +} + +--- + +DELETE https://compute.googleapis.com/compute/beta/projects/${projectId}/global/addresses/computeaddress1-${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://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}?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://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "selfLinkWithId": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}" +} + +--- + +DELETE https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}?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://www.googleapis.com/compute/beta/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetId": "${networkID}", + "targetLink": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "user": "user@example.com" +} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/basic/serviceusage/v1beta1/service/_generated_export_service.golden b/pkg/test/resourcefixture/testdata/basic/serviceusage/v1beta1/service/_generated_export_service.golden new file mode 100644 index 0000000000..bac8e3f007 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/serviceusage/v1beta1/service/_generated_export_service.golden @@ -0,0 +1,8 @@ +apiVersion: serviceusage.cnrm.cloud.google.com/v1beta1 +kind: Service +metadata: + name: runtimeconfig.googleapis.com +spec: + projectRef: + external: ${projectId} + resourceID: runtimeconfig.googleapis.com \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/basic/serviceusage/v1beta1/service/_http.log b/pkg/test/resourcefixture/testdata/basic/serviceusage/v1beta1/service/_http.log new file mode 100644 index 0000000000..8ba4d3f5f9 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/serviceusage/v1beta1/service/_http.log @@ -0,0 +1,68 @@ +GET https://serviceusage.googleapis.com/v1/projects/${projectId}/services?alt=json&fields=services%2Fname%2CnextPageToken&filter=state%3AENABLED&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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "nextPageToken": "", + "services": [] +} + +--- + +POST https://serviceusage.googleapis.com/v1/projects/${projectId}/services/runtimeconfig.googleapis.com:enable?alt=json&prettyPrint=false +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 + +{} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://serviceusage.googleapis.com/v1/projects/${projectId}/services?alt=json&fields=services%2Fname%2CnextPageToken&filter=state%3AENABLED&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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "nextPageToken": "", + "services": [ + { + "config": null, + "name": "projects/${projectNumber}/services/runtimeconfig.googleapis.com", + "parent": "projects/${projectNumber}", + "state": "ENABLED" + } + ] +} + +--- + +POST https://serviceusage.googleapis.com/v1/projects/${projectId}/services/runtimeconfig.googleapis.com:disable?alt=json&prettyPrint=false +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 + +{} + +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/serviceusage/v1beta1/serviceidentity/_http.log b/pkg/test/resourcefixture/testdata/basic/serviceusage/v1beta1/serviceidentity/_http.log new file mode 100644 index 0000000000..7b785cef38 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/serviceusage/v1beta1/serviceidentity/_http.log @@ -0,0 +1,39 @@ +POST https://serviceusage.googleapis.com/v1beta1/projects/${projectId}/services/pubsub.googleapis.com:generateServiceIdentity?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}", + "response": { + "@type": "type.googleapis.com/mockgcp.api.serviceusage.v1beta1.ServiceIdentity", + "email": "service-${projectNumber}@gcp-sa-pubsub.iam.gserviceaccount.com", + "uniqueId": "123456789002" + } +} + +--- + +POST https://serviceusage.googleapis.com/v1beta1/projects/${projectId}/services/pubsub.googleapis.com:generateServiceIdentity?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}", + "response": { + "@type": "type.googleapis.com/mockgcp.api.serviceusage.v1beta1.ServiceIdentity", + "email": "service-${projectNumber}@gcp-sa-pubsub.iam.gserviceaccount.com", + "uniqueId": "123456789002" + } +} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/basic/spanner/v1beta1/spannerinstance/_generated_object_spannerinstance.golden.yaml b/pkg/test/resourcefixture/testdata/basic/spanner/v1beta1/spannerinstance/_generated_object_spannerinstance.golden.yaml index 281c5d4c1e..eb7dbcb14c 100644 --- a/pkg/test/resourcefixture/testdata/basic/spanner/v1beta1/spannerinstance/_generated_object_spannerinstance.golden.yaml +++ b/pkg/test/resourcefixture/testdata/basic/spanner/v1beta1/spannerinstance/_generated_object_spannerinstance.golden.yaml @@ -8,7 +8,7 @@ metadata: finalizers: - cnrm.cloud.google.com/finalizer - cnrm.cloud.google.com/deletion-defender - generation: 2 + generation: 4 labels: cnrm-test: "true" label-one: value-one @@ -17,8 +17,8 @@ metadata: spec: config: regional-us-west1 displayName: Spanner Instance Sample - numNodes: 2 - processingUnits: 2000 + numNodes: 3 + processingUnits: 3000 resourceID: spannerinstance-sample-${uniqueId} status: conditions: @@ -27,5 +27,5 @@ status: reason: UpToDate status: "True" type: Ready - observedGeneration: 2 + observedGeneration: 4 state: READY diff --git a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/mysqlinstance/_generated_object_mysqlinstance.golden.yaml b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/mysqlinstance/_generated_object_mysqlinstance.golden.yaml new file mode 100644 index 0000000000..1d6f77d2fa --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/mysqlinstance/_generated_object_mysqlinstance.golden.yaml @@ -0,0 +1,69 @@ +apiVersion: sql.cnrm.cloud.google.com/v1beta1 +kind: SQLInstance +metadata: + annotations: + cnrm.cloud.google.com/management-conflict-prevention-policy: none + cnrm.cloud.google.com/mutable-but-unreadable-fields: '{}' + cnrm.cloud.google.com/observed-secret-versions: (removed) + 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: 2 + labels: + cnrm-test: "true" + label-one: value-one + newkey: newval + name: sqlinstance-sample-${uniqueId} + namespace: ${uniqueId} +spec: + databaseVersion: MYSQL_5_7 + instanceType: CLOUD_SQL_INSTANCE + maintenanceVersion: MYSQL_5_7_44.R20231105.01_03 + region: us-central1 + resourceID: sqlinstance-sample-${uniqueId} + settings: + activationPolicy: ALWAYS + availabilityType: ZONAL + backupConfiguration: + backupRetentionSettings: + retainedBackups: 7 + retentionUnit: COUNT + startTime: "21:00" + transactionLogRetentionDays: 7 + connectorEnforcement: NOT_REQUIRED + diskAutoresize: true + diskAutoresizeLimit: 0 + diskSize: 10 + diskType: PD_SSD + edition: ENTERPRISE + ipConfiguration: + ipv4Enabled: true + locationPreference: + zone: us-central1-c + pricingPlan: PER_USE + tier: db-n1-standard-1 +status: + conditions: + - lastTransitionTime: "1970-01-01T00:00:00Z" + message: The resource is up to date + reason: UpToDate + status: "True" + type: Ready + connectionName: ${projectId}:us-central1:sqlinstance-sample-${uniqueId} + firstIpAddress: 10.10.10.10 + instanceType: CLOUD_SQL_INSTANCE + ipAddress: 10.1.2.3 + observedGeneration: 2 + publicIpAddress: 10.10.10.10 + selfLink: https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqlinstance-sample-${uniqueId} + serverCaCert: + cert: | + -----BEGIN CERTIFICATE----- + -----END CERTIFICATE----- + commonName: common-name + createTime: "2024-06-19T22:54:22.309289161Z" + expirationTime: "2025-06-19T22:54:22.309289161Z" + sha1Fingerprint: "12345678" + serviceAccountEmailAddress: p${projectNumber}-abcdef@gcp-sa-cloud-sql.iam.gserviceaccount.com diff --git a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/mysqlinstance/_http.log b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/mysqlinstance/_http.log new file mode 100644 index 0000000000..c09c0afe12 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/mysqlinstance/_http.log @@ -0,0 +1,283 @@ +GET https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqlinstance-sample-${uniqueId}?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 + +404 Not Found +Content-Type: application/json + +{ + "code": 5, + "details": [], + "message": "databaseInstance \"projects/${projectId}/SQLInstances/sqlinstance-sample-${uniqueId}\" not found" +} + +--- + +POST https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances?alt=json&prettyPrint=false +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 + +{ + "databaseVersion": "MYSQL_5_7", + "instanceType": "CLOUD_SQL_INSTANCE", + "name": "sqlinstance-sample-${uniqueId}", + "region": "us-central1", + "settings": { + "activationPolicy": "ALWAYS", + "availabilityType": "ZONAL", + "dataDiskType": "PD_SSD", + "edition": "ENTERPRISE", + "pricingPlan": "PER_USE", + "storageAutoResize": true, + "tier": "db-n1-standard-1", + "userLabels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + } + } +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "apiWarning": null, + "backupContext": null, + "endTime": null, + "error": null, + "exportContext": null, + "importContext": null, + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "sql#operation", + "name": "${operationID}", + "operationType": "CREATE", + "selfLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/operations/${operationID}", + "startTime": null, + "status": "PENDING", + "targetId": "sqlinstance-sample-${uniqueId}", + "targetLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqlinstance-sample-${uniqueId}", + "targetProject": "${projectId}", + "user": "user@example.com" +} + +--- + +GET https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqlinstance-sample-${uniqueId}/users?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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "items": [ + { + "etag": "EjnF9iH0o1gfUa1zU3TNUQ==", + "host": "%", + "instance": "sqlinstance-sample-${uniqueId}", + "kind": "sql#user", + "name": "root", + "password": "", + "passwordPolicy": { + "allowedFailedAttempts": 0, + "enableFailedAttemptsCheck": false, + "enablePasswordVerification": false, + "passwordExpirationDuration": null, + "status": { + "locked": false, + "passwordExpirationTime": null + } + }, + "project": "${projectId}", + "type": "BUILT_IN" + } + ], + "kind": "sql#usersList", + "nextPageToken": "" +} + +--- + +DELETE https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqlinstance-sample-${uniqueId}/users?alt=json&host=%25&name=root&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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "apiWarning": null, + "backupContext": null, + "endTime": null, + "error": null, + "exportContext": null, + "importContext": null, + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "sql#operation", + "name": "${operationID}", + "operationType": "DELETE_USER", + "selfLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/operations/${operationID}", + "startTime": null, + "status": "PENDING", + "targetId": "sqlinstance-sample-${uniqueId}", + "targetLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqlinstance-sample-${uniqueId}", + "targetProject": "${projectId}", + "user": "user@example.com" +} + +--- + +GET https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqlinstance-sample-${uniqueId}?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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "availableMaintenanceVersions": [], + "backendType": "SECOND_GEN", + "connectionName": "${projectId}:us-central1:sqlinstance-sample-${uniqueId}", + "createTime": "2024-04-01T12:34:56.123456Z", + "currentDiskSize": null, + "databaseInstalledVersion": "MYSQL_5_7_44", + "databaseVersion": "MYSQL_5_7", + "diskEncryptionConfiguration": null, + "diskEncryptionStatus": null, + "etag": "abcdef0123A=", + "failoverReplica": null, + "gceZone": "us-central1-c", + "instanceType": "CLOUD_SQL_INSTANCE", + "ipAddresses": [ + { + "ipAddress": "10.10.10.10", + "timeToRetire": null, + "type": "PRIMARY" + } + ], + "ipv6Address": "", + "kind": "sql#instance", + "maintenanceVersion": "MYSQL_5_7_44.R20231105.01_03", + "masterInstanceName": "", + "maxDiskSize": null, + "name": "sqlinstance-sample-${uniqueId}", + "onPremisesConfiguration": null, + "project": "${projectId}", + "region": "us-central1", + "replicaConfiguration": null, + "replicaNames": [], + "rootPassword": "", + "satisfiesPzs": null, + "scheduledMaintenance": null, + "secondaryGceZone": "", + "selfLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqlinstance-sample-${uniqueId}", + "serverCaCert": { + "cert": "-----BEGIN CERTIFICATE-----\n-----END CERTIFICATE-----\n", + "certSerialNumber": "0", + "commonName": "common-name", + "createTime": "2024-06-19T22:54:22.309289161Z", + "expirationTime": "2025-06-19T22:54:22.309289161Z", + "instance": "sqlinstance-sample-${uniqueId}", + "kind": "sql#sslCert", + "selfLink": "", + "sha1Fingerprint": "12345678" + }, + "serviceAccountEmailAddress": "p${projectNumber}-abcdef@gcp-sa-cloud-sql.iam.gserviceaccount.com", + "settings": { + "activationPolicy": "ALWAYS", + "activeDirectoryConfig": null, + "advancedMachineFeatures": null, + "authorizedGaeApplications": [], + "availabilityType": "ZONAL", + "backupConfiguration": { + "backupRetentionSettings": { + "retainedBackups": 7, + "retentionUnit": "COUNT" + }, + "binaryLogEnabled": null, + "enabled": false, + "kind": "sql#backupConfiguration", + "location": "", + "pointInTimeRecoveryEnabled": false, + "replicationLogArchivingEnabled": null, + "startTime": "21:00", + "transactionLogRetentionDays": 7 + }, + "collation": "", + "connectorEnforcement": "NOT_REQUIRED", + "crashSafeReplicationEnabled": null, + "dataCacheConfig": null, + "dataDiskSizeGb": "10", + "dataDiskType": "PD_SSD", + "databaseFlags": [], + "databaseReplicationEnabled": null, + "deletionProtectionEnabled": false, + "denyMaintenancePeriods": [], + "edition": "ENTERPRISE", + "insightsConfig": null, + "ipConfiguration": { + "allocatedIpRange": "", + "authorizedNetworks": [], + "enablePrivatePathForGoogleCloudServices": null, + "ipv4Enabled": true, + "privateNetwork": "", + "requireSsl": false, + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, + "kind": "sql#settings", + "locationPreference": { + "followGaeApplication": "", + "kind": "sql#locationPreference", + "secondaryZone": "", + "zone": "us-central1-c" + }, + "maintenanceWindow": null, + "passwordValidationPolicy": null, + "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", + "settingsVersion": "1", + "sqlServerAuditConfig": null, + "storageAutoResize": true, + "storageAutoResizeLimit": "0", + "tier": "db-n1-standard-1", + "timeZone": "", + "userLabels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + } + }, + "sqlNetworkArchitecture": "NEW_NETWORK_ARCHITECTURE", + "state": "RUNNABLE", + "suspensionReason": [] +} + +--- + +DELETE https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqlinstance-sample-${uniqueId}?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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "apiWarning": null, + "backupContext": null, + "endTime": null, + "error": null, + "exportContext": null, + "importContext": null, + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "sql#operation", + "name": "${operationID}", + "operationType": "DELETE", + "selfLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/operations/${operationID}", + "startTime": null, + "status": "PENDING", + "targetId": "sqlinstance-sample-${uniqueId}", + "targetLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqlinstance-sample-${uniqueId}", + "targetProject": "${projectId}", + "user": "user@example.com" +} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/postgresinstance/_generated_object_postgresinstance.golden.yaml b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/postgresinstance/_generated_object_postgresinstance.golden.yaml new file mode 100644 index 0000000000..01d26370dc --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/postgresinstance/_generated_object_postgresinstance.golden.yaml @@ -0,0 +1,85 @@ +apiVersion: sql.cnrm.cloud.google.com/v1beta1 +kind: SQLInstance +metadata: + annotations: + cnrm.cloud.google.com/management-conflict-prevention-policy: none + cnrm.cloud.google.com/mutable-but-unreadable-fields: '{"spec":{"settings":{"ipConfiguration":{"sslMode":"ENCRYPTED_ONLY"}}}}' + cnrm.cloud.google.com/observed-secret-versions: (removed) + 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" + name: sqlinstance-${uniqueId} + namespace: ${uniqueId} +spec: + databaseVersion: POSTGRES_9_6 + instanceType: SQL_INSTANCE_TYPE_UNSPECIFIED + region: us-central1 + resourceID: sqlinstance-${uniqueId} + settings: + activationPolicy: ALWAYS + availabilityType: REGIONAL + backupConfiguration: + backupRetentionSettings: + retainedBackups: 7 + retentionUnit: COUNT + enabled: true + pointInTimeRecoveryEnabled: true + startTime: "05:00" + transactionLogRetentionDays: 3 + connectorEnforcement: NOT_REQUIRED + databaseFlags: + - name: cloudsql.iam_authentication + value: "on" + - name: max_connections + value: "1000" + - name: max_worker_processes + value: "8" + deletionProtectionEnabled: false + diskAutoresize: false + diskAutoresizeLimit: 0 + diskSize: 100 + diskType: PD_SSD + edition: ENTERPRISE + insightsConfig: + queryInsightsEnabled: true + queryStringLength: 1024 + recordApplicationTags: true + recordClientAddress: true + ipConfiguration: + ipv4Enabled: false + privateNetworkRef: + name: computenetwork-${uniqueId} + requireSsl: false + sslMode: ENCRYPTED_ONLY + locationPreference: + zone: us-central1-c + pricingPlan: PER_USE + tier: db-custom-1-3840 +status: + conditions: + - lastTransitionTime: "1970-01-01T00:00:00Z" + message: The resource is up to date + reason: UpToDate + status: "True" + type: Ready + connectionName: ${projectId}:us-central1:sqlinstance-${uniqueId} + firstIpAddress: 10.10.10.10 + instanceType: SQL_INSTANCE_TYPE_UNSPECIFIED + ipAddress: 10.1.2.3 + observedGeneration: 3 + publicIpAddress: 10.10.10.10 + selfLink: https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqlinstance-${uniqueId} + serverCaCert: + cert: | + -----BEGIN CERTIFICATE----- + -----END CERTIFICATE----- + commonName: common-name + createTime: "2024-06-19T22:54:48.411842645Z" + expirationTime: "2025-06-19T22:54:48.411842645Z" + sha1Fingerprint: "12345678" + serviceAccountEmailAddress: p${projectNumber}-abcdef@gcp-sa-cloud-sql.iam.gserviceaccount.com diff --git a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/postgresinstance/_http.log b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/postgresinstance/_http.log new file mode 100644 index 0000000000..65f2d7e996 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/postgresinstance/_http.log @@ -0,0 +1,1251 @@ +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}?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": "The resource 'projects/${projectId}/global/networks/computenetwork-${uniqueId}' was not found", + "reason": "notFound" + } + ], + "message": "The resource 'projects/${projectId}/global/networks/computenetwork-${uniqueId}' was 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://www.googleapis.com/compute/beta/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetId": "${networkID}", + "targetLink": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "user": "user@example.com" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}?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://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "selfLinkWithId": "https://www.googleapis.com/compute/beta/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" + } +} + +--- + +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://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqlinstance-${uniqueId}?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 + +404 Not Found +Content-Type: application/json + +{ + "code": 5, + "details": [], + "message": "databaseInstance \"projects/${projectId}/SQLInstances/sqlinstance-${uniqueId}\" not found" +} + +--- + +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" + } + ] +} + +--- + +POST https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances?alt=json&prettyPrint=false +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 + +{ + "databaseVersion": "POSTGRES_9_6", + "name": "sqlinstance-${uniqueId}", + "region": "us-central1", + "settings": { + "activationPolicy": "ALWAYS", + "availabilityType": "REGIONAL", + "backupConfiguration": { + "backupRetentionSettings": { + "retainedBackups": 7, + "retentionUnit": "COUNT" + }, + "binaryLogEnabled": false, + "enabled": true, + "pointInTimeRecoveryEnabled": true, + "startTime": "06:00", + "transactionLogRetentionDays": 3 + }, + "dataDiskSizeGb": "100", + "dataDiskType": "PD_SSD", + "databaseFlags": [ + { + "name": "cloudsql.iam_authentication", + "value": "on" + }, + { + "name": "max_connections", + "value": "1000" + }, + { + "name": "max_worker_processes", + "value": "8" + } + ], + "edition": "ENTERPRISE", + "insightsConfig": { + "queryInsightsEnabled": true, + "queryStringLength": 1024, + "recordApplicationTags": true, + "recordClientAddress": true + }, + "ipConfiguration": { + "enablePrivatePathForGoogleCloudServices": false, + "ipv4Enabled": false, + "privateNetwork": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "requireSsl": false, + "sslMode": "ENCRYPTED_ONLY" + }, + "pricingPlan": "PER_USE", + "storageAutoResize": false, + "tier": "db-custom-1-3840", + "userLabels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + } + } +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "apiWarning": null, + "backupContext": null, + "endTime": null, + "error": null, + "exportContext": null, + "importContext": null, + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "sql#operation", + "name": "${operationID}", + "operationType": "CREATE", + "selfLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/operations/${operationID}", + "startTime": null, + "status": "PENDING", + "targetId": "sqlinstance-${uniqueId}", + "targetLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqlinstance-${uniqueId}", + "targetProject": "${projectId}", + "user": "user@example.com" +} + +--- + +GET https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqlinstance-${uniqueId}/users?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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "items": [], + "kind": "sql#usersList", + "nextPageToken": "" +} + +--- + +GET https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqlinstance-${uniqueId}?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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "availableMaintenanceVersions": [], + "backendType": "SECOND_GEN", + "connectionName": "${projectId}:us-central1:sqlinstance-${uniqueId}", + "createTime": "2024-04-01T12:34:56.123456Z", + "currentDiskSize": null, + "databaseInstalledVersion": "POSTGRES_9_6", + "databaseVersion": "POSTGRES_9_6", + "diskEncryptionConfiguration": null, + "diskEncryptionStatus": null, + "etag": "abcdef0123A=", + "failoverReplica": null, + "gceZone": "us-central1-c", + "instanceType": "SQL_INSTANCE_TYPE_UNSPECIFIED", + "ipAddresses": [ + { + "ipAddress": "10.10.10.10", + "timeToRetire": null, + "type": "PRIMARY" + } + ], + "ipv6Address": "", + "kind": "sql#instance", + "maintenanceVersion": "", + "masterInstanceName": "", + "maxDiskSize": null, + "name": "sqlinstance-${uniqueId}", + "onPremisesConfiguration": null, + "project": "${projectId}", + "region": "us-central1", + "replicaConfiguration": null, + "replicaNames": [], + "rootPassword": "", + "satisfiesPzs": null, + "scheduledMaintenance": null, + "secondaryGceZone": "", + "selfLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqlinstance-${uniqueId}", + "serverCaCert": { + "cert": "-----BEGIN CERTIFICATE-----\n-----END CERTIFICATE-----\n", + "certSerialNumber": "0", + "commonName": "common-name", + "createTime": "2024-06-19T22:54:48.411842645Z", + "expirationTime": "2025-06-19T22:54:48.411842645Z", + "instance": "sqlinstance-${uniqueId}", + "kind": "sql#sslCert", + "selfLink": "", + "sha1Fingerprint": "12345678" + }, + "serviceAccountEmailAddress": "p${projectNumber}-abcdef@gcp-sa-cloud-sql.iam.gserviceaccount.com", + "settings": { + "activationPolicy": "ALWAYS", + "activeDirectoryConfig": null, + "advancedMachineFeatures": null, + "authorizedGaeApplications": [], + "availabilityType": "REGIONAL", + "backupConfiguration": { + "backupRetentionSettings": { + "retainedBackups": 7, + "retentionUnit": "COUNT" + }, + "binaryLogEnabled": false, + "enabled": true, + "kind": "sql#backupConfiguration", + "location": "", + "pointInTimeRecoveryEnabled": true, + "replicationLogArchivingEnabled": null, + "startTime": "06:00", + "transactionLogRetentionDays": 3 + }, + "collation": "", + "connectorEnforcement": "NOT_REQUIRED", + "crashSafeReplicationEnabled": null, + "dataCacheConfig": null, + "dataDiskSizeGb": "100", + "dataDiskType": "PD_SSD", + "databaseFlags": [ + { + "name": "cloudsql.iam_authentication", + "value": "on" + }, + { + "name": "max_connections", + "value": "1000" + }, + { + "name": "max_worker_processes", + "value": "8" + } + ], + "databaseReplicationEnabled": null, + "deletionProtectionEnabled": false, + "denyMaintenancePeriods": [], + "edition": "ENTERPRISE", + "insightsConfig": { + "queryInsightsEnabled": true, + "queryPlansPerMinute": null, + "queryStringLength": 1024, + "recordApplicationTags": true, + "recordClientAddress": true + }, + "ipConfiguration": { + "allocatedIpRange": "", + "authorizedNetworks": [], + "enablePrivatePathForGoogleCloudServices": false, + "ipv4Enabled": false, + "privateNetwork": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "requireSsl": false, + "sslMode": "ENCRYPTED_ONLY" + }, + "kind": "sql#settings", + "locationPreference": { + "followGaeApplication": "", + "kind": "sql#locationPreference", + "secondaryZone": "", + "zone": "us-central1-c" + }, + "maintenanceWindow": null, + "passwordValidationPolicy": null, + "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", + "settingsVersion": "1", + "sqlServerAuditConfig": null, + "storageAutoResize": false, + "storageAutoResizeLimit": "0", + "tier": "db-custom-1-3840", + "timeZone": "", + "userLabels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + } + }, + "sqlNetworkArchitecture": "NEW_NETWORK_ARCHITECTURE", + "state": "RUNNABLE", + "suspensionReason": [] +} + +--- + +PUT https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqlinstance-${uniqueId}?alt=json&prettyPrint=false +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 + +{ + "instanceType": "SQL_INSTANCE_TYPE_UNSPECIFIED", + "settings": { + "activationPolicy": "ALWAYS", + "availabilityType": "REGIONAL", + "backupConfiguration": { + "backupRetentionSettings": { + "retainedBackups": 7, + "retentionUnit": "COUNT" + }, + "binaryLogEnabled": false, + "enabled": true, + "pointInTimeRecoveryEnabled": true, + "startTime": "05:00", + "transactionLogRetentionDays": 3 + }, + "connectorEnforcement": "NOT_REQUIRED", + "dataDiskSizeGb": "100", + "dataDiskType": "PD_SSD", + "databaseFlags": [ + { + "name": "cloudsql.iam_authentication", + "value": "on" + }, + { + "name": "max_connections", + "value": "1000" + }, + { + "name": "max_worker_processes", + "value": "8" + } + ], + "edition": "ENTERPRISE", + "insightsConfig": { + "queryInsightsEnabled": true, + "queryStringLength": 1024, + "recordApplicationTags": true, + "recordClientAddress": true + }, + "ipConfiguration": { + "enablePrivatePathForGoogleCloudServices": false, + "ipv4Enabled": false, + "privateNetwork": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "requireSsl": false, + "sslMode": "ENCRYPTED_ONLY" + }, + "locationPreference": { + "zone": "us-central1-c" + }, + "pricingPlan": "PER_USE", + "settingsVersion": "1", + "storageAutoResize": false, + "tier": "db-custom-1-3840", + "userLabels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + } + } +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "apiWarning": null, + "backupContext": null, + "endTime": null, + "error": null, + "exportContext": null, + "importContext": null, + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "sql#operation", + "name": "${operationID}", + "operationType": "UPDATE", + "selfLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/operations/${operationID}", + "startTime": null, + "status": "PENDING", + "targetId": "sqlinstance-${uniqueId}", + "targetLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqlinstance-${uniqueId}", + "targetProject": "${projectId}", + "user": "user@example.com" +} + +--- + +GET https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqlinstance-${uniqueId}?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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "availableMaintenanceVersions": [], + "backendType": "SECOND_GEN", + "connectionName": "${projectId}:us-central1:sqlinstance-${uniqueId}", + "createTime": "2024-04-01T12:34:56.123456Z", + "currentDiskSize": null, + "databaseInstalledVersion": "POSTGRES_9_6", + "databaseVersion": "POSTGRES_9_6", + "diskEncryptionConfiguration": null, + "diskEncryptionStatus": null, + "etag": "abcdef0123A=", + "failoverReplica": null, + "gceZone": "us-central1-c", + "instanceType": "SQL_INSTANCE_TYPE_UNSPECIFIED", + "ipAddresses": [ + { + "ipAddress": "10.10.10.10", + "timeToRetire": null, + "type": "PRIMARY" + } + ], + "ipv6Address": "", + "kind": "sql#instance", + "maintenanceVersion": "", + "masterInstanceName": "", + "maxDiskSize": null, + "name": "sqlinstance-${uniqueId}", + "onPremisesConfiguration": null, + "project": "${projectId}", + "region": "us-central1", + "replicaConfiguration": null, + "replicaNames": [], + "rootPassword": "", + "satisfiesPzs": null, + "scheduledMaintenance": null, + "secondaryGceZone": "", + "selfLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqlinstance-${uniqueId}", + "serverCaCert": { + "cert": "-----BEGIN CERTIFICATE-----\n-----END CERTIFICATE-----\n", + "certSerialNumber": "0", + "commonName": "common-name", + "createTime": "2024-06-19T22:54:48.411842645Z", + "expirationTime": "2025-06-19T22:54:48.411842645Z", + "instance": "sqlinstance-${uniqueId}", + "kind": "sql#sslCert", + "selfLink": "", + "sha1Fingerprint": "12345678" + }, + "serviceAccountEmailAddress": "p${projectNumber}-abcdef@gcp-sa-cloud-sql.iam.gserviceaccount.com", + "settings": { + "activationPolicy": "ALWAYS", + "activeDirectoryConfig": null, + "advancedMachineFeatures": null, + "authorizedGaeApplications": [], + "availabilityType": "REGIONAL", + "backupConfiguration": { + "backupRetentionSettings": { + "retainedBackups": 7, + "retentionUnit": "COUNT" + }, + "binaryLogEnabled": false, + "enabled": true, + "kind": "sql#backupConfiguration", + "location": "", + "pointInTimeRecoveryEnabled": true, + "replicationLogArchivingEnabled": null, + "startTime": "05:00", + "transactionLogRetentionDays": 3 + }, + "collation": "", + "connectorEnforcement": "NOT_REQUIRED", + "crashSafeReplicationEnabled": null, + "dataCacheConfig": null, + "dataDiskSizeGb": "100", + "dataDiskType": "PD_SSD", + "databaseFlags": [ + { + "name": "cloudsql.iam_authentication", + "value": "on" + }, + { + "name": "max_connections", + "value": "1000" + }, + { + "name": "max_worker_processes", + "value": "8" + } + ], + "databaseReplicationEnabled": null, + "deletionProtectionEnabled": false, + "denyMaintenancePeriods": [], + "edition": "ENTERPRISE", + "insightsConfig": { + "queryInsightsEnabled": true, + "queryPlansPerMinute": null, + "queryStringLength": 1024, + "recordApplicationTags": true, + "recordClientAddress": true + }, + "ipConfiguration": { + "allocatedIpRange": "", + "authorizedNetworks": [], + "enablePrivatePathForGoogleCloudServices": false, + "ipv4Enabled": false, + "privateNetwork": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "requireSsl": false, + "sslMode": "ENCRYPTED_ONLY" + }, + "kind": "sql#settings", + "locationPreference": { + "followGaeApplication": "", + "kind": "sql#locationPreference", + "secondaryZone": "", + "zone": "us-central1-c" + }, + "maintenanceWindow": null, + "passwordValidationPolicy": null, + "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", + "settingsVersion": "2", + "sqlServerAuditConfig": null, + "storageAutoResize": false, + "storageAutoResizeLimit": "0", + "tier": "db-custom-1-3840", + "timeZone": "", + "userLabels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + } + }, + "sqlNetworkArchitecture": "NEW_NETWORK_ARCHITECTURE", + "state": "RUNNABLE", + "suspensionReason": [] +} + +--- + +DELETE https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqlinstance-${uniqueId}?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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "apiWarning": null, + "backupContext": null, + "endTime": null, + "error": null, + "exportContext": null, + "importContext": null, + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "sql#operation", + "name": "${operationID}", + "operationType": "DELETE", + "selfLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/operations/${operationID}", + "startTime": null, + "status": "PENDING", + "targetId": "sqlinstance-${uniqueId}", + "targetLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqlinstance-${uniqueId}", + "targetProject": "${projectId}", + "user": "user@example.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://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/${networkID}/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://www.googleapis.com/compute/beta/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://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}?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://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "selfLinkWithId": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}" +} + +--- + +DELETE https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}?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://www.googleapis.com/compute/beta/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetId": "${networkID}", + "targetLink": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "user": "user@example.com" +} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlserverinstance/_generated_object_sqlserverinstance.golden.yaml b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlserverinstance/_generated_object_sqlserverinstance.golden.yaml new file mode 100644 index 0000000000..95d03e5912 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlserverinstance/_generated_object_sqlserverinstance.golden.yaml @@ -0,0 +1,74 @@ +apiVersion: sql.cnrm.cloud.google.com/v1beta1 +kind: SQLInstance +metadata: + annotations: + cnrm.cloud.google.com/management-conflict-prevention-policy: none + cnrm.cloud.google.com/mutable-but-unreadable-fields: '{"spec":{"rootPassword":{"value":"1234"}}}' + cnrm.cloud.google.com/observed-secret-versions: (removed) + 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: 2 + labels: + cnrm-test: "true" + label-one: value-one + newkey: newval + name: sqlinstance-sample-${uniqueId} + namespace: ${uniqueId} +spec: + databaseVersion: SQLSERVER_2017_EXPRESS + instanceType: SQL_INSTANCE_TYPE_UNSPECIFIED + maintenanceVersion: SQLSERVER_2017_EXPRESS_CU31_GDR.R20231029.00_02 + region: us-central1 + resourceID: sqlinstance-sample-${uniqueId} + rootPassword: + value: "1234" + settings: + activationPolicy: ALWAYS + availabilityType: ZONAL + backupConfiguration: + backupRetentionSettings: + retainedBackups: 7 + retentionUnit: COUNT + startTime: "21:00" + transactionLogRetentionDays: 7 + connectorEnforcement: NOT_REQUIRED + diskAutoresize: true + diskAutoresizeLimit: 0 + diskSize: 10 + diskType: PD_SSD + edition: ENTERPRISE + ipConfiguration: + ipv4Enabled: true + locationPreference: + zone: us-central1-c + pricingPlan: PER_USE + sqlServerAuditConfig: + bucketRef: + name: storagebucket-${uniqueId} + tier: db-custom-1-3840 +status: + conditions: + - lastTransitionTime: "1970-01-01T00:00:00Z" + message: The resource is up to date + reason: UpToDate + status: "True" + type: Ready + connectionName: ${projectId}:us-central1:sqlinstance-sample-${uniqueId} + firstIpAddress: 10.10.10.10 + instanceType: SQL_INSTANCE_TYPE_UNSPECIFIED + ipAddress: 10.1.2.3 + observedGeneration: 2 + publicIpAddress: 10.10.10.10 + selfLink: https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqlinstance-sample-${uniqueId} + serverCaCert: + cert: | + -----BEGIN CERTIFICATE----- + -----END CERTIFICATE----- + commonName: common-name + createTime: "2024-06-19T22:55:16.440089500Z" + expirationTime: "2025-06-19T22:55:16.440089500Z" + sha1Fingerprint: "12345678" + serviceAccountEmailAddress: p${projectNumber}-abcdef@gcp-sa-cloud-sql.iam.gserviceaccount.com diff --git a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlserverinstance/_http.log b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlserverinstance/_http.log new file mode 100644 index 0000000000..3fea66837e --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlserverinstance/_http.log @@ -0,0 +1,535 @@ +GET https://storage.googleapis.com/storage/v1/b/storagebucket-${uniqueId}?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 + +404 Not Found +Cache-Control: no-cache, no-store, max-age=0, must-revalidate +Content-Type: application/json; charset=UTF-8 +Expires: Mon, 01 Jan 1990 00:00:00 GMT +Pragma: no-cache +Server: UploadServer +Vary: Origin +Vary: X-Origin + +{ + "error": { + "code": 404, + "errors": [ + { + "domain": "global", + "message": "The specified bucket does not exist.", + "reason": "notFound" + } + ], + "message": "The specified bucket does not exist." + } +} + +--- + +POST https://storage.googleapis.com/storage/v1/b?alt=json&prettyPrint=false&project=${projectId} +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 + +{ + "iamConfiguration": { + "uniformBucketLevelAccess": { + "enabled": false + } + }, + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lifecycle": { + "rule": [] + }, + "name": "storagebucket-${uniqueId}", + "storageClass": "STANDARD" +} + +200 OK +Cache-Control: no-cache, no-store, max-age=0, must-revalidate +Content-Type: application/json; charset=UTF-8 +Expires: Mon, 01 Jan 1990 00:00:00 GMT +Pragma: no-cache +Server: UploadServer +Vary: Origin +Vary: X-Origin + +{ + "etag": "abcdef0123A=", + "iamConfiguration": { + "bucketPolicyOnly": { + "enabled": false + }, + "publicAccessPrevention": "inherited", + "uniformBucketLevelAccess": { + "enabled": false + } + }, + "id": "000000000000000000000", + "kind": "storage#bucket", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lifecycle": {}, + "location": "US", + "locationType": "multi-region", + "metageneration": "1", + "name": "storagebucket-${uniqueId}", + "projectNumber": "${projectNumber}", + "rpo": "DEFAULT", + "selfLink": "https://www.googleapis.com/storage/v1/b/storagebucket-${uniqueId}", + "softDeletePolicy": { + "effectiveTime": "2024-04-01T12:34:56.123456Z", + "retentionDurationSeconds": "604800" + }, + "storageClass": "STANDARD", + "timeCreated": "2024-04-01T12:34:56.123456Z", + "updated": "2024-04-01T12:34:56.123456Z" +} + +--- + +GET https://storage.googleapis.com/storage/v1/b/storagebucket-${uniqueId}?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, max-age=0, must-revalidate, no-transform +Content-Type: application/json; charset=UTF-8 +Expires: {now+0m} +Server: UploadServer +Vary: Origin +Vary: X-Origin + +{ + "etag": "abcdef0123A=", + "iamConfiguration": { + "bucketPolicyOnly": { + "enabled": false + }, + "publicAccessPrevention": "inherited", + "uniformBucketLevelAccess": { + "enabled": false + } + }, + "id": "000000000000000000000", + "kind": "storage#bucket", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lifecycle": {}, + "location": "US", + "locationType": "multi-region", + "metageneration": "1", + "name": "storagebucket-${uniqueId}", + "projectNumber": "${projectNumber}", + "rpo": "DEFAULT", + "selfLink": "https://www.googleapis.com/storage/v1/b/storagebucket-${uniqueId}", + "softDeletePolicy": { + "effectiveTime": "2024-04-01T12:34:56.123456Z", + "retentionDurationSeconds": "604800" + }, + "storageClass": "STANDARD", + "timeCreated": "2024-04-01T12:34:56.123456Z", + "updated": "2024-04-01T12:34:56.123456Z" +} + +--- + +GET https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqlinstance-sample-${uniqueId}?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 + +404 Not Found +Content-Type: application/json + +{ + "code": 5, + "details": [], + "message": "databaseInstance \"projects/${projectId}/SQLInstances/sqlinstance-sample-${uniqueId}\" not found" +} + +--- + +POST https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances?alt=json&prettyPrint=false +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 + +{ + "databaseVersion": "SQLSERVER_2017_EXPRESS", + "name": "sqlinstance-sample-${uniqueId}", + "region": "us-central1", + "rootPassword": "1234", + "settings": { + "activationPolicy": "ALWAYS", + "availabilityType": "ZONAL", + "dataDiskType": "PD_SSD", + "edition": "ENTERPRISE", + "pricingPlan": "PER_USE", + "sqlServerAuditConfig": { + "bucket": "gs://storagebucket-${uniqueId}" + }, + "storageAutoResize": true, + "tier": "db-custom-1-3840", + "userLabels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + } + } +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "apiWarning": null, + "backupContext": null, + "endTime": null, + "error": null, + "exportContext": null, + "importContext": null, + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "sql#operation", + "name": "${operationID}", + "operationType": "CREATE", + "selfLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/operations/${operationID}", + "startTime": null, + "status": "PENDING", + "targetId": "sqlinstance-sample-${uniqueId}", + "targetLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqlinstance-sample-${uniqueId}", + "targetProject": "${projectId}", + "user": "user@example.com" +} + +--- + +GET https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqlinstance-sample-${uniqueId}/users?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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "items": [ + { + "etag": "l8lRRG2lxV3YOX8UJ3t+gg==", + "host": "", + "instance": "sqlinstance-sample-${uniqueId}", + "kind": "sql#user", + "name": "##MS_PolicyEventProcessingLogin##", + "password": "", + "passwordPolicy": { + "allowedFailedAttempts": 0, + "enableFailedAttemptsCheck": false, + "enablePasswordVerification": false, + "passwordExpirationDuration": null, + "status": { + "locked": false, + "passwordExpirationTime": null + } + }, + "project": "${projectId}", + "sqlserverUserDetails": { + "disabled": true, + "serverRoles": [] + }, + "type": "BUILT_IN" + }, + { + "etag": "xYqLTZMZxPVPE0w1JqoGTA==", + "host": "", + "instance": "sqlinstance-sample-${uniqueId}", + "kind": "sql#user", + "name": "##MS_PolicyTsqlExecutionLogin##", + "password": "", + "passwordPolicy": { + "allowedFailedAttempts": 0, + "enableFailedAttemptsCheck": false, + "enablePasswordVerification": false, + "passwordExpirationDuration": null, + "status": { + "locked": false, + "passwordExpirationTime": null + } + }, + "project": "${projectId}", + "sqlserverUserDetails": { + "disabled": true, + "serverRoles": [] + }, + "type": "BUILT_IN" + }, + { + "etag": "g1dQutqOoBb3fXMbVGXZXA==", + "host": "", + "instance": "sqlinstance-sample-${uniqueId}", + "kind": "sql#user", + "name": "sqlserver", + "password": "", + "passwordPolicy": { + "allowedFailedAttempts": 0, + "enableFailedAttemptsCheck": false, + "enablePasswordVerification": false, + "passwordExpirationDuration": null, + "status": { + "locked": false, + "passwordExpirationTime": null + } + }, + "project": "${projectId}", + "sqlserverUserDetails": { + "disabled": false, + "serverRoles": [ + "CustomerDbRootRole" + ] + }, + "type": "BUILT_IN" + } + ], + "kind": "sql#usersList", + "nextPageToken": "" +} + +--- + +GET https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqlinstance-sample-${uniqueId}?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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "availableMaintenanceVersions": [], + "backendType": "SECOND_GEN", + "connectionName": "${projectId}:us-central1:sqlinstance-sample-${uniqueId}", + "createTime": "2024-04-01T12:34:56.123456Z", + "currentDiskSize": null, + "databaseInstalledVersion": "SQLSERVER_2017_EXPRESS_CU31_GDR", + "databaseVersion": "SQLSERVER_2017_EXPRESS", + "diskEncryptionConfiguration": null, + "diskEncryptionStatus": null, + "etag": "abcdef0123A=", + "failoverReplica": null, + "gceZone": "us-central1-c", + "instanceType": "SQL_INSTANCE_TYPE_UNSPECIFIED", + "ipAddresses": [ + { + "ipAddress": "10.10.10.10", + "timeToRetire": null, + "type": "PRIMARY" + } + ], + "ipv6Address": "", + "kind": "sql#instance", + "maintenanceVersion": "SQLSERVER_2017_EXPRESS_CU31_GDR.R20231029.00_02", + "masterInstanceName": "", + "maxDiskSize": null, + "name": "sqlinstance-sample-${uniqueId}", + "onPremisesConfiguration": null, + "project": "${projectId}", + "region": "us-central1", + "replicaConfiguration": null, + "replicaNames": [], + "rootPassword": "1234", + "satisfiesPzs": null, + "scheduledMaintenance": null, + "secondaryGceZone": "", + "selfLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqlinstance-sample-${uniqueId}", + "serverCaCert": { + "cert": "-----BEGIN CERTIFICATE-----\n-----END CERTIFICATE-----\n", + "certSerialNumber": "0", + "commonName": "common-name", + "createTime": "2024-06-19T22:55:16.440089500Z", + "expirationTime": "2025-06-19T22:55:16.440089500Z", + "instance": "sqlinstance-sample-${uniqueId}", + "kind": "sql#sslCert", + "selfLink": "", + "sha1Fingerprint": "12345678" + }, + "serviceAccountEmailAddress": "p${projectNumber}-abcdef@gcp-sa-cloud-sql.iam.gserviceaccount.com", + "settings": { + "activationPolicy": "ALWAYS", + "activeDirectoryConfig": null, + "advancedMachineFeatures": null, + "authorizedGaeApplications": [], + "availabilityType": "ZONAL", + "backupConfiguration": { + "backupRetentionSettings": { + "retainedBackups": 7, + "retentionUnit": "COUNT" + }, + "binaryLogEnabled": null, + "enabled": false, + "kind": "sql#backupConfiguration", + "location": "", + "pointInTimeRecoveryEnabled": false, + "replicationLogArchivingEnabled": null, + "startTime": "21:00", + "transactionLogRetentionDays": 7 + }, + "collation": "", + "connectorEnforcement": "NOT_REQUIRED", + "crashSafeReplicationEnabled": null, + "dataCacheConfig": null, + "dataDiskSizeGb": "10", + "dataDiskType": "PD_SSD", + "databaseFlags": [], + "databaseReplicationEnabled": null, + "deletionProtectionEnabled": false, + "denyMaintenancePeriods": [], + "edition": "ENTERPRISE", + "insightsConfig": null, + "ipConfiguration": { + "allocatedIpRange": "", + "authorizedNetworks": [], + "enablePrivatePathForGoogleCloudServices": null, + "ipv4Enabled": true, + "privateNetwork": "", + "requireSsl": false, + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, + "kind": "sql#settings", + "locationPreference": { + "followGaeApplication": "", + "kind": "sql#locationPreference", + "secondaryZone": "", + "zone": "us-central1-c" + }, + "maintenanceWindow": null, + "passwordValidationPolicy": null, + "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", + "settingsVersion": "1", + "sqlServerAuditConfig": { + "bucket": "gs://storagebucket-${uniqueId}", + "kind": "", + "retentionInterval": null, + "uploadInterval": null + }, + "storageAutoResize": true, + "storageAutoResizeLimit": "0", + "tier": "db-custom-1-3840", + "timeZone": "", + "userLabels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + } + }, + "sqlNetworkArchitecture": "NEW_NETWORK_ARCHITECTURE", + "state": "RUNNABLE", + "suspensionReason": [] +} + +--- + +DELETE https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqlinstance-sample-${uniqueId}?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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "apiWarning": null, + "backupContext": null, + "endTime": null, + "error": null, + "exportContext": null, + "importContext": null, + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "sql#operation", + "name": "${operationID}", + "operationType": "DELETE", + "selfLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/operations/${operationID}", + "startTime": null, + "status": "PENDING", + "targetId": "sqlinstance-sample-${uniqueId}", + "targetLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqlinstance-sample-${uniqueId}", + "targetProject": "${projectId}", + "user": "user@example.com" +} + +--- + +GET https://storage.googleapis.com/storage/v1/b/storagebucket-${uniqueId}?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, max-age=0, must-revalidate, no-transform +Content-Type: application/json; charset=UTF-8 +Expires: {now+0m} +Server: UploadServer +Vary: Origin +Vary: X-Origin + +{ + "etag": "abcdef0123A=", + "iamConfiguration": { + "bucketPolicyOnly": { + "enabled": false + }, + "publicAccessPrevention": "inherited", + "uniformBucketLevelAccess": { + "enabled": false + } + }, + "id": "000000000000000000000", + "kind": "storage#bucket", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lifecycle": {}, + "location": "US", + "locationType": "multi-region", + "metageneration": "1", + "name": "storagebucket-${uniqueId}", + "projectNumber": "${projectNumber}", + "rpo": "DEFAULT", + "selfLink": "https://www.googleapis.com/storage/v1/b/storagebucket-${uniqueId}", + "softDeletePolicy": { + "effectiveTime": "2024-04-01T12:34:56.123456Z", + "retentionDurationSeconds": "604800" + }, + "storageClass": "STANDARD", + "timeCreated": "2024-04-01T12:34:56.123456Z", + "updated": "2024-04-01T12:34:56.123456Z" +} + +--- + +GET https://storage.googleapis.com/storage/v1/b/storagebucket-${uniqueId}/o?alt=json&prettyPrint=false&versions=true +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, max-age=0, must-revalidate, no-transform +Content-Type: application/json; charset=UTF-8 +Expires: {now+0m} +Server: UploadServer +Vary: Origin +Vary: X-Origin + +{ + "kind": "storage#objects" +} + +--- + +DELETE https://storage.googleapis.com/storage/v1/b/storagebucket-${uniqueId}?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 + +204 No Content +Cache-Control: no-cache, no-store, max-age=0, must-revalidate +Content-Type: application/json +Expires: Mon, 01 Jan 1990 00:00:00 GMT +Pragma: no-cache +Server: UploadServer +Vary: Origin +Vary: X-Origin \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqluser/_generated_object_sqluser.golden.yaml b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqluser/_generated_object_sqluser.golden.yaml new file mode 100644 index 0000000000..8e4d5f08af --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqluser/_generated_object_sqluser.golden.yaml @@ -0,0 +1,37 @@ +apiVersion: sql.cnrm.cloud.google.com/v1beta1 +kind: SQLUser +metadata: + annotations: + cnrm.cloud.google.com/management-conflict-prevention-policy: none + cnrm.cloud.google.com/mutable-but-unreadable-fields: '{"spec":{"password":{"valueFrom":{"secretKeyRef":{"key":"password","name":"sqluser-dep-${uniqueId}"}}}}}' + cnrm.cloud.google.com/observed-secret-versions: (removed) + 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: 2 + labels: + cnrm-test: "true" + label-one: value-one + name: sqluser-${uniqueId} + namespace: ${uniqueId} +spec: + host: foo + instanceRef: + name: sqluser-dep-${uniqueId} + password: + valueFrom: + secretKeyRef: + key: password + name: sqluser-dep-${uniqueId} + resourceID: sqluser-${uniqueId} + type: BUILT_IN +status: + conditions: + - lastTransitionTime: "1970-01-01T00:00:00Z" + message: The resource is up to date + reason: UpToDate + status: "True" + type: Ready + observedGeneration: 2 diff --git a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqluser/_http.log b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqluser/_http.log new file mode 100644 index 0000000000..ca0492b77a --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqluser/_http.log @@ -0,0 +1,1099 @@ +GET https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqluser-dep-${uniqueId}?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 + +404 Not Found +Content-Type: application/json + +{ + "code": 5, + "details": [], + "message": "databaseInstance \"projects/${projectId}/SQLInstances/sqluser-dep-${uniqueId}\" not found" +} + +--- + +POST https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances?alt=json&prettyPrint=false +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 + +{ + "databaseVersion": "MYSQL_5_7", + "name": "sqluser-dep-${uniqueId}", + "region": "us-central1", + "settings": { + "activationPolicy": "ALWAYS", + "availabilityType": "ZONAL", + "dataDiskType": "PD_SSD", + "edition": "ENTERPRISE", + "pricingPlan": "PER_USE", + "storageAutoResize": true, + "tier": "db-n1-standard-1", + "userLabels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + } + } +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "apiWarning": null, + "backupContext": null, + "endTime": null, + "error": null, + "exportContext": null, + "importContext": null, + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "sql#operation", + "name": "${operationID}", + "operationType": "CREATE", + "selfLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/operations/${operationID}", + "startTime": null, + "status": "PENDING", + "targetId": "sqluser-dep-${uniqueId}", + "targetLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqluser-dep-${uniqueId}", + "targetProject": "${projectId}", + "user": "user@example.com" +} + +--- + +GET https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqluser-dep-${uniqueId}/users?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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "items": [ + { + "etag": "agLwPI6rKbiav9xKYtFtrg==", + "host": "%", + "instance": "sqluser-dep-${uniqueId}", + "kind": "sql#user", + "name": "root", + "password": "", + "passwordPolicy": { + "allowedFailedAttempts": 0, + "enableFailedAttemptsCheck": false, + "enablePasswordVerification": false, + "passwordExpirationDuration": null, + "status": { + "locked": false, + "passwordExpirationTime": null + } + }, + "project": "${projectId}", + "type": "BUILT_IN" + } + ], + "kind": "sql#usersList", + "nextPageToken": "" +} + +--- + +DELETE https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqluser-dep-${uniqueId}/users?alt=json&host=%25&name=root&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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "apiWarning": null, + "backupContext": null, + "endTime": null, + "error": null, + "exportContext": null, + "importContext": null, + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "sql#operation", + "name": "${operationID}", + "operationType": "DELETE_USER", + "selfLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/operations/${operationID}", + "startTime": null, + "status": "PENDING", + "targetId": "sqluser-dep-${uniqueId}", + "targetLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqluser-dep-${uniqueId}", + "targetProject": "${projectId}", + "user": "user@example.com" +} + +--- + +GET https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqluser-dep-${uniqueId}?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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "availableMaintenanceVersions": [], + "backendType": "SECOND_GEN", + "connectionName": "${projectId}:us-central1:sqluser-dep-${uniqueId}", + "createTime": "2024-04-01T12:34:56.123456Z", + "currentDiskSize": null, + "databaseInstalledVersion": "MYSQL_5_7_44", + "databaseVersion": "MYSQL_5_7", + "diskEncryptionConfiguration": null, + "diskEncryptionStatus": null, + "etag": "abcdef0123A=", + "failoverReplica": null, + "gceZone": "us-central1-c", + "instanceType": "SQL_INSTANCE_TYPE_UNSPECIFIED", + "ipAddresses": [ + { + "ipAddress": "10.10.10.10", + "timeToRetire": null, + "type": "PRIMARY" + } + ], + "ipv6Address": "", + "kind": "sql#instance", + "maintenanceVersion": "MYSQL_5_7_44.R20231105.01_03", + "masterInstanceName": "", + "maxDiskSize": null, + "name": "sqluser-dep-${uniqueId}", + "onPremisesConfiguration": null, + "project": "${projectId}", + "region": "us-central1", + "replicaConfiguration": null, + "replicaNames": [], + "rootPassword": "", + "satisfiesPzs": null, + "scheduledMaintenance": null, + "secondaryGceZone": "", + "selfLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqluser-dep-${uniqueId}", + "serverCaCert": { + "cert": "-----BEGIN CERTIFICATE-----\n-----END CERTIFICATE-----\n", + "certSerialNumber": "0", + "commonName": "common-name", + "createTime": "2024-06-19T22:55:40.568828479Z", + "expirationTime": "2025-06-19T22:55:40.568828479Z", + "instance": "sqluser-dep-${uniqueId}", + "kind": "sql#sslCert", + "selfLink": "", + "sha1Fingerprint": "12345678" + }, + "serviceAccountEmailAddress": "p${projectNumber}-abcdef@gcp-sa-cloud-sql.iam.gserviceaccount.com", + "settings": { + "activationPolicy": "ALWAYS", + "activeDirectoryConfig": null, + "advancedMachineFeatures": null, + "authorizedGaeApplications": [], + "availabilityType": "ZONAL", + "backupConfiguration": { + "backupRetentionSettings": { + "retainedBackups": 7, + "retentionUnit": "COUNT" + }, + "binaryLogEnabled": null, + "enabled": false, + "kind": "sql#backupConfiguration", + "location": "", + "pointInTimeRecoveryEnabled": false, + "replicationLogArchivingEnabled": null, + "startTime": "21:00", + "transactionLogRetentionDays": 7 + }, + "collation": "", + "connectorEnforcement": "NOT_REQUIRED", + "crashSafeReplicationEnabled": null, + "dataCacheConfig": null, + "dataDiskSizeGb": "10", + "dataDiskType": "PD_SSD", + "databaseFlags": [], + "databaseReplicationEnabled": null, + "deletionProtectionEnabled": false, + "denyMaintenancePeriods": [], + "edition": "ENTERPRISE", + "insightsConfig": null, + "ipConfiguration": { + "allocatedIpRange": "", + "authorizedNetworks": [], + "enablePrivatePathForGoogleCloudServices": null, + "ipv4Enabled": true, + "privateNetwork": "", + "requireSsl": false, + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, + "kind": "sql#settings", + "locationPreference": { + "followGaeApplication": "", + "kind": "sql#locationPreference", + "secondaryZone": "", + "zone": "us-central1-c" + }, + "maintenanceWindow": null, + "passwordValidationPolicy": null, + "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", + "settingsVersion": "1", + "sqlServerAuditConfig": null, + "storageAutoResize": true, + "storageAutoResizeLimit": "0", + "tier": "db-n1-standard-1", + "timeZone": "", + "userLabels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + } + }, + "sqlNetworkArchitecture": "NEW_NETWORK_ARCHITECTURE", + "state": "RUNNABLE", + "suspensionReason": [] +} + +--- + +GET https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqluser-dep-${uniqueId}/users?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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "items": [], + "kind": "sql#usersList", + "nextPageToken": "" +} + +--- + +GET https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqluser-dep-${uniqueId}?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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "availableMaintenanceVersions": [], + "backendType": "SECOND_GEN", + "connectionName": "${projectId}:us-central1:sqluser-dep-${uniqueId}", + "createTime": "2024-04-01T12:34:56.123456Z", + "currentDiskSize": null, + "databaseInstalledVersion": "MYSQL_5_7_44", + "databaseVersion": "MYSQL_5_7", + "diskEncryptionConfiguration": null, + "diskEncryptionStatus": null, + "etag": "abcdef0123A=", + "failoverReplica": null, + "gceZone": "us-central1-c", + "instanceType": "SQL_INSTANCE_TYPE_UNSPECIFIED", + "ipAddresses": [ + { + "ipAddress": "10.10.10.10", + "timeToRetire": null, + "type": "PRIMARY" + } + ], + "ipv6Address": "", + "kind": "sql#instance", + "maintenanceVersion": "MYSQL_5_7_44.R20231105.01_03", + "masterInstanceName": "", + "maxDiskSize": null, + "name": "sqluser-dep-${uniqueId}", + "onPremisesConfiguration": null, + "project": "${projectId}", + "region": "us-central1", + "replicaConfiguration": null, + "replicaNames": [], + "rootPassword": "", + "satisfiesPzs": null, + "scheduledMaintenance": null, + "secondaryGceZone": "", + "selfLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqluser-dep-${uniqueId}", + "serverCaCert": { + "cert": "-----BEGIN CERTIFICATE-----\n-----END CERTIFICATE-----\n", + "certSerialNumber": "0", + "commonName": "common-name", + "createTime": "2024-06-19T22:55:40.568828479Z", + "expirationTime": "2025-06-19T22:55:40.568828479Z", + "instance": "sqluser-dep-${uniqueId}", + "kind": "sql#sslCert", + "selfLink": "", + "sha1Fingerprint": "12345678" + }, + "serviceAccountEmailAddress": "p${projectNumber}-abcdef@gcp-sa-cloud-sql.iam.gserviceaccount.com", + "settings": { + "activationPolicy": "ALWAYS", + "activeDirectoryConfig": null, + "advancedMachineFeatures": null, + "authorizedGaeApplications": [], + "availabilityType": "ZONAL", + "backupConfiguration": { + "backupRetentionSettings": { + "retainedBackups": 7, + "retentionUnit": "COUNT" + }, + "binaryLogEnabled": null, + "enabled": false, + "kind": "sql#backupConfiguration", + "location": "", + "pointInTimeRecoveryEnabled": false, + "replicationLogArchivingEnabled": null, + "startTime": "21:00", + "transactionLogRetentionDays": 7 + }, + "collation": "", + "connectorEnforcement": "NOT_REQUIRED", + "crashSafeReplicationEnabled": null, + "dataCacheConfig": null, + "dataDiskSizeGb": "10", + "dataDiskType": "PD_SSD", + "databaseFlags": [], + "databaseReplicationEnabled": null, + "deletionProtectionEnabled": false, + "denyMaintenancePeriods": [], + "edition": "ENTERPRISE", + "insightsConfig": null, + "ipConfiguration": { + "allocatedIpRange": "", + "authorizedNetworks": [], + "enablePrivatePathForGoogleCloudServices": null, + "ipv4Enabled": true, + "privateNetwork": "", + "requireSsl": false, + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, + "kind": "sql#settings", + "locationPreference": { + "followGaeApplication": "", + "kind": "sql#locationPreference", + "secondaryZone": "", + "zone": "us-central1-c" + }, + "maintenanceWindow": null, + "passwordValidationPolicy": null, + "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", + "settingsVersion": "1", + "sqlServerAuditConfig": null, + "storageAutoResize": true, + "storageAutoResizeLimit": "0", + "tier": "db-n1-standard-1", + "timeZone": "", + "userLabels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + } + }, + "sqlNetworkArchitecture": "NEW_NETWORK_ARCHITECTURE", + "state": "RUNNABLE", + "suspensionReason": [] +} + +--- + +POST https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqluser-dep-${uniqueId}/users?alt=json&prettyPrint=false +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 + +{ + "host": "10.1.2.3", + "instance": "sqluser-dep-${uniqueId}", + "name": "sqluser-${uniqueId}", + "password": "password" +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "apiWarning": null, + "backupContext": null, + "endTime": null, + "error": null, + "exportContext": null, + "importContext": null, + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "sql#operation", + "name": "${operationID}", + "operationType": "CREATE_USER", + "selfLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/operations/${operationID}", + "startTime": null, + "status": "PENDING", + "targetId": "sqluser-dep-${uniqueId}", + "targetLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqluser-dep-${uniqueId}", + "targetProject": "${projectId}", + "user": "user@example.com" +} + +--- + +GET https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqluser-dep-${uniqueId}/users?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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "items": [ + { + "etag": "8bNGhWyyUBi+zWENjU5LMQ==", + "host": "foo", + "instance": "sqluser-dep-${uniqueId}", + "kind": "sql#user", + "name": "sqluser-${uniqueId}", + "password": "password", + "passwordPolicy": { + "allowedFailedAttempts": 0, + "enableFailedAttemptsCheck": false, + "enablePasswordVerification": false, + "passwordExpirationDuration": null, + "status": { + "locked": false, + "passwordExpirationTime": null + } + }, + "project": "${projectId}", + "type": "BUILT_IN" + } + ], + "kind": "sql#usersList", + "nextPageToken": "" +} + +--- + +GET https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqluser-dep-${uniqueId}?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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "availableMaintenanceVersions": [], + "backendType": "SECOND_GEN", + "connectionName": "${projectId}:us-central1:sqluser-dep-${uniqueId}", + "createTime": "2024-04-01T12:34:56.123456Z", + "currentDiskSize": null, + "databaseInstalledVersion": "MYSQL_5_7_44", + "databaseVersion": "MYSQL_5_7", + "diskEncryptionConfiguration": null, + "diskEncryptionStatus": null, + "etag": "abcdef0123A=", + "failoverReplica": null, + "gceZone": "us-central1-c", + "instanceType": "SQL_INSTANCE_TYPE_UNSPECIFIED", + "ipAddresses": [ + { + "ipAddress": "10.10.10.10", + "timeToRetire": null, + "type": "PRIMARY" + } + ], + "ipv6Address": "", + "kind": "sql#instance", + "maintenanceVersion": "MYSQL_5_7_44.R20231105.01_03", + "masterInstanceName": "", + "maxDiskSize": null, + "name": "sqluser-dep-${uniqueId}", + "onPremisesConfiguration": null, + "project": "${projectId}", + "region": "us-central1", + "replicaConfiguration": null, + "replicaNames": [], + "rootPassword": "", + "satisfiesPzs": null, + "scheduledMaintenance": null, + "secondaryGceZone": "", + "selfLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqluser-dep-${uniqueId}", + "serverCaCert": { + "cert": "-----BEGIN CERTIFICATE-----\n-----END CERTIFICATE-----\n", + "certSerialNumber": "0", + "commonName": "common-name", + "createTime": "2024-06-19T22:55:40.568828479Z", + "expirationTime": "2025-06-19T22:55:40.568828479Z", + "instance": "sqluser-dep-${uniqueId}", + "kind": "sql#sslCert", + "selfLink": "", + "sha1Fingerprint": "12345678" + }, + "serviceAccountEmailAddress": "p${projectNumber}-abcdef@gcp-sa-cloud-sql.iam.gserviceaccount.com", + "settings": { + "activationPolicy": "ALWAYS", + "activeDirectoryConfig": null, + "advancedMachineFeatures": null, + "authorizedGaeApplications": [], + "availabilityType": "ZONAL", + "backupConfiguration": { + "backupRetentionSettings": { + "retainedBackups": 7, + "retentionUnit": "COUNT" + }, + "binaryLogEnabled": null, + "enabled": false, + "kind": "sql#backupConfiguration", + "location": "", + "pointInTimeRecoveryEnabled": false, + "replicationLogArchivingEnabled": null, + "startTime": "21:00", + "transactionLogRetentionDays": 7 + }, + "collation": "", + "connectorEnforcement": "NOT_REQUIRED", + "crashSafeReplicationEnabled": null, + "dataCacheConfig": null, + "dataDiskSizeGb": "10", + "dataDiskType": "PD_SSD", + "databaseFlags": [], + "databaseReplicationEnabled": null, + "deletionProtectionEnabled": false, + "denyMaintenancePeriods": [], + "edition": "ENTERPRISE", + "insightsConfig": null, + "ipConfiguration": { + "allocatedIpRange": "", + "authorizedNetworks": [], + "enablePrivatePathForGoogleCloudServices": null, + "ipv4Enabled": true, + "privateNetwork": "", + "requireSsl": false, + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, + "kind": "sql#settings", + "locationPreference": { + "followGaeApplication": "", + "kind": "sql#locationPreference", + "secondaryZone": "", + "zone": "us-central1-c" + }, + "maintenanceWindow": null, + "passwordValidationPolicy": null, + "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", + "settingsVersion": "1", + "sqlServerAuditConfig": null, + "storageAutoResize": true, + "storageAutoResizeLimit": "0", + "tier": "db-n1-standard-1", + "timeZone": "", + "userLabels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + } + }, + "sqlNetworkArchitecture": "NEW_NETWORK_ARCHITECTURE", + "state": "RUNNABLE", + "suspensionReason": [] +} + +--- + +GET https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqluser-dep-${uniqueId}/users?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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "items": [ + { + "etag": "8bNGhWyyUBi+zWENjU5LMQ==", + "host": "foo", + "instance": "sqluser-dep-${uniqueId}", + "kind": "sql#user", + "name": "sqluser-${uniqueId}", + "password": "password", + "passwordPolicy": { + "allowedFailedAttempts": 0, + "enableFailedAttemptsCheck": false, + "enablePasswordVerification": false, + "passwordExpirationDuration": null, + "status": { + "locked": false, + "passwordExpirationTime": null + } + }, + "project": "${projectId}", + "type": "BUILT_IN" + } + ], + "kind": "sql#usersList", + "nextPageToken": "" +} + +--- + +GET https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqluser-dep-${uniqueId}?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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "availableMaintenanceVersions": [], + "backendType": "SECOND_GEN", + "connectionName": "${projectId}:us-central1:sqluser-dep-${uniqueId}", + "createTime": "2024-04-01T12:34:56.123456Z", + "currentDiskSize": null, + "databaseInstalledVersion": "MYSQL_5_7_44", + "databaseVersion": "MYSQL_5_7", + "diskEncryptionConfiguration": null, + "diskEncryptionStatus": null, + "etag": "abcdef0123A=", + "failoverReplica": null, + "gceZone": "us-central1-c", + "instanceType": "SQL_INSTANCE_TYPE_UNSPECIFIED", + "ipAddresses": [ + { + "ipAddress": "10.10.10.10", + "timeToRetire": null, + "type": "PRIMARY" + } + ], + "ipv6Address": "", + "kind": "sql#instance", + "maintenanceVersion": "MYSQL_5_7_44.R20231105.01_03", + "masterInstanceName": "", + "maxDiskSize": null, + "name": "sqluser-dep-${uniqueId}", + "onPremisesConfiguration": null, + "project": "${projectId}", + "region": "us-central1", + "replicaConfiguration": null, + "replicaNames": [], + "rootPassword": "", + "satisfiesPzs": null, + "scheduledMaintenance": null, + "secondaryGceZone": "", + "selfLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqluser-dep-${uniqueId}", + "serverCaCert": { + "cert": "-----BEGIN CERTIFICATE-----\n-----END CERTIFICATE-----\n", + "certSerialNumber": "0", + "commonName": "common-name", + "createTime": "2024-06-19T22:55:40.568828479Z", + "expirationTime": "2025-06-19T22:55:40.568828479Z", + "instance": "sqluser-dep-${uniqueId}", + "kind": "sql#sslCert", + "selfLink": "", + "sha1Fingerprint": "12345678" + }, + "serviceAccountEmailAddress": "p${projectNumber}-abcdef@gcp-sa-cloud-sql.iam.gserviceaccount.com", + "settings": { + "activationPolicy": "ALWAYS", + "activeDirectoryConfig": null, + "advancedMachineFeatures": null, + "authorizedGaeApplications": [], + "availabilityType": "ZONAL", + "backupConfiguration": { + "backupRetentionSettings": { + "retainedBackups": 7, + "retentionUnit": "COUNT" + }, + "binaryLogEnabled": null, + "enabled": false, + "kind": "sql#backupConfiguration", + "location": "", + "pointInTimeRecoveryEnabled": false, + "replicationLogArchivingEnabled": null, + "startTime": "21:00", + "transactionLogRetentionDays": 7 + }, + "collation": "", + "connectorEnforcement": "NOT_REQUIRED", + "crashSafeReplicationEnabled": null, + "dataCacheConfig": null, + "dataDiskSizeGb": "10", + "dataDiskType": "PD_SSD", + "databaseFlags": [], + "databaseReplicationEnabled": null, + "deletionProtectionEnabled": false, + "denyMaintenancePeriods": [], + "edition": "ENTERPRISE", + "insightsConfig": null, + "ipConfiguration": { + "allocatedIpRange": "", + "authorizedNetworks": [], + "enablePrivatePathForGoogleCloudServices": null, + "ipv4Enabled": true, + "privateNetwork": "", + "requireSsl": false, + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, + "kind": "sql#settings", + "locationPreference": { + "followGaeApplication": "", + "kind": "sql#locationPreference", + "secondaryZone": "", + "zone": "us-central1-c" + }, + "maintenanceWindow": null, + "passwordValidationPolicy": null, + "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", + "settingsVersion": "1", + "sqlServerAuditConfig": null, + "storageAutoResize": true, + "storageAutoResizeLimit": "0", + "tier": "db-n1-standard-1", + "timeZone": "", + "userLabels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + } + }, + "sqlNetworkArchitecture": "NEW_NETWORK_ARCHITECTURE", + "state": "RUNNABLE", + "suspensionReason": [] +} + +--- + +GET https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqluser-dep-${uniqueId}/users?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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "items": [ + { + "etag": "8bNGhWyyUBi+zWENjU5LMQ==", + "host": "foo", + "instance": "sqluser-dep-${uniqueId}", + "kind": "sql#user", + "name": "sqluser-${uniqueId}", + "password": "password", + "passwordPolicy": { + "allowedFailedAttempts": 0, + "enableFailedAttemptsCheck": false, + "enablePasswordVerification": false, + "passwordExpirationDuration": null, + "status": { + "locked": false, + "passwordExpirationTime": null + } + }, + "project": "${projectId}", + "type": "BUILT_IN" + } + ], + "kind": "sql#usersList", + "nextPageToken": "" +} + +--- + +GET https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqluser-dep-${uniqueId}?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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "availableMaintenanceVersions": [], + "backendType": "SECOND_GEN", + "connectionName": "${projectId}:us-central1:sqluser-dep-${uniqueId}", + "createTime": "2024-04-01T12:34:56.123456Z", + "currentDiskSize": null, + "databaseInstalledVersion": "MYSQL_5_7_44", + "databaseVersion": "MYSQL_5_7", + "diskEncryptionConfiguration": null, + "diskEncryptionStatus": null, + "etag": "abcdef0123A=", + "failoverReplica": null, + "gceZone": "us-central1-c", + "instanceType": "SQL_INSTANCE_TYPE_UNSPECIFIED", + "ipAddresses": [ + { + "ipAddress": "10.10.10.10", + "timeToRetire": null, + "type": "PRIMARY" + } + ], + "ipv6Address": "", + "kind": "sql#instance", + "maintenanceVersion": "MYSQL_5_7_44.R20231105.01_03", + "masterInstanceName": "", + "maxDiskSize": null, + "name": "sqluser-dep-${uniqueId}", + "onPremisesConfiguration": null, + "project": "${projectId}", + "region": "us-central1", + "replicaConfiguration": null, + "replicaNames": [], + "rootPassword": "", + "satisfiesPzs": null, + "scheduledMaintenance": null, + "secondaryGceZone": "", + "selfLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqluser-dep-${uniqueId}", + "serverCaCert": { + "cert": "-----BEGIN CERTIFICATE-----\n-----END CERTIFICATE-----\n", + "certSerialNumber": "0", + "commonName": "common-name", + "createTime": "2024-06-19T22:55:40.568828479Z", + "expirationTime": "2025-06-19T22:55:40.568828479Z", + "instance": "sqluser-dep-${uniqueId}", + "kind": "sql#sslCert", + "selfLink": "", + "sha1Fingerprint": "12345678" + }, + "serviceAccountEmailAddress": "p${projectNumber}-abcdef@gcp-sa-cloud-sql.iam.gserviceaccount.com", + "settings": { + "activationPolicy": "ALWAYS", + "activeDirectoryConfig": null, + "advancedMachineFeatures": null, + "authorizedGaeApplications": [], + "availabilityType": "ZONAL", + "backupConfiguration": { + "backupRetentionSettings": { + "retainedBackups": 7, + "retentionUnit": "COUNT" + }, + "binaryLogEnabled": null, + "enabled": false, + "kind": "sql#backupConfiguration", + "location": "", + "pointInTimeRecoveryEnabled": false, + "replicationLogArchivingEnabled": null, + "startTime": "21:00", + "transactionLogRetentionDays": 7 + }, + "collation": "", + "connectorEnforcement": "NOT_REQUIRED", + "crashSafeReplicationEnabled": null, + "dataCacheConfig": null, + "dataDiskSizeGb": "10", + "dataDiskType": "PD_SSD", + "databaseFlags": [], + "databaseReplicationEnabled": null, + "deletionProtectionEnabled": false, + "denyMaintenancePeriods": [], + "edition": "ENTERPRISE", + "insightsConfig": null, + "ipConfiguration": { + "allocatedIpRange": "", + "authorizedNetworks": [], + "enablePrivatePathForGoogleCloudServices": null, + "ipv4Enabled": true, + "privateNetwork": "", + "requireSsl": false, + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, + "kind": "sql#settings", + "locationPreference": { + "followGaeApplication": "", + "kind": "sql#locationPreference", + "secondaryZone": "", + "zone": "us-central1-c" + }, + "maintenanceWindow": null, + "passwordValidationPolicy": null, + "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", + "settingsVersion": "1", + "sqlServerAuditConfig": null, + "storageAutoResize": true, + "storageAutoResizeLimit": "0", + "tier": "db-n1-standard-1", + "timeZone": "", + "userLabels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + } + }, + "sqlNetworkArchitecture": "NEW_NETWORK_ARCHITECTURE", + "state": "RUNNABLE", + "suspensionReason": [] +} + +--- + +DELETE https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqluser-dep-${uniqueId}/users?alt=json&host=foo&name=sqluser-${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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "apiWarning": null, + "backupContext": null, + "endTime": null, + "error": null, + "exportContext": null, + "importContext": null, + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "sql#operation", + "name": "${operationID}", + "operationType": "DELETE_USER", + "selfLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/operations/${operationID}", + "startTime": null, + "status": "PENDING", + "targetId": "sqluser-dep-${uniqueId}", + "targetLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqluser-dep-${uniqueId}", + "targetProject": "${projectId}", + "user": "user@example.com" +} + +--- + +GET https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqluser-dep-${uniqueId}?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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "availableMaintenanceVersions": [], + "backendType": "SECOND_GEN", + "connectionName": "${projectId}:us-central1:sqluser-dep-${uniqueId}", + "createTime": "2024-04-01T12:34:56.123456Z", + "currentDiskSize": null, + "databaseInstalledVersion": "MYSQL_5_7_44", + "databaseVersion": "MYSQL_5_7", + "diskEncryptionConfiguration": null, + "diskEncryptionStatus": null, + "etag": "abcdef0123A=", + "failoverReplica": null, + "gceZone": "us-central1-c", + "instanceType": "SQL_INSTANCE_TYPE_UNSPECIFIED", + "ipAddresses": [ + { + "ipAddress": "10.10.10.10", + "timeToRetire": null, + "type": "PRIMARY" + } + ], + "ipv6Address": "", + "kind": "sql#instance", + "maintenanceVersion": "MYSQL_5_7_44.R20231105.01_03", + "masterInstanceName": "", + "maxDiskSize": null, + "name": "sqluser-dep-${uniqueId}", + "onPremisesConfiguration": null, + "project": "${projectId}", + "region": "us-central1", + "replicaConfiguration": null, + "replicaNames": [], + "rootPassword": "", + "satisfiesPzs": null, + "scheduledMaintenance": null, + "secondaryGceZone": "", + "selfLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqluser-dep-${uniqueId}", + "serverCaCert": { + "cert": "-----BEGIN CERTIFICATE-----\n-----END CERTIFICATE-----\n", + "certSerialNumber": "0", + "commonName": "common-name", + "createTime": "2024-06-19T22:55:40.568828479Z", + "expirationTime": "2025-06-19T22:55:40.568828479Z", + "instance": "sqluser-dep-${uniqueId}", + "kind": "sql#sslCert", + "selfLink": "", + "sha1Fingerprint": "12345678" + }, + "serviceAccountEmailAddress": "p${projectNumber}-abcdef@gcp-sa-cloud-sql.iam.gserviceaccount.com", + "settings": { + "activationPolicy": "ALWAYS", + "activeDirectoryConfig": null, + "advancedMachineFeatures": null, + "authorizedGaeApplications": [], + "availabilityType": "ZONAL", + "backupConfiguration": { + "backupRetentionSettings": { + "retainedBackups": 7, + "retentionUnit": "COUNT" + }, + "binaryLogEnabled": null, + "enabled": false, + "kind": "sql#backupConfiguration", + "location": "", + "pointInTimeRecoveryEnabled": false, + "replicationLogArchivingEnabled": null, + "startTime": "21:00", + "transactionLogRetentionDays": 7 + }, + "collation": "", + "connectorEnforcement": "NOT_REQUIRED", + "crashSafeReplicationEnabled": null, + "dataCacheConfig": null, + "dataDiskSizeGb": "10", + "dataDiskType": "PD_SSD", + "databaseFlags": [], + "databaseReplicationEnabled": null, + "deletionProtectionEnabled": false, + "denyMaintenancePeriods": [], + "edition": "ENTERPRISE", + "insightsConfig": null, + "ipConfiguration": { + "allocatedIpRange": "", + "authorizedNetworks": [], + "enablePrivatePathForGoogleCloudServices": null, + "ipv4Enabled": true, + "privateNetwork": "", + "requireSsl": false, + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, + "kind": "sql#settings", + "locationPreference": { + "followGaeApplication": "", + "kind": "sql#locationPreference", + "secondaryZone": "", + "zone": "us-central1-c" + }, + "maintenanceWindow": null, + "passwordValidationPolicy": null, + "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", + "settingsVersion": "1", + "sqlServerAuditConfig": null, + "storageAutoResize": true, + "storageAutoResizeLimit": "0", + "tier": "db-n1-standard-1", + "timeZone": "", + "userLabels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + } + }, + "sqlNetworkArchitecture": "NEW_NETWORK_ARCHITECTURE", + "state": "RUNNABLE", + "suspensionReason": [] +} + +--- + +DELETE https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqluser-dep-${uniqueId}?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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "apiWarning": null, + "backupContext": null, + "endTime": null, + "error": null, + "exportContext": null, + "importContext": null, + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "sql#operation", + "name": "${operationID}", + "operationType": "DELETE", + "selfLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/operations/${operationID}", + "startTime": null, + "status": "PENDING", + "targetId": "sqluser-dep-${uniqueId}", + "targetLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqluser-dep-${uniqueId}", + "targetProject": "${projectId}", + "user": "user@example.com" +} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/basic/storage/v1beta1/storagebucket/_generated_object_storagebucket.golden.yaml b/pkg/test/resourcefixture/testdata/basic/storage/v1beta1/storagebucket/_generated_object_storagebucket.golden.yaml index bb172f7bff..d22575b9e0 100644 --- a/pkg/test/resourcefixture/testdata/basic/storage/v1beta1/storagebucket/_generated_object_storagebucket.golden.yaml +++ b/pkg/test/resourcefixture/testdata/basic/storage/v1beta1/storagebucket/_generated_object_storagebucket.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: storage.cnrm.cloud.google.com/v1beta1 kind: StorageBucket metadata: @@ -30,9 +16,10 @@ metadata: name: storagebucket-sample-${uniqueId} namespace: ${uniqueId} spec: - lifecycleRule: [] location: US + publicAccessPrevention: inherited resourceID: storagebucket-sample-${uniqueId} + storageClass: STANDARD versioning: enabled: true status: @@ -43,3 +30,5 @@ status: status: "True" type: Ready observedGeneration: 4 + selfLink: https://www.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId} + url: gs://storagebucket-sample-${uniqueId} diff --git a/pkg/test/resourcefixture/testdata/basic/storage/v1beta1/storagebucket/_http.log b/pkg/test/resourcefixture/testdata/basic/storage/v1beta1/storagebucket/_http.log index 7f6c900a26..c8673ce90a 100644 --- a/pkg/test/resourcefixture/testdata/basic/storage/v1beta1/storagebucket/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/storage/v1beta1/storagebucket/_http.log @@ -1,6 +1,5 @@ GET https://storage.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}?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/dev -X-Goog-Api-Client: gl-go/1.22.0 gdcl/0.160.0 +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 404 Not Found Cache-Control: no-cache, no-store, max-age=0, must-revalidate @@ -29,8 +28,7 @@ Vary: X-Origin POST https://storage.googleapis.com/storage/v1/b?alt=json&prettyPrint=false&project=${projectId} 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/dev -X-Goog-Api-Client: gl-go/1.22.0 gdcl/0.160.0 +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 { "iamConfiguration": { @@ -124,197 +122,7 @@ Vary: X-Origin --- GET https://storage.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}?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/dev -X-Goog-Api-Client: gl-go/1.22.0 gdcl/0.160.0 - -200 OK -Cache-Control: private, max-age=0, must-revalidate, no-transform -Content-Type: application/json; charset=UTF-8 -Expires: {now+0m} -Server: UploadServer -Vary: Origin -Vary: X-Origin - -{ - "etag": "abcdef0123A=", - "iamConfiguration": { - "bucketPolicyOnly": { - "enabled": false - }, - "publicAccessPrevention": "inherited", - "uniformBucketLevelAccess": { - "enabled": false - } - }, - "id": "000000000000000000000", - "kind": "storage#bucket", - "labels": { - "cnrm-test": "true", - "label-one": "value-one", - "managed-by-cnrm": "true" - }, - "lifecycle": { - "rule": [ - { - "action": { - "type": "Delete" - }, - "condition": { - "age": 7 - } - } - ] - }, - "location": "US", - "locationType": "multi-region", - "metageneration": "1", - "name": "storagebucket-sample-${uniqueId}", - "projectNumber": "${projectNumber}", - "rpo": "DEFAULT", - "selfLink": "https://www.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}", - "softDeletePolicy": { - "effectiveTime": "2024-04-01T12:34:56.123456Z", - "retentionDurationSeconds": "604800" - }, - "storageClass": "STANDARD", - "timeCreated": "2024-04-01T12:34:56.123456Z", - "updated": "2024-04-01T12:34:56.123456Z", - "versioning": { - "enabled": false - } -} - ---- - -GET https://storage.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}?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/dev -X-Goog-Api-Client: gl-go/1.22.0 gdcl/0.160.0 - -200 OK -Cache-Control: private, max-age=0, must-revalidate, no-transform -Content-Type: application/json; charset=UTF-8 -Expires: {now+0m} -Server: UploadServer -Vary: Origin -Vary: X-Origin - -{ - "etag": "abcdef0123A=", - "iamConfiguration": { - "bucketPolicyOnly": { - "enabled": false - }, - "publicAccessPrevention": "inherited", - "uniformBucketLevelAccess": { - "enabled": false - } - }, - "id": "000000000000000000000", - "kind": "storage#bucket", - "labels": { - "cnrm-test": "true", - "label-one": "value-one", - "managed-by-cnrm": "true" - }, - "lifecycle": { - "rule": [ - { - "action": { - "type": "Delete" - }, - "condition": { - "age": 7 - } - } - ] - }, - "location": "US", - "locationType": "multi-region", - "metageneration": "1", - "name": "storagebucket-sample-${uniqueId}", - "projectNumber": "${projectNumber}", - "rpo": "DEFAULT", - "selfLink": "https://www.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}", - "softDeletePolicy": { - "effectiveTime": "2024-04-01T12:34:56.123456Z", - "retentionDurationSeconds": "604800" - }, - "storageClass": "STANDARD", - "timeCreated": "2024-04-01T12:34:56.123456Z", - "updated": "2024-04-01T12:34:56.123456Z", - "versioning": { - "enabled": false - } -} - ---- - -GET https://storage.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}?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/dev -X-Goog-Api-Client: gl-go/1.22.0 gdcl/0.160.0 - -200 OK -Cache-Control: private, max-age=0, must-revalidate, no-transform -Content-Type: application/json; charset=UTF-8 -Expires: {now+0m} -Server: UploadServer -Vary: Origin -Vary: X-Origin - -{ - "etag": "abcdef0123A=", - "iamConfiguration": { - "bucketPolicyOnly": { - "enabled": false - }, - "publicAccessPrevention": "inherited", - "uniformBucketLevelAccess": { - "enabled": false - } - }, - "id": "000000000000000000000", - "kind": "storage#bucket", - "labels": { - "cnrm-test": "true", - "label-one": "value-one", - "managed-by-cnrm": "true" - }, - "lifecycle": { - "rule": [ - { - "action": { - "type": "Delete" - }, - "condition": { - "age": 7 - } - } - ] - }, - "location": "US", - "locationType": "multi-region", - "metageneration": "1", - "name": "storagebucket-sample-${uniqueId}", - "projectNumber": "${projectNumber}", - "rpo": "DEFAULT", - "selfLink": "https://www.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}", - "softDeletePolicy": { - "effectiveTime": "2024-04-01T12:34:56.123456Z", - "retentionDurationSeconds": "604800" - }, - "storageClass": "STANDARD", - "timeCreated": "2024-04-01T12:34:56.123456Z", - "updated": "2024-04-01T12:34:56.123456Z", - "versioning": { - "enabled": false - } -} - ---- - -GET https://storage.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}?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/dev -X-Goog-Api-Client: gl-go/1.22.0 gdcl/0.160.0 +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, max-age=0, must-revalidate, no-transform @@ -377,8 +185,7 @@ Vary: X-Origin PATCH https://storage.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}?alt=json&prettyPrint=false 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/dev -X-Goog-Api-Client: gl-go/1.22.0 gdcl/0.160.0 +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 { "labels": { @@ -409,7 +216,7 @@ Vary: X-Origin { "bucket": "storagebucket-sample-${uniqueId}", "entity": "project-owners-${projectNumber}", - "etag": "abcdef0123A=", + "etag": "abcdef0123A", "id": "storagebucket-sample-${uniqueId}/project-owners-${projectNumber}", "kind": "storage#bucketAccessControl", "projectTeam": { @@ -422,7 +229,7 @@ Vary: X-Origin { "bucket": "storagebucket-sample-${uniqueId}", "entity": "project-editors-${projectNumber}", - "etag": "abcdef0123A=", + "etag": "abcdef0123A", "id": "storagebucket-sample-${uniqueId}/project-editors-${projectNumber}", "kind": "storage#bucketAccessControl", "projectTeam": { @@ -435,7 +242,7 @@ Vary: X-Origin { "bucket": "storagebucket-sample-${uniqueId}", "entity": "project-viewers-${projectNumber}", - "etag": "abcdef0123A=", + "etag": "abcdef0123A", "id": "storagebucket-sample-${uniqueId}/project-viewers-${projectNumber}", "kind": "storage#bucketAccessControl", "projectTeam": { @@ -521,112 +328,7 @@ Vary: X-Origin --- GET https://storage.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}?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/dev -X-Goog-Api-Client: gl-go/1.22.0 gdcl/0.160.0 - -200 OK -Cache-Control: private, max-age=0, must-revalidate, no-transform -Content-Type: application/json; charset=UTF-8 -Expires: {now+0m} -Server: UploadServer -Vary: Origin -Vary: X-Origin - -{ - "etag": "abcdef0123A=", - "iamConfiguration": { - "bucketPolicyOnly": { - "enabled": false - }, - "publicAccessPrevention": "inherited", - "uniformBucketLevelAccess": { - "enabled": false - } - }, - "id": "000000000000000000000", - "kind": "storage#bucket", - "labels": { - "cnrm-test": "true", - "label-one": "value-one", - "managed-by-cnrm": "true", - "newkey": "newval" - }, - "location": "US", - "locationType": "multi-region", - "metageneration": "2", - "name": "storagebucket-sample-${uniqueId}", - "projectNumber": "${projectNumber}", - "rpo": "DEFAULT", - "selfLink": "https://www.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}", - "softDeletePolicy": { - "effectiveTime": "2024-04-01T12:34:56.123456Z", - "retentionDurationSeconds": "604800" - }, - "storageClass": "STANDARD", - "timeCreated": "2024-04-01T12:34:56.123456Z", - "updated": "2024-04-01T12:34:56.123456Z", - "versioning": { - "enabled": true - } -} - ---- - -GET https://storage.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}?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/dev -X-Goog-Api-Client: gl-go/1.22.0 gdcl/0.160.0 - -200 OK -Cache-Control: private, max-age=0, must-revalidate, no-transform -Content-Type: application/json; charset=UTF-8 -Expires: {now+0m} -Server: UploadServer -Vary: Origin -Vary: X-Origin - -{ - "etag": "abcdef0123A=", - "iamConfiguration": { - "bucketPolicyOnly": { - "enabled": false - }, - "publicAccessPrevention": "inherited", - "uniformBucketLevelAccess": { - "enabled": false - } - }, - "id": "000000000000000000000", - "kind": "storage#bucket", - "labels": { - "cnrm-test": "true", - "label-one": "value-one", - "managed-by-cnrm": "true", - "newkey": "newval" - }, - "location": "US", - "locationType": "multi-region", - "metageneration": "2", - "name": "storagebucket-sample-${uniqueId}", - "projectNumber": "${projectNumber}", - "rpo": "DEFAULT", - "selfLink": "https://www.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}", - "softDeletePolicy": { - "effectiveTime": "2024-04-01T12:34:56.123456Z", - "retentionDurationSeconds": "604800" - }, - "storageClass": "STANDARD", - "timeCreated": "2024-04-01T12:34:56.123456Z", - "updated": "2024-04-01T12:34:56.123456Z", - "versioning": { - "enabled": true - } -} - ---- - -GET https://storage.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}?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/dev -X-Goog-Api-Client: gl-go/1.22.0 gdcl/0.160.0 +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, max-age=0, must-revalidate, no-transform @@ -677,8 +379,7 @@ Vary: X-Origin --- GET https://storage.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}/o?alt=json&prettyPrint=false&versions=true -User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/dev -X-Goog-Api-Client: gl-go/1.22.0 gdcl/0.160.0 +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, max-age=0, must-revalidate, no-transform @@ -695,8 +396,7 @@ Vary: X-Origin --- DELETE https://storage.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}?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/dev -X-Goog-Api-Client: gl-go/1.22.0 gdcl/0.160.0 +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 204 No Content Cache-Control: no-cache, no-store, max-age=0, must-revalidate diff --git a/pkg/test/resourcefixture/testdata/basic/tags/v1beta1/tagstagkey/tagkeyorgbasic/_generated_object_tagkeyorgbasic.golden.yaml b/pkg/test/resourcefixture/testdata/basic/tags/v1beta1/tagstagkey/tagkeyorgbasic/_generated_object_tagkeyorgbasic.golden.yaml index 30df7dd14c..cc13298a48 100644 --- a/pkg/test/resourcefixture/testdata/basic/tags/v1beta1/tagstagkey/tagkeyorgbasic/_generated_object_tagkeyorgbasic.golden.yaml +++ b/pkg/test/resourcefixture/testdata/basic/tags/v1beta1/tagstagkey/tagkeyorgbasic/_generated_object_tagkeyorgbasic.golden.yaml @@ -15,7 +15,7 @@ metadata: spec: description: For keyname resources. parent: organizations/123450001 - resourceID: "1717551330001130820" + resourceID: "1718837800003546533" shortName: keyname${uniqueId} status: conditions: @@ -25,7 +25,7 @@ status: status: "True" type: Ready createTime: "1970-01-01T00:00:00Z" - name: "1717551330001130820" + name: "1718837800003546533" namespacedName: 123450001/keyname${uniqueId} observedGeneration: 2 updateTime: "1970-01-01T00:00:00Z" diff --git a/pkg/test/resourcefixture/testdata/basic/tags/v1beta1/tagstagkey/tagkeyprojectbasic/_generated_object_tagkeyprojectbasic.golden.yaml b/pkg/test/resourcefixture/testdata/basic/tags/v1beta1/tagstagkey/tagkeyprojectbasic/_generated_object_tagkeyprojectbasic.golden.yaml index fd63e4ba33..0069554dcb 100644 --- a/pkg/test/resourcefixture/testdata/basic/tags/v1beta1/tagstagkey/tagkeyprojectbasic/_generated_object_tagkeyprojectbasic.golden.yaml +++ b/pkg/test/resourcefixture/testdata/basic/tags/v1beta1/tagstagkey/tagkeyprojectbasic/_generated_object_tagkeyprojectbasic.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: tags.cnrm.cloud.google.com/v1beta1 kind: TagsTagKey metadata: @@ -29,7 +15,7 @@ metadata: spec: description: For keyname resources. parent: projects/${projectId} - resourceID: "1712185390270723440" + resourceID: "1718837823777494893" shortName: keyname${uniqueId} status: conditions: @@ -39,7 +25,7 @@ status: status: "True" type: Ready createTime: "1970-01-01T00:00:00Z" - name: "1712185390270723440" + name: "1718837823777494893" namespacedName: ${projectId}/keyname${uniqueId} observedGeneration: 2 updateTime: "1970-01-01T00:00:00Z" diff --git a/pkg/test/resourcefixture/testdata/basic/tags/v1beta1/tagstagkey/tagkeyprojectbasic/_http.log b/pkg/test/resourcefixture/testdata/basic/tags/v1beta1/tagstagkey/tagkeyprojectbasic/_http.log index 6134ca22b5..e5908f6d46 100644 --- a/pkg/test/resourcefixture/testdata/basic/tags/v1beta1/tagstagkey/tagkeyprojectbasic/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/tags/v1beta1/tagstagkey/tagkeyprojectbasic/_http.log @@ -92,62 +92,6 @@ X-Xss-Protection: 0 --- -GET https://cloudresourcemanager.googleapis.com/v3/tagKeys/${tagKeyID}?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 - -{ - "createTime": "2024-04-01T12:34:56.123456Z", - "description": "For keyname resources.", - "etag": "abcdef0123A=", - "name": "tagKeys/${tagKeyID}", - "namespacedName": "${projectId}/keyname${uniqueId}", - "parent": "projects/${projectNumber}", - "shortName": "keyname${uniqueId}", - "updateTime": "2024-04-01T12:34:56.123456Z" -} - ---- - -GET https://cloudresourcemanager.googleapis.com/v3/tagKeys/${tagKeyID}?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 - -{ - "createTime": "2024-04-01T12:34:56.123456Z", - "description": "For keyname resources.", - "etag": "abcdef0123A=", - "name": "tagKeys/${tagKeyID}", - "namespacedName": "${projectId}/keyname${uniqueId}", - "parent": "projects/${projectNumber}", - "shortName": "keyname${uniqueId}", - "updateTime": "2024-04-01T12:34:56.123456Z" -} - ---- - DELETE https://cloudresourcemanager.googleapis.com/v3/tagKeys/${tagKeyID}?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/tags/v1beta1/tagstagvalue/tagvaluebasic/_generated_object_tagvaluebasic.golden.yaml b/pkg/test/resourcefixture/testdata/basic/tags/v1beta1/tagstagvalue/tagvaluebasic/_generated_object_tagvaluebasic.golden.yaml new file mode 100644 index 0000000000..d7b2c5a3a2 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/tags/v1beta1/tagstagvalue/tagvaluebasic/_generated_object_tagvaluebasic.golden.yaml @@ -0,0 +1,31 @@ +apiVersion: tags.cnrm.cloud.google.com/v1beta1 +kind: TagsTagValue +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: tagstagvalue-${uniqueId} + namespace: ${uniqueId} +spec: + description: For valuename resources. + parentRef: + name: tagstagkey-${uniqueId} + resourceID: "1718837846427802079" + shortName: valuename +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: "1718837846427802079" + observedGeneration: 2 + updateTime: "1970-01-01T00:00:00Z" diff --git a/pkg/test/resourcefixture/testdata/basic/tags/v1beta1/tagstagvalue/tagvaluebasic/_http.log b/pkg/test/resourcefixture/testdata/basic/tags/v1beta1/tagstagvalue/tagvaluebasic/_http.log new file mode 100644 index 0000000000..97f360db46 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/tags/v1beta1/tagstagvalue/tagvaluebasic/_http.log @@ -0,0 +1,330 @@ +POST https://cloudresourcemanager.googleapis.com/v3/tagKeys?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 + +{ + "description": "For keyname resources.", + "parent": "organizations/${organizationID}", + "shortName": "keyname${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 + +{ + "metadata": { + "@type": "type.googleapis.com/google.cloud.resourcemanager.v3.CreateTagKeyMetadata" + }, + "name": "operations/${operationID}" +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v3/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 + +{ + "done": true, + "metadata": { + "@type": "type.googleapis.com/google.cloud.resourcemanager.v3.CreateTagKeyMetadata" + }, + "name": "operations/${operationID}", + "response": { + "@type": "type.googleapis.com/google.cloud.resourcemanager.v3.TagKey", + "createTime": "2024-04-01T12:34:56.123456Z", + "description": "For keyname resources.", + "etag": "abcdef0123A=", + "name": "tagKeys/${tagKeyID}", + "namespacedName": "${organizationID}/keyname${uniqueId}", + "parent": "organizations/${organizationID}", + "shortName": "keyname${uniqueId}", + "updateTime": "2024-04-01T12:34:56.123456Z" + } +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v3/tagKeys/${tagKeyID}?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 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "description": "For keyname resources.", + "etag": "abcdef0123A=", + "name": "tagKeys/${tagKeyID}", + "namespacedName": "${organizationID}/keyname${uniqueId}", + "parent": "organizations/${organizationID}", + "shortName": "keyname${uniqueId}", + "updateTime": "2024-04-01T12:34:56.123456Z" +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v3/tagValues?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 + +{ + "description": "For valuename resources.", + "parent": "tagKeys/${tagKeyID}", + "shortName": "valuename" +} + +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 + +{ + "metadata": { + "@type": "type.googleapis.com/google.cloud.resourcemanager.v3.CreateTagValueMetadata" + }, + "name": "operations/${operationID}" +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v3/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 + +{ + "done": true, + "metadata": { + "@type": "type.googleapis.com/google.cloud.resourcemanager.v3.CreateTagValueMetadata" + }, + "name": "operations/${operationID}", + "response": { + "@type": "type.googleapis.com/google.cloud.resourcemanager.v3.TagValue", + "createTime": "2024-04-01T12:34:56.123456Z", + "description": "For valuename resources.", + "etag": "abcdef0123A=", + "name": "tagValues/${tagValueID}", + "parent": "tagKeys/${tagKeyID}", + "shortName": "valuename", + "updateTime": "2024-04-01T12:34:56.123456Z" + } +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v3/tagValues/${tagValueID}?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 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "description": "For valuename resources.", + "etag": "abcdef0123A=", + "name": "tagValues/${tagValueID}", + "parent": "tagKeys/${tagKeyID}", + "shortName": "valuename", + "updateTime": "2024-04-01T12:34:56.123456Z" +} + +--- + +DELETE https://cloudresourcemanager.googleapis.com/v3/tagValues/${tagValueID}?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 + +{ + "metadata": { + "@type": "type.googleapis.com/google.cloud.resourcemanager.v3.DeleteTagValueMetadata" + }, + "name": "operations/${operationID}" +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v3/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 + +{ + "done": true, + "metadata": { + "@type": "type.googleapis.com/google.cloud.resourcemanager.v3.DeleteTagValueMetadata" + }, + "name": "operations/${operationID}", + "response": { + "@type": "type.googleapis.com/google.cloud.resourcemanager.v3.TagValue", + "createTime": "2024-04-01T12:34:56.123456Z", + "description": "For valuename resources.", + "etag": "abcdef0123A=", + "name": "tagValues/${tagValueID}", + "parent": "tagKeys/${tagKeyID}", + "shortName": "valuename", + "updateTime": "2024-04-01T12:34:56.123456Z" + } +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v3/tagKeys/${tagKeyID}?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 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "description": "For keyname resources.", + "etag": "abcdef0123A=", + "name": "tagKeys/${tagKeyID}", + "namespacedName": "${organizationID}/keyname${uniqueId}", + "parent": "organizations/${organizationID}", + "shortName": "keyname${uniqueId}", + "updateTime": "2024-04-01T12:34:56.123456Z" +} + +--- + +DELETE https://cloudresourcemanager.googleapis.com/v3/tagKeys/${tagKeyID}?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 + +{ + "metadata": { + "@type": "type.googleapis.com/google.cloud.resourcemanager.v3.DeleteTagKeyMetadata" + }, + "name": "operations/${operationID}" +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v3/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 + +{ + "done": true, + "metadata": { + "@type": "type.googleapis.com/google.cloud.resourcemanager.v3.DeleteTagKeyMetadata" + }, + "name": "operations/${operationID}", + "response": { + "@type": "type.googleapis.com/google.cloud.resourcemanager.v3.TagKey", + "createTime": "2024-04-01T12:34:56.123456Z", + "description": "For keyname resources.", + "etag": "abcdef0123A=", + "name": "tagKeys/${tagKeyID}", + "namespacedName": "${organizationID}/keyname${uniqueId}", + "parent": "organizations/${organizationID}", + "shortName": "keyname${uniqueId}", + "updateTime": "2024-04-01T12:34:56.123456Z" + } +} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/basic/tags/v1beta1/tagstagvalue/tagvalueproject/_generated_object_tagvalueproject.golden.yaml b/pkg/test/resourcefixture/testdata/basic/tags/v1beta1/tagstagvalue/tagvalueproject/_generated_object_tagvalueproject.golden.yaml new file mode 100644 index 0000000000..fab0e23638 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/tags/v1beta1/tagstagvalue/tagvalueproject/_generated_object_tagvalueproject.golden.yaml @@ -0,0 +1,32 @@ +apiVersion: tags.cnrm.cloud.google.com/v1beta1 +kind: TagsTagValue +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: tagstagvalue-${uniqueId} + namespace: ${uniqueId} +spec: + description: For valuename resources. + parentRef: + name: tagstagkey-${uniqueId} + resourceID: "1718837870725566645" + shortName: valuename +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: "1718837870725566645" + namespacedName: ${projectId}/keyname${uniqueId}/valuename + observedGeneration: 2 + updateTime: "1970-01-01T00:00:00Z" diff --git a/pkg/test/resourcefixture/testdata/basic/tags/v1beta1/tagstagvalue/tagvalueproject/_http.log b/pkg/test/resourcefixture/testdata/basic/tags/v1beta1/tagstagvalue/tagvalueproject/_http.log index bac5c5fd2e..6f4cd5184d 100644 --- a/pkg/test/resourcefixture/testdata/basic/tags/v1beta1/tagstagvalue/tagvalueproject/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/tags/v1beta1/tagstagvalue/tagvalueproject/_http.log @@ -1,6 +1,6 @@ POST https://cloudresourcemanager.googleapis.com/v3/tagKeys?alt=json Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/dev +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager { "description": "For keyname resources.", @@ -30,7 +30,7 @@ X-Xss-Protection: 0 GET https://cloudresourcemanager.googleapis.com/v3/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/dev +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 @@ -66,35 +66,7 @@ X-Xss-Protection: 0 GET https://cloudresourcemanager.googleapis.com/v3/tagKeys/${tagKeyID}?alt=json Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/dev - -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", - "description": "For keyname resources.", - "etag": "abcdef0123A=", - "name": "tagKeys/${tagKeyID}", - "namespacedName": "${projectId}/keyname${uniqueId}", - "parent": "projects/${projectNumber}", - "shortName": "keyname${uniqueId}", - "updateTime": "2024-04-01T12:34:56.123456Z" -} - ---- - -GET https://cloudresourcemanager.googleapis.com/v3/tagKeys/${tagKeyID}?alt=json -Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/dev +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 @@ -122,7 +94,7 @@ X-Xss-Protection: 0 POST https://cloudresourcemanager.googleapis.com/v3/tagValues?alt=json Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/dev +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager { "description": "For valuename resources.", @@ -152,7 +124,7 @@ X-Xss-Protection: 0 GET https://cloudresourcemanager.googleapis.com/v3/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/dev +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 @@ -188,63 +160,7 @@ X-Xss-Protection: 0 GET https://cloudresourcemanager.googleapis.com/v3/tagValues/${tagValueID}?alt=json Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/dev - -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", - "description": "For valuename resources.", - "etag": "abcdef0123A=", - "name": "tagValues/${tagValueID}", - "namespacedName": "${projectId}/keyname${uniqueId}/valuename", - "parent": "tagKeys/${tagKeyID}", - "shortName": "valuename", - "updateTime": "2024-04-01T12:34:56.123456Z" -} - ---- - -GET https://cloudresourcemanager.googleapis.com/v3/tagValues/${tagValueID}?alt=json -Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/dev - -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", - "description": "For valuename resources.", - "etag": "abcdef0123A=", - "name": "tagValues/${tagValueID}", - "namespacedName": "${projectId}/keyname${uniqueId}/valuename", - "parent": "tagKeys/${tagKeyID}", - "shortName": "valuename", - "updateTime": "2024-04-01T12:34:56.123456Z" -} - ---- - -GET https://cloudresourcemanager.googleapis.com/v3/tagValues/${tagValueID}?alt=json -Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/dev +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 @@ -272,7 +188,7 @@ X-Xss-Protection: 0 DELETE https://cloudresourcemanager.googleapis.com/v3/tagValues/${tagValueID}?alt=json Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/dev +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 @@ -296,7 +212,7 @@ X-Xss-Protection: 0 GET https://cloudresourcemanager.googleapis.com/v3/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/dev +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 @@ -332,7 +248,7 @@ X-Xss-Protection: 0 GET https://cloudresourcemanager.googleapis.com/v3/tagKeys/${tagKeyID}?alt=json Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/dev +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 @@ -360,7 +276,7 @@ X-Xss-Protection: 0 DELETE https://cloudresourcemanager.googleapis.com/v3/tagKeys/${tagKeyID}?alt=json Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/dev +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 @@ -384,7 +300,7 @@ X-Xss-Protection: 0 GET https://cloudresourcemanager.googleapis.com/v3/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/dev +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 diff --git a/pkg/test/resourcefixture/testdata/basic/vertexai/v1alpha1/vertexaitensorboard/_generated_object_vertexaitensorboard.golden.yaml b/pkg/test/resourcefixture/testdata/basic/vertexai/v1alpha1/vertexaitensorboard/_generated_object_vertexaitensorboard.golden.yaml index d397ec942a..ee29e17a96 100644 --- a/pkg/test/resourcefixture/testdata/basic/vertexai/v1alpha1/vertexaitensorboard/_generated_object_vertexaitensorboard.golden.yaml +++ b/pkg/test/resourcefixture/testdata/basic/vertexai/v1alpha1/vertexaitensorboard/_generated_object_vertexaitensorboard.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: vertexai.cnrm.cloud.google.com/v1alpha1 kind: VertexAITensorboard 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 @@ -32,9 +18,9 @@ spec: projectRef: external: ${projectId} region: us-central1 - resourceID: projects/${projectNumber}/locations/us-central1/tensorboards/1712185409009515056 + resourceID: projects/${projectNumber}/locations/us-central1/tensorboards/1718837895702041590 status: - blobStoragePathPrefix: cloud-ai-platform-f5cdc0d6-ff04-47ec-8206-cbe099c6aa0d + blobStoragePathPrefix: cloud-ai-platform-4c7152f6-07a9-47d6-8f51-4299e2fdff92 conditions: - lastTransitionTime: "1970-01-01T00:00:00Z" message: The resource is up to date @@ -42,6 +28,6 @@ status: status: "True" type: Ready createTime: "1970-01-01T00:00:00Z" - name: projects/${projectNumber}/locations/us-central1/tensorboards/1712185409009515056 + name: projects/${projectNumber}/locations/us-central1/tensorboards/1718837895702041590 observedGeneration: 3 updateTime: "1970-01-01T00:00:00Z" diff --git a/pkg/test/resourcefixture/testdata/basic/vertexai/v1alpha1/vertexaitensorboard/_http.log b/pkg/test/resourcefixture/testdata/basic/vertexai/v1alpha1/vertexaitensorboard/_http.log index 83c2b63cab..7bfe4244dd 100644 --- a/pkg/test/resourcefixture/testdata/basic/vertexai/v1alpha1/vertexaitensorboard/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/vertexai/v1alpha1/vertexaitensorboard/_http.log @@ -1,6 +1,6 @@ POST https://us-central1-aiplatform.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1/tensorboards?alt=json Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/dev +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager { "description": "Dashboard version 1", @@ -37,7 +37,7 @@ X-Xss-Protection: 0 GET https://us-central1-aiplatform.googleapis.com/v1beta1/projects/${projectNumber}/locations/us-central1/tensorboards/${tensorboardID}/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/dev +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 @@ -76,69 +76,7 @@ X-Xss-Protection: 0 GET https://us-central1-aiplatform.googleapis.com/v1beta1/projects/${projectNumber}/locations/us-central1/tensorboards/${tensorboardID}?alt=json Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/dev - -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 - -{ - "blobStoragePathPrefix": "cloud-ai-platform-00000000-1111-2222-3333-444444444444", - "createTime": "2024-04-01T12:34:56.123456Z", - "description": "Dashboard version 1", - "displayName": "config-connector v1", - "etag": "abcdef0123A=", - "labels": { - "cnrm-test": "true", - "managed-by-cnrm": "true" - }, - "name": "projects/${projectNumber}/locations/us-central1/tensorboards/${tensorboardID}", - "updateTime": "2024-04-01T12:34:56.123456Z" -} - ---- - -GET https://us-central1-aiplatform.googleapis.com/v1beta1/projects/${projectNumber}/locations/us-central1/tensorboards/${tensorboardID}?alt=json -Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/dev - -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 - -{ - "blobStoragePathPrefix": "cloud-ai-platform-00000000-1111-2222-3333-444444444444", - "createTime": "2024-04-01T12:34:56.123456Z", - "description": "Dashboard version 1", - "displayName": "config-connector v1", - "etag": "abcdef0123A=", - "labels": { - "cnrm-test": "true", - "managed-by-cnrm": "true" - }, - "name": "projects/${projectNumber}/locations/us-central1/tensorboards/${tensorboardID}", - "updateTime": "2024-04-01T12:34:56.123456Z" -} - ---- - -GET https://us-central1-aiplatform.googleapis.com/v1beta1/projects/${projectNumber}/locations/us-central1/tensorboards/${tensorboardID}?alt=json -Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/dev +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 @@ -169,7 +107,7 @@ X-Xss-Protection: 0 PATCH https://us-central1-aiplatform.googleapis.com/v1beta1/projects/${projectNumber}/locations/us-central1/tensorboards/${tensorboardID}?alt=json&updateMask=displayName%2Cdescription Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/dev +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager { "description": "Dashboard version 2", @@ -221,38 +159,7 @@ X-Xss-Protection: 0 GET https://us-central1-aiplatform.googleapis.com/v1beta1/projects/${projectNumber}/locations/us-central1/tensorboards/${tensorboardID}?alt=json Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/dev - -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 - -{ - "blobStoragePathPrefix": "cloud-ai-platform-00000000-1111-2222-3333-444444444444", - "createTime": "2024-04-01T12:34:56.123456Z", - "description": "Dashboard version 2", - "displayName": "config-connector v2", - "etag": "abcdef0123A=", - "labels": { - "cnrm-test": "true", - "managed-by-cnrm": "true" - }, - "name": "projects/${projectNumber}/locations/us-central1/tensorboards/${tensorboardID}", - "updateTime": "2024-04-01T12:34:56.123456Z" -} - ---- - -GET https://us-central1-aiplatform.googleapis.com/v1beta1/projects/${projectNumber}/locations/us-central1/tensorboards/${tensorboardID}?alt=json -Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/dev +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 @@ -283,7 +190,7 @@ X-Xss-Protection: 0 DELETE https://us-central1-aiplatform.googleapis.com/v1beta1/projects/${projectNumber}/locations/us-central1/tensorboards/${tensorboardID}?alt=json Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/dev +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 diff --git a/pkg/test/resourcefixture/testdata/basic/vertexai/v1beta1/vertexaidataset/vertexaidatasetbasic/_http.log b/pkg/test/resourcefixture/testdata/basic/vertexai/v1beta1/vertexaidataset/vertexaidatasetbasic/_http.log index 3137a01fe4..a81b83a7f4 100644 --- a/pkg/test/resourcefixture/testdata/basic/vertexai/v1beta1/vertexaidataset/vertexaidatasetbasic/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/vertexai/v1beta1/vertexaidataset/vertexaidatasetbasic/_http.log @@ -134,37 +134,6 @@ X-Xss-Protection: 0 --- -GET https://us-central1-aiplatform.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1/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 - -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", - "displayName": "a basic vertex AI dataset", - "etag": "abcdef0123A=", - "metadata": { - "dataItemSchemaUri": "gs://google-cloud-aiplatform/schema/dataset/dataitem/image_1.0.0.yaml", - "gcsBucket": "cloud-ai-platform-${bucketId}" - }, - "metadataArtifact": "projects/${projectNumber}/locations/us-central1/metadataStores/default/artifacts/${artifactId}", - "metadataSchemaUri": "gs://google-cloud-aiplatform/schema/dataset/metadata/image_1.0.0.yaml", - "name": "projects/${projectNumber}/locations/us-central1/datasets/${datasetID}", - "updateTime": "2024-04-01T12:34:56.123456Z" -} - ---- - PATCH https://us-central1-aiplatform.googleapis.com/v1beta1/projects/${projectNumber}/locations/us-central1/datasets/${datasetID}?alt=json&updateMask=displayName 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/vertexai/v1beta1/vertexaiendpoint/vertexaiendpointbasic/_generated_object_vertexaiendpointbasic.golden.yaml b/pkg/test/resourcefixture/testdata/basic/vertexai/v1beta1/vertexaiendpoint/vertexaiendpointbasic/_generated_object_vertexaiendpointbasic.golden.yaml new file mode 100644 index 0000000000..201d3b2bfa --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/vertexai/v1beta1/vertexaiendpoint/vertexaiendpointbasic/_generated_object_vertexaiendpointbasic.golden.yaml @@ -0,0 +1,32 @@ +apiVersion: vertexai.cnrm.cloud.google.com/v1beta1 +kind: VertexAIEndpoint +metadata: + annotations: + cnrm.cloud.google.com/management-conflict-prevention-policy: none + cnrm.cloud.google.com/state-into-spec: absent + finalizers: + - cnrm.cloud.google.com/finalizer + - cnrm.cloud.google.com/deletion-defender + generation: 3 + labels: + cnrm-test: "true" + label-one: value-one + name: vertexaiendpoint-${uniqueId} + namespace: ${uniqueId} +spec: + description: example vertex AI endpoint with labels + displayName: vertexai-endpoint-basic-updated + projectRef: + external: ${projectId} + region: us-central1 + resourceID: vertexaiendpoint-${uniqueId} +status: + conditions: + - lastTransitionTime: "1970-01-01T00:00:00Z" + message: The resource is up to date + reason: UpToDate + status: "True" + type: Ready + observedGeneration: 3 + observedState: + createTime: "1970-01-01T00:00:00Z" diff --git a/pkg/test/resourcefixture/testdata/basic/vertexai/v1beta1/vertexaiendpoint/vertexaiendpointbasic/_http.log b/pkg/test/resourcefixture/testdata/basic/vertexai/v1beta1/vertexaiendpoint/vertexaiendpointbasic/_http.log index fe80c3f462..265026ac4d 100644 --- a/pkg/test/resourcefixture/testdata/basic/vertexai/v1beta1/vertexaiendpoint/vertexaiendpointbasic/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/vertexai/v1beta1/vertexaiendpoint/vertexaiendpointbasic/_http.log @@ -136,66 +136,6 @@ X-Xss-Protection: 0 --- -GET https://us-central1-aiplatform.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1/endpoints/vertexaiendpoint-${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 - -{ - "createTime": "2024-04-01T12:34:56.123456Z", - "description": "example vertex AI endpoint", - "displayName": "vertexai-endpoint-basic", - "etag": "abcdef0123A=", - "labels": { - "cnrm-test": "true", - "managed-by-cnrm": "true" - }, - "name": "projects/${projectNumber}/locations/us-central1/endpoints/vertexaiendpoint-${uniqueId}", - "updateTime": "2024-04-01T12:34:56.123456Z" -} - ---- - -GET https://us-central1-aiplatform.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1/endpoints/vertexaiendpoint-${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 - -{ - "createTime": "2024-04-01T12:34:56.123456Z", - "description": "example vertex AI endpoint", - "displayName": "vertexai-endpoint-basic", - "etag": "abcdef0123A=", - "labels": { - "cnrm-test": "true", - "managed-by-cnrm": "true" - }, - "name": "projects/${projectNumber}/locations/us-central1/endpoints/vertexaiendpoint-${uniqueId}", - "updateTime": "2024-04-01T12:34:56.123456Z" -} - ---- - PATCH https://us-central1-aiplatform.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1/endpoints/vertexaiendpoint-${uniqueId}?alt=json&updateMask=displayName%2Cdescription%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 @@ -268,37 +208,6 @@ X-Xss-Protection: 0 --- -GET https://us-central1-aiplatform.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1/endpoints/vertexaiendpoint-${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 - -{ - "createTime": "2024-04-01T12:34:56.123456Z", - "description": "example vertex AI endpoint with labels", - "displayName": "vertexai-endpoint-basic-updated", - "etag": "abcdef0123A=", - "labels": { - "cnrm-test": "true", - "label-one": "value-one", - "managed-by-cnrm": "true" - }, - "name": "projects/${projectNumber}/locations/us-central1/endpoints/vertexaiendpoint-${uniqueId}", - "updateTime": "2024-04-01T12:34:56.123456Z" -} - ---- - DELETE https://us-central1-aiplatform.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1/endpoints/vertexaiendpoint-${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/vertexai/v1beta1/vertexaiendpoint/vertexaiendpointnetwork/_generated_object_vertexaiendpointnetwork.golden.yaml b/pkg/test/resourcefixture/testdata/basic/vertexai/v1beta1/vertexaiendpoint/vertexaiendpointnetwork/_generated_object_vertexaiendpointnetwork.golden.yaml new file mode 100644 index 0000000000..c7bb4a2c15 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/vertexai/v1beta1/vertexaiendpoint/vertexaiendpointnetwork/_generated_object_vertexaiendpointnetwork.golden.yaml @@ -0,0 +1,34 @@ +apiVersion: vertexai.cnrm.cloud.google.com/v1beta1 +kind: VertexAIEndpoint +metadata: + annotations: + cnrm.cloud.google.com/management-conflict-prevention-policy: none + cnrm.cloud.google.com/state-into-spec: absent + finalizers: + - cnrm.cloud.google.com/finalizer + - cnrm.cloud.google.com/deletion-defender + generation: 3 + labels: + cnrm-test: "true" + label-one: value-one + name: vertexaiendpoint-${uniqueId} + namespace: ${uniqueId} +spec: + description: example vertex AI endpoint with encryption key + displayName: vertexai-endpoint-network-updated + networkRef: + name: computenetwork-${uniqueId} + projectRef: + external: ${projectId} + region: us-central1 + resourceID: vertexaiendpoint-${uniqueId} +status: + conditions: + - lastTransitionTime: "1970-01-01T00:00:00Z" + message: The resource is up to date + reason: UpToDate + status: "True" + type: Ready + observedGeneration: 3 + observedState: + createTime: "1970-01-01T00:00:00Z" diff --git a/pkg/test/resourcefixture/testdata/basic/vertexai/v1beta1/vertexaiendpoint/vertexaiendpointnetwork/_http.log b/pkg/test/resourcefixture/testdata/basic/vertexai/v1beta1/vertexaiendpoint/vertexaiendpointnetwork/_http.log new file mode 100644 index 0000000000..7d03f8acf6 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/vertexai/v1beta1/vertexaiendpoint/vertexaiendpointnetwork/_http.log @@ -0,0 +1,1156 @@ +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}?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": "The resource 'projects/${projectId}/global/networks/computenetwork-${uniqueId}' was not found", + "reason": "notFound" + } + ], + "message": "The resource 'projects/${projectId}/global/networks/computenetwork-${uniqueId}' was 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://www.googleapis.com/compute/beta/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetId": "${networkID}", + "targetLink": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "user": "user@example.com" +} + +--- + +GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}?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://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "selfLinkWithId": "https://www.googleapis.com/compute/beta/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" + } +} + +--- + +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": 24, + "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": 24, + "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": 24, + "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://us-central1-aiplatform.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1/endpoints/vertexaiendpoint-${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": "endpoint \"projects/${projectNumber}/locations/us-central1/endpoints/vertexaiendpoint-${uniqueId}\" not found", + "reason": "notFound" + } + ], + "message": "endpoint \"projects/${projectNumber}/locations/us-central1/endpoints/vertexaiendpoint-${uniqueId}\" not found", + "status": "NOT_FOUND" + } +} + +--- + +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://us-central1-aiplatform.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1/endpoints?alt=json&endpointId=vertexaiendpoint-${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": "example vertex AI endpoint with encryption key", + "displayName": "vertexai-endpoint-network", + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "network": "projects/${projectNumber}/global/networks/computenetwork-${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 + +{ + "metadata": { + "@type": "type.googleapis.com/google.cloud.aiplatform.v1beta1.CreateEndpointOperationMetadata", + "genericMetadata": { + "createTime": "2024-04-01T12:34:56.123456Z", + "updateTime": "2024-04-01T12:34:56.123456Z" + } + }, + "name": "projects/${projectNumber}/locations/us-central1/endpoints/vertexaiendpoint-${uniqueId}/operations/${operationID}" +} + +--- + +GET https://us-central1-aiplatform.googleapis.com/v1beta1/projects/${projectNumber}/locations/us-central1/endpoints/vertexaiendpoint-${uniqueId}/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 + +{ + "done": true, + "metadata": { + "@type": "type.googleapis.com/google.cloud.aiplatform.v1beta1.CreateEndpointOperationMetadata", + "genericMetadata": { + "createTime": "2024-04-01T12:34:56.123456Z", + "updateTime": "2024-04-01T12:34:56.123456Z" + } + }, + "name": "projects/${projectNumber}/locations/us-central1/endpoints/vertexaiendpoint-${uniqueId}/operations/${operationID}", + "response": { + "@type": "type.googleapis.com/google.cloud.aiplatform.v1beta1.Endpoint", + "description": "example vertex AI endpoint with encryption key", + "displayName": "vertexai-endpoint-network", + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectNumber}/locations/us-central1/endpoints/vertexaiendpoint-${uniqueId}", + "network": "projects/${projectNumber}/global/networks/computenetwork-${uniqueId}" + } +} + +--- + +GET https://us-central1-aiplatform.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1/endpoints/vertexaiendpoint-${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 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "description": "example vertex AI endpoint with encryption key", + "displayName": "vertexai-endpoint-network", + "etag": "abcdef0123A=", + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectNumber}/locations/us-central1/endpoints/vertexaiendpoint-${uniqueId}", + "network": "projects/${projectNumber}/global/networks/computenetwork-${uniqueId}", + "updateTime": "2024-04-01T12:34:56.123456Z" +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/${projectNumber}?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://us-central1-aiplatform.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1/endpoints/vertexaiendpoint-${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 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "description": "example vertex AI endpoint with encryption key", + "displayName": "vertexai-endpoint-network", + "etag": "abcdef0123A=", + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectNumber}/locations/us-central1/endpoints/vertexaiendpoint-${uniqueId}", + "network": "projects/${projectNumber}/global/networks/computenetwork-${uniqueId}", + "updateTime": "2024-04-01T12:34:56.123456Z" +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/${projectNumber}?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://us-central1-aiplatform.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1/endpoints/vertexaiendpoint-${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 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "description": "example vertex AI endpoint with encryption key", + "displayName": "vertexai-endpoint-network", + "etag": "abcdef0123A=", + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectNumber}/locations/us-central1/endpoints/vertexaiendpoint-${uniqueId}", + "network": "projects/${projectNumber}/global/networks/computenetwork-${uniqueId}", + "updateTime": "2024-04-01T12:34:56.123456Z" +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/${projectNumber}?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://us-central1-aiplatform.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1/endpoints/vertexaiendpoint-${uniqueId}?alt=json&updateMask=displayName +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": "example vertex AI endpoint with encryption key", + "displayName": "vertexai-endpoint-network-updated", + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "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 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "description": "example vertex AI endpoint with encryption key", + "displayName": "vertexai-endpoint-network-updated", + "etag": "abcdef0123A=", + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectNumber}/locations/us-central1/endpoints/vertexaiendpoint-${uniqueId}", + "network": "projects/${projectNumber}/global/networks/computenetwork-${uniqueId}", + "updateTime": "2024-04-01T12:34:56.123456Z" +} + +--- + +GET https://us-central1-aiplatform.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1/endpoints/vertexaiendpoint-${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 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "description": "example vertex AI endpoint with encryption key", + "displayName": "vertexai-endpoint-network-updated", + "etag": "abcdef0123A=", + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectNumber}/locations/us-central1/endpoints/vertexaiendpoint-${uniqueId}", + "network": "projects/${projectNumber}/global/networks/computenetwork-${uniqueId}", + "updateTime": "2024-04-01T12:34:56.123456Z" +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/${projectNumber}?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://us-central1-aiplatform.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1/endpoints/vertexaiendpoint-${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 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "description": "example vertex AI endpoint with encryption key", + "displayName": "vertexai-endpoint-network-updated", + "etag": "abcdef0123A=", + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectNumber}/locations/us-central1/endpoints/vertexaiendpoint-${uniqueId}", + "network": "projects/${projectNumber}/global/networks/computenetwork-${uniqueId}", + "updateTime": "2024-04-01T12:34:56.123456Z" +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/${projectNumber}?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}" +} + +--- + +DELETE https://us-central1-aiplatform.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1/endpoints/vertexaiendpoint-${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 + +{ + "done": true, + "metadata": { + "@type": "type.googleapis.com/google.cloud.aiplatform.v1beta1.DeleteOperationMetadata", + "genericMetadata": { + "createTime": "2024-04-01T12:34:56.123456Z", + "updateTime": "2024-04-01T12:34:56.123456Z" + } + }, + "name": "projects/${projectNumber}/locations/us-central1/operations/${operationID}", + "response": { + "@type": "type.googleapis.com/google.protobuf.Empty" + } +} + +--- + +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/${networkID}/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://www.googleapis.com/compute/beta/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": 24, + "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://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}?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://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "selfLinkWithId": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}" +} + +--- + +DELETE https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}?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://www.googleapis.com/compute/beta/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetId": "${networkID}", + "targetLink": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/computenetwork-${uniqueId}", + "user": "user@example.com" +} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/containerannotations/folderid/_generated_object_folderid.golden.yaml b/pkg/test/resourcefixture/testdata/containerannotations/folderid/_generated_object_folderid.golden.yaml index 7065f40bae..97a5bb1d59 100644 --- a/pkg/test/resourcefixture/testdata/containerannotations/folderid/_generated_object_folderid.golden.yaml +++ b/pkg/test/resourcefixture/testdata/containerannotations/folderid/_generated_object_folderid.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: resourcemanager.cnrm.cloud.google.com/v1beta1 kind: Project metadata: @@ -39,5 +25,5 @@ status: reason: UpToDate status: "True" type: Ready - number: "2598046405" + number: "2687044318" observedGeneration: 3 diff --git a/pkg/test/resourcefixture/testdata/containerannotations/folderid/_http.log b/pkg/test/resourcefixture/testdata/containerannotations/folderid/_http.log new file mode 100644 index 0000000000..b69fe65d26 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/containerannotations/folderid/_http.log @@ -0,0 +1,468 @@ +GET https://cloudresourcemanager.googleapis.com/v1/projects/project-${uniqueId}?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 + +403 Forbidden +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": 403, + "message": "The caller does not have permission", + "status": "PERMISSION_DENIED" + } +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/projects?alt=json&prettyPrint=false +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 + +{ + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "KCC ${uniqueId}", + "parent": { + "id": "${testFolderId}", + "type": "folder" + }, + "projectId": "project-${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://cloudresourcemanager.googleapis.com/v1/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 + +{ + "done": true, + "metadata": { + "@type": "type.googleapis.com/google.cloud.resourcemanager.v3.CreateProjectMetadata" + }, + "name": "operations/${operationID}", + "response": { + "@type": "type.googleapis.com/google.cloud.resourcemanager.v3.Project", + "createTime": "2024-04-01T12:34:56.123456Z", + "displayName": "KCC ${uniqueId}", + "etag": "abcdef0123A=", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectNumber}", + "parent": "folders/${testFolderId}", + "projectId": "project-${uniqueId}", + "state": "ACTIVE" + } +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/project-${uniqueId}?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", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "KCC ${uniqueId}", + "parent": { + "id": "${testFolderId}", + "type": "folder" + }, + "projectId": "project-${uniqueId}", + "projectNumber": "${projectNumber}" +} + +--- + +GET https://cloudbilling.googleapis.com/v1/projects/project-${uniqueId}/billingInfo?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 + +{ + "billingAccountName": "", + "billingEnabled": false, + "name": "projects/project-${uniqueId}/billingInfo", + "projectId": "project-${uniqueId}" +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/project-${uniqueId}?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", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "KCC ${uniqueId}", + "parent": { + "id": "${testFolderId}", + "type": "folder" + }, + "projectId": "project-${uniqueId}", + "projectNumber": "${projectNumber}" +} + +--- + +GET https://cloudbilling.googleapis.com/v1/projects/project-${uniqueId}/billingInfo?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 + +{ + "billingAccountName": "", + "billingEnabled": false, + "name": "projects/project-${uniqueId}/billingInfo", + "projectId": "project-${uniqueId}" +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/project-${uniqueId}?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", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "KCC ${uniqueId}", + "parent": { + "id": "${testFolderId}", + "type": "folder" + }, + "projectId": "project-${uniqueId}", + "projectNumber": "${projectNumber}" +} + +--- + +GET https://cloudbilling.googleapis.com/v1/projects/project-${uniqueId}/billingInfo?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 + +{ + "billingAccountName": "", + "billingEnabled": false, + "name": "projects/project-${uniqueId}/billingInfo", + "projectId": "project-${uniqueId}" +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/project-${uniqueId}?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", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "KCC ${uniqueId}", + "parent": { + "id": "${testFolderId}", + "type": "folder" + }, + "projectId": "project-${uniqueId}", + "projectNumber": "${projectNumber}" +} + +--- + +PUT https://cloudresourcemanager.googleapis.com/v1/projects/project-${uniqueId}?alt=json&prettyPrint=false +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 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "KCC-2 ${uniqueId}", + "parent": { + "id": "${testFolderId}", + "type": "folder" + }, + "projectId": "project-${uniqueId}", + "projectNumber": "${projectNumber}" +} + +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", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "projects/project-${uniqueId}", + "parent": { + "id": "${testFolderId}", + "type": "folder" + }, + "projectId": "project-${uniqueId}", + "projectNumber": "${projectNumber}" +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/project-${uniqueId}?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", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "projects/project-${uniqueId}", + "parent": { + "id": "${testFolderId}", + "type": "folder" + }, + "projectId": "project-${uniqueId}", + "projectNumber": "${projectNumber}" +} + +--- + +GET https://cloudbilling.googleapis.com/v1/projects/project-${uniqueId}/billingInfo?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 + +{ + "billingAccountName": "", + "billingEnabled": false, + "name": "projects/project-${uniqueId}/billingInfo", + "projectId": "project-${uniqueId}" +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/project-${uniqueId}?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", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "projects/project-${uniqueId}", + "parent": { + "id": "${testFolderId}", + "type": "folder" + }, + "projectId": "project-${uniqueId}", + "projectNumber": "${projectNumber}" +} + +--- + +GET https://cloudbilling.googleapis.com/v1/projects/project-${uniqueId}/billingInfo?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 + +{ + "billingAccountName": "", + "billingEnabled": false, + "name": "projects/project-${uniqueId}/billingInfo", + "projectId": "project-${uniqueId}" +} + +--- + +DELETE https://cloudresourcemanager.googleapis.com/v1/projects/project-${uniqueId}?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 + +{} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/containerannotations/projectid/_generated_export_projectid.golden b/pkg/test/resourcefixture/testdata/containerannotations/projectid/_generated_export_projectid.golden new file mode 100644 index 0000000000..09677b54be --- /dev/null +++ b/pkg/test/resourcefixture/testdata/containerannotations/projectid/_generated_export_projectid.golden @@ -0,0 +1,24 @@ +apiVersion: bigquery.cnrm.cloud.google.com/v1beta1 +kind: BigQueryDataset +metadata: + annotations: + cnrm.cloud.google.com/delete-contents-on-destroy: "false" + labels: + cnrm-test: "true" + managed-by-cnrm: "true" + name: bigquerydatasetsample${uniqueId} +spec: + access: + - role: OWNER + specialGroup: projectOwners + - role: OWNER + userByEmail: user@google.com + - role: READER + specialGroup: projectReaders + - role: WRITER + specialGroup: projectWriters + friendlyName: bigquerydataset-sample-updated + location: US + projectRef: + external: ${projectId} + resourceID: bigquerydatasetsample${uniqueId} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/containerannotations/projectid/_generated_object_projectid.golden.yaml b/pkg/test/resourcefixture/testdata/containerannotations/projectid/_generated_object_projectid.golden.yaml new file mode 100644 index 0000000000..7a71a22283 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/containerannotations/projectid/_generated_object_projectid.golden.yaml @@ -0,0 +1,42 @@ +apiVersion: bigquery.cnrm.cloud.google.com/v1beta1 +kind: BigQueryDataset +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" + name: bigquerydatasetsample${uniqueId} + namespace: ${uniqueId} +spec: + access: + - role: OWNER + specialGroup: projectOwners + - role: OWNER + userByEmail: user@google.com + - role: READER + specialGroup: projectReaders + - role: WRITER + specialGroup: projectWriters + friendlyName: bigquerydataset-sample-updated + location: US + projectRef: + external: ${projectId} + resourceID: bigquerydatasetsample${uniqueId} +status: + conditions: + - lastTransitionTime: "1970-01-01T00:00:00Z" + message: The resource is up to date + reason: UpToDate + status: "True" + type: Ready + creationTime: "1970-01-01T00:00:00Z" + etag: abcdef123456 + lastModifiedTime: "1970-01-01T00:00:00Z" + observedGeneration: 3 + selfLink: https://bigquery.googleapis.com/bigquery/v2/projects/${projectId}/datasets/bigquerydatasetsample${uniqueId} diff --git a/pkg/test/resourcefixture/testdata/containerannotations/projectid/_http.log b/pkg/test/resourcefixture/testdata/containerannotations/projectid/_http.log new file mode 100644 index 0000000000..e955a3353f --- /dev/null +++ b/pkg/test/resourcefixture/testdata/containerannotations/projectid/_http.log @@ -0,0 +1,307 @@ +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 + +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": "Not found: Dataset ${projectId}:bigquerydatasetsample${uniqueId}", + "reason": "notFound" + } + ], + "message": "Not found: Dataset ${projectId}:bigquerydatasetsample${uniqueId}", + "status": "NOT_FOUND" + } +} + +--- + +POST https://bigquery.googleapis.com/bigquery/v2/projects/${projectId}/datasets?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 + +{ + "datasetReference": { + "datasetId": "bigquerydatasetsample${uniqueId}" + }, + "friendlyName": "bigquerydataset-sample", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "location": "US" +} + +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/${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 + +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/${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 + +{ + "access": [ + { + "role": "OWNER", + "userByEmail": "user@google.com" + }, + { + "role": "READER", + "specialGroup": "projectReaders" + }, + { + "role": "OWNER", + "specialGroup": "projectOwners" + }, + { + "role": "WRITER", + "specialGroup": "projectWriters" + } + ], + "datasetReference": { + "datasetId": "bigquerydatasetsample${uniqueId}" + }, + "friendlyName": "bigquerydataset-sample-updated", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "location": "US" +} + +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/${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 + +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" +} + +--- + +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 + +204 No Content +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 \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/directives/forcedestroy/_generated_object_forcedestroy.golden.yaml b/pkg/test/resourcefixture/testdata/directives/forcedestroy/_generated_object_forcedestroy.golden.yaml index cdb550c232..95c36f1e72 100644 --- a/pkg/test/resourcefixture/testdata/directives/forcedestroy/_generated_object_forcedestroy.golden.yaml +++ b/pkg/test/resourcefixture/testdata/directives/forcedestroy/_generated_object_forcedestroy.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: storage.cnrm.cloud.google.com/v1beta1 kind: StorageBucket metadata: @@ -23,7 +9,7 @@ metadata: finalizers: - cnrm.cloud.google.com/finalizer - cnrm.cloud.google.com/deletion-defender - generation: 4 + generation: 3 labels: cnrm-test: "true" label-one: value-one @@ -32,7 +18,9 @@ metadata: namespace: ${uniqueId} spec: location: US + publicAccessPrevention: inherited resourceID: storagebucket-sample-${uniqueId} + storageClass: STANDARD versioning: enabled: true status: @@ -42,4 +30,6 @@ status: reason: UpToDate status: "True" type: Ready - observedGeneration: 4 + observedGeneration: 3 + selfLink: https://www.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId} + url: gs://storagebucket-sample-${uniqueId} diff --git a/pkg/test/resourcefixture/testdata/directives/forcedestroy/_http.log b/pkg/test/resourcefixture/testdata/directives/forcedestroy/_http.log new file mode 100644 index 0000000000..f37ff42d35 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/directives/forcedestroy/_http.log @@ -0,0 +1,374 @@ +GET https://storage.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}?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 + +404 Not Found +Cache-Control: no-cache, no-store, max-age=0, must-revalidate +Content-Type: application/json; charset=UTF-8 +Expires: Mon, 01 Jan 1990 00:00:00 GMT +Pragma: no-cache +Server: UploadServer +Vary: Origin +Vary: X-Origin + +{ + "error": { + "code": 404, + "errors": [ + { + "domain": "global", + "message": "The specified bucket does not exist.", + "reason": "notFound" + } + ], + "message": "The specified bucket does not exist." + } +} + +--- + +POST https://storage.googleapis.com/storage/v1/b?alt=json&prettyPrint=false&project=${projectId} +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 + +{ + "iamConfiguration": { + "uniformBucketLevelAccess": { + "enabled": false + } + }, + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "lifecycle": { + "rule": [] + }, + "location": "US", + "name": "storagebucket-sample-${uniqueId}", + "storageClass": "STANDARD", + "versioning": { + "enabled": false + } +} + +200 OK +Cache-Control: no-cache, no-store, max-age=0, must-revalidate +Content-Type: application/json; charset=UTF-8 +Expires: Mon, 01 Jan 1990 00:00:00 GMT +Pragma: no-cache +Server: UploadServer +Vary: Origin +Vary: X-Origin + +{ + "etag": "abcdef0123A=", + "iamConfiguration": { + "bucketPolicyOnly": { + "enabled": false + }, + "publicAccessPrevention": "inherited", + "uniformBucketLevelAccess": { + "enabled": false + } + }, + "id": "000000000000000000000", + "kind": "storage#bucket", + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "lifecycle": {}, + "location": "US", + "locationType": "multi-region", + "metageneration": "1", + "name": "storagebucket-sample-${uniqueId}", + "projectNumber": "${projectNumber}", + "rpo": "DEFAULT", + "selfLink": "https://www.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}", + "softDeletePolicy": { + "effectiveTime": "2024-04-01T12:34:56.123456Z", + "retentionDurationSeconds": "604800" + }, + "storageClass": "STANDARD", + "timeCreated": "2024-04-01T12:34:56.123456Z", + "updated": "2024-04-01T12:34:56.123456Z", + "versioning": { + "enabled": false + } +} + +--- + +GET https://storage.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}?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, max-age=0, must-revalidate, no-transform +Content-Type: application/json; charset=UTF-8 +Expires: {now+0m} +Server: UploadServer +Vary: Origin +Vary: X-Origin + +{ + "etag": "abcdef0123A=", + "iamConfiguration": { + "bucketPolicyOnly": { + "enabled": false + }, + "publicAccessPrevention": "inherited", + "uniformBucketLevelAccess": { + "enabled": false + } + }, + "id": "000000000000000000000", + "kind": "storage#bucket", + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "lifecycle": {}, + "location": "US", + "locationType": "multi-region", + "metageneration": "1", + "name": "storagebucket-sample-${uniqueId}", + "projectNumber": "${projectNumber}", + "rpo": "DEFAULT", + "selfLink": "https://www.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}", + "softDeletePolicy": { + "effectiveTime": "2024-04-01T12:34:56.123456Z", + "retentionDurationSeconds": "604800" + }, + "storageClass": "STANDARD", + "timeCreated": "2024-04-01T12:34:56.123456Z", + "updated": "2024-04-01T12:34:56.123456Z", + "versioning": { + "enabled": false + } +} + +--- + +PATCH https://storage.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}?alt=json&prettyPrint=false +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 + +{ + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true", + "newkey": "newval" + }, + "versioning": { + "enabled": true + } +} + +200 OK +Cache-Control: no-cache, no-store, max-age=0, must-revalidate +Content-Type: application/json; charset=UTF-8 +Expires: Mon, 01 Jan 1990 00:00:00 GMT +Pragma: no-cache +Server: UploadServer +Vary: Origin +Vary: X-Origin + +{ + "acl": [ + { + "bucket": "storagebucket-sample-${uniqueId}", + "entity": "project-owners-${projectNumber}", + "etag": "abcdef0123A", + "id": "storagebucket-sample-${uniqueId}/project-owners-${projectNumber}", + "kind": "storage#bucketAccessControl", + "projectTeam": { + "projectNumber": "${projectNumber}", + "team": "owners" + }, + "role": "OWNER", + "selfLink": "https://www.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}/acl/project-owners-${projectNumber}" + }, + { + "bucket": "storagebucket-sample-${uniqueId}", + "entity": "project-editors-${projectNumber}", + "etag": "abcdef0123A", + "id": "storagebucket-sample-${uniqueId}/project-editors-${projectNumber}", + "kind": "storage#bucketAccessControl", + "projectTeam": { + "projectNumber": "${projectNumber}", + "team": "editors" + }, + "role": "OWNER", + "selfLink": "https://www.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}/acl/project-editors-${projectNumber}" + }, + { + "bucket": "storagebucket-sample-${uniqueId}", + "entity": "project-viewers-${projectNumber}", + "etag": "abcdef0123A", + "id": "storagebucket-sample-${uniqueId}/project-viewers-${projectNumber}", + "kind": "storage#bucketAccessControl", + "projectTeam": { + "projectNumber": "${projectNumber}", + "team": "viewers" + }, + "role": "READER", + "selfLink": "https://www.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}/acl/project-viewers-${projectNumber}" + } + ], + "defaultObjectAcl": [ + { + "entity": "project-owners-${projectNumber}", + "etag": "abcdef0123A=", + "kind": "storage#objectAccessControl", + "projectTeam": { + "projectNumber": "${projectNumber}", + "team": "owners" + }, + "role": "OWNER" + }, + { + "entity": "project-editors-${projectNumber}", + "etag": "abcdef0123A=", + "kind": "storage#objectAccessControl", + "projectTeam": { + "projectNumber": "${projectNumber}", + "team": "editors" + }, + "role": "OWNER" + }, + { + "entity": "project-viewers-${projectNumber}", + "etag": "abcdef0123A=", + "kind": "storage#objectAccessControl", + "projectTeam": { + "projectNumber": "${projectNumber}", + "team": "viewers" + }, + "role": "READER" + } + ], + "etag": "abcdef0123A=", + "iamConfiguration": { + "bucketPolicyOnly": { + "enabled": false + }, + "publicAccessPrevention": "inherited", + "uniformBucketLevelAccess": { + "enabled": false + } + }, + "id": "000000000000000000000", + "kind": "storage#bucket", + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true", + "newkey": "newval" + }, + "location": "US", + "locationType": "multi-region", + "metageneration": "2", + "name": "storagebucket-sample-${uniqueId}", + "owner": { + "entity": "project-owners-${projectNumber}" + }, + "projectNumber": "${projectNumber}", + "rpo": "DEFAULT", + "selfLink": "https://www.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}", + "softDeletePolicy": { + "effectiveTime": "2024-04-01T12:34:56.123456Z", + "retentionDurationSeconds": "604800" + }, + "storageClass": "STANDARD", + "timeCreated": "2024-04-01T12:34:56.123456Z", + "updated": "2024-04-01T12:34:56.123456Z", + "versioning": { + "enabled": true + } +} + +--- + +GET https://storage.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}?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, max-age=0, must-revalidate, no-transform +Content-Type: application/json; charset=UTF-8 +Expires: {now+0m} +Server: UploadServer +Vary: Origin +Vary: X-Origin + +{ + "etag": "abcdef0123A=", + "iamConfiguration": { + "bucketPolicyOnly": { + "enabled": false + }, + "publicAccessPrevention": "inherited", + "uniformBucketLevelAccess": { + "enabled": false + } + }, + "id": "000000000000000000000", + "kind": "storage#bucket", + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true", + "newkey": "newval" + }, + "location": "US", + "locationType": "multi-region", + "metageneration": "2", + "name": "storagebucket-sample-${uniqueId}", + "projectNumber": "${projectNumber}", + "rpo": "DEFAULT", + "selfLink": "https://www.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}", + "softDeletePolicy": { + "effectiveTime": "2024-04-01T12:34:56.123456Z", + "retentionDurationSeconds": "604800" + }, + "storageClass": "STANDARD", + "timeCreated": "2024-04-01T12:34:56.123456Z", + "updated": "2024-04-01T12:34:56.123456Z", + "versioning": { + "enabled": true + } +} + +--- + +GET https://storage.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}/o?alt=json&prettyPrint=false&versions=true +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, max-age=0, must-revalidate, no-transform +Content-Type: application/json; charset=UTF-8 +Expires: {now+0m} +Server: UploadServer +Vary: Origin +Vary: X-Origin + +{ + "kind": "storage#objects" +} + +--- + +DELETE https://storage.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}?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 + +204 No Content +Cache-Control: no-cache, no-store, max-age=0, must-revalidate +Content-Type: application/json +Expires: Mon, 01 Jan 1990 00:00:00 GMT +Pragma: no-cache +Server: UploadServer +Vary: Origin +Vary: X-Origin \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/directives/removedefaultnodepool/_generated_object_removedefaultnodepool.golden.yaml b/pkg/test/resourcefixture/testdata/directives/removedefaultnodepool/_generated_object_removedefaultnodepool.golden.yaml new file mode 100644 index 0000000000..f3ad327227 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/directives/removedefaultnodepool/_generated_object_removedefaultnodepool.golden.yaml @@ -0,0 +1,86 @@ +apiVersion: container.cnrm.cloud.google.com/v1beta1 +kind: ContainerCluster +metadata: + annotations: + cnrm.cloud.google.com/management-conflict-prevention-policy: none + cnrm.cloud.google.com/mutable-but-unreadable-fields: '{}' + cnrm.cloud.google.com/observed-secret-versions: (removed) + cnrm.cloud.google.com/project-id: ${projectId} + cnrm.cloud.google.com/remove-default-node-pool: "true" + 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: cluster-sample-${uniqueId} + namespace: ${uniqueId} +spec: + addonsConfig: + gcePersistentDiskCsiDriverConfig: + enabled: true + networkPolicyConfig: + disabled: true + clusterAutoscaling: + autoscalingProfile: BALANCED + clusterTelemetry: + type: ENABLED + databaseEncryption: + state: DECRYPTED + enableShieldedNodes: true + initialNodeCount: 1 + location: us-central1-a + loggingConfig: + enableComponents: + - SYSTEM_COMPONENTS + - WORKLOADS + loggingService: none + monitoringConfig: + advancedDatapathObservabilityConfig: + - enableMetrics: false + enableComponents: + - SYSTEM_COMPONENTS + managedPrometheus: + enabled: true + monitoringService: none + networkPolicy: + enabled: false + networkRef: + external: projects/${projectId}/global/networks/default + networkingMode: ROUTES + nodeConfig: + loggingVariant: DEFAULT + oauthScopes: + - https://www.googleapis.com/auth/trace.append + - https://www.googleapis.com/auth/devstorage.read_only + - https://www.googleapis.com/auth/logging.write + - https://www.googleapis.com/auth/monitoring + - https://www.googleapis.com/auth/service.management.readonly + - https://www.googleapis.com/auth/servicecontrol + nodeLocations: + - us-central1-a + nodeVersion: "" + notificationConfig: + pubsub: + enabled: false + podSecurityPolicyConfig: + enabled: false + releaseChannel: + channel: REGULAR + resourceID: cluster-sample-${uniqueId} + securityPostureConfig: + mode: BASIC + vulnerabilityMode: VULNERABILITY_MODE_UNSPECIFIED + subnetworkRef: + external: projects/${projectId}/regions/us-central1-a/subnetworks/default +status: + conditions: + - lastTransitionTime: "1970-01-01T00:00:00Z" + message: The resource is up to date + reason: UpToDate + status: "True" + type: Ready + observedGeneration: 3 + selfLink: https://container.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1-a/clusters/cluster-sample-${uniqueId} diff --git a/pkg/test/resourcefixture/testdata/directives/removedefaultnodepool/_http.log b/pkg/test/resourcefixture/testdata/directives/removedefaultnodepool/_http.log new file mode 100644 index 0000000000..e5ac229f3f --- /dev/null +++ b/pkg/test/resourcefixture/testdata/directives/removedefaultnodepool/_http.log @@ -0,0 +1,517 @@ +GET https://container.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1-a/clusters/cluster-sample-${uniqueId}?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 + +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": "cluster \"projects/${projectId}/locations/us-central1-a/clusters/cluster-sample-${uniqueId}\" not found", + "reason": "notFound" + } + ], + "message": "cluster \"projects/${projectId}/locations/us-central1-a/clusters/cluster-sample-${uniqueId}\" not found", + "status": "NOT_FOUND" + } +} + +--- + +POST https://container.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1-a/clusters?alt=json&prettyPrint=false +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 + +{ + "cluster": { + "autopilot": { + "enabled": false + }, + "autoscaling": { + "enableNodeAutoprovisioning": false + }, + "binaryAuthorization": { + "enabled": false + }, + "initialNodeCount": 1, + "ipAllocationPolicy": { + "stackType": "IPV4", + "useIpAliases": false + }, + "legacyAbac": { + "enabled": false + }, + "loggingService": "logging.googleapis.com/kubernetes", + "maintenancePolicy": { + "window": {} + }, + "masterAuthorizedNetworksConfig": {}, + "monitoringService": "monitoring.googleapis.com/kubernetes", + "name": "cluster-sample-${uniqueId}", + "network": "projects/${projectId}/global/networks/default", + "networkConfig": {}, + "networkPolicy": {}, + "nodeConfig": { + "oauthScopes": [ + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/logging.write", + "https://www.googleapis.com/auth/monitoring", + "https://www.googleapis.com/auth/service.management.readonly", + "https://www.googleapis.com/auth/servicecontrol", + "https://www.googleapis.com/auth/trace.append" + ] + }, + "notificationConfig": { + "pubsub": {} + }, + "resourceLabels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "shieldedNodes": { + "enabled": 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 + +{ + "name": "${operationID}", + "operationType": "CREATE_CLUSTER", + "selfLink": "https://container.googleapis.com/v1beta1/projects/${projectNumber}/locations/us-central1-a/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetLink": "https://container.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1-a/clusters/cluster-sample-${uniqueId}", + "zone": "us-central1-a" +} + +--- + +DELETE https://container.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1-a/clusters/cluster-sample-${uniqueId}/nodePools/default-pool?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 + +{ + "name": "${operationID}", + "operationType": "DELETE_NODE_POOL", + "selfLink": "https://container.googleapis.com/v1beta1/projects/${projectNumber}/locations/us-central1-a/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "zone": "us-central1-a" +} + +--- + +GET https://container.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1-a/clusters/cluster-sample-${uniqueId}?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 + +{ + "addonsConfig": { + "gcePersistentDiskCsiDriverConfig": { + "enabled": true + }, + "kubernetesDashboard": { + "disabled": true + }, + "networkPolicyConfig": { + "disabled": true + } + }, + "autopilot": {}, + "autoscaling": { + "autoscalingProfile": "BALANCED" + }, + "binaryAuthorization": {}, + "clusterTelemetry": { + "type": "ENABLED" + }, + "createTime": "2024-04-01T12:34:56.123456Z", + "databaseEncryption": { + "state": "DECRYPTED" + }, + "enterpriseConfig": { + "clusterTier": "STANDARD" + }, + "initialNodeCount": 1, + "ipAllocationPolicy": { + "stackType": "IPV4" + }, + "legacyAbac": {}, + "location": "us-central1-a", + "locations": [ + "us-central1-a" + ], + "loggingConfig": { + "componentConfig": { + "enableComponents": [ + "SYSTEM_COMPONENTS", + "WORKLOADS" + ] + } + }, + "loggingService": "logging.googleapis.com/kubernetes", + "maintenancePolicy": { + "window": {} + }, + "masterAuthorizedNetworksConfig": {}, + "monitoringConfig": { + "advancedDatapathObservabilityConfig": {}, + "componentConfig": { + "enableComponents": [ + "SYSTEM_COMPONENTS" + ] + }, + "managedPrometheusConfig": { + "enabled": true + } + }, + "monitoringService": "monitoring.googleapis.com/kubernetes", + "name": "cluster-sample-${uniqueId}", + "network": "projects/${projectId}/global/networks/default", + "networkConfig": { + "network": "projects/${projectId}/global/networks/default", + "subnetwork": "projects/${projectId}/regions/us-central1-a/subnetworks/default" + }, + "networkPolicy": {}, + "nodeConfig": { + "oauthScopes": [ + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/logging.write", + "https://www.googleapis.com/auth/monitoring", + "https://www.googleapis.com/auth/service.management.readonly", + "https://www.googleapis.com/auth/servicecontrol", + "https://www.googleapis.com/auth/trace.append" + ] + }, + "nodePools": [ + { + "config": { + "diskSizeGb": 100, + "diskType": "pd-balanced", + "imageType": "COS_CONTAINERD", + "machineType": "e2-standard-4", + "metadata": { + "disable-legacy-endpoints": "true" + }, + "oauthScopes": [ + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/logging.write", + "https://www.googleapis.com/auth/monitoring", + "https://www.googleapis.com/auth/service.management.readonly", + "https://www.googleapis.com/auth/servicecontrol", + "https://www.googleapis.com/auth/trace.append" + ], + "serviceAccount": "default", + "shieldedInstanceConfig": { + "enableIntegrityMonitoring": true + }, + "windowsNodeConfig": {} + }, + "initialNodeCount": 1, + "locations": [ + "us-central1-a" + ], + "management": { + "autoRepair": true, + "autoUpgrade": true + }, + "maxPodsConstraint": { + "maxPodsPerNode": "110" + }, + "name": "default-pool", + "networkConfig": { + "enablePrivateNodes": false + }, + "status": "RUNNING", + "upgradeSettings": { + "maxSurge": 1, + "strategy": "SURGE" + } + } + ], + "notificationConfig": { + "pubsub": {} + }, + "releaseChannel": { + "channel": "REGULAR" + }, + "resourceLabels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "securityPostureConfig": { + "mode": "BASIC", + "vulnerabilityMode": "VULNERABILITY_MODE_UNSPECIFIED" + }, + "selfLink": "https://container.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1-a/clusters/cluster-sample-${uniqueId}", + "shieldedNodes": { + "enabled": true + }, + "status": "RUNNING" +} + +--- + +PUT https://container.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1-a/clusters/cluster-sample-${uniqueId}?alt=json&prettyPrint=false +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 + +{ + "update": { + "desiredLoggingService": "none", + "desiredMonitoringService": "none" + } +} + +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": "${operationID}", + "operationType": "UPDATE_CLUSTER", + "selfLink": "https://container.googleapis.com/v1beta1/projects/${projectNumber}/locations/us-central1-a/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetLink": "https://container.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1-a/clusters/cluster-sample-${uniqueId}", + "zone": "us-central1-a" +} + +--- + +GET https://container.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1-a/clusters/cluster-sample-${uniqueId}?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 + +{ + "addonsConfig": { + "gcePersistentDiskCsiDriverConfig": { + "enabled": true + }, + "kubernetesDashboard": { + "disabled": true + }, + "networkPolicyConfig": { + "disabled": true + } + }, + "autopilot": {}, + "autoscaling": { + "autoscalingProfile": "BALANCED" + }, + "binaryAuthorization": {}, + "clusterTelemetry": { + "type": "ENABLED" + }, + "createTime": "2024-04-01T12:34:56.123456Z", + "databaseEncryption": { + "state": "DECRYPTED" + }, + "enterpriseConfig": { + "clusterTier": "STANDARD" + }, + "initialNodeCount": 1, + "ipAllocationPolicy": { + "stackType": "IPV4" + }, + "legacyAbac": {}, + "location": "us-central1-a", + "locations": [ + "us-central1-a" + ], + "loggingConfig": { + "componentConfig": { + "enableComponents": [ + "SYSTEM_COMPONENTS", + "WORKLOADS" + ] + } + }, + "loggingService": "none", + "maintenancePolicy": { + "window": {} + }, + "masterAuthorizedNetworksConfig": {}, + "monitoringConfig": { + "advancedDatapathObservabilityConfig": {}, + "componentConfig": { + "enableComponents": [ + "SYSTEM_COMPONENTS" + ] + }, + "managedPrometheusConfig": { + "enabled": true + } + }, + "monitoringService": "none", + "name": "cluster-sample-${uniqueId}", + "network": "projects/${projectId}/global/networks/default", + "networkConfig": { + "network": "projects/${projectId}/global/networks/default", + "subnetwork": "projects/${projectId}/regions/us-central1-a/subnetworks/default" + }, + "networkPolicy": {}, + "nodeConfig": { + "oauthScopes": [ + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/logging.write", + "https://www.googleapis.com/auth/monitoring", + "https://www.googleapis.com/auth/service.management.readonly", + "https://www.googleapis.com/auth/servicecontrol", + "https://www.googleapis.com/auth/trace.append" + ] + }, + "nodePools": [ + { + "config": { + "diskSizeGb": 100, + "diskType": "pd-balanced", + "imageType": "COS_CONTAINERD", + "machineType": "e2-standard-4", + "metadata": { + "disable-legacy-endpoints": "true" + }, + "oauthScopes": [ + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/logging.write", + "https://www.googleapis.com/auth/monitoring", + "https://www.googleapis.com/auth/service.management.readonly", + "https://www.googleapis.com/auth/servicecontrol", + "https://www.googleapis.com/auth/trace.append" + ], + "serviceAccount": "default", + "shieldedInstanceConfig": { + "enableIntegrityMonitoring": true + }, + "windowsNodeConfig": {} + }, + "initialNodeCount": 1, + "locations": [ + "us-central1-a" + ], + "management": { + "autoRepair": true, + "autoUpgrade": true + }, + "maxPodsConstraint": { + "maxPodsPerNode": "110" + }, + "name": "default-pool", + "networkConfig": { + "enablePrivateNodes": false + }, + "status": "RUNNING", + "upgradeSettings": { + "maxSurge": 1, + "strategy": "SURGE" + } + } + ], + "notificationConfig": { + "pubsub": {} + }, + "releaseChannel": { + "channel": "REGULAR" + }, + "resourceLabels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "securityPostureConfig": { + "mode": "BASIC", + "vulnerabilityMode": "VULNERABILITY_MODE_UNSPECIFIED" + }, + "selfLink": "https://container.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1-a/clusters/cluster-sample-${uniqueId}", + "shieldedNodes": { + "enabled": true + }, + "status": "RUNNING" +} + +--- + +DELETE https://container.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1-a/clusters/cluster-sample-${uniqueId}?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 + +{ + "name": "${operationID}", + "operationType": "DELETE_CLUSTER", + "selfLink": "https://container.googleapis.com/v1beta1/projects/${projectNumber}/locations/us-central1-a/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetLink": "https://container.googleapis.com/v1beta1/projects/${projectId}/locations/us-central1-a/clusters/cluster-sample-${uniqueId}", + "zone": "us-central1-a" +} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/iamexternalonlyref/billingaccountiampolicy/_http.log b/pkg/test/resourcefixture/testdata/iamexternalonlyref/billingaccountiampolicy/_http.log new file mode 100644 index 0000000000..412d9a7357 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/iamexternalonlyref/billingaccountiampolicy/_http.log @@ -0,0 +1,70 @@ +GET https://cloudbilling.googleapis.com/v1/billingAccounts/123456-777777-000002:getIamPolicy?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 + + + +{ + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://cloudbilling.googleapis.com/v1/billingAccounts/123456-777777-000002:setIamPolicy?alt=json&prettyPrint=false +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 + +{ + "policy": { + "bindings": [ + { + "members": [ + "group:kcc-eng@google.com", + "serviceAccount:cnrm-eap-prow@cnrm-eap.iam.gserviceaccount.com", + "user:john@configconnector.joonix.net" + ], + "role": "roles/billing.admin" + } + ], + "version": 3 + } +} + + + +{ + "bindings": [ + { + "members": [ + "group:kcc-eng@google.com", + "serviceAccount:cnrm-eap-prow@cnrm-eap.iam.gserviceaccount.com", + "user:john@configconnector.joonix.net" + ], + "role": "roles/billing.admin" + } + ], + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +GET https://cloudbilling.googleapis.com/v1/billingAccounts/123456-777777-000002:getIamPolicy?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 + + + +{ + "bindings": [ + { + "members": [ + "group:kcc-eng@google.com", + "serviceAccount:cnrm-eap-prow@cnrm-eap.iam.gserviceaccount.com", + "user:john@configconnector.joonix.net" + ], + "role": "roles/billing.admin" + } + ], + "etag": "abcdef0123A=", + "version": 3 +} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/iamexternalonlyref/billingaccountiampolicymember/_http.log b/pkg/test/resourcefixture/testdata/iamexternalonlyref/billingaccountiampolicymember/_http.log new file mode 100644 index 0000000000..798553fc2b --- /dev/null +++ b/pkg/test/resourcefixture/testdata/iamexternalonlyref/billingaccountiampolicymember/_http.log @@ -0,0 +1,227 @@ +GET https://iam.googleapis.com/v1/projects/${projectId}/serviceAccounts/extonly-${uniqueId}@${projectId}.iam.gserviceaccount.com?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 + +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": "Unknown service account", + "reason": "notFound" + } + ], + "message": "Unknown service account", + "status": "NOT_FOUND" + } +} + +--- + +POST https://iam.googleapis.com/v1/projects/${projectId}/serviceAccounts?alt=json&prettyPrint=false +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 + +{ + "accountId": "extonly-${uniqueId}", + "serviceAccount": {} +} + +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 + +{ + "email": "extonly-${uniqueId}@${projectId}.iam.gserviceaccount.com", + "etag": "abcdef0123A=", + "name": "projects/${projectId}/serviceAccounts/extonly-${uniqueId}@${projectId}.iam.gserviceaccount.com", + "oauth2ClientId": "888888888888888888888", + "projectId": "${projectId}", + "uniqueId": "111111111111111111111" +} + +--- + +GET https://iam.googleapis.com/v1/projects/${projectId}/serviceAccounts/extonly-${uniqueId}@${projectId}.iam.gserviceaccount.com?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 + +{ + "email": "extonly-${uniqueId}@${projectId}.iam.gserviceaccount.com", + "etag": "abcdef0123A=", + "name": "projects/${projectId}/serviceAccounts/extonly-${uniqueId}@${projectId}.iam.gserviceaccount.com", + "oauth2ClientId": "888888888888888888888", + "projectId": "${projectId}", + "uniqueId": "111111111111111111111" +} + +--- + +GET https://cloudbilling.googleapis.com/v1/billingAccounts/123456-777777-000001:getIamPolicy?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 + + + +{ + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://cloudbilling.googleapis.com/v1/billingAccounts/123456-777777-000001:setIamPolicy?alt=json&prettyPrint=false +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 + +{ + "policy": { + "bindings": [ + { + "members": [ + "serviceAccount:extonly-${uniqueId}@${projectId}.iam.gserviceaccount.com" + ], + "role": "roles/billing.viewer" + } + ], + "etag": "abcdef0123A=", + "version": 3 + } +} + + + +{ + "bindings": [ + { + "members": [ + "serviceAccount:extonly-${uniqueId}@${projectId}.iam.gserviceaccount.com" + ], + "role": "roles/billing.viewer" + } + ], + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +GET https://cloudbilling.googleapis.com/v1/billingAccounts/123456-777777-000001:getIamPolicy?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 + + + +{ + "bindings": [ + { + "members": [ + "serviceAccount:extonly-${uniqueId}@${projectId}.iam.gserviceaccount.com" + ], + "role": "roles/billing.viewer" + } + ], + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://cloudbilling.googleapis.com/v1/billingAccounts/123456-777777-000001:setIamPolicy?alt=json&prettyPrint=false +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 + +{ + "policy": { + "etag": "abcdef0123A=", + "version": 3 + } +} + + + +{ + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +GET https://cloudbilling.googleapis.com/v1/billingAccounts/123456-777777-000001:getIamPolicy?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 + + + +{ + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +GET https://iam.googleapis.com/v1/projects/${projectId}/serviceAccounts/extonly-${uniqueId}@${projectId}.iam.gserviceaccount.com?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 + +{ + "email": "extonly-${uniqueId}@${projectId}.iam.gserviceaccount.com", + "etag": "abcdef0123A=", + "name": "projects/${projectId}/serviceAccounts/extonly-${uniqueId}@${projectId}.iam.gserviceaccount.com", + "oauth2ClientId": "888888888888888888888", + "projectId": "${projectId}", + "uniqueId": "111111111111111111111" +} + +--- + +DELETE https://iam.googleapis.com/v1/projects/${projectId}/serviceAccounts/extonly-${uniqueId}@${projectId}.iam.gserviceaccount.com?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 + +{} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/iamexternalonlyref/organizationiampolicy/_http.log b/pkg/test/resourcefixture/testdata/iamexternalonlyref/organizationiampolicy/_http.log new file mode 100644 index 0000000000..0f0b316f06 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/iamexternalonlyref/organizationiampolicy/_http.log @@ -0,0 +1,143 @@ +POST https://cloudresourcemanager.googleapis.com/v1/organizations/123450002:getIamPolicy?alt=json&prettyPrint=false +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 + +{ + "options": { + "requestedPolicyVersion": 3 + } +} + + + +{ + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/organizations/123450002:getIamPolicy?alt=json&prettyPrint=false +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 + +{ + "options": { + "requestedPolicyVersion": 3 + } +} + + + +{ + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/organizations/123450002:setIamPolicy?alt=json&prettyPrint=false +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 + +{ + "policy": { + "bindings": [ + { + "members": [ + "domain:configconnector.joonix.net", + "group:kcc-eng@google.com" + ], + "role": "roles/billing.creator" + }, + { + "members": [ + "group:kcc-eng@google.com", + "serviceAccount:cnrm-eap-prow@cnrm-eap.iam.gserviceaccount.com", + "user:john@configconnector.joonix.net" + ], + "role": "roles/resourcemanager.organizationAdmin" + }, + { + "members": [ + "domain:configconnector.joonix.net" + ], + "role": "roles/resourcemanager.projectCreator" + } + ], + "version": 3 + }, + "updateMask": "bindings,etag,auditConfigs" +} + + + +{ + "bindings": [ + { + "members": [ + "domain:configconnector.joonix.net", + "group:kcc-eng@google.com" + ], + "role": "roles/billing.creator" + }, + { + "members": [ + "group:kcc-eng@google.com", + "serviceAccount:cnrm-eap-prow@cnrm-eap.iam.gserviceaccount.com", + "user:john@configconnector.joonix.net" + ], + "role": "roles/resourcemanager.organizationAdmin" + }, + { + "members": [ + "domain:configconnector.joonix.net" + ], + "role": "roles/resourcemanager.projectCreator" + } + ], + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/organizations/123450002:getIamPolicy?alt=json&prettyPrint=false +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 + +{ + "options": { + "requestedPolicyVersion": 3 + } +} + + + +{ + "bindings": [ + { + "members": [ + "domain:configconnector.joonix.net", + "group:kcc-eng@google.com" + ], + "role": "roles/billing.creator" + }, + { + "members": [ + "group:kcc-eng@google.com", + "serviceAccount:cnrm-eap-prow@cnrm-eap.iam.gserviceaccount.com", + "user:john@configconnector.joonix.net" + ], + "role": "roles/resourcemanager.organizationAdmin" + }, + { + "members": [ + "domain:configconnector.joonix.net" + ], + "role": "roles/resourcemanager.projectCreator" + } + ], + "etag": "abcdef0123A=", + "version": 3 +} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/iamexternalonlyref/organizationiampolicymember/_http.log b/pkg/test/resourcefixture/testdata/iamexternalonlyref/organizationiampolicymember/_http.log new file mode 100644 index 0000000000..d2acd55a83 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/iamexternalonlyref/organizationiampolicymember/_http.log @@ -0,0 +1,480 @@ +GET https://iam.googleapis.com/v1/projects/${projectId}/serviceAccounts/extonly-${uniqueId}@${projectId}.iam.gserviceaccount.com?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 + +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": "Unknown service account", + "reason": "notFound" + } + ], + "message": "Unknown service account", + "status": "NOT_FOUND" + } +} + +--- + +POST https://iam.googleapis.com/v1/projects/${projectId}/serviceAccounts?alt=json&prettyPrint=false +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 + +{ + "accountId": "extonly-${uniqueId}", + "serviceAccount": {} +} + +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 + +{ + "email": "extonly-${uniqueId}@${projectId}.iam.gserviceaccount.com", + "etag": "abcdef0123A=", + "name": "projects/${projectId}/serviceAccounts/extonly-${uniqueId}@${projectId}.iam.gserviceaccount.com", + "oauth2ClientId": "888888888888888888888", + "projectId": "${projectId}", + "uniqueId": "111111111111111111111" +} + +--- + +GET https://iam.googleapis.com/v1/projects/${projectId}/serviceAccounts/extonly-${uniqueId}@${projectId}.iam.gserviceaccount.com?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 + +{ + "email": "extonly-${uniqueId}@${projectId}.iam.gserviceaccount.com", + "etag": "abcdef0123A=", + "name": "projects/${projectId}/serviceAccounts/extonly-${uniqueId}@${projectId}.iam.gserviceaccount.com", + "oauth2ClientId": "888888888888888888888", + "projectId": "${projectId}", + "uniqueId": "111111111111111111111" +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/organizations/${organizationID}:getIamPolicy?alt=json&prettyPrint=false +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 + +{ + "options": { + "requestedPolicyVersion": 3 + } +} + + + +{ + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/organizations/${organizationID}:getIamPolicy?alt=json&prettyPrint=false +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 + +{ + "options": { + "requestedPolicyVersion": 3 + } +} + + + +{ + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/organizations/${organizationID}:getIamPolicy?alt=json&prettyPrint=false +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 + +{ + "options": { + "requestedPolicyVersion": 3 + } +} + + + +{ + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/organizations/${organizationID}:setIamPolicy?alt=json&prettyPrint=false +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 + +{ + "policy": { + "bindings": [ + { + "members": [ + "serviceAccount:extonly-${uniqueId}@${projectId}.iam.gserviceaccount.com" + ], + "role": "roles/pubsub.admin" + } + ], + "etag": "abcdef0123A=", + "version": 3 + }, + "updateMask": "bindings,etag,auditConfigs" +} + + + +{ + "bindings": [ + { + "members": [ + "serviceAccount:extonly-${uniqueId}@${projectId}.iam.gserviceaccount.com" + ], + "role": "roles/pubsub.admin" + } + ], + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/organizations/${organizationID}:getIamPolicy?alt=json&prettyPrint=false +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 + +{ + "options": { + "requestedPolicyVersion": 3 + } +} + + + +{ + "bindings": [ + { + "members": [ + "serviceAccount:extonly-${uniqueId}@${projectId}.iam.gserviceaccount.com" + ], + "role": "roles/pubsub.admin" + } + ], + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/organizations/${organizationID}:getIamPolicy?alt=json&prettyPrint=false +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 + +{ + "options": { + "requestedPolicyVersion": 3 + } +} + + + +{ + "bindings": [ + { + "members": [ + "serviceAccount:extonly-${uniqueId}@${projectId}.iam.gserviceaccount.com" + ], + "role": "roles/pubsub.admin" + } + ], + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/organizations/${organizationID}:getIamPolicy?alt=json&prettyPrint=false +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 + +{ + "options": { + "requestedPolicyVersion": 3 + } +} + + + +{ + "bindings": [ + { + "members": [ + "serviceAccount:extonly-${uniqueId}@${projectId}.iam.gserviceaccount.com" + ], + "role": "roles/pubsub.admin" + } + ], + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/organizations/${organizationID}:getIamPolicy?alt=json&prettyPrint=false +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 + +{ + "options": { + "requestedPolicyVersion": 3 + } +} + + + +{ + "bindings": [ + { + "members": [ + "serviceAccount:extonly-${uniqueId}@${projectId}.iam.gserviceaccount.com" + ], + "role": "roles/pubsub.admin" + } + ], + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/organizations/${organizationID}:getIamPolicy?alt=json&prettyPrint=false +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 + +{ + "options": { + "requestedPolicyVersion": 3 + } +} + + + +{ + "bindings": [ + { + "members": [ + "serviceAccount:extonly-${uniqueId}@${projectId}.iam.gserviceaccount.com" + ], + "role": "roles/pubsub.admin" + } + ], + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/organizations/${organizationID}:getIamPolicy?alt=json&prettyPrint=false +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 + +{ + "options": { + "requestedPolicyVersion": 3 + } +} + + + +{ + "bindings": [ + { + "members": [ + "serviceAccount:extonly-${uniqueId}@${projectId}.iam.gserviceaccount.com" + ], + "role": "roles/pubsub.admin" + } + ], + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/organizations/${organizationID}:setIamPolicy?alt=json&prettyPrint=false +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 + +{ + "policy": { + "etag": "abcdef0123A=", + "version": 3 + }, + "updateMask": "bindings,etag,auditConfigs" +} + + + +{ + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/organizations/${organizationID}:getIamPolicy?alt=json&prettyPrint=false +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 + +{ + "options": { + "requestedPolicyVersion": 3 + } +} + + + +{ + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/organizations/${organizationID}:getIamPolicy?alt=json&prettyPrint=false +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 + +{ + "options": { + "requestedPolicyVersion": 3 + } +} + + + +{ + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/organizations/${organizationID}:getIamPolicy?alt=json&prettyPrint=false +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 + +{ + "options": { + "requestedPolicyVersion": 3 + } +} + + + +{ + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/organizations/${organizationID}:getIamPolicy?alt=json&prettyPrint=false +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 + +{ + "options": { + "requestedPolicyVersion": 3 + } +} + + + +{ + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +GET https://iam.googleapis.com/v1/projects/${projectId}/serviceAccounts/extonly-${uniqueId}@${projectId}.iam.gserviceaccount.com?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 + +{ + "email": "extonly-${uniqueId}@${projectId}.iam.gserviceaccount.com", + "etag": "abcdef0123A=", + "name": "projects/${projectId}/serviceAccounts/extonly-${uniqueId}@${projectId}.iam.gserviceaccount.com", + "oauth2ClientId": "888888888888888888888", + "projectId": "${projectId}", + "uniqueId": "111111111111111111111" +} + +--- + +DELETE https://iam.googleapis.com/v1/projects/${projectId}/serviceAccounts/extonly-${uniqueId}@${projectId}.iam.gserviceaccount.com?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 + +{} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/iammemberreferences/serviceaccountref/_generated_object_serviceaccountref.golden.yaml b/pkg/test/resourcefixture/testdata/iammemberreferences/serviceaccountref/_generated_object_serviceaccountref.golden.yaml new file mode 100644 index 0000000000..72e358401e --- /dev/null +++ b/pkg/test/resourcefixture/testdata/iammemberreferences/serviceaccountref/_generated_object_serviceaccountref.golden.yaml @@ -0,0 +1,30 @@ +apiVersion: iam.cnrm.cloud.google.com/v1beta1 +kind: IAMPolicyMember +metadata: + annotations: + cnrm.cloud.google.com/state-into-spec: merge + finalizers: + - cnrm.cloud.google.com/finalizer + - cnrm.cloud.google.com/deletion-defender + generation: 1 + labels: + cnrm-test: "true" + name: iammemberref-${uniqueId} + namespace: ${uniqueId} +spec: + memberFrom: + serviceAccountRef: + name: gsa-${uniqueId} + resourceRef: + apiVersion: pubsub.cnrm.cloud.google.com/v1beta1 + kind: PubSubTopic + name: pubsubtopic-${uniqueId} + role: roles/editor +status: + conditions: + - lastTransitionTime: "1970-01-01T00:00:00Z" + message: The resource is up to date + reason: UpToDate + status: "True" + type: Ready + observedGeneration: 1 diff --git a/pkg/test/resourcefixture/testdata/iammemberreferences/serviceaccountref/_http.log b/pkg/test/resourcefixture/testdata/iammemberreferences/serviceaccountref/_http.log new file mode 100644 index 0000000000..162aaa4022 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/iammemberreferences/serviceaccountref/_http.log @@ -0,0 +1,356 @@ +GET https://iam.googleapis.com/v1/projects/${projectId}/serviceAccounts/gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com?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 + +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": "Unknown service account", + "reason": "notFound" + } + ], + "message": "Unknown service account", + "status": "NOT_FOUND" + } +} + +--- + +POST https://iam.googleapis.com/v1/projects/${projectId}/serviceAccounts?alt=json&prettyPrint=false +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 + +{ + "accountId": "gsa-${uniqueId}", + "serviceAccount": {} +} + +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 + +{ + "email": "gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com", + "etag": "abcdef0123A=", + "name": "projects/${projectId}/serviceAccounts/gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com", + "oauth2ClientId": "888888888888888888888", + "projectId": "${projectId}", + "uniqueId": "111111111111111111111" +} + +--- + +GET https://iam.googleapis.com/v1/projects/${projectId}/serviceAccounts/gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com?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 + +{ + "email": "gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com", + "etag": "abcdef0123A=", + "name": "projects/${projectId}/serviceAccounts/gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com", + "oauth2ClientId": "888888888888888888888", + "projectId": "${projectId}", + "uniqueId": "111111111111111111111" +} + +--- + +GET https://pubsub.googleapis.com/v1/projects/${projectId}/topics/pubsubtopic-${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, + "message": "Resource not found (resource=pubsubtopic-${uniqueId}).", + "status": "NOT_FOUND" + } +} + +--- + +PUT https://pubsub.googleapis.com/v1/projects/${projectId}/topics/pubsubtopic-${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 + +{ + "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 + +{ + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectId}/topics/pubsubtopic-${uniqueId}" +} + +--- + +GET https://pubsub.googleapis.com/v1/projects/${projectId}/topics/pubsubtopic-${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 + +{ + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectId}/topics/pubsubtopic-${uniqueId}" +} + +--- + +GET https://pubsub.googleapis.com/v1/projects/${projectId}/topics/pubsubtopic-${uniqueId}:getIamPolicy?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 + + + +{ + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://pubsub.googleapis.com/v1/projects/${projectId}/topics/pubsubtopic-${uniqueId}:setIamPolicy?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 + +{ + "policy": { + "bindings": [ + { + "members": [ + "serviceAccount:gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com" + ], + "role": "roles/editor" + } + ], + "etag": "abcdef0123A=", + "version": 3 + } +} + + + +{ + "bindings": [ + { + "members": [ + "serviceAccount:gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com" + ], + "role": "roles/editor" + } + ], + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +GET https://pubsub.googleapis.com/v1/projects/${projectId}/topics/pubsubtopic-${uniqueId}:getIamPolicy?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 + + + +{ + "bindings": [ + { + "members": [ + "serviceAccount:gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com" + ], + "role": "roles/editor" + } + ], + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://pubsub.googleapis.com/v1/projects/${projectId}/topics/pubsubtopic-${uniqueId}:setIamPolicy?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 + +{ + "policy": { + "etag": "abcdef0123A=", + "version": 3 + } +} + + + +{ + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +GET https://pubsub.googleapis.com/v1/projects/${projectId}/topics/pubsubtopic-${uniqueId}:getIamPolicy?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 + + + +{ + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +GET https://pubsub.googleapis.com/v1/projects/${projectId}/topics/pubsubtopic-${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 + +{ + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectId}/topics/pubsubtopic-${uniqueId}" +} + +--- + +DELETE https://pubsub.googleapis.com/v1/projects/${projectId}/topics/pubsubtopic-${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 + +{} + +--- + +GET https://iam.googleapis.com/v1/projects/${projectId}/serviceAccounts/gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com?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 + +{ + "email": "gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com", + "etag": "abcdef0123A=", + "name": "projects/${projectId}/serviceAccounts/gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com", + "oauth2ClientId": "888888888888888888888", + "projectId": "${projectId}", + "uniqueId": "111111111111111111111" +} + +--- + +DELETE https://iam.googleapis.com/v1/projects/${projectId}/serviceAccounts/gsa-${uniqueId}@${projectId}.iam.gserviceaccount.com?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 + +{} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/iammemberreferences/serviceidentityref/_generated_object_serviceidentityref.golden.yaml b/pkg/test/resourcefixture/testdata/iammemberreferences/serviceidentityref/_generated_object_serviceidentityref.golden.yaml new file mode 100644 index 0000000000..c6506cc3f0 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/iammemberreferences/serviceidentityref/_generated_object_serviceidentityref.golden.yaml @@ -0,0 +1,30 @@ +apiVersion: iam.cnrm.cloud.google.com/v1beta1 +kind: IAMPolicyMember +metadata: + annotations: + cnrm.cloud.google.com/state-into-spec: merge + finalizers: + - cnrm.cloud.google.com/finalizer + - cnrm.cloud.google.com/deletion-defender + generation: 1 + labels: + cnrm-test: "true" + name: iammemberref-${uniqueId} + namespace: ${uniqueId} +spec: + memberFrom: + serviceIdentityRef: + name: serviceidentity-${uniqueId} + resourceRef: + apiVersion: artifactregistry.cnrm.cloud.google.com/v1beta1 + kind: ArtifactRegistryRepository + name: artifactregistryrepository-${uniqueId} + role: roles/editor +status: + conditions: + - lastTransitionTime: "1970-01-01T00:00:00Z" + message: The resource is up to date + reason: UpToDate + status: "True" + type: Ready + observedGeneration: 1 diff --git a/pkg/test/resourcefixture/testdata/iammemberreferences/serviceidentityref/_http.log b/pkg/test/resourcefixture/testdata/iammemberreferences/serviceidentityref/_http.log new file mode 100644 index 0000000000..29b512887e --- /dev/null +++ b/pkg/test/resourcefixture/testdata/iammemberreferences/serviceidentityref/_http.log @@ -0,0 +1,233 @@ +POST https://serviceusage.googleapis.com/v1beta1/projects/${projectId}/services/pubsub.googleapis.com:generateServiceIdentity?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}", + "response": { + "@type": "type.googleapis.com/mockgcp.api.serviceusage.v1beta1.ServiceIdentity", + "email": "service-${projectNumber}@gcp-sa-pubsub.iam.gserviceaccount.com", + "uniqueId": "123456789002" + } +} + +--- + +GET https://artifactregistry.googleapis.com/v1/projects/${projectId}/locations/us-west1/repositories/artifactregistryrepository-${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": "repository \"projects/${projectId}/locations/us-west1/repositories/artifactregistryrepository-${uniqueId}\" not found" +} + +--- + +POST https://artifactregistry.googleapis.com/v1/projects/${projectId}/locations/us-west1/repositories?alt=json&repository_id=artifactregistryrepository-${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 + +{ + "format": "DOCKER", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "mode": "STANDARD_REPOSITORY" +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "done": true, + "metadata": null, + "name": "${operationID}" +} + +--- + +GET https://artifactregistry.googleapis.com/v1/projects/${projectId}/locations/us-west1/repositories/artifactregistryrepository-${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": "", + "format": "DOCKER", + "kmsKeyName": "", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "mode": "STANDARD_REPOSITORY", + "name": "projects/${projectId}/locations/us-west1/repositories/artifactregistryrepository-${uniqueId}", + "satisfiesPzs": false, + "sizeBytes": "0", + "updateTime": "2024-04-01T12:34:56.123456Z" +} + +--- + +GET https://artifactregistry.googleapis.com/v1/projects/${projectId}/locations/us-west1/repositories/artifactregistryrepository-${uniqueId}:getIamPolicy?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 + + + +{ + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://artifactregistry.googleapis.com/v1/projects/${projectId}/locations/us-west1/repositories/artifactregistryrepository-${uniqueId}:setIamPolicy?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 + +{ + "policy": { + "bindings": [ + { + "members": [ + "serviceAccount:service-${projectNumber}@gcp-sa-pubsub.iam.gserviceaccount.com" + ], + "role": "roles/editor" + } + ], + "etag": "abcdef0123A=", + "version": 3 + } +} + + + +{ + "bindings": [ + { + "members": [ + "serviceAccount:service-${projectNumber}@gcp-sa-pubsub.iam.gserviceaccount.com" + ], + "role": "roles/editor" + } + ], + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +GET https://artifactregistry.googleapis.com/v1/projects/${projectId}/locations/us-west1/repositories/artifactregistryrepository-${uniqueId}:getIamPolicy?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 + + + +{ + "bindings": [ + { + "members": [ + "serviceAccount:service-${projectNumber}@gcp-sa-pubsub.iam.gserviceaccount.com" + ], + "role": "roles/editor" + } + ], + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://artifactregistry.googleapis.com/v1/projects/${projectId}/locations/us-west1/repositories/artifactregistryrepository-${uniqueId}:setIamPolicy?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 + +{ + "policy": { + "etag": "abcdef0123A=", + "version": 3 + } +} + + + +{ + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +GET https://artifactregistry.googleapis.com/v1/projects/${projectId}/locations/us-west1/repositories/artifactregistryrepository-${uniqueId}:getIamPolicy?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 + + + +{ + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +GET https://artifactregistry.googleapis.com/v1/projects/${projectId}/locations/us-west1/repositories/artifactregistryrepository-${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": "", + "format": "DOCKER", + "kmsKeyName": "", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "mode": "STANDARD_REPOSITORY", + "name": "projects/${projectId}/locations/us-west1/repositories/artifactregistryrepository-${uniqueId}", + "satisfiesPzs": false, + "sizeBytes": "0", + "updateTime": "2024-04-01T12:34:56.123456Z" +} + +--- + +DELETE https://artifactregistry.googleapis.com/v1/projects/${projectId}/locations/us-west1/repositories/artifactregistryrepository-${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/iammemberreferences/sqlinstanceref/_generated_object_sqlinstanceref.golden.yaml b/pkg/test/resourcefixture/testdata/iammemberreferences/sqlinstanceref/_generated_object_sqlinstanceref.golden.yaml new file mode 100644 index 0000000000..1cbc186da2 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/iammemberreferences/sqlinstanceref/_generated_object_sqlinstanceref.golden.yaml @@ -0,0 +1,30 @@ +apiVersion: iam.cnrm.cloud.google.com/v1beta1 +kind: IAMPolicyMember +metadata: + annotations: + cnrm.cloud.google.com/state-into-spec: merge + finalizers: + - cnrm.cloud.google.com/finalizer + - cnrm.cloud.google.com/deletion-defender + generation: 1 + labels: + cnrm-test: "true" + name: iammemberref-${uniqueId} + namespace: ${uniqueId} +spec: + memberFrom: + sqlInstanceRef: + name: sqlinstance-${uniqueId} + resourceRef: + apiVersion: pubsub.cnrm.cloud.google.com/v1beta1 + kind: PubSubTopic + name: pubsubtopic-${uniqueId} + role: roles/editor +status: + conditions: + - lastTransitionTime: "1970-01-01T00:00:00Z" + message: The resource is up to date + reason: UpToDate + status: "True" + type: Ready + observedGeneration: 1 diff --git a/pkg/test/resourcefixture/testdata/iammemberreferences/sqlinstanceref/_http.log b/pkg/test/resourcefixture/testdata/iammemberreferences/sqlinstanceref/_http.log new file mode 100644 index 0000000000..62f50c3a27 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/iammemberreferences/sqlinstanceref/_http.log @@ -0,0 +1,635 @@ +GET https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqlinstance-${uniqueId}?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 + +404 Not Found +Content-Type: application/json + +{ + "code": 5, + "details": [], + "message": "databaseInstance \"projects/${projectId}/SQLInstances/sqlinstance-${uniqueId}\" not found" +} + +--- + +POST https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances?alt=json&prettyPrint=false +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 + +{ + "databaseVersion": "MYSQL_5_7", + "name": "sqlinstance-${uniqueId}", + "region": "us-central1", + "settings": { + "activationPolicy": "ALWAYS", + "availabilityType": "ZONAL", + "dataDiskType": "PD_SSD", + "edition": "ENTERPRISE", + "pricingPlan": "PER_USE", + "storageAutoResize": true, + "tier": "db-n1-standard-1", + "userLabels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + } + } +} + +200 OK +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "apiWarning": null, + "backupContext": null, + "endTime": null, + "error": null, + "exportContext": null, + "importContext": null, + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "sql#operation", + "name": "${operationID}", + "operationType": "CREATE", + "selfLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/operations/${operationID}", + "startTime": null, + "status": "PENDING", + "targetId": "sqlinstance-${uniqueId}", + "targetLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqlinstance-${uniqueId}", + "targetProject": "${projectId}", + "user": "user@example.com" +} + +--- + +GET https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqlinstance-${uniqueId}/users?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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "items": [ + { + "etag": "NdQ6PJfBochzVJ9pZhZsqg==", + "host": "%", + "instance": "sqlinstance-${uniqueId}", + "kind": "sql#user", + "name": "root", + "password": "", + "passwordPolicy": { + "allowedFailedAttempts": 0, + "enableFailedAttemptsCheck": false, + "enablePasswordVerification": false, + "passwordExpirationDuration": null, + "status": { + "locked": false, + "passwordExpirationTime": null + } + }, + "project": "${projectId}", + "type": "BUILT_IN" + } + ], + "kind": "sql#usersList", + "nextPageToken": "" +} + +--- + +DELETE https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqlinstance-${uniqueId}/users?alt=json&host=%25&name=root&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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "apiWarning": null, + "backupContext": null, + "endTime": null, + "error": null, + "exportContext": null, + "importContext": null, + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "sql#operation", + "name": "${operationID}", + "operationType": "DELETE_USER", + "selfLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/operations/${operationID}", + "startTime": null, + "status": "PENDING", + "targetId": "sqlinstance-${uniqueId}", + "targetLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqlinstance-${uniqueId}", + "targetProject": "${projectId}", + "user": "user@example.com" +} + +--- + +GET https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqlinstance-${uniqueId}?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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "availableMaintenanceVersions": [], + "backendType": "SECOND_GEN", + "connectionName": "${projectId}:us-central1:sqlinstance-${uniqueId}", + "createTime": "2024-04-01T12:34:56.123456Z", + "currentDiskSize": null, + "databaseInstalledVersion": "MYSQL_5_7_44", + "databaseVersion": "MYSQL_5_7", + "diskEncryptionConfiguration": null, + "diskEncryptionStatus": null, + "etag": "abcdef0123A=", + "failoverReplica": null, + "gceZone": "us-central1-c", + "instanceType": "SQL_INSTANCE_TYPE_UNSPECIFIED", + "ipAddresses": [ + { + "ipAddress": "10.10.10.10", + "timeToRetire": null, + "type": "PRIMARY" + } + ], + "ipv6Address": "", + "kind": "sql#instance", + "maintenanceVersion": "MYSQL_5_7_44.R20231105.01_03", + "masterInstanceName": "", + "maxDiskSize": null, + "name": "sqlinstance-${uniqueId}", + "onPremisesConfiguration": null, + "project": "${projectId}", + "region": "us-central1", + "replicaConfiguration": null, + "replicaNames": [], + "rootPassword": "", + "satisfiesPzs": null, + "scheduledMaintenance": null, + "secondaryGceZone": "", + "selfLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqlinstance-${uniqueId}", + "serverCaCert": { + "cert": "-----BEGIN CERTIFICATE-----\n-----END CERTIFICATE-----\n", + "certSerialNumber": "0", + "commonName": "common-name", + "createTime": "2024-06-19T23:04:51.688945621Z", + "expirationTime": "2025-06-19T23:04:51.688945621Z", + "instance": "sqlinstance-${uniqueId}", + "kind": "sql#sslCert", + "selfLink": "", + "sha1Fingerprint": "12345678" + }, + "serviceAccountEmailAddress": "p${projectNumber}-abcdef@gcp-sa-cloud-sql.iam.gserviceaccount.com", + "settings": { + "activationPolicy": "ALWAYS", + "activeDirectoryConfig": null, + "advancedMachineFeatures": null, + "authorizedGaeApplications": [], + "availabilityType": "ZONAL", + "backupConfiguration": { + "backupRetentionSettings": { + "retainedBackups": 7, + "retentionUnit": "COUNT" + }, + "binaryLogEnabled": null, + "enabled": false, + "kind": "sql#backupConfiguration", + "location": "", + "pointInTimeRecoveryEnabled": false, + "replicationLogArchivingEnabled": null, + "startTime": "21:00", + "transactionLogRetentionDays": 7 + }, + "collation": "", + "connectorEnforcement": "NOT_REQUIRED", + "crashSafeReplicationEnabled": null, + "dataCacheConfig": null, + "dataDiskSizeGb": "10", + "dataDiskType": "PD_SSD", + "databaseFlags": [], + "databaseReplicationEnabled": null, + "deletionProtectionEnabled": false, + "denyMaintenancePeriods": [], + "edition": "ENTERPRISE", + "insightsConfig": null, + "ipConfiguration": { + "allocatedIpRange": "", + "authorizedNetworks": [], + "enablePrivatePathForGoogleCloudServices": null, + "ipv4Enabled": true, + "privateNetwork": "", + "requireSsl": false, + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, + "kind": "sql#settings", + "locationPreference": { + "followGaeApplication": "", + "kind": "sql#locationPreference", + "secondaryZone": "", + "zone": "us-central1-c" + }, + "maintenanceWindow": null, + "passwordValidationPolicy": null, + "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", + "settingsVersion": "1", + "sqlServerAuditConfig": null, + "storageAutoResize": true, + "storageAutoResizeLimit": "0", + "tier": "db-n1-standard-1", + "timeZone": "", + "userLabels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + } + }, + "sqlNetworkArchitecture": "NEW_NETWORK_ARCHITECTURE", + "state": "RUNNABLE", + "suspensionReason": [] +} + +--- + +GET https://pubsub.googleapis.com/v1/projects/${projectId}/topics/pubsubtopic-${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, + "message": "Resource not found (resource=pubsubtopic-${uniqueId}).", + "status": "NOT_FOUND" + } +} + +--- + +PUT https://pubsub.googleapis.com/v1/projects/${projectId}/topics/pubsubtopic-${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 + +{ + "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 + +{ + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectId}/topics/pubsubtopic-${uniqueId}" +} + +--- + +GET https://pubsub.googleapis.com/v1/projects/${projectId}/topics/pubsubtopic-${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 + +{ + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectId}/topics/pubsubtopic-${uniqueId}" +} + +--- + +GET https://pubsub.googleapis.com/v1/projects/${projectId}/topics/pubsubtopic-${uniqueId}:getIamPolicy?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 + + + +{ + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://pubsub.googleapis.com/v1/projects/${projectId}/topics/pubsubtopic-${uniqueId}:setIamPolicy?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 + +{ + "policy": { + "bindings": [ + { + "members": [ + "serviceAccount:p${projectNumber}-abcdef@gcp-sa-cloud-sql.iam.gserviceaccount.com" + ], + "role": "roles/editor" + } + ], + "etag": "abcdef0123A=", + "version": 3 + } +} + + + +{ + "bindings": [ + { + "members": [ + "serviceAccount:p${projectNumber}-abcdef@gcp-sa-cloud-sql.iam.gserviceaccount.com" + ], + "role": "roles/editor" + } + ], + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +GET https://pubsub.googleapis.com/v1/projects/${projectId}/topics/pubsubtopic-${uniqueId}:getIamPolicy?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 + + + +{ + "bindings": [ + { + "members": [ + "serviceAccount:p${projectNumber}-abcdef@gcp-sa-cloud-sql.iam.gserviceaccount.com" + ], + "role": "roles/editor" + } + ], + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +POST https://pubsub.googleapis.com/v1/projects/${projectId}/topics/pubsubtopic-${uniqueId}:setIamPolicy?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 + +{ + "policy": { + "etag": "abcdef0123A=", + "version": 3 + } +} + + + +{ + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +GET https://pubsub.googleapis.com/v1/projects/${projectId}/topics/pubsubtopic-${uniqueId}:getIamPolicy?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 + + + +{ + "etag": "abcdef0123A=", + "version": 3 +} + +--- + +GET https://pubsub.googleapis.com/v1/projects/${projectId}/topics/pubsubtopic-${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 + +{ + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectId}/topics/pubsubtopic-${uniqueId}" +} + +--- + +DELETE https://pubsub.googleapis.com/v1/projects/${projectId}/topics/pubsubtopic-${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 + +{} + +--- + +GET https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqlinstance-${uniqueId}?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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "availableMaintenanceVersions": [], + "backendType": "SECOND_GEN", + "connectionName": "${projectId}:us-central1:sqlinstance-${uniqueId}", + "createTime": "2024-04-01T12:34:56.123456Z", + "currentDiskSize": null, + "databaseInstalledVersion": "MYSQL_5_7_44", + "databaseVersion": "MYSQL_5_7", + "diskEncryptionConfiguration": null, + "diskEncryptionStatus": null, + "etag": "abcdef0123A=", + "failoverReplica": null, + "gceZone": "us-central1-c", + "instanceType": "SQL_INSTANCE_TYPE_UNSPECIFIED", + "ipAddresses": [ + { + "ipAddress": "10.10.10.10", + "timeToRetire": null, + "type": "PRIMARY" + } + ], + "ipv6Address": "", + "kind": "sql#instance", + "maintenanceVersion": "MYSQL_5_7_44.R20231105.01_03", + "masterInstanceName": "", + "maxDiskSize": null, + "name": "sqlinstance-${uniqueId}", + "onPremisesConfiguration": null, + "project": "${projectId}", + "region": "us-central1", + "replicaConfiguration": null, + "replicaNames": [], + "rootPassword": "", + "satisfiesPzs": null, + "scheduledMaintenance": null, + "secondaryGceZone": "", + "selfLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqlinstance-${uniqueId}", + "serverCaCert": { + "cert": "-----BEGIN CERTIFICATE-----\n-----END CERTIFICATE-----\n", + "certSerialNumber": "0", + "commonName": "common-name", + "createTime": "2024-06-19T23:04:51.688945621Z", + "expirationTime": "2025-06-19T23:04:51.688945621Z", + "instance": "sqlinstance-${uniqueId}", + "kind": "sql#sslCert", + "selfLink": "", + "sha1Fingerprint": "12345678" + }, + "serviceAccountEmailAddress": "p${projectNumber}-abcdef@gcp-sa-cloud-sql.iam.gserviceaccount.com", + "settings": { + "activationPolicy": "ALWAYS", + "activeDirectoryConfig": null, + "advancedMachineFeatures": null, + "authorizedGaeApplications": [], + "availabilityType": "ZONAL", + "backupConfiguration": { + "backupRetentionSettings": { + "retainedBackups": 7, + "retentionUnit": "COUNT" + }, + "binaryLogEnabled": null, + "enabled": false, + "kind": "sql#backupConfiguration", + "location": "", + "pointInTimeRecoveryEnabled": false, + "replicationLogArchivingEnabled": null, + "startTime": "21:00", + "transactionLogRetentionDays": 7 + }, + "collation": "", + "connectorEnforcement": "NOT_REQUIRED", + "crashSafeReplicationEnabled": null, + "dataCacheConfig": null, + "dataDiskSizeGb": "10", + "dataDiskType": "PD_SSD", + "databaseFlags": [], + "databaseReplicationEnabled": null, + "deletionProtectionEnabled": false, + "denyMaintenancePeriods": [], + "edition": "ENTERPRISE", + "insightsConfig": null, + "ipConfiguration": { + "allocatedIpRange": "", + "authorizedNetworks": [], + "enablePrivatePathForGoogleCloudServices": null, + "ipv4Enabled": true, + "privateNetwork": "", + "requireSsl": false, + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, + "kind": "sql#settings", + "locationPreference": { + "followGaeApplication": "", + "kind": "sql#locationPreference", + "secondaryZone": "", + "zone": "us-central1-c" + }, + "maintenanceWindow": null, + "passwordValidationPolicy": null, + "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", + "settingsVersion": "1", + "sqlServerAuditConfig": null, + "storageAutoResize": true, + "storageAutoResizeLimit": "0", + "tier": "db-n1-standard-1", + "timeZone": "", + "userLabels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + } + }, + "sqlNetworkArchitecture": "NEW_NETWORK_ARCHITECTURE", + "state": "RUNNABLE", + "suspensionReason": [] +} + +--- + +DELETE https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqlinstance-${uniqueId}?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 +Content-Type: application/json +Grpc-Metadata-Content-Type: application/grpc + +{ + "apiWarning": null, + "backupContext": null, + "endTime": null, + "error": null, + "exportContext": null, + "importContext": null, + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "sql#operation", + "name": "${operationID}", + "operationType": "DELETE", + "selfLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/operations/${operationID}", + "startTime": null, + "status": "PENDING", + "targetId": "sqlinstance-${uniqueId}", + "targetLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/sqlinstance-${uniqueId}", + "targetProject": "${projectId}", + "user": "user@example.com" +} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/reconcileintervalannotations/bigquerydataset/_http.log b/pkg/test/resourcefixture/testdata/reconcileintervalannotations/bigquerydataset/_http.log index 2a97bf4c24..e955a3353f 100644 --- a/pkg/test/resourcefixture/testdata/reconcileintervalannotations/bigquerydataset/_http.log +++ b/pkg/test/resourcefixture/testdata/reconcileintervalannotations/bigquerydataset/_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/reconcileintervalannotations/pubsubschema/_generated_object_pubsubschema#01.golden.yaml b/pkg/test/resourcefixture/testdata/reconcileintervalannotations/pubsubschema/_generated_object_pubsubschema#01.golden.yaml new file mode 100644 index 0000000000..395c2b1dcd --- /dev/null +++ b/pkg/test/resourcefixture/testdata/reconcileintervalannotations/pubsubschema/_generated_object_pubsubschema#01.golden.yaml @@ -0,0 +1,36 @@ +apiVersion: pubsub.cnrm.cloud.google.com/v1beta1 +kind: PubSubSchema +metadata: + annotations: + cnrm.cloud.google.com/management-conflict-prevention-policy: none + cnrm.cloud.google.com/reconcile-interval-in-seconds: "0" + 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: pubsubschema-${uniqueId} + namespace: ${uniqueId} +spec: + definition: |- + syntax = "proto3"; + message Results { + string message_request = 1; + string message_response = 2; + string timestamp_request = 3; + string timestamp_response = 4; + } + projectRef: + external: ${projectId} + resourceID: pubsubschema-${uniqueId} + type: PROTOCOL_BUFFER +status: + conditions: + - lastTransitionTime: "1970-01-01T00:00:00Z" + message: The resource is up to date + reason: UpToDate + status: "True" + type: Ready + observedGeneration: 2 diff --git a/pkg/test/resourcefixture/testdata/reconcileintervalannotations/pubsubschema/_http.log b/pkg/test/resourcefixture/testdata/reconcileintervalannotations/pubsubschema/_http.log index 1d90b7033a..e2b1219a09 100644 --- a/pkg/test/resourcefixture/testdata/reconcileintervalannotations/pubsubschema/_http.log +++ b/pkg/test/resourcefixture/testdata/reconcileintervalannotations/pubsubschema/_http.log @@ -79,56 +79,6 @@ X-Xss-Protection: 0 --- -GET https://pubsub.googleapis.com/v1/projects/${projectId}/schemas/pubsubschema-${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 - -{ - "definition": "syntax = \"proto3\";\nmessage Results {\nstring message_request = 1;\nstring message_response = 2;\nstring timestamp_request = 3;\nstring timestamp_response = 4;\n}", - "name": "projects/${projectId}/schemas/pubsubschema-${uniqueId}", - "revisionCreateTime": "2024-04-01T12:34:56.123456Z", - "revisionId": "revision-id-placeholder", - "type": "PROTOCOL_BUFFER" -} - ---- - -GET https://pubsub.googleapis.com/v1/projects/${projectId}/schemas/pubsubschema-${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 - -{ - "definition": "syntax = \"proto3\";\nmessage Results {\nstring message_request = 1;\nstring message_response = 2;\nstring timestamp_request = 3;\nstring timestamp_response = 4;\n}", - "name": "projects/${projectId}/schemas/pubsubschema-${uniqueId}", - "revisionCreateTime": "2024-04-01T12:34:56.123456Z", - "revisionId": "revision-id-placeholder", - "type": "PROTOCOL_BUFFER" -} - ---- - DELETE https://pubsub.googleapis.com/v1/projects/${projectId}/schemas/pubsubschema-${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 @@ -163,231 +113,6 @@ X-Content-Type-Options: nosniff X-Frame-Options: SAMEORIGIN X-Xss-Protection: 0 -{ - "error": { - "code": 404, - "message": "Resource not found (resource=projects/${projectId}/schemas/pubsubschema-${uniqueId}).", - "status": "NOT_FOUND" - } -} - ---- - -GET https://pubsub.googleapis.com/v1/projects/${projectId}/schemas/pubsubschema-${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, - "message": "Resource not found (resource=projects/${projectId}/schemas/pubsubschema-${uniqueId}).", - "status": "NOT_FOUND" - } -} - ---- - -GET https://pubsub.googleapis.com/v1/projects/${projectId}/schemas/pubsubschema-${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, - "message": "Resource not found (resource=projects/${projectId}/schemas/pubsubschema-${uniqueId}).", - "status": "NOT_FOUND" - } -} - ---- - -GET https://pubsub.googleapis.com/v1/projects/${projectId}/schemas/pubsubschema-${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, - "message": "Resource not found (resource=projects/${projectId}/schemas/pubsubschema-${uniqueId}).", - "status": "NOT_FOUND" - } -} - ---- - -GET https://pubsub.googleapis.com/v1/projects/${projectId}/schemas/pubsubschema-${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, - "message": "Resource not found (resource=projects/${projectId}/schemas/pubsubschema-${uniqueId}).", - "status": "NOT_FOUND" - } -} - ---- - -GET https://pubsub.googleapis.com/v1/projects/${projectId}/schemas/pubsubschema-${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, - "message": "Resource not found (resource=projects/${projectId}/schemas/pubsubschema-${uniqueId}).", - "status": "NOT_FOUND" - } -} - ---- - -GET https://pubsub.googleapis.com/v1/projects/${projectId}/schemas/pubsubschema-${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, - "message": "Resource not found (resource=projects/${projectId}/schemas/pubsubschema-${uniqueId}).", - "status": "NOT_FOUND" - } -} - ---- - -GET https://pubsub.googleapis.com/v1/projects/${projectId}/schemas/pubsubschema-${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, - "message": "Resource not found (resource=projects/${projectId}/schemas/pubsubschema-${uniqueId}).", - "status": "NOT_FOUND" - } -} - ---- - -GET https://pubsub.googleapis.com/v1/projects/${projectId}/schemas/pubsubschema-${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, - "message": "Resource not found (resource=projects/${projectId}/schemas/pubsubschema-${uniqueId}).", - "status": "NOT_FOUND" - } -} - ---- - -GET https://pubsub.googleapis.com/v1/projects/${projectId}/schemas/pubsubschema-${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, diff --git a/pkg/test/resourcefixture/testdata/reconcileintervalannotations/storagebucket/_generated_object_storagebucket#01.golden.yaml b/pkg/test/resourcefixture/testdata/reconcileintervalannotations/storagebucket/_generated_object_storagebucket#01.golden.yaml index 144f8146f4..5d9a2eb135 100644 --- a/pkg/test/resourcefixture/testdata/reconcileintervalannotations/storagebucket/_generated_object_storagebucket#01.golden.yaml +++ b/pkg/test/resourcefixture/testdata/reconcileintervalannotations/storagebucket/_generated_object_storagebucket#01.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: storage.cnrm.cloud.google.com/v1beta1 kind: StorageBucket metadata: @@ -29,9 +15,10 @@ metadata: name: storagebucket-sample-${uniqueId} namespace: ${uniqueId} spec: - lifecycleRule: [] location: US + publicAccessPrevention: inherited resourceID: storagebucket-sample-${uniqueId} + storageClass: STANDARD versioning: enabled: true status: @@ -42,3 +29,5 @@ status: status: "True" type: Ready observedGeneration: 4 + selfLink: https://www.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId} + url: gs://storagebucket-sample-${uniqueId} diff --git a/pkg/test/resourcefixture/testdata/reconcileintervalannotations/storagebucket/_http.log b/pkg/test/resourcefixture/testdata/reconcileintervalannotations/storagebucket/_http.log index e667adbdc2..0a4fdd914d 100644 --- a/pkg/test/resourcefixture/testdata/reconcileintervalannotations/storagebucket/_http.log +++ b/pkg/test/resourcefixture/testdata/reconcileintervalannotations/storagebucket/_http.log @@ -1,6 +1,5 @@ GET https://storage.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}?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/dev -X-Goog-Api-Client: gl-go/1.22.0 gdcl/0.160.0 +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 404 Not Found Cache-Control: no-cache, no-store, max-age=0, must-revalidate @@ -29,8 +28,7 @@ Vary: X-Origin POST https://storage.googleapis.com/storage/v1/b?alt=json&prettyPrint=false&project=${projectId} 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/dev -X-Goog-Api-Client: gl-go/1.22.0 gdcl/0.160.0 +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 { "iamConfiguration": { @@ -122,194 +120,7 @@ Vary: X-Origin --- GET https://storage.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}?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/dev -X-Goog-Api-Client: gl-go/1.22.0 gdcl/0.160.0 - -200 OK -Cache-Control: private, max-age=0, must-revalidate, no-transform -Content-Type: application/json; charset=UTF-8 -Expires: {now+0m} -Server: UploadServer -Vary: Origin -Vary: X-Origin - -{ - "etag": "abcdef0123A=", - "iamConfiguration": { - "bucketPolicyOnly": { - "enabled": false - }, - "publicAccessPrevention": "inherited", - "uniformBucketLevelAccess": { - "enabled": false - } - }, - "id": "000000000000000000000", - "kind": "storage#bucket", - "labels": { - "cnrm-test": "true", - "managed-by-cnrm": "true" - }, - "lifecycle": { - "rule": [ - { - "action": { - "type": "Delete" - }, - "condition": { - "age": 7 - } - } - ] - }, - "location": "US", - "locationType": "multi-region", - "metageneration": "1", - "name": "storagebucket-sample-${uniqueId}", - "projectNumber": "${projectNumber}", - "rpo": "DEFAULT", - "selfLink": "https://www.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}", - "softDeletePolicy": { - "effectiveTime": "2024-04-01T12:34:56.123456Z", - "retentionDurationSeconds": "604800" - }, - "storageClass": "STANDARD", - "timeCreated": "2024-04-01T12:34:56.123456Z", - "updated": "2024-04-01T12:34:56.123456Z", - "versioning": { - "enabled": false - } -} - ---- - -GET https://storage.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}?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/dev -X-Goog-Api-Client: gl-go/1.22.0 gdcl/0.160.0 - -200 OK -Cache-Control: private, max-age=0, must-revalidate, no-transform -Content-Type: application/json; charset=UTF-8 -Expires: {now+0m} -Server: UploadServer -Vary: Origin -Vary: X-Origin - -{ - "etag": "abcdef0123A=", - "iamConfiguration": { - "bucketPolicyOnly": { - "enabled": false - }, - "publicAccessPrevention": "inherited", - "uniformBucketLevelAccess": { - "enabled": false - } - }, - "id": "000000000000000000000", - "kind": "storage#bucket", - "labels": { - "cnrm-test": "true", - "managed-by-cnrm": "true" - }, - "lifecycle": { - "rule": [ - { - "action": { - "type": "Delete" - }, - "condition": { - "age": 7 - } - } - ] - }, - "location": "US", - "locationType": "multi-region", - "metageneration": "1", - "name": "storagebucket-sample-${uniqueId}", - "projectNumber": "${projectNumber}", - "rpo": "DEFAULT", - "selfLink": "https://www.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}", - "softDeletePolicy": { - "effectiveTime": "2024-04-01T12:34:56.123456Z", - "retentionDurationSeconds": "604800" - }, - "storageClass": "STANDARD", - "timeCreated": "2024-04-01T12:34:56.123456Z", - "updated": "2024-04-01T12:34:56.123456Z", - "versioning": { - "enabled": false - } -} - ---- - -GET https://storage.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}?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/dev -X-Goog-Api-Client: gl-go/1.22.0 gdcl/0.160.0 - -200 OK -Cache-Control: private, max-age=0, must-revalidate, no-transform -Content-Type: application/json; charset=UTF-8 -Expires: {now+0m} -Server: UploadServer -Vary: Origin -Vary: X-Origin - -{ - "etag": "abcdef0123A=", - "iamConfiguration": { - "bucketPolicyOnly": { - "enabled": false - }, - "publicAccessPrevention": "inherited", - "uniformBucketLevelAccess": { - "enabled": false - } - }, - "id": "000000000000000000000", - "kind": "storage#bucket", - "labels": { - "cnrm-test": "true", - "managed-by-cnrm": "true" - }, - "lifecycle": { - "rule": [ - { - "action": { - "type": "Delete" - }, - "condition": { - "age": 7 - } - } - ] - }, - "location": "US", - "locationType": "multi-region", - "metageneration": "1", - "name": "storagebucket-sample-${uniqueId}", - "projectNumber": "${projectNumber}", - "rpo": "DEFAULT", - "selfLink": "https://www.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}", - "softDeletePolicy": { - "effectiveTime": "2024-04-01T12:34:56.123456Z", - "retentionDurationSeconds": "604800" - }, - "storageClass": "STANDARD", - "timeCreated": "2024-04-01T12:34:56.123456Z", - "updated": "2024-04-01T12:34:56.123456Z", - "versioning": { - "enabled": false - } -} - ---- - -GET https://storage.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}?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/dev -X-Goog-Api-Client: gl-go/1.22.0 gdcl/0.160.0 +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, max-age=0, must-revalidate, no-transform @@ -371,8 +182,7 @@ Vary: X-Origin PATCH https://storage.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}?alt=json&prettyPrint=false 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/dev -X-Goog-Api-Client: gl-go/1.22.0 gdcl/0.160.0 +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 { "lifecycle": { @@ -397,7 +207,7 @@ Vary: X-Origin { "bucket": "storagebucket-sample-${uniqueId}", "entity": "project-owners-${projectNumber}", - "etag": "abcdef0123A=", + "etag": "abcdef0123A", "id": "storagebucket-sample-${uniqueId}/project-owners-${projectNumber}", "kind": "storage#bucketAccessControl", "projectTeam": { @@ -410,7 +220,7 @@ Vary: X-Origin { "bucket": "storagebucket-sample-${uniqueId}", "entity": "project-editors-${projectNumber}", - "etag": "abcdef0123A=", + "etag": "abcdef0123A", "id": "storagebucket-sample-${uniqueId}/project-editors-${projectNumber}", "kind": "storage#bucketAccessControl", "projectTeam": { @@ -423,7 +233,7 @@ Vary: X-Origin { "bucket": "storagebucket-sample-${uniqueId}", "entity": "project-viewers-${projectNumber}", - "etag": "abcdef0123A=", + "etag": "abcdef0123A", "id": "storagebucket-sample-${uniqueId}/project-viewers-${projectNumber}", "kind": "storage#bucketAccessControl", "projectTeam": { @@ -507,108 +317,7 @@ Vary: X-Origin --- GET https://storage.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}?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/dev -X-Goog-Api-Client: gl-go/1.22.0 gdcl/0.160.0 - -200 OK -Cache-Control: private, max-age=0, must-revalidate, no-transform -Content-Type: application/json; charset=UTF-8 -Expires: {now+0m} -Server: UploadServer -Vary: Origin -Vary: X-Origin - -{ - "etag": "abcdef0123A=", - "iamConfiguration": { - "bucketPolicyOnly": { - "enabled": false - }, - "publicAccessPrevention": "inherited", - "uniformBucketLevelAccess": { - "enabled": false - } - }, - "id": "000000000000000000000", - "kind": "storage#bucket", - "labels": { - "cnrm-test": "true", - "managed-by-cnrm": "true" - }, - "location": "US", - "locationType": "multi-region", - "metageneration": "2", - "name": "storagebucket-sample-${uniqueId}", - "projectNumber": "${projectNumber}", - "rpo": "DEFAULT", - "selfLink": "https://www.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}", - "softDeletePolicy": { - "effectiveTime": "2024-04-01T12:34:56.123456Z", - "retentionDurationSeconds": "604800" - }, - "storageClass": "STANDARD", - "timeCreated": "2024-04-01T12:34:56.123456Z", - "updated": "2024-04-01T12:34:56.123456Z", - "versioning": { - "enabled": true - } -} - ---- - -GET https://storage.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}?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/dev -X-Goog-Api-Client: gl-go/1.22.0 gdcl/0.160.0 - -200 OK -Cache-Control: private, max-age=0, must-revalidate, no-transform -Content-Type: application/json; charset=UTF-8 -Expires: {now+0m} -Server: UploadServer -Vary: Origin -Vary: X-Origin - -{ - "etag": "abcdef0123A=", - "iamConfiguration": { - "bucketPolicyOnly": { - "enabled": false - }, - "publicAccessPrevention": "inherited", - "uniformBucketLevelAccess": { - "enabled": false - } - }, - "id": "000000000000000000000", - "kind": "storage#bucket", - "labels": { - "cnrm-test": "true", - "managed-by-cnrm": "true" - }, - "location": "US", - "locationType": "multi-region", - "metageneration": "2", - "name": "storagebucket-sample-${uniqueId}", - "projectNumber": "${projectNumber}", - "rpo": "DEFAULT", - "selfLink": "https://www.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}", - "softDeletePolicy": { - "effectiveTime": "2024-04-01T12:34:56.123456Z", - "retentionDurationSeconds": "604800" - }, - "storageClass": "STANDARD", - "timeCreated": "2024-04-01T12:34:56.123456Z", - "updated": "2024-04-01T12:34:56.123456Z", - "versioning": { - "enabled": true - } -} - ---- - -GET https://storage.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}?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/dev -X-Goog-Api-Client: gl-go/1.22.0 gdcl/0.160.0 +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, max-age=0, must-revalidate, no-transform @@ -657,8 +366,7 @@ Vary: X-Origin --- GET https://storage.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}/o?alt=json&prettyPrint=false&versions=true -User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/dev -X-Goog-Api-Client: gl-go/1.22.0 gdcl/0.160.0 +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, max-age=0, must-revalidate, no-transform @@ -675,8 +383,7 @@ Vary: X-Origin --- DELETE https://storage.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}?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/dev -X-Goog-Api-Client: gl-go/1.22.0 gdcl/0.160.0 +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 204 No Content Cache-Control: no-cache, no-store, max-age=0, must-revalidate diff --git a/pkg/test/resourcefixture/testdata/resourceid/userspecifiedresourceid/_generated_export_userspecifiedresourceid.golden b/pkg/test/resourcefixture/testdata/resourceid/userspecifiedresourceid/_generated_export_userspecifiedresourceid.golden new file mode 100644 index 0000000000..bba5c4cdbd --- /dev/null +++ b/pkg/test/resourcefixture/testdata/resourceid/userspecifiedresourceid/_generated_export_userspecifiedresourceid.golden @@ -0,0 +1,24 @@ +apiVersion: bigquery.cnrm.cloud.google.com/v1beta1 +kind: BigQueryDataset +metadata: + annotations: + cnrm.cloud.google.com/delete-contents-on-destroy: "false" + labels: + cnrm-test: "true" + managed-by-cnrm: "true" + name: bigquerydataset-${uniqueId} +spec: + access: + - role: OWNER + specialGroup: projectOwners + - role: OWNER + userByEmail: user@google.com + - role: READER + specialGroup: projectReaders + - role: WRITER + specialGroup: projectWriters + friendlyName: bigquerydataset-sample-updated + location: US + projectRef: + external: ${projectId} + resourceID: bigquerydataset_${uniqueId} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/resourceid/userspecifiedresourceid/_generated_object_userspecifiedresourceid.golden.yaml b/pkg/test/resourcefixture/testdata/resourceid/userspecifiedresourceid/_generated_object_userspecifiedresourceid.golden.yaml new file mode 100644 index 0000000000..4107dad945 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/resourceid/userspecifiedresourceid/_generated_object_userspecifiedresourceid.golden.yaml @@ -0,0 +1,41 @@ +apiVersion: bigquery.cnrm.cloud.google.com/v1beta1 +kind: BigQueryDataset +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: bigquerydataset-resourceid-${uniqueId} + namespace: ${uniqueId} +spec: + access: + - role: OWNER + specialGroup: projectOwners + - role: OWNER + userByEmail: user@google.com + - role: READER + specialGroup: projectReaders + - role: WRITER + specialGroup: projectWriters + friendlyName: bigquerydataset-sample-updated + location: US + projectRef: + external: ${projectId} + resourceID: bigquerydataset_${uniqueId} +status: + conditions: + - lastTransitionTime: "1970-01-01T00:00:00Z" + message: The resource is up to date + reason: UpToDate + status: "True" + type: Ready + creationTime: "1970-01-01T00:00:00Z" + etag: abcdef123456 + lastModifiedTime: "1970-01-01T00:00:00Z" + observedGeneration: 3 + selfLink: https://bigquery.googleapis.com/bigquery/v2/projects/${projectId}/datasets/bigquerydataset_${uniqueId} diff --git a/pkg/test/resourcefixture/testdata/resourceid/userspecifiedresourceid/_http.log b/pkg/test/resourcefixture/testdata/resourceid/userspecifiedresourceid/_http.log new file mode 100644 index 0000000000..30769f1d3d --- /dev/null +++ b/pkg/test/resourcefixture/testdata/resourceid/userspecifiedresourceid/_http.log @@ -0,0 +1,307 @@ +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 + +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": "Not found: Dataset ${projectId}:bigquerydataset_${uniqueId}", + "reason": "notFound" + } + ], + "message": "Not found: Dataset ${projectId}:bigquerydataset_${uniqueId}", + "status": "NOT_FOUND" + } +} + +--- + +POST https://bigquery.googleapis.com/bigquery/v2/projects/${projectId}/datasets?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 + +{ + "datasetReference": { + "datasetId": "bigquerydataset_${uniqueId}" + }, + "friendlyName": "bigquerydataset-sample", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "location": "US" +} + +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": "bigquerydataset_${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/bigquerydataset_${uniqueId}", + "type": "DEFAULT" +} + +--- + +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 + +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": "bigquerydataset_${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/bigquerydataset_${uniqueId}", + "type": "DEFAULT" +} + +--- + +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 + +{ + "access": [ + { + "role": "OWNER", + "userByEmail": "user@google.com" + }, + { + "role": "READER", + "specialGroup": "projectReaders" + }, + { + "role": "OWNER", + "specialGroup": "projectOwners" + }, + { + "role": "WRITER", + "specialGroup": "projectWriters" + } + ], + "datasetReference": { + "datasetId": "bigquerydataset_${uniqueId}" + }, + "friendlyName": "bigquerydataset-sample-updated", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "location": "US" +} + +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": "bigquerydataset_${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/bigquerydataset_${uniqueId}", + "type": "DEFAULT" +} + +--- + +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 + +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": "bigquerydataset_${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/bigquerydataset_${uniqueId}", + "type": "DEFAULT" +} + +--- + +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 + +204 No Content +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 \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/resourceid/userspecifiedresourceidandservergeneratedid/_generated_object_userspecifiedresourceidandservergeneratedid.golden.yaml b/pkg/test/resourcefixture/testdata/resourceid/userspecifiedresourceidandservergeneratedid/_generated_object_userspecifiedresourceidandservergeneratedid.golden.yaml index 4564220fc1..d4d61b251c 100644 --- a/pkg/test/resourcefixture/testdata/resourceid/userspecifiedresourceidandservergeneratedid/_generated_object_userspecifiedresourceidandservergeneratedid.golden.yaml +++ b/pkg/test/resourcefixture/testdata/resourceid/userspecifiedresourceidandservergeneratedid/_generated_object_userspecifiedresourceidandservergeneratedid.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: resourcemanager.cnrm.cloud.google.com/v1beta1 kind: Project metadata: @@ -39,5 +25,5 @@ status: reason: UpToDate status: "True" type: Ready - number: "2670267076" + number: "2588019318" observedGeneration: 2 diff --git a/pkg/test/resourcefixture/testdata/resourceid/userspecifiedresourceidandservergeneratedid/_http.log b/pkg/test/resourcefixture/testdata/resourceid/userspecifiedresourceidandservergeneratedid/_http.log new file mode 100644 index 0000000000..1fad1be07d --- /dev/null +++ b/pkg/test/resourcefixture/testdata/resourceid/userspecifiedresourceidandservergeneratedid/_http.log @@ -0,0 +1,466 @@ +GET https://cloudresourcemanager.googleapis.com/v1/projects/project-${uniqueId}?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 + +403 Forbidden +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": 403, + "message": "The caller does not have permission", + "status": "PERMISSION_DENIED" + } +} + +--- + +POST https://cloudresourcemanager.googleapis.com/v1/projects?alt=json&prettyPrint=false +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 + +{ + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "KCC ${uniqueId}", + "parent": { + "id": "123450001", + "type": "organization" + }, + "projectId": "project-${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://cloudresourcemanager.googleapis.com/v1/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 + +{ + "done": true, + "metadata": { + "@type": "type.googleapis.com/google.cloud.resourcemanager.v3.CreateProjectMetadata" + }, + "name": "operations/${operationID}", + "response": { + "@type": "type.googleapis.com/google.cloud.resourcemanager.v3.Project", + "createTime": "2024-04-01T12:34:56.123456Z", + "displayName": "KCC ${uniqueId}", + "etag": "abcdef0123A=", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectNumber}", + "parent": "organizations/${organizationID}", + "projectId": "project-${uniqueId}", + "state": "ACTIVE" + } +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/project-${uniqueId}?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", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "KCC ${uniqueId}", + "parent": { + "id": "123450001", + "type": "organization" + }, + "projectId": "project-${uniqueId}", + "projectNumber": "${projectNumber}" +} + +--- + +GET https://cloudbilling.googleapis.com/v1/projects/project-${uniqueId}/billingInfo?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 + +{ + "billingAccountName": "", + "billingEnabled": false, + "name": "projects/project-${uniqueId}/billingInfo", + "projectId": "project-${uniqueId}" +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/project-${uniqueId}?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", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "KCC ${uniqueId}", + "parent": { + "id": "123450001", + "type": "organization" + }, + "projectId": "project-${uniqueId}", + "projectNumber": "${projectNumber}" +} + +--- + +GET https://cloudbilling.googleapis.com/v1/projects/project-${uniqueId}/billingInfo?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 + +{ + "billingAccountName": "", + "billingEnabled": false, + "name": "projects/project-${uniqueId}/billingInfo", + "projectId": "project-${uniqueId}" +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/project-${uniqueId}?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", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "KCC ${uniqueId}", + "parent": { + "id": "123450001", + "type": "organization" + }, + "projectId": "project-${uniqueId}", + "projectNumber": "${projectNumber}" +} + +--- + +PUT https://cloudresourcemanager.googleapis.com/v1/projects/project-${uniqueId}?alt=json&prettyPrint=false +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 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "KCC-2 ${uniqueId}", + "parent": { + "id": "123450001", + "type": "organization" + }, + "projectId": "project-${uniqueId}", + "projectNumber": "${projectNumber}" +} + +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", + "labels": { + "cnrm-test": "true", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "projects/project-${uniqueId}", + "parent": { + "id": "123450001", + "type": "organization" + }, + "projectId": "project-${uniqueId}", + "projectNumber": "${projectNumber}" +} + +--- + +PUT https://cloudresourcemanager.googleapis.com/v1/projects/project-${uniqueId}?alt=json&prettyPrint=false +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 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "projects/project-${uniqueId}", + "parent": { + "id": "123450001", + "type": "organization" + }, + "projectId": "project-${uniqueId}", + "projectNumber": "${projectNumber}" +} + +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", + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "projects/project-${uniqueId}", + "parent": { + "id": "123450001", + "type": "organization" + }, + "projectId": "project-${uniqueId}", + "projectNumber": "${projectNumber}" +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/project-${uniqueId}?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", + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "projects/project-${uniqueId}", + "parent": { + "id": "123450001", + "type": "organization" + }, + "projectId": "project-${uniqueId}", + "projectNumber": "${projectNumber}" +} + +--- + +GET https://cloudbilling.googleapis.com/v1/projects/project-${uniqueId}/billingInfo?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 + +{ + "billingAccountName": "", + "billingEnabled": false, + "name": "projects/project-${uniqueId}/billingInfo", + "projectId": "project-${uniqueId}" +} + +--- + +GET https://cloudresourcemanager.googleapis.com/v1/projects/project-${uniqueId}?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", + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "lifecycleState": "ACTIVE", + "name": "projects/project-${uniqueId}", + "parent": { + "id": "123450001", + "type": "organization" + }, + "projectId": "project-${uniqueId}", + "projectNumber": "${projectNumber}" +} + +--- + +GET https://cloudbilling.googleapis.com/v1/projects/project-${uniqueId}/billingInfo?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 + +{ + "billingAccountName": "", + "billingEnabled": false, + "name": "projects/project-${uniqueId}/billingInfo", + "projectId": "project-${uniqueId}" +} + +--- + +DELETE https://cloudresourcemanager.googleapis.com/v1/projects/project-${uniqueId}?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 + +{} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/resourceid/userspecifiedresourceidfordcl/_generated_object_userspecifiedresourceidfordcl.golden.yaml b/pkg/test/resourcefixture/testdata/resourceid/userspecifiedresourceidfordcl/_generated_object_userspecifiedresourceidfordcl.golden.yaml new file mode 100644 index 0000000000..201b4aaa56 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/resourceid/userspecifiedresourceidfordcl/_generated_object_userspecifiedresourceidfordcl.golden.yaml @@ -0,0 +1,35 @@ +apiVersion: containeranalysis.cnrm.cloud.google.com/v1beta1 +kind: ContainerAnalysisNote +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" + name: containeranalysisnote-${uniqueId} + namespace: ${uniqueId} +spec: + attestation: + hint: + humanReadableName: Attestor Note2 + longDescription: new long description + relatedUrl: + - label: test + url: some.url + resourceID: containeranalysisnote-${uniqueId} + shortDescription: short description +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" + observedGeneration: 3 + updateTime: "1970-01-01T00:00:00Z" diff --git a/pkg/test/resourcefixture/testdata/resourceid/userspecifiedresourceidfordcl/_http.log b/pkg/test/resourcefixture/testdata/resourceid/userspecifiedresourceidfordcl/_http.log new file mode 100644 index 0000000000..4bdcb1a5dc --- /dev/null +++ b/pkg/test/resourcefixture/testdata/resourceid/userspecifiedresourceidfordcl/_http.log @@ -0,0 +1,259 @@ +GET https://containeranalysis.googleapis.com/v1/projects/${projectId}/notes/containeranalysisnote-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: 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, + "message": "Requested entity was not found", + "status": "NOT_FOUND" + } +} + +--- + +POST https://containeranalysis.googleapis.com/v1/projects/${projectId}/notes?alt=json¬eId=containeranalysisnote-${uniqueId} +Content-Type: application/json +User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 + +{ + "attestation": { + "hint": { + "humanReadableName": "Attestor Note1" + } + }, + "longDescription": "long description", + "name": "projects/${projectId}/notes/containeranalysisnote-${uniqueId}", + "relatedUrl": [ + { + "label": "test", + "url": "some.url" + }, + { + "label": "google", + "url": "google.com" + } + ], + "shortDescription": "short description" +} + +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 + +{ + "attestation": { + "hint": { + "humanReadableName": "Attestor Note1" + } + }, + "createTime": "2024-04-01T12:34:56.123456Z", + "kind": "ATTESTATION", + "longDescription": "long description", + "name": "projects/${projectId}/notes/containeranalysisnote-${uniqueId}", + "relatedUrl": [ + { + "label": "test", + "url": "some.url" + }, + { + "label": "google", + "url": "google.com" + } + ], + "shortDescription": "short description", + "updateTime": "2024-04-01T12:34:56.123456Z" +} + +--- + +GET https://containeranalysis.googleapis.com/v1/projects/${projectId}/notes/containeranalysisnote-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: 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 + +{ + "attestation": { + "hint": { + "humanReadableName": "Attestor Note1" + } + }, + "createTime": "2024-04-01T12:34:56.123456Z", + "kind": "ATTESTATION", + "longDescription": "long description", + "name": "projects/${projectId}/notes/containeranalysisnote-${uniqueId}", + "relatedUrl": [ + { + "label": "test", + "url": "some.url" + }, + { + "label": "google", + "url": "google.com" + } + ], + "shortDescription": "short description", + "updateTime": "2024-04-01T12:34:56.123456Z" +} + +--- + +PATCH https://containeranalysis.googleapis.com/v1/projects/${projectId}/notes/containeranalysisnote-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 + +{ + "attestation": { + "hint": { + "humanReadableName": "Attestor Note2" + } + }, + "longDescription": "new long description", + "relatedUrl": [ + { + "label": "test", + "url": "some.url" + } + ], + "shortDescription": "short description" +} + +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 + +{ + "attestation": { + "hint": { + "humanReadableName": "Attestor Note2" + } + }, + "createTime": "2024-04-01T12:34:56.123456Z", + "kind": "ATTESTATION", + "longDescription": "new long description", + "name": "projects/${projectId}/notes/containeranalysisnote-${uniqueId}", + "relatedUrl": [ + { + "label": "test", + "url": "some.url" + } + ], + "shortDescription": "short description", + "updateTime": "2024-04-01T12:34:56.123456Z" +} + +--- + +GET https://containeranalysis.googleapis.com/v1/projects/${projectId}/notes/containeranalysisnote-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: 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 + +{ + "attestation": { + "hint": { + "humanReadableName": "Attestor Note2" + } + }, + "createTime": "2024-04-01T12:34:56.123456Z", + "kind": "ATTESTATION", + "longDescription": "new long description", + "name": "projects/${projectId}/notes/containeranalysisnote-${uniqueId}", + "relatedUrl": [ + { + "label": "test", + "url": "some.url" + } + ], + "shortDescription": "short description", + "updateTime": "2024-04-01T12:34:56.123456Z" +} + +--- + +DELETE https://containeranalysis.googleapis.com/v1/projects/${projectId}/notes/containeranalysisnote-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: 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 + +{} + +--- + +GET https://containeranalysis.googleapis.com/v1/projects/${projectId}/notes/containeranalysisnote-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: 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, + "message": "Requested entity was not found", + "status": "NOT_FOUND" + } +} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/stateabsentinspec/bigquerydataset/_http.log b/pkg/test/resourcefixture/testdata/stateabsentinspec/bigquerydataset/_http.log index 2a97bf4c24..e955a3353f 100644 --- a/pkg/test/resourcefixture/testdata/stateabsentinspec/bigquerydataset/_http.log +++ b/pkg/test/resourcefixture/testdata/stateabsentinspec/bigquerydataset/_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/stateabsentinspec/clusterleveloverride/_generated_object_clusterleveloverride.golden.yaml b/pkg/test/resourcefixture/testdata/stateabsentinspec/clusterleveloverride/_generated_object_clusterleveloverride.golden.yaml new file mode 100644 index 0000000000..2cc30642bf --- /dev/null +++ b/pkg/test/resourcefixture/testdata/stateabsentinspec/clusterleveloverride/_generated_object_clusterleveloverride.golden.yaml @@ -0,0 +1,33 @@ +apiVersion: storage.cnrm.cloud.google.com/v1beta1 +kind: StorageBucket +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: absent + finalizers: + - cnrm.cloud.google.com/finalizer + - cnrm.cloud.google.com/deletion-defender + generation: 3 + labels: + cnrm-test: "true" + label-one: value-one + newkey: newval + name: storagebucket-sample-${uniqueId} + namespace: ${uniqueId} +spec: + lifecycleRule: [] + location: US + resourceID: storagebucket-sample-${uniqueId} + versioning: + enabled: true +status: + conditions: + - lastTransitionTime: "1970-01-01T00:00:00Z" + message: The resource is up to date + reason: UpToDate + status: "True" + type: Ready + observedGeneration: 3 + selfLink: https://www.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId} + url: gs://storagebucket-sample-${uniqueId} diff --git a/pkg/test/resourcefixture/testdata/stateabsentinspec/clusterleveloverride/_http.log b/pkg/test/resourcefixture/testdata/stateabsentinspec/clusterleveloverride/_http.log new file mode 100644 index 0000000000..c8673ce90a --- /dev/null +++ b/pkg/test/resourcefixture/testdata/stateabsentinspec/clusterleveloverride/_http.log @@ -0,0 +1,408 @@ +GET https://storage.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}?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 + +404 Not Found +Cache-Control: no-cache, no-store, max-age=0, must-revalidate +Content-Type: application/json; charset=UTF-8 +Expires: Mon, 01 Jan 1990 00:00:00 GMT +Pragma: no-cache +Server: UploadServer +Vary: Origin +Vary: X-Origin + +{ + "error": { + "code": 404, + "errors": [ + { + "domain": "global", + "message": "The specified bucket does not exist.", + "reason": "notFound" + } + ], + "message": "The specified bucket does not exist." + } +} + +--- + +POST https://storage.googleapis.com/storage/v1/b?alt=json&prettyPrint=false&project=${projectId} +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 + +{ + "iamConfiguration": { + "uniformBucketLevelAccess": { + "enabled": false + } + }, + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "lifecycle": { + "rule": [ + { + "action": { + "type": "Delete" + }, + "condition": { + "age": 7 + } + } + ] + }, + "location": "US", + "name": "storagebucket-sample-${uniqueId}", + "storageClass": "STANDARD", + "versioning": { + "enabled": false + } +} + +200 OK +Cache-Control: no-cache, no-store, max-age=0, must-revalidate +Content-Type: application/json; charset=UTF-8 +Expires: Mon, 01 Jan 1990 00:00:00 GMT +Pragma: no-cache +Server: UploadServer +Vary: Origin +Vary: X-Origin + +{ + "etag": "abcdef0123A=", + "iamConfiguration": { + "bucketPolicyOnly": { + "enabled": false + }, + "publicAccessPrevention": "inherited", + "uniformBucketLevelAccess": { + "enabled": false + } + }, + "id": "000000000000000000000", + "kind": "storage#bucket", + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "lifecycle": { + "rule": [ + { + "action": { + "type": "Delete" + }, + "condition": { + "age": 7 + } + } + ] + }, + "location": "US", + "locationType": "multi-region", + "metageneration": "1", + "name": "storagebucket-sample-${uniqueId}", + "projectNumber": "${projectNumber}", + "rpo": "DEFAULT", + "selfLink": "https://www.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}", + "softDeletePolicy": { + "effectiveTime": "2024-04-01T12:34:56.123456Z", + "retentionDurationSeconds": "604800" + }, + "storageClass": "STANDARD", + "timeCreated": "2024-04-01T12:34:56.123456Z", + "updated": "2024-04-01T12:34:56.123456Z", + "versioning": { + "enabled": false + } +} + +--- + +GET https://storage.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}?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, max-age=0, must-revalidate, no-transform +Content-Type: application/json; charset=UTF-8 +Expires: {now+0m} +Server: UploadServer +Vary: Origin +Vary: X-Origin + +{ + "etag": "abcdef0123A=", + "iamConfiguration": { + "bucketPolicyOnly": { + "enabled": false + }, + "publicAccessPrevention": "inherited", + "uniformBucketLevelAccess": { + "enabled": false + } + }, + "id": "000000000000000000000", + "kind": "storage#bucket", + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true" + }, + "lifecycle": { + "rule": [ + { + "action": { + "type": "Delete" + }, + "condition": { + "age": 7 + } + } + ] + }, + "location": "US", + "locationType": "multi-region", + "metageneration": "1", + "name": "storagebucket-sample-${uniqueId}", + "projectNumber": "${projectNumber}", + "rpo": "DEFAULT", + "selfLink": "https://www.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}", + "softDeletePolicy": { + "effectiveTime": "2024-04-01T12:34:56.123456Z", + "retentionDurationSeconds": "604800" + }, + "storageClass": "STANDARD", + "timeCreated": "2024-04-01T12:34:56.123456Z", + "updated": "2024-04-01T12:34:56.123456Z", + "versioning": { + "enabled": false + } +} + +--- + +PATCH https://storage.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}?alt=json&prettyPrint=false +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 + +{ + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true", + "newkey": "newval" + }, + "lifecycle": { + "rule": [] + }, + "versioning": { + "enabled": true + } +} + +200 OK +Cache-Control: no-cache, no-store, max-age=0, must-revalidate +Content-Type: application/json; charset=UTF-8 +Expires: Mon, 01 Jan 1990 00:00:00 GMT +Pragma: no-cache +Server: UploadServer +Vary: Origin +Vary: X-Origin + +{ + "acl": [ + { + "bucket": "storagebucket-sample-${uniqueId}", + "entity": "project-owners-${projectNumber}", + "etag": "abcdef0123A", + "id": "storagebucket-sample-${uniqueId}/project-owners-${projectNumber}", + "kind": "storage#bucketAccessControl", + "projectTeam": { + "projectNumber": "${projectNumber}", + "team": "owners" + }, + "role": "OWNER", + "selfLink": "https://www.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}/acl/project-owners-${projectNumber}" + }, + { + "bucket": "storagebucket-sample-${uniqueId}", + "entity": "project-editors-${projectNumber}", + "etag": "abcdef0123A", + "id": "storagebucket-sample-${uniqueId}/project-editors-${projectNumber}", + "kind": "storage#bucketAccessControl", + "projectTeam": { + "projectNumber": "${projectNumber}", + "team": "editors" + }, + "role": "OWNER", + "selfLink": "https://www.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}/acl/project-editors-${projectNumber}" + }, + { + "bucket": "storagebucket-sample-${uniqueId}", + "entity": "project-viewers-${projectNumber}", + "etag": "abcdef0123A", + "id": "storagebucket-sample-${uniqueId}/project-viewers-${projectNumber}", + "kind": "storage#bucketAccessControl", + "projectTeam": { + "projectNumber": "${projectNumber}", + "team": "viewers" + }, + "role": "READER", + "selfLink": "https://www.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}/acl/project-viewers-${projectNumber}" + } + ], + "defaultObjectAcl": [ + { + "entity": "project-owners-${projectNumber}", + "etag": "abcdef0123A=", + "kind": "storage#objectAccessControl", + "projectTeam": { + "projectNumber": "${projectNumber}", + "team": "owners" + }, + "role": "OWNER" + }, + { + "entity": "project-editors-${projectNumber}", + "etag": "abcdef0123A=", + "kind": "storage#objectAccessControl", + "projectTeam": { + "projectNumber": "${projectNumber}", + "team": "editors" + }, + "role": "OWNER" + }, + { + "entity": "project-viewers-${projectNumber}", + "etag": "abcdef0123A=", + "kind": "storage#objectAccessControl", + "projectTeam": { + "projectNumber": "${projectNumber}", + "team": "viewers" + }, + "role": "READER" + } + ], + "etag": "abcdef0123A=", + "iamConfiguration": { + "bucketPolicyOnly": { + "enabled": false + }, + "publicAccessPrevention": "inherited", + "uniformBucketLevelAccess": { + "enabled": false + } + }, + "id": "000000000000000000000", + "kind": "storage#bucket", + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true", + "newkey": "newval" + }, + "location": "US", + "locationType": "multi-region", + "metageneration": "2", + "name": "storagebucket-sample-${uniqueId}", + "owner": { + "entity": "project-owners-${projectNumber}" + }, + "projectNumber": "${projectNumber}", + "rpo": "DEFAULT", + "selfLink": "https://www.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}", + "softDeletePolicy": { + "effectiveTime": "2024-04-01T12:34:56.123456Z", + "retentionDurationSeconds": "604800" + }, + "storageClass": "STANDARD", + "timeCreated": "2024-04-01T12:34:56.123456Z", + "updated": "2024-04-01T12:34:56.123456Z", + "versioning": { + "enabled": true + } +} + +--- + +GET https://storage.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}?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, max-age=0, must-revalidate, no-transform +Content-Type: application/json; charset=UTF-8 +Expires: {now+0m} +Server: UploadServer +Vary: Origin +Vary: X-Origin + +{ + "etag": "abcdef0123A=", + "iamConfiguration": { + "bucketPolicyOnly": { + "enabled": false + }, + "publicAccessPrevention": "inherited", + "uniformBucketLevelAccess": { + "enabled": false + } + }, + "id": "000000000000000000000", + "kind": "storage#bucket", + "labels": { + "cnrm-test": "true", + "label-one": "value-one", + "managed-by-cnrm": "true", + "newkey": "newval" + }, + "location": "US", + "locationType": "multi-region", + "metageneration": "2", + "name": "storagebucket-sample-${uniqueId}", + "projectNumber": "${projectNumber}", + "rpo": "DEFAULT", + "selfLink": "https://www.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}", + "softDeletePolicy": { + "effectiveTime": "2024-04-01T12:34:56.123456Z", + "retentionDurationSeconds": "604800" + }, + "storageClass": "STANDARD", + "timeCreated": "2024-04-01T12:34:56.123456Z", + "updated": "2024-04-01T12:34:56.123456Z", + "versioning": { + "enabled": true + } +} + +--- + +GET https://storage.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}/o?alt=json&prettyPrint=false&versions=true +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, max-age=0, must-revalidate, no-transform +Content-Type: application/json; charset=UTF-8 +Expires: {now+0m} +Server: UploadServer +Vary: Origin +Vary: X-Origin + +{ + "kind": "storage#objects" +} + +--- + +DELETE https://storage.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}?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 + +204 No Content +Cache-Control: no-cache, no-store, max-age=0, must-revalidate +Content-Type: application/json +Expires: Mon, 01 Jan 1990 00:00:00 GMT +Pragma: no-cache +Server: UploadServer +Vary: Origin +Vary: X-Origin \ No newline at end of file diff --git a/scripts/github-actions/tests-e2e-fixtures b/scripts/github-actions/tests-e2e-fixtures index 18f961758c..cdf16c1a1c 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 a1e7229d9a..71baeee10b 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 From dd6d5317e4d5e0b2b9b433d3e918f3284d78bf02 Mon Sep 17 00:00:00 2001 From: Yuwen Ma Date: Thu, 20 Jun 2024 01:20:41 +0000 Subject: [PATCH 2/3] split presubmit test --- scripts/github-actions/tests-e2e-fixtures | 4 ++-- scripts/github-actions/tests-e2e-samples | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/github-actions/tests-e2e-fixtures b/scripts/github-actions/tests-e2e-fixtures index cdf16c1a1c..067d668ebc 100755 --- a/scripts/github-actions/tests-e2e-fixtures +++ b/scripts/github-actions/tests-e2e-fixtures @@ -27,8 +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 \ +# 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 71baeee10b..a1e7229d9a 100755 --- a/scripts/github-actions/tests-e2e-samples +++ b/scripts/github-actions/tests-e2e-samples @@ -27,8 +27,6 @@ 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 From b3f13c7e32f20ef5ac8dbb568b28e79263c9e6a0 Mon Sep 17 00:00:00 2001 From: Yuwen Ma Date: Thu, 20 Jun 2024 04:26:01 +0000 Subject: [PATCH 3/3] fix monitoringdashboard direct e2e failure --- scripts/github-actions/tests-e2e-direct.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/github-actions/tests-e2e-direct.sh b/scripts/github-actions/tests-e2e-direct.sh index efe45ff93b..62c7743483 100755 --- a/scripts/github-actions/tests-e2e-direct.sh +++ b/scripts/github-actions/tests-e2e-direct.sh @@ -24,7 +24,7 @@ cd ${REPO_ROOT}/ echo "Downloading envtest assets..." export KUBEBUILDER_ASSETS=$(go run sigs.k8s.io/controller-runtime/tools/setup-envtest@latest use -p path) -export KCC_USE_DIRECT_RECONCILERS=MonitoringDashboard +KCC_USE_DIRECT_RECONCILERS=MonitoringDashboard echo "Running e2e tests samples for LoggingLogMetric direct reconciliation..." GOLDEN_OBJECT_CHECKS=1 \