diff --git a/apis/compute/v1beta1/targettcpproxy_types.go b/apis/compute/v1beta1/targettcpproxy_types.go index fb17ec5ece..635d090b0f 100644 --- a/apis/compute/v1beta1/targettcpproxy_types.go +++ b/apis/compute/v1beta1/targettcpproxy_types.go @@ -87,7 +87,7 @@ type ComputeTargetTCPProxyObservedState struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +kubebuilder:resource:categories=gcp,shortName=gcpcomputetargettcpproxy;gcpcomputetargettcpproxies // +kubebuilder:subresource:status -// +kubebuilder:metadata:labels="cnrm.cloud.google.com/tf2crd=true";"cnrm.cloud.google.com/stability-level=stable";"cnrm.cloud.google.com/managed-by-kcc=true";"cnrm.cloud.google.com/system=true" +// +kubebuilder:metadata:labels="cnrm.cloud.google.com/stability-level=stable";"cnrm.cloud.google.com/managed-by-kcc=true";"cnrm.cloud.google.com/system=true" // +kubebuilder:printcolumn:name="Age",JSONPath=".metadata.creationTimestamp",type="date" // +kubebuilder:printcolumn:name="Ready",JSONPath=".status.conditions[?(@.type=='Ready')].status",type="string",description="When 'True', the most recent reconcile of the resource succeeded" // +kubebuilder:printcolumn:name="Status",JSONPath=".status.conditions[?(@.type=='Ready')].reason",type="string",description="The reason for the value in 'Ready'" diff --git a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_computetargettcpproxies.compute.cnrm.cloud.google.com.yaml b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_computetargettcpproxies.compute.cnrm.cloud.google.com.yaml index 185478604c..62498aa367 100644 --- a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_computetargettcpproxies.compute.cnrm.cloud.google.com.yaml +++ b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_computetargettcpproxies.compute.cnrm.cloud.google.com.yaml @@ -8,7 +8,6 @@ metadata: cnrm.cloud.google.com/managed-by-kcc: "true" cnrm.cloud.google.com/stability-level: stable cnrm.cloud.google.com/system: "true" - cnrm.cloud.google.com/tf2crd: "true" name: computetargettcpproxies.compute.cnrm.cloud.google.com spec: group: compute.cnrm.cloud.google.com diff --git a/config/samples/resources/computetargettcpproxy/compute_v1beta1_computebackendservice.yaml b/config/samples/resources/computetargettcpproxy/global-target-tcp-proxy/compute_v1beta1_computebackendservice.yaml similarity index 100% rename from config/samples/resources/computetargettcpproxy/compute_v1beta1_computebackendservice.yaml rename to config/samples/resources/computetargettcpproxy/global-target-tcp-proxy/compute_v1beta1_computebackendservice.yaml diff --git a/config/samples/resources/computetargettcpproxy/compute_v1beta1_computehealthcheck.yaml b/config/samples/resources/computetargettcpproxy/global-target-tcp-proxy/compute_v1beta1_computehealthcheck.yaml similarity index 100% rename from config/samples/resources/computetargettcpproxy/compute_v1beta1_computehealthcheck.yaml rename to config/samples/resources/computetargettcpproxy/global-target-tcp-proxy/compute_v1beta1_computehealthcheck.yaml diff --git a/config/samples/resources/computetargettcpproxy/compute_v1beta1_computetargettcpproxy.yaml b/config/samples/resources/computetargettcpproxy/global-target-tcp-proxy/compute_v1beta1_computetargettcpproxy.yaml similarity index 94% rename from config/samples/resources/computetargettcpproxy/compute_v1beta1_computetargettcpproxy.yaml rename to config/samples/resources/computetargettcpproxy/global-target-tcp-proxy/compute_v1beta1_computetargettcpproxy.yaml index cc8620b6e6..8d792b07e9 100644 --- a/config/samples/resources/computetargettcpproxy/compute_v1beta1_computetargettcpproxy.yaml +++ b/config/samples/resources/computetargettcpproxy/global-target-tcp-proxy/compute_v1beta1_computetargettcpproxy.yaml @@ -17,6 +17,6 @@ kind: ComputeTargetTCPProxy metadata: name: computetargettcpproxy-sample spec: - description: "A sample TCP proxy." + description: "A sample global TCP proxy." backendServiceRef: name: computetargettcpproxy-dep diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-full/dependencies.yaml b/config/samples/resources/computetargettcpproxy/regional-target-tcp-proxy/compute_v1beta1_computebackendservice.yaml similarity index 57% rename from pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-full/dependencies.yaml rename to config/samples/resources/computetargettcpproxy/regional-target-tcp-proxy/compute_v1beta1_computebackendservice.yaml index 41e379a2fe..6be7ced742 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-full/dependencies.yaml +++ b/config/samples/resources/computetargettcpproxy/regional-target-tcp-proxy/compute_v1beta1_computebackendservice.yaml @@ -1,10 +1,10 @@ -# Copyright 2022 Google LLC +# Copyright 2020 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 +# 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, @@ -12,24 +12,17 @@ # See the License for the specific language governing permissions and # limitations under the License. -apiVersion: compute.cnrm.cloud.google.com/v1beta1 -kind: ComputeHealthCheck -metadata: - name: computehealthcheck-${uniqueId} -spec: - checkIntervalSec: 10 - tcpHealthCheck: - port: 443 - location: global ---- apiVersion: compute.cnrm.cloud.google.com/v1beta1 kind: ComputeBackendService metadata: - name: computebackendservice-${uniqueId} + name: computetargettcpproxy-dep spec: healthChecks: - healthCheckRef: - name: computehealthcheck-${uniqueId} - location: global + name: computetargettcpproxy-dep + location: europe-west4 protocol: TCP - + # Default loadBalancingScheme for regional backend service is INTERNAL + # Set to INTERNAL_MANAGED when being referenced by Regional Target TCP Proxy + # googleapi error: Regional Target TCP Proxy cannot be used with BackendServices with schema INTERNAL + loadBalancingScheme: INTERNAL_MANAGED diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-basic/update.yaml b/config/samples/resources/computetargettcpproxy/regional-target-tcp-proxy/compute_v1beta1_computehealthcheck.yaml similarity index 66% rename from pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-basic/update.yaml rename to config/samples/resources/computetargettcpproxy/regional-target-tcp-proxy/compute_v1beta1_computehealthcheck.yaml index 5ce9fad643..b951f269f3 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-basic/update.yaml +++ b/config/samples/resources/computetargettcpproxy/regional-target-tcp-proxy/compute_v1beta1_computehealthcheck.yaml @@ -1,10 +1,10 @@ -# Copyright 2022 Google LLC +# Copyright 2020 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 +# 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, @@ -13,11 +13,11 @@ # limitations under the License. apiVersion: compute.cnrm.cloud.google.com/v1beta1 -kind: ComputeTargetTCPProxy +kind: ComputeHealthCheck metadata: - annotations: - cnrm.cloud.google.com/project-id: ${projectId} - name: computetargettcpproxy-${uniqueId} + name: computetargettcpproxy-dep spec: - backendServiceRef: - name: computebackendservice-${uniqueId} + checkIntervalSec: 10 + tcpHealthCheck: + port: 443 + location: europe-west4 diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-full/create.yaml b/config/samples/resources/computetargettcpproxy/regional-target-tcp-proxy/compute_v1beta1_computetargettcpproxy.yaml similarity index 70% rename from pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-full/create.yaml rename to config/samples/resources/computetargettcpproxy/regional-target-tcp-proxy/compute_v1beta1_computetargettcpproxy.yaml index 93b78899f0..00dd64cd91 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-full/create.yaml +++ b/config/samples/resources/computetargettcpproxy/regional-target-tcp-proxy/compute_v1beta1_computetargettcpproxy.yaml @@ -1,10 +1,10 @@ -# Copyright 2022 Google LLC +# Copyright 2020 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 +# 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, @@ -15,12 +15,11 @@ apiVersion: compute.cnrm.cloud.google.com/v1beta1 kind: ComputeTargetTCPProxy metadata: - annotations: - cnrm.cloud.google.com/project-id: ${projectId} - name: computetargettcpproxy-${uniqueId} + name: computetargettcpproxy-sample spec: - description: "test target tcp proxy" + description: "A sample regional TCP proxy." backendServiceRef: - name: computebackendservice-${uniqueId} + name: computetargettcpproxy-dep proxyBind: false proxyHeader: NONE + location: europe-west4 diff --git a/pkg/clients/generated/apis/compute/v1beta1/computetargettcpproxy_types.go b/pkg/clients/generated/apis/compute/v1beta1/computetargettcpproxy_types.go index 2e2da7dc85..95055f81e2 100644 --- a/pkg/clients/generated/apis/compute/v1beta1/computetargettcpproxy_types.go +++ b/pkg/clients/generated/apis/compute/v1beta1/computetargettcpproxy_types.go @@ -89,7 +89,7 @@ type ComputeTargetTCPProxyStatus struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +kubebuilder:resource:categories=gcp,shortName=gcpcomputetargettcpproxy;gcpcomputetargettcpproxies // +kubebuilder:subresource:status -// +kubebuilder:metadata:labels="cnrm.cloud.google.com/managed-by-kcc=true";"cnrm.cloud.google.com/stability-level=stable";"cnrm.cloud.google.com/system=true";"cnrm.cloud.google.com/tf2crd=true" +// +kubebuilder:metadata:labels="cnrm.cloud.google.com/managed-by-kcc=true";"cnrm.cloud.google.com/stability-level=stable";"cnrm.cloud.google.com/system=true" // +kubebuilder:printcolumn:name="Age",JSONPath=".metadata.creationTimestamp",type="date" // +kubebuilder:printcolumn:name="Ready",JSONPath=".status.conditions[?(@.type=='Ready')].status",type="string",description="When 'True', the most recent reconcile of the resource succeeded" // +kubebuilder:printcolumn:name="Status",JSONPath=".status.conditions[?(@.type=='Ready')].reason",type="string",description="The reason for the value in 'Ready'" diff --git a/pkg/gvks/supportedgvks/gvks_generated.go b/pkg/gvks/supportedgvks/gvks_generated.go index c8d013c40e..812de015ce 100644 --- a/pkg/gvks/supportedgvks/gvks_generated.go +++ b/pkg/gvks/supportedgvks/gvks_generated.go @@ -1862,7 +1862,6 @@ var SupportedGVKs = map[schema.GroupVersionKind]GVKMetadata{ "cnrm.cloud.google.com/managed-by-kcc": "true", "cnrm.cloud.google.com/stability-level": "stable", "cnrm.cloud.google.com/system": "true", - "cnrm.cloud.google.com/tf2crd": "true", }, }, { diff --git a/pkg/snippet/snippetgeneration/snippetgeneration.go b/pkg/snippet/snippetgeneration/snippetgeneration.go index 096b00d872..8e196bbb7f 100644 --- a/pkg/snippet/snippetgeneration/snippetgeneration.go +++ b/pkg/snippet/snippetgeneration/snippetgeneration.go @@ -68,6 +68,7 @@ var preferredSampleForResource = map[string]string{ "computesslcertificate": "global-compute-ssl-certificate", "computesslpolicy": "modern-tls-1-1-ssl-policy", "computetargethttpsproxy": "target-https-proxy-with-ssl-certificates", + "computetargettcpproxy": "global-target-tcp-proxy", "computeurlmap": "global-compute-url-map", "configcontrollerinstance": "autopilot-config-controller-instance", "containerattachedcluster": "container-attached-cluster-basic", diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-basic-direct/_generated_object_globalcomputetargettcpproxy-basic-direct.golden.yaml b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-basic-direct/_generated_object_globalcomputetargettcpproxy-basic-direct.golden.yaml index 0666f344ce..f329cfcf00 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-basic-direct/_generated_object_globalcomputetargettcpproxy-basic-direct.golden.yaml +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-basic-direct/_generated_object_globalcomputetargettcpproxy-basic-direct.golden.yaml @@ -2,7 +2,6 @@ apiVersion: compute.cnrm.cloud.google.com/v1beta1 kind: ComputeTargetTCPProxy metadata: annotations: - alpha.cnrm.cloud.google.com/reconciler: direct cnrm.cloud.google.com/management-conflict-prevention-policy: none cnrm.cloud.google.com/project-id: ${projectId} finalizers: diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-basic-direct/create.yaml b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-basic-direct/create.yaml index a0a6cfca7b..5d3a378aa6 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-basic-direct/create.yaml +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-basic-direct/create.yaml @@ -17,7 +17,6 @@ kind: ComputeTargetTCPProxy metadata: annotations: cnrm.cloud.google.com/project-id: ${projectId} - alpha.cnrm.cloud.google.com/reconciler: "direct" name: computetargettcpproxy-${uniqueId} spec: backendServiceRef: diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-basic-direct/update.yaml b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-basic-direct/update.yaml index a0a6cfca7b..5d3a378aa6 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-basic-direct/update.yaml +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-basic-direct/update.yaml @@ -17,7 +17,6 @@ kind: ComputeTargetTCPProxy metadata: annotations: cnrm.cloud.google.com/project-id: ${projectId} - alpha.cnrm.cloud.google.com/reconciler: "direct" name: computetargettcpproxy-${uniqueId} spec: backendServiceRef: diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-basic/_generated_object_globalcomputetargettcpproxy-basic.golden.yaml b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-basic/_generated_object_globalcomputetargettcpproxy-basic.golden.yaml deleted file mode 100644 index 86e2070b44..0000000000 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-basic/_generated_object_globalcomputetargettcpproxy-basic.golden.yaml +++ /dev/null @@ -1,30 +0,0 @@ -apiVersion: compute.cnrm.cloud.google.com/v1beta1 -kind: ComputeTargetTCPProxy -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: 2 - labels: - cnrm-test: "true" - name: computetargettcpproxy-${uniqueId} - namespace: ${uniqueId} -spec: - backendServiceRef: - name: computebackendservice-${uniqueId} - resourceID: computetargettcpproxy-${uniqueId} -status: - conditions: - - lastTransitionTime: "1970-01-01T00:00:00Z" - message: The resource is up to date - reason: UpToDate - status: "True" - type: Ready - creationTimestamp: "1970-01-01T00:00:00Z" - observedGeneration: 2 - proxyId: 1111111111111111 - selfLink: https://www.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId} diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-basic/_http.log b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-basic/_http.log deleted file mode 100644 index dcb387066d..0000000000 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-basic/_http.log +++ /dev/null @@ -1,537 +0,0 @@ -GET https://compute.googleapis.com/compute/v1/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/v1/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": 443, - "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://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", - "startTime": "2024-04-01T12:34:56.123456Z", - "status": "DONE" -} - ---- - -GET https://compute.googleapis.com/compute/v1/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://www.googleapis.com/compute/v1/projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}", - "tcpHealthCheck": { - "port": 443, - "proxyHeader": "NONE" - }, - "timeoutSec": 5, - "type": "TCP", - "unhealthyThreshold": 2 -} - ---- - -GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}?alt=json -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/backendServices/computebackendservice-${uniqueId}' was not found", - "reason": "notFound" - } - ], - "message": "The resource 'projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}' was not found" - } -} - ---- - -POST https://compute.googleapis.com/compute/v1/projects/${projectId}/global/backendServices?alt=json -Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager - -{ - "connectionDraining": { - "drainingTimeoutSec": 300 - }, - "healthChecks": [ - "https://www.googleapis.com/compute/v1/projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}" - ], - "iap": { - "enabled": false, - "oauth2ClientId": "", - "oauth2ClientSecret": "" - }, - "loadBalancingScheme": "EXTERNAL", - "name": "computebackendservice-${uniqueId}", - "protocol": "TCP" -} - -200 OK -Cache-Control: private -Content-Type: application/json; charset=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/v1/projects/${projectId}/global/operations/${operationID}", - "startTime": "2024-04-01T12:34:56.123456Z", - "status": "DONE" -} - ---- - -GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}?alt=json -Content-Type: 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 - -{ - "connectionDraining": { - "drainingTimeoutSec": 300 - }, - "creationTimestamp": "2024-04-01T12:34:56.123456Z", - "healthChecks": [ - "https://www.googleapis.com/compute/v1/projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}" - ], - "iap": { - "enabled": false, - "oauth2ClientId": "", - "oauth2ClientSecret": "" - }, - "id": "000000000000000000000", - "kind": "compute#backendService", - "loadBalancingScheme": "EXTERNAL", - "name": "computebackendservice-${uniqueId}", - "protocol": "TCP", - "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}" -} - ---- - -GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/${targetTcpProxyID}?alt=json -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/targetTcpProxies/computetargettcpproxy-${uniqueId}' was not found", - "reason": "notFound" - } - ], - "message": "The resource 'projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId}' was not found" - } -} - ---- - -POST https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies?alt=json -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": "computetargettcpproxy-${uniqueId}", - "proxyHeader": "NONE", - "service": "projects/${projectId}/global/backendServices/computebackendservice-${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 - -{ - "id": "000000000000000000000", - "insertTime": "2024-04-01T12:34:56.123456Z", - "kind": "compute#operation", - "name": "${operationID}", - "operationType": "insert", - "progress": 0, - "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", - "startTime": "2024-04-01T12:34:56.123456Z", - "status": "RUNNING", - "targetId": "${targetTcpProxyID}", - "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId}", - "user": "user@example.com" -} - ---- - -GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/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 - -{ - "endTime": "2024-04-01T12:34:56.123456Z", - "id": "000000000000000000000", - "insertTime": "2024-04-01T12:34:56.123456Z", - "kind": "compute#operation", - "name": "${operationID}", - "operationType": "insert", - "progress": 100, - "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", - "startTime": "2024-04-01T12:34:56.123456Z", - "status": "DONE", - "targetId": "${targetTcpProxyID}", - "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId}", - "user": "user@example.com" -} - ---- - -GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/${targetTcpProxyID}?alt=json -Content-Type: 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", - "id": "000000000000000000000", - "kind": "compute#targetTcpProxy", - "name": "computetargettcpproxy-${uniqueId}", - "proxyHeader": "NONE", - "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId}", - "service": "projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}" -} - ---- - -DELETE https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/${targetTcpProxyID}?alt=json -Content-Type: 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/v1/projects/${projectId}/global/operations/${operationID}", - "startTime": "2024-04-01T12:34:56.123456Z", - "status": "RUNNING", - "targetId": "${targetTcpProxyID}", - "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId}", - "user": "user@example.com" -} - ---- - -GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/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 - -{ - "endTime": "2024-04-01T12:34:56.123456Z", - "id": "000000000000000000000", - "insertTime": "2024-04-01T12:34:56.123456Z", - "kind": "compute#operation", - "name": "${operationID}", - "operationType": "delete", - "progress": 100, - "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", - "startTime": "2024-04-01T12:34:56.123456Z", - "status": "DONE", - "targetId": "${targetTcpProxyID}", - "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId}", - "user": "user@example.com" -} - ---- - -GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}?alt=json -Content-Type: 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 - -{ - "connectionDraining": { - "drainingTimeoutSec": 300 - }, - "creationTimestamp": "2024-04-01T12:34:56.123456Z", - "healthChecks": [ - "https://www.googleapis.com/compute/v1/projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}" - ], - "iap": { - "enabled": false, - "oauth2ClientId": "", - "oauth2ClientSecret": "" - }, - "id": "000000000000000000000", - "kind": "compute#backendService", - "loadBalancingScheme": "EXTERNAL", - "name": "computebackendservice-${uniqueId}", - "protocol": "TCP", - "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}" -} - ---- - -DELETE https://compute.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}?alt=json -Content-Type: 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://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", - "startTime": "2024-04-01T12:34:56.123456Z", - "status": "DONE" -} - ---- - -GET https://compute.googleapis.com/compute/v1/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://www.googleapis.com/compute/v1/projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}", - "tcpHealthCheck": { - "port": 443, - "proxyHeader": "NONE" - }, - "timeoutSec": 5, - "type": "TCP", - "unhealthyThreshold": 2 -} - ---- - -DELETE https://compute.googleapis.com/compute/v1/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://www.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/computetargettcpproxy/globalcomputetargettcpproxy-basic/create.yaml b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-basic/create.yaml deleted file mode 100644 index 5ce9fad643..0000000000 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-basic/create.yaml +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright 2022 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: compute.cnrm.cloud.google.com/v1beta1 -kind: ComputeTargetTCPProxy -metadata: - annotations: - cnrm.cloud.google.com/project-id: ${projectId} - name: computetargettcpproxy-${uniqueId} -spec: - backendServiceRef: - name: computebackendservice-${uniqueId} diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-basic/dependencies.yaml b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-basic/dependencies.yaml deleted file mode 100644 index fdc8db7396..0000000000 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-basic/dependencies.yaml +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 2022 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: compute.cnrm.cloud.google.com/v1beta1 -kind: ComputeHealthCheck -metadata: - name: computehealthcheck-${uniqueId} -spec: - checkIntervalSec: 10 - tcpHealthCheck: - port: 443 - location: global ---- -apiVersion: compute.cnrm.cloud.google.com/v1beta1 -kind: ComputeBackendService -metadata: - name: computebackendservice-${uniqueId} -spec: - healthChecks: - - healthCheckRef: - name: computehealthcheck-${uniqueId} - location: global - protocol: TCP diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-full-direct/_generated_object_globalcomputetargettcpproxy-full-direct.golden.yaml b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-full-direct/_generated_object_globalcomputetargettcpproxy-full-direct.golden.yaml index 4d9666af4d..d1f6e98310 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-full-direct/_generated_object_globalcomputetargettcpproxy-full-direct.golden.yaml +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-full-direct/_generated_object_globalcomputetargettcpproxy-full-direct.golden.yaml @@ -2,7 +2,6 @@ apiVersion: compute.cnrm.cloud.google.com/v1beta1 kind: ComputeTargetTCPProxy metadata: annotations: - alpha.cnrm.cloud.google.com/reconciler: direct cnrm.cloud.google.com/management-conflict-prevention-policy: none cnrm.cloud.google.com/project-id: ${projectId} finalizers: diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-full-direct/create.yaml b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-full-direct/create.yaml index ac752438cd..1f0e8edefe 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-full-direct/create.yaml +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-full-direct/create.yaml @@ -17,7 +17,6 @@ kind: ComputeTargetTCPProxy metadata: annotations: cnrm.cloud.google.com/project-id: ${projectId} - alpha.cnrm.cloud.google.com/reconciler: "direct" name: computetargettcpproxy-${uniqueId} spec: description: "test target tcp proxy" diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-full-direct/update.yaml b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-full-direct/update.yaml index a55980feac..c014943098 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-full-direct/update.yaml +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-full-direct/update.yaml @@ -17,7 +17,6 @@ kind: ComputeTargetTCPProxy metadata: annotations: cnrm.cloud.google.com/project-id: ${projectId} - alpha.cnrm.cloud.google.com/reconciler: "direct" name: computetargettcpproxy-${uniqueId} spec: description: "test target tcp proxy" diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-full/_generated_object_globalcomputetargettcpproxy-full.golden.yaml b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-full/_generated_object_globalcomputetargettcpproxy-full.golden.yaml deleted file mode 100644 index 320b868b4d..0000000000 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-full/_generated_object_globalcomputetargettcpproxy-full.golden.yaml +++ /dev/null @@ -1,33 +0,0 @@ -apiVersion: compute.cnrm.cloud.google.com/v1beta1 -kind: ComputeTargetTCPProxy -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" - name: computetargettcpproxy-${uniqueId} - namespace: ${uniqueId} -spec: - backendServiceRef: - name: computebackendservice-${uniqueId} - description: test target tcp proxy - proxyBind: false - proxyHeader: PROXY_V1 - resourceID: computetargettcpproxy-${uniqueId} -status: - conditions: - - lastTransitionTime: "1970-01-01T00:00:00Z" - message: The resource is up to date - reason: UpToDate - status: "True" - type: Ready - creationTimestamp: "1970-01-01T00:00:00Z" - observedGeneration: 3 - proxyId: 1111111111111111 - selfLink: https://www.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId} diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-full/_http.log b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-full/_http.log deleted file mode 100644 index e83ff3a1e7..0000000000 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-full/_http.log +++ /dev/null @@ -1,635 +0,0 @@ -GET https://compute.googleapis.com/compute/v1/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/v1/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": 443, - "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://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", - "startTime": "2024-04-01T12:34:56.123456Z", - "status": "DONE" -} - ---- - -GET https://compute.googleapis.com/compute/v1/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://www.googleapis.com/compute/v1/projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}", - "tcpHealthCheck": { - "port": 443, - "proxyHeader": "NONE" - }, - "timeoutSec": 5, - "type": "TCP", - "unhealthyThreshold": 2 -} - ---- - -GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}?alt=json -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/backendServices/computebackendservice-${uniqueId}' was not found", - "reason": "notFound" - } - ], - "message": "The resource 'projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}' was not found" - } -} - ---- - -POST https://compute.googleapis.com/compute/v1/projects/${projectId}/global/backendServices?alt=json -Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager - -{ - "connectionDraining": { - "drainingTimeoutSec": 300 - }, - "healthChecks": [ - "https://www.googleapis.com/compute/v1/projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}" - ], - "iap": { - "enabled": false, - "oauth2ClientId": "", - "oauth2ClientSecret": "" - }, - "loadBalancingScheme": "EXTERNAL", - "name": "computebackendservice-${uniqueId}", - "protocol": "TCP" -} - -200 OK -Cache-Control: private -Content-Type: application/json; charset=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/v1/projects/${projectId}/global/operations/${operationID}", - "startTime": "2024-04-01T12:34:56.123456Z", - "status": "DONE" -} - ---- - -GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}?alt=json -Content-Type: 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 - -{ - "connectionDraining": { - "drainingTimeoutSec": 300 - }, - "creationTimestamp": "2024-04-01T12:34:56.123456Z", - "healthChecks": [ - "https://www.googleapis.com/compute/v1/projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}" - ], - "iap": { - "enabled": false, - "oauth2ClientId": "", - "oauth2ClientSecret": "" - }, - "id": "000000000000000000000", - "kind": "compute#backendService", - "loadBalancingScheme": "EXTERNAL", - "name": "computebackendservice-${uniqueId}", - "protocol": "TCP", - "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}" -} - ---- - -GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/${targetTcpProxyID}?alt=json -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/targetTcpProxies/computetargettcpproxy-${uniqueId}' was not found", - "reason": "notFound" - } - ], - "message": "The resource 'projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId}' was not found" - } -} - ---- - -POST https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies?alt=json -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": "test target tcp proxy", - "name": "computetargettcpproxy-${uniqueId}", - "proxyHeader": "NONE", - "service": "projects/${projectId}/global/backendServices/computebackendservice-${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 - -{ - "id": "000000000000000000000", - "insertTime": "2024-04-01T12:34:56.123456Z", - "kind": "compute#operation", - "name": "${operationID}", - "operationType": "insert", - "progress": 0, - "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", - "startTime": "2024-04-01T12:34:56.123456Z", - "status": "RUNNING", - "targetId": "${targetTcpProxyID}", - "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId}", - "user": "user@example.com" -} - ---- - -GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/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 - -{ - "endTime": "2024-04-01T12:34:56.123456Z", - "id": "000000000000000000000", - "insertTime": "2024-04-01T12:34:56.123456Z", - "kind": "compute#operation", - "name": "${operationID}", - "operationType": "insert", - "progress": 100, - "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", - "startTime": "2024-04-01T12:34:56.123456Z", - "status": "DONE", - "targetId": "${targetTcpProxyID}", - "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId}", - "user": "user@example.com" -} - ---- - -GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/${targetTcpProxyID}?alt=json -Content-Type: 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": "test target tcp proxy", - "id": "000000000000000000000", - "kind": "compute#targetTcpProxy", - "name": "computetargettcpproxy-${uniqueId}", - "proxyHeader": "NONE", - "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId}", - "service": "projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}" -} - ---- - -POST https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/${targetTcpProxyID}/setProxyHeader?alt=json -Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager - -{ - "proxyHeader": "PROXY_V1" -} - -200 OK -Cache-Control: private -Content-Type: application/json; charset=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": "TargetTcpProxySetProxyHeader", - "progress": 0, - "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", - "startTime": "2024-04-01T12:34:56.123456Z", - "status": "RUNNING", - "targetId": "${targetTcpProxyID}", - "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId}", - "user": "user@example.com" -} - ---- - -GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/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 - -{ - "endTime": "2024-04-01T12:34:56.123456Z", - "id": "000000000000000000000", - "insertTime": "2024-04-01T12:34:56.123456Z", - "kind": "compute#operation", - "name": "${operationID}", - "operationType": "TargetTcpProxySetProxyHeader", - "progress": 100, - "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", - "startTime": "2024-04-01T12:34:56.123456Z", - "status": "DONE", - "targetId": "${targetTcpProxyID}", - "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId}", - "user": "user@example.com" -} - ---- - -GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/${targetTcpProxyID}?alt=json -Content-Type: 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": "test target tcp proxy", - "id": "000000000000000000000", - "kind": "compute#targetTcpProxy", - "name": "computetargettcpproxy-${uniqueId}", - "proxyHeader": "PROXY_V1", - "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId}", - "service": "projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}" -} - ---- - -DELETE https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/${targetTcpProxyID}?alt=json -Content-Type: 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/v1/projects/${projectId}/global/operations/${operationID}", - "startTime": "2024-04-01T12:34:56.123456Z", - "status": "RUNNING", - "targetId": "${targetTcpProxyID}", - "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId}", - "user": "user@example.com" -} - ---- - -GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/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 - -{ - "endTime": "2024-04-01T12:34:56.123456Z", - "id": "000000000000000000000", - "insertTime": "2024-04-01T12:34:56.123456Z", - "kind": "compute#operation", - "name": "${operationID}", - "operationType": "delete", - "progress": 100, - "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", - "startTime": "2024-04-01T12:34:56.123456Z", - "status": "DONE", - "targetId": "${targetTcpProxyID}", - "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId}", - "user": "user@example.com" -} - ---- - -GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}?alt=json -Content-Type: 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 - -{ - "connectionDraining": { - "drainingTimeoutSec": 300 - }, - "creationTimestamp": "2024-04-01T12:34:56.123456Z", - "healthChecks": [ - "https://www.googleapis.com/compute/v1/projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}" - ], - "iap": { - "enabled": false, - "oauth2ClientId": "", - "oauth2ClientSecret": "" - }, - "id": "000000000000000000000", - "kind": "compute#backendService", - "loadBalancingScheme": "EXTERNAL", - "name": "computebackendservice-${uniqueId}", - "protocol": "TCP", - "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}" -} - ---- - -DELETE https://compute.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}?alt=json -Content-Type: 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://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", - "startTime": "2024-04-01T12:34:56.123456Z", - "status": "DONE" -} - ---- - -GET https://compute.googleapis.com/compute/v1/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://www.googleapis.com/compute/v1/projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}", - "tcpHealthCheck": { - "port": 443, - "proxyHeader": "NONE" - }, - "timeoutSec": 5, - "type": "TCP", - "unhealthyThreshold": 2 -} - ---- - -DELETE https://compute.googleapis.com/compute/v1/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://www.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/computetargettcpproxy/globalcomputetargettcpproxy-full/update.yaml b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-full/update.yaml deleted file mode 100644 index 3019011cd8..0000000000 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-full/update.yaml +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright 2022 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: compute.cnrm.cloud.google.com/v1beta1 -kind: ComputeTargetTCPProxy -metadata: - annotations: - cnrm.cloud.google.com/project-id: ${projectId} - name: computetargettcpproxy-${uniqueId} -spec: - description: "test target tcp proxy" - backendServiceRef: - name: computebackendservice-${uniqueId} - proxyBind: false - proxyHeader: PROXY_V1 diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/regionalcomputetargettcpproxy-direct/_generated_object_regionalcomputetargettcpproxy-direct.golden.yaml b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/regionalcomputetargettcpproxy-direct/_generated_object_regionalcomputetargettcpproxy-direct.golden.yaml index 3aebc9be5f..9d4dd85530 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/regionalcomputetargettcpproxy-direct/_generated_object_regionalcomputetargettcpproxy-direct.golden.yaml +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/regionalcomputetargettcpproxy-direct/_generated_object_regionalcomputetargettcpproxy-direct.golden.yaml @@ -2,7 +2,6 @@ apiVersion: compute.cnrm.cloud.google.com/v1beta1 kind: ComputeTargetTCPProxy metadata: annotations: - alpha.cnrm.cloud.google.com/reconciler: direct cnrm.cloud.google.com/management-conflict-prevention-policy: none cnrm.cloud.google.com/project-id: ${projectId} finalizers: diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/regionalcomputetargettcpproxy-direct/_http.log b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/regionalcomputetargettcpproxy-direct/_http.log index 1c70b18a1d..053014c986 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/regionalcomputetargettcpproxy-direct/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/regionalcomputetargettcpproxy-direct/_http.log @@ -225,7 +225,7 @@ X-Xss-Protection: 0 GET https://compute.googleapis.com/compute/v1/projects/${projectId}/regions/europe-west4/targetTcpProxies/${targetTcpProxyID} Content-Type: application/json User-Agent: kcc/controller-manager -x-goog-request-params: project=${projectId}®ion=europe-west4&target_tcp_proxy=computetargettcpproxy-${uniqueId} +x-goog-request-params: project=${projectId}®ion=europe-west4&target_tcp_proxy=${targetTcpProxyID} 404 Not Found Cache-Control: private @@ -335,7 +335,7 @@ X-Xss-Protection: 0 GET https://compute.googleapis.com/compute/v1/projects/${projectId}/regions/europe-west4/targetTcpProxies/${targetTcpProxyID} Content-Type: application/json User-Agent: kcc/controller-manager -x-goog-request-params: project=${projectId}®ion=europe-west4&target_tcp_proxy=computetargettcpproxy-${uniqueId} +x-goog-request-params: project=${projectId}®ion=europe-west4&target_tcp_proxy=${targetTcpProxyID} 200 OK Cache-Control: private @@ -366,7 +366,7 @@ X-Xss-Protection: 0 DELETE https://compute.googleapis.com/compute/v1/projects/${projectId}/regions/europe-west4/targetTcpProxies/${targetTcpProxyID} Content-Type: application/json User-Agent: kcc/controller-manager -x-goog-request-params: project=${projectId}®ion=europe-west4&target_tcp_proxy=computetargettcpproxy-${uniqueId} +x-goog-request-params: project=${projectId}®ion=europe-west4&target_tcp_proxy=${targetTcpProxyID} 200 OK Cache-Control: private diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/regionalcomputetargettcpproxy-direct/create.yaml b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/regionalcomputetargettcpproxy-direct/create.yaml index 7e384eaa4f..9634eb3a14 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/regionalcomputetargettcpproxy-direct/create.yaml +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/regionalcomputetargettcpproxy-direct/create.yaml @@ -17,7 +17,6 @@ kind: ComputeTargetTCPProxy metadata: annotations: cnrm.cloud.google.com/project-id: ${projectId} - alpha.cnrm.cloud.google.com/reconciler: "direct" name: computetargettcpproxy-${uniqueId} spec: description: "test target tcp proxy" diff --git a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/compute/computetargettcpproxy.md b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/compute/computetargettcpproxy.md index ea27c12cb6..8621841de1 100644 --- a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/compute/computetargettcpproxy.md +++ b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/compute/computetargettcpproxy.md @@ -56,6 +56,9 @@ +ComputeTargetTCPProxy can manage both global and regional target TCP proxies. To manage a global ComputeTargetTCPProxy, no need to specify `spec.location` + or use a value of `global` in the `spec.location` field. To manage a regional ComputeTargetTCPProxy, use a region name in the `spec.location` field. + ## Custom Resource Definition Properties @@ -302,7 +305,7 @@ selfLink: string ## Sample YAML(s) -### Typical Use Case +### Global Target Tcp Proxy ```yaml # Copyright 2020 Google LLC # @@ -323,7 +326,7 @@ kind: ComputeTargetTCPProxy metadata: name: computetargettcpproxy-sample spec: - description: "A sample TCP proxy." + description: "A sample global TCP proxy." backendServiceRef: name: computetargettcpproxy-dep --- @@ -349,6 +352,60 @@ spec: location: global ``` +### Regional Target Tcp Proxy +```yaml +# Copyright 2020 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: compute.cnrm.cloud.google.com/v1beta1 +kind: ComputeTargetTCPProxy +metadata: + name: computetargettcpproxy-sample +spec: + description: "A sample regional TCP proxy." + backendServiceRef: + name: computetargettcpproxy-dep + proxyBind: false + proxyHeader: NONE + location: europe-west4 +--- +apiVersion: compute.cnrm.cloud.google.com/v1beta1 +kind: ComputeBackendService +metadata: + name: computetargettcpproxy-dep +spec: + healthChecks: + - healthCheckRef: + name: computetargettcpproxy-dep + location: europe-west4 + protocol: TCP + # Default loadBalancingScheme for regional backend service is INTERNAL + # Set to INTERNAL_MANAGED when being referenced by Regional Target TCP Proxy + # googleapi error: Regional Target TCP Proxy cannot be used with BackendServices with schema INTERNAL + loadBalancingScheme: INTERNAL_MANAGED +--- +apiVersion: compute.cnrm.cloud.google.com/v1beta1 +kind: ComputeHealthCheck +metadata: + name: computetargettcpproxy-dep +spec: + checkIntervalSec: 10 + tcpHealthCheck: + port: 443 + location: europe-west4 +``` + Note: If you have any trouble with instantiating the resource, refer to Troubleshoot Config Connector. diff --git a/scripts/generate-google3-docs/resource-reference/templates/compute_computetargettcpproxy.tmpl b/scripts/generate-google3-docs/resource-reference/templates/compute_computetargettcpproxy.tmpl index b23225a310..bee0113c2c 100644 --- a/scripts/generate-google3-docs/resource-reference/templates/compute_computetargettcpproxy.tmpl +++ b/scripts/generate-google3-docs/resource-reference/templates/compute_computetargettcpproxy.tmpl @@ -49,6 +49,9 @@ +{{ .Kind}} can manage both global and regional target TCP proxies. To manage a global {{ .Kind}}, no need to specify `spec.location` + or use a value of `global` in the `spec.location` field. To manage a regional {{ .Kind}}, use a region name in the `spec.location` field. + {{template "resource.tmpl" .}} {{template "endnote.tmpl" .}} {% endblock %} \ No newline at end of file