diff --git a/mockgcp/mockcompute/globaltargettcpproxyv1.go b/mockgcp/mockcompute/globaltargettcpproxyv1.go index b54f6b21de..a1df48b876 100644 --- a/mockgcp/mockcompute/globaltargettcpproxyv1.go +++ b/mockgcp/mockcompute/globaltargettcpproxyv1.go @@ -107,6 +107,36 @@ func (s *GlobalTargetTcpProxyV1) Delete(ctx context.Context, req *pb.DeleteTarge }) } +func (s *GlobalTargetTcpProxyV1) SetBackendService(ctx context.Context, req *pb.SetBackendServiceTargetTcpProxyRequest) (*pb.Operation, error) { + reqName := "projects/" + req.GetProject() + "/global/targetTcpProxies/" + req.GetTargetTcpProxy() + name, err := s.parseTargetTcpProxyName(reqName) + if err != nil { + return nil, err + } + + fqn := name.String() + + obj := &pb.TargetTcpProxy{} + if err := s.storage.Get(ctx, fqn, obj); err != nil { + return nil, err + } + + obj.Service = req.GetTargetTcpProxiesSetBackendServiceRequestResource().Service + if err := s.storage.Update(ctx, fqn, obj); err != nil { + return nil, err + } + + op := &pb.Operation{ + TargetId: obj.Id, + TargetLink: obj.SelfLink, + OperationType: PtrTo("TargetTcpProxySetBackendService"), + User: PtrTo("user@example.com"), + } + return s.startGlobalLRO(ctx, name.Project.ID, op, func() (proto.Message, error) { + return obj, nil + }) +} + func (s *GlobalTargetTcpProxyV1) SetProxyHeader(ctx context.Context, req *pb.SetProxyHeaderTargetTcpProxyRequest) (*pb.Operation, error) { reqName := "projects/" + req.GetProject() + "/global/targetTcpProxies/" + req.GetTargetTcpProxy() name, err := s.parseTargetTcpProxyName(reqName) diff --git a/pkg/controller/direct/compute/targettcpproxy/targettcpproxy_controller.go b/pkg/controller/direct/compute/targettcpproxy/targettcpproxy_controller.go index 7f206fb069..e48e8fccc3 100644 --- a/pkg/controller/direct/compute/targettcpproxy/targettcpproxy_controller.go +++ b/pkg/controller/direct/compute/targettcpproxy/targettcpproxy_controller.go @@ -113,6 +113,14 @@ func (m *targetTCPProxyModel) AdapterForObject(ctx context.Context, reader clien } location := parent.Region + // Handle API/TF default values + if *obj.Spec.ProxyBind == false { + obj.Spec.ProxyBind = nil + } + if obj.Spec.ProxyHeader == nil { + obj.Spec.ProxyHeader = direct.PtrTo("NONE") + } + // Get GCP client if location == "global" { gcpClient, err := m.client(ctx) @@ -256,42 +264,43 @@ func (a *targetTCPProxyAdapter) Update(ctx context.Context, updateOp *directbase targetTCPProxy.Name = direct.LazyPtr(tokens[len(tokens)-1]) // Regional API does not support Update - if !reflect.DeepEqual(targetTCPProxy.Service, a.actual.Service) && region == "global" { - setBackendServiceReq := &computepb.SetBackendServiceTargetTcpProxyRequest{ + if !reflect.DeepEqual(targetTCPProxy.ProxyHeader, a.actual.ProxyHeader) && region == "global" { + setProxyHeaderReq := &computepb.SetProxyHeaderTargetTcpProxyRequest{ Project: parent.ProjectID, - TargetTcpProxiesSetBackendServiceRequestResource: &computepb.TargetTcpProxiesSetBackendServiceRequest{Service: targetTCPProxy.Service}, + TargetTcpProxiesSetProxyHeaderRequestResource: &computepb.TargetTcpProxiesSetProxyHeaderRequest{ProxyHeader: targetTCPProxy.ProxyHeader}, TargetTcpProxy: tokens[len(tokens)-1], } - op, err = a.targetTcpProxiesClient.SetBackendService(ctx, setBackendServiceReq) + op, err = a.targetTcpProxiesClient.SetProxyHeader(ctx, setProxyHeaderReq) if err != nil { - return fmt.Errorf("updating ComputeTargetTCPProxy backend service %s: %w", a.id.External, err) + return fmt.Errorf("updating ComputeTargetTCPProxy proxy header %s: %w", a.id.External, err) } if !op.Done() { err = op.Wait(ctx) if err != nil { - return fmt.Errorf("waiting ComputeTargetTCPProxy backend service %s update failed: %w", a.id.External, err) + return fmt.Errorf("waiting ComputeTargetTCPProxy proxy header %s update failed: %w", a.id.External, err) } } - log.V(2).Info("successfully updated ComputeTargetTCPProxy backend service", "name", a.id.External) - + log.V(2).Info("successfully updated ComputeTargetTCPProxy proxy header", "name", a.id.External) } - if !reflect.DeepEqual(targetTCPProxy.ProxyHeader, a.actual.ProxyHeader) && region == "global" { - setProxyHeaderReq := &computepb.SetProxyHeaderTargetTcpProxyRequest{ + + if !reflect.DeepEqual(targetTCPProxy.Service, a.actual.Service) && region == "global" { + setBackendServiceReq := &computepb.SetBackendServiceTargetTcpProxyRequest{ Project: parent.ProjectID, - TargetTcpProxiesSetProxyHeaderRequestResource: &computepb.TargetTcpProxiesSetProxyHeaderRequest{ProxyHeader: targetTCPProxy.ProxyHeader}, + TargetTcpProxiesSetBackendServiceRequestResource: &computepb.TargetTcpProxiesSetBackendServiceRequest{Service: targetTCPProxy.Service}, TargetTcpProxy: tokens[len(tokens)-1], } - op, err = a.targetTcpProxiesClient.SetProxyHeader(ctx, setProxyHeaderReq) + op, err = a.targetTcpProxiesClient.SetBackendService(ctx, setBackendServiceReq) if err != nil { - return fmt.Errorf("updating ComputeTargetTCPProxy proxy header %s: %w", a.id.External, err) + return fmt.Errorf("updating ComputeTargetTCPProxy backend service %s: %w", a.id.External, err) } if !op.Done() { err = op.Wait(ctx) if err != nil { - return fmt.Errorf("waiting ComputeTargetTCPProxy proxy header %s update failed: %w", a.id.External, err) + return fmt.Errorf("waiting ComputeTargetTCPProxy backend service %s update failed: %w", a.id.External, err) } } - log.V(2).Info("successfully updated ComputeTargetTCPProxy proxy header", "name", a.id.External) + log.V(2).Info("successfully updated ComputeTargetTCPProxy backend service", "name", a.id.External) + } // Get the updated resource 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..e7a8056ef5 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 @@ -8,14 +8,14 @@ metadata: finalizers: - cnrm.cloud.google.com/finalizer - cnrm.cloud.google.com/deletion-defender - generation: 1 + generation: 2 labels: cnrm-test: "true" name: computetargettcpproxy-${uniqueId} namespace: ${uniqueId} spec: backendServiceRef: - name: computebackendservice-${uniqueId} + name: computebackendservice-2-${uniqueId} status: conditions: - lastTransitionTime: "1970-01-01T00:00:00Z" @@ -25,6 +25,6 @@ status: type: Ready creationTimestamp: "1970-01-01T00:00:00Z" externalRef: projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId} - observedGeneration: 1 + 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-direct/_http.log b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-basic-direct/_http.log index 5e3acf7777..35d61cd05f 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-basic-direct/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-basic-direct/_http.log @@ -19,11 +19,11 @@ X-Xss-Protection: 0 "errors": [ { "domain": "global", - "message": "healthCheck \"projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}\" not found", + "message": "The resource 'projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}' was not found", "reason": "notFound" } ], - "message": "healthCheck \"projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}\" not found" + "message": "The resource 'projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}' was not found" } } @@ -62,10 +62,46 @@ X-Xss-Protection: 0 "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": "DONE" + "status": "RUNNING", + "targetId": "4997480492536308160", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/healthChecks/computehealthcheck-${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": "4997480492536308160", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}", + "user": "user@example.com" } --- @@ -172,10 +208,46 @@ X-Xss-Protection: 0 "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": "DONE" + "status": "RUNNING", + "targetId": "4614492404711563731", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${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": "4614492404711563731", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}", + "user": "user@example.com" } --- @@ -196,10 +268,75 @@ X-Frame-Options: SAMEORIGIN X-Xss-Protection: 0 { + "affinityCookieTtlSec": 0, "connectionDraining": { "drainingTimeoutSec": 300 }, "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "description": "", + "enableCDN": false, + "fingerprint": "abcdef0123A=", + "healthChecks": [ + "https://www.googleapis.com/compute/beta/projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}" + ], + "iap": { + "enabled": false, + "oauth2ClientId": "", + "oauth2ClientSecretSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "id": "000000000000000000000", + "kind": "compute#backendService", + "loadBalancingScheme": "EXTERNAL", + "name": "computebackendservice-${uniqueId}", + "port": 80, + "portName": "http", + "protocol": "TCP", + "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}", + "sessionAffinity": "NONE", + "timeoutSec": 30 +} + +--- + +GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-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": "The resource 'projects/${projectId}/global/backendServices/computebackendservice-2-${uniqueId}' was not found", + "reason": "notFound" + } + ], + "message": "The resource 'projects/${projectId}/global/backendServices/computebackendservice-2-${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}" ], @@ -208,12 +345,113 @@ X-Xss-Protection: 0 "oauth2ClientId": "", "oauth2ClientSecret": "" }, + "loadBalancingScheme": "EXTERNAL", + "name": "computebackendservice-2-${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}", + "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": "2547329846352159165", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-2-${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": "2547329846352159165", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-2-${uniqueId}", + "user": "user@example.com" +} + +--- + +GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-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 + +{ + "affinityCookieTtlSec": 0, + "connectionDraining": { + "drainingTimeoutSec": 300 + }, + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "description": "", + "enableCDN": false, + "fingerprint": "abcdef0123A=", + "healthChecks": [ + "https://www.googleapis.com/compute/beta/projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}" + ], + "iap": { + "enabled": false, + "oauth2ClientId": "", + "oauth2ClientSecretSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, "id": "000000000000000000000", "kind": "compute#backendService", "loadBalancingScheme": "EXTERNAL", - "name": "computebackendservice-${uniqueId}", + "name": "computebackendservice-2-${uniqueId}", + "port": 80, + "portName": "http", "protocol": "TCP", - "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}" + "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-2-${uniqueId}", + "sessionAffinity": "NONE", + "timeoutSec": 30 } --- @@ -257,6 +495,7 @@ x-goog-request-params: project=${projectId} { "name": "computetargettcpproxy-${uniqueId}", + "proxyHeader": "NONE", "service": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}" } @@ -350,6 +589,105 @@ X-Xss-Protection: 0 --- +POST https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/${targetTcpProxyID}/setBackendService +Content-Type: application/json +User-Agent: kcc/controller-manager +x-goog-request-params: project=${projectId}&target_tcp_proxy=${targetTcpProxyID} + +{ + "service": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-2-${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": "TargetTcpProxySetBackendService", + "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} +Content-Type: application/json +User-Agent: kcc/controller-manager +x-goog-request-params: project=${projectId}&operation=${operationID} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=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": "TargetTcpProxySetBackendService", + "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} +Content-Type: application/json +User-Agent: kcc/controller-manager +x-goog-request-params: project=${projectId}&target_tcp_proxy=${targetTcpProxyID} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=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": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-2-${uniqueId}" +} + +--- + DELETE https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/${targetTcpProxyID} Content-Type: application/json User-Agent: kcc/controller-manager @@ -417,6 +755,116 @@ X-Xss-Protection: 0 --- +GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-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 + +{ + "affinityCookieTtlSec": 0, + "connectionDraining": { + "drainingTimeoutSec": 300 + }, + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "description": "", + "enableCDN": false, + "fingerprint": "abcdef0123A=", + "healthChecks": [ + "https://www.googleapis.com/compute/beta/projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}" + ], + "iap": { + "enabled": false, + "oauth2ClientId": "", + "oauth2ClientSecretSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "id": "000000000000000000000", + "kind": "compute#backendService", + "loadBalancingScheme": "EXTERNAL", + "name": "computebackendservice-2-${uniqueId}", + "port": 80, + "portName": "http", + "protocol": "TCP", + "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-2-${uniqueId}", + "sessionAffinity": "NONE", + "timeoutSec": 30 +} + +--- + +DELETE https://compute.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-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}", + "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": "2547329846352159165", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-2-${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": "2547329846352159165", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-2-${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 @@ -433,24 +881,32 @@ X-Frame-Options: SAMEORIGIN X-Xss-Protection: 0 { + "affinityCookieTtlSec": 0, "connectionDraining": { "drainingTimeoutSec": 300 }, "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "description": "", + "enableCDN": false, + "fingerprint": "abcdef0123A=", "healthChecks": [ - "https://www.googleapis.com/compute/v1/projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}" + "https://www.googleapis.com/compute/beta/projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}" ], "iap": { "enabled": false, "oauth2ClientId": "", - "oauth2ClientSecret": "" + "oauth2ClientSecretSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" }, "id": "000000000000000000000", "kind": "compute#backendService", "loadBalancingScheme": "EXTERNAL", "name": "computebackendservice-${uniqueId}", + "port": 80, + "portName": "http", "protocol": "TCP", - "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}" + "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}", + "sessionAffinity": "NONE", + "timeoutSec": 30 } --- @@ -475,10 +931,46 @@ X-Xss-Protection: 0 "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": "DONE" + "status": "RUNNING", + "targetId": "4614492404711563731", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${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": "4614492404711563731", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}", + "user": "user@example.com" } --- @@ -537,8 +1029,44 @@ X-Xss-Protection: 0 "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": "DONE" + "status": "RUNNING", + "targetId": "4997480492536308160", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/healthChecks/computehealthcheck-${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": "4997480492536308160", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}", + "user": "user@example.com" } \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-basic-direct/dependencies.yaml b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-basic-direct/dependencies.yaml index 479fc938a0..517d412e07 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-basic-direct/dependencies.yaml +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-basic-direct/dependencies.yaml @@ -32,3 +32,14 @@ spec: name: computehealthcheck-${uniqueId} location: global protocol: TCP +--- +apiVersion: compute.cnrm.cloud.google.com/v1beta1 +kind: ComputeBackendService +metadata: + name: computebackendservice-2-${uniqueId} +spec: + healthChecks: + - healthCheckRef: + name: computehealthcheck-${uniqueId} + location: global + protocol: TCP 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..038ab2359a 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 @@ -21,4 +21,4 @@ metadata: name: computetargettcpproxy-${uniqueId} spec: backendServiceRef: - name: computebackendservice-${uniqueId} + name: computebackendservice-2-${uniqueId} 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 index 86e2070b44..e512eda532 100644 --- 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 @@ -8,14 +8,14 @@ metadata: finalizers: - cnrm.cloud.google.com/finalizer - cnrm.cloud.google.com/deletion-defender - generation: 2 + generation: 3 labels: cnrm-test: "true" name: computetargettcpproxy-${uniqueId} namespace: ${uniqueId} spec: backendServiceRef: - name: computebackendservice-${uniqueId} + name: computebackendservice-2-${uniqueId} resourceID: computetargettcpproxy-${uniqueId} status: conditions: @@ -25,6 +25,6 @@ status: status: "True" type: Ready creationTimestamp: "1970-01-01T00:00:00Z" - observedGeneration: 2 + 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-basic/_http.log b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-basic/_http.log index dcb387066d..d9d14e69ee 100644 --- 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 @@ -19,11 +19,11 @@ X-Xss-Protection: 0 "errors": [ { "domain": "global", - "message": "healthCheck \"projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}\" not found", + "message": "The resource 'projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}' was not found", "reason": "notFound" } ], - "message": "healthCheck \"projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}\" not found" + "message": "The resource 'projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}' was not found" } } @@ -62,10 +62,46 @@ X-Xss-Protection: 0 "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": "DONE" + "status": "RUNNING", + "targetId": "8828366513390103266", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/healthChecks/computehealthcheck-${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": "8828366513390103266", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}", + "user": "user@example.com" } --- @@ -172,10 +208,46 @@ X-Xss-Protection: 0 "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": "DONE" + "status": "RUNNING", + "targetId": "3590941675906804470", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${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": "3590941675906804470", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}", + "user": "user@example.com" } --- @@ -196,10 +268,75 @@ X-Frame-Options: SAMEORIGIN X-Xss-Protection: 0 { + "affinityCookieTtlSec": 0, "connectionDraining": { "drainingTimeoutSec": 300 }, "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "description": "", + "enableCDN": false, + "fingerprint": "abcdef0123A=", + "healthChecks": [ + "https://www.googleapis.com/compute/beta/projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}" + ], + "iap": { + "enabled": false, + "oauth2ClientId": "", + "oauth2ClientSecretSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "id": "000000000000000000000", + "kind": "compute#backendService", + "loadBalancingScheme": "EXTERNAL", + "name": "computebackendservice-${uniqueId}", + "port": 80, + "portName": "http", + "protocol": "TCP", + "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}", + "sessionAffinity": "NONE", + "timeoutSec": 30 +} + +--- + +GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-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": "The resource 'projects/${projectId}/global/backendServices/computebackendservice-2-${uniqueId}' was not found", + "reason": "notFound" + } + ], + "message": "The resource 'projects/${projectId}/global/backendServices/computebackendservice-2-${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}" ], @@ -208,12 +345,113 @@ X-Xss-Protection: 0 "oauth2ClientId": "", "oauth2ClientSecret": "" }, + "loadBalancingScheme": "EXTERNAL", + "name": "computebackendservice-2-${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}", + "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": "2456801560774191808", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-2-${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": "2456801560774191808", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-2-${uniqueId}", + "user": "user@example.com" +} + +--- + +GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-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 + +{ + "affinityCookieTtlSec": 0, + "connectionDraining": { + "drainingTimeoutSec": 300 + }, + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "description": "", + "enableCDN": false, + "fingerprint": "abcdef0123A=", + "healthChecks": [ + "https://www.googleapis.com/compute/beta/projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}" + ], + "iap": { + "enabled": false, + "oauth2ClientId": "", + "oauth2ClientSecretSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, "id": "000000000000000000000", "kind": "compute#backendService", "loadBalancingScheme": "EXTERNAL", - "name": "computebackendservice-${uniqueId}", + "name": "computebackendservice-2-${uniqueId}", + "port": 80, + "portName": "http", "protocol": "TCP", - "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}" + "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-2-${uniqueId}", + "sessionAffinity": "NONE", + "timeoutSec": 30 } --- @@ -341,7 +579,102 @@ X-Xss-Protection: 0 "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}" + "service": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}" +} + +--- + +POST https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/${targetTcpProxyID}/setBackendService?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "service": "projects/${projectId}/global/backendServices/computebackendservice-2-${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": "TargetTcpProxySetBackendService", + "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": "TargetTcpProxySetBackendService", + "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": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/backendServices/computebackendservice-2-${uniqueId}" } --- @@ -410,6 +743,116 @@ X-Xss-Protection: 0 --- +GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-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 + +{ + "affinityCookieTtlSec": 0, + "connectionDraining": { + "drainingTimeoutSec": 300 + }, + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "description": "", + "enableCDN": false, + "fingerprint": "abcdef0123A=", + "healthChecks": [ + "https://www.googleapis.com/compute/beta/projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}" + ], + "iap": { + "enabled": false, + "oauth2ClientId": "", + "oauth2ClientSecretSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "id": "000000000000000000000", + "kind": "compute#backendService", + "loadBalancingScheme": "EXTERNAL", + "name": "computebackendservice-2-${uniqueId}", + "port": 80, + "portName": "http", + "protocol": "TCP", + "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-2-${uniqueId}", + "sessionAffinity": "NONE", + "timeoutSec": 30 +} + +--- + +DELETE https://compute.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-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}", + "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": "2456801560774191808", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-2-${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": "2456801560774191808", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-2-${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 @@ -426,24 +869,32 @@ X-Frame-Options: SAMEORIGIN X-Xss-Protection: 0 { + "affinityCookieTtlSec": 0, "connectionDraining": { "drainingTimeoutSec": 300 }, "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "description": "", + "enableCDN": false, + "fingerprint": "abcdef0123A=", "healthChecks": [ - "https://www.googleapis.com/compute/v1/projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}" + "https://www.googleapis.com/compute/beta/projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}" ], "iap": { "enabled": false, "oauth2ClientId": "", - "oauth2ClientSecret": "" + "oauth2ClientSecretSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" }, "id": "000000000000000000000", "kind": "compute#backendService", "loadBalancingScheme": "EXTERNAL", "name": "computebackendservice-${uniqueId}", + "port": 80, + "portName": "http", "protocol": "TCP", - "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}" + "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}", + "sessionAffinity": "NONE", + "timeoutSec": 30 } --- @@ -468,10 +919,46 @@ X-Xss-Protection: 0 "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": "DONE" + "status": "RUNNING", + "targetId": "3590941675906804470", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${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": "3590941675906804470", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}", + "user": "user@example.com" } --- @@ -530,8 +1017,44 @@ X-Xss-Protection: 0 "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": "DONE" + "status": "RUNNING", + "targetId": "8828366513390103266", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/healthChecks/computehealthcheck-${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": "8828366513390103266", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}", + "user": "user@example.com" } \ No newline at end of file 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 index fdc8db7396..c41cc45b26 100644 --- 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 @@ -32,3 +32,14 @@ spec: name: computehealthcheck-${uniqueId} location: global protocol: TCP +--- +apiVersion: compute.cnrm.cloud.google.com/v1beta1 +kind: ComputeBackendService +metadata: + name: computebackendservice-2-${uniqueId} +spec: + healthChecks: + - healthCheckRef: + name: computehealthcheck-${uniqueId} + location: global + protocol: TCP diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-basic/update.yaml b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-basic/update.yaml index 5ce9fad643..a2a61fc383 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-basic/update.yaml +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-basic/update.yaml @@ -20,4 +20,4 @@ metadata: name: computetargettcpproxy-${uniqueId} spec: backendServiceRef: - name: computebackendservice-${uniqueId} + name: computebackendservice-2-${uniqueId} 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..14ce893ff2 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 @@ -15,7 +15,7 @@ metadata: namespace: ${uniqueId} spec: backendServiceRef: - name: computebackendservice-${uniqueId} + name: computebackendservice-2-${uniqueId} description: test target tcp proxy proxyBind: false proxyHeader: PROXY_V1 diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-full-direct/_http.log b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-full-direct/_http.log index f073db55df..62bcd77919 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-full-direct/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-full-direct/_http.log @@ -19,11 +19,11 @@ X-Xss-Protection: 0 "errors": [ { "domain": "global", - "message": "healthCheck \"projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}\" not found", + "message": "The resource 'projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}' was not found", "reason": "notFound" } ], - "message": "healthCheck \"projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}\" not found" + "message": "The resource 'projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}' was not found" } } @@ -62,10 +62,46 @@ X-Xss-Protection: 0 "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": "DONE" + "status": "RUNNING", + "targetId": "5178479120288455085", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/healthChecks/computehealthcheck-${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": "5178479120288455085", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}", + "user": "user@example.com" } --- @@ -172,10 +208,46 @@ X-Xss-Protection: 0 "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": "DONE" + "status": "RUNNING", + "targetId": "1225275063659534753", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${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": "1225275063659534753", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}", + "user": "user@example.com" } --- @@ -196,10 +268,75 @@ X-Frame-Options: SAMEORIGIN X-Xss-Protection: 0 { + "affinityCookieTtlSec": 0, "connectionDraining": { "drainingTimeoutSec": 300 }, "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "description": "", + "enableCDN": false, + "fingerprint": "abcdef0123A=", + "healthChecks": [ + "https://www.googleapis.com/compute/beta/projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}" + ], + "iap": { + "enabled": false, + "oauth2ClientId": "", + "oauth2ClientSecretSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "id": "000000000000000000000", + "kind": "compute#backendService", + "loadBalancingScheme": "EXTERNAL", + "name": "computebackendservice-${uniqueId}", + "port": 80, + "portName": "http", + "protocol": "TCP", + "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}", + "sessionAffinity": "NONE", + "timeoutSec": 30 +} + +--- + +GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-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": "The resource 'projects/${projectId}/global/backendServices/computebackendservice-2-${uniqueId}' was not found", + "reason": "notFound" + } + ], + "message": "The resource 'projects/${projectId}/global/backendServices/computebackendservice-2-${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}" ], @@ -208,12 +345,113 @@ X-Xss-Protection: 0 "oauth2ClientId": "", "oauth2ClientSecret": "" }, + "loadBalancingScheme": "EXTERNAL", + "name": "computebackendservice-2-${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}", + "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": "773108027792431499", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-2-${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": "773108027792431499", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-2-${uniqueId}", + "user": "user@example.com" +} + +--- + +GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-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 + +{ + "affinityCookieTtlSec": 0, + "connectionDraining": { + "drainingTimeoutSec": 300 + }, + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "description": "", + "enableCDN": false, + "fingerprint": "abcdef0123A=", + "healthChecks": [ + "https://www.googleapis.com/compute/beta/projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}" + ], + "iap": { + "enabled": false, + "oauth2ClientId": "", + "oauth2ClientSecretSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, "id": "000000000000000000000", "kind": "compute#backendService", "loadBalancingScheme": "EXTERNAL", - "name": "computebackendservice-${uniqueId}", + "name": "computebackendservice-2-${uniqueId}", + "port": 80, + "portName": "http", "protocol": "TCP", - "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}" + "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-2-${uniqueId}", + "sessionAffinity": "NONE", + "timeoutSec": 30 } --- @@ -426,6 +664,77 @@ X-Xss-Protection: 0 --- +POST https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/${targetTcpProxyID}/setBackendService +Content-Type: application/json +User-Agent: kcc/controller-manager +x-goog-request-params: project=${projectId}&target_tcp_proxy=${targetTcpProxyID} + +{ + "service": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-2-${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": "TargetTcpProxySetBackendService", + "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} +Content-Type: application/json +User-Agent: kcc/controller-manager +x-goog-request-params: project=${projectId}&operation=${operationID} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=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": "TargetTcpProxySetBackendService", + "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} Content-Type: application/json User-Agent: kcc/controller-manager @@ -451,7 +760,7 @@ X-Xss-Protection: 0 "proxyBind": false, "proxyHeader": "PROXY_V1", "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId}", - "service": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}" + "service": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-2-${uniqueId}" } --- @@ -523,6 +832,116 @@ X-Xss-Protection: 0 --- +GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-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 + +{ + "affinityCookieTtlSec": 0, + "connectionDraining": { + "drainingTimeoutSec": 300 + }, + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "description": "", + "enableCDN": false, + "fingerprint": "abcdef0123A=", + "healthChecks": [ + "https://www.googleapis.com/compute/beta/projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}" + ], + "iap": { + "enabled": false, + "oauth2ClientId": "", + "oauth2ClientSecretSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "id": "000000000000000000000", + "kind": "compute#backendService", + "loadBalancingScheme": "EXTERNAL", + "name": "computebackendservice-2-${uniqueId}", + "port": 80, + "portName": "http", + "protocol": "TCP", + "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-2-${uniqueId}", + "sessionAffinity": "NONE", + "timeoutSec": 30 +} + +--- + +DELETE https://compute.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-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}", + "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": "773108027792431499", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-2-${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": "773108027792431499", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-2-${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 @@ -539,24 +958,32 @@ X-Frame-Options: SAMEORIGIN X-Xss-Protection: 0 { + "affinityCookieTtlSec": 0, "connectionDraining": { "drainingTimeoutSec": 300 }, "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "description": "", + "enableCDN": false, + "fingerprint": "abcdef0123A=", "healthChecks": [ - "https://www.googleapis.com/compute/v1/projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}" + "https://www.googleapis.com/compute/beta/projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}" ], "iap": { "enabled": false, "oauth2ClientId": "", - "oauth2ClientSecret": "" + "oauth2ClientSecretSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" }, "id": "000000000000000000000", "kind": "compute#backendService", "loadBalancingScheme": "EXTERNAL", "name": "computebackendservice-${uniqueId}", + "port": 80, + "portName": "http", "protocol": "TCP", - "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}" + "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}", + "sessionAffinity": "NONE", + "timeoutSec": 30 } --- @@ -581,10 +1008,46 @@ X-Xss-Protection: 0 "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": "DONE" + "status": "RUNNING", + "targetId": "1225275063659534753", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${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": "1225275063659534753", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}", + "user": "user@example.com" } --- @@ -643,8 +1106,44 @@ X-Xss-Protection: 0 "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": "DONE" + "status": "RUNNING", + "targetId": "5178479120288455085", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/healthChecks/computehealthcheck-${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": "5178479120288455085", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}", + "user": "user@example.com" } \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-full-direct/dependencies.yaml b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-full-direct/dependencies.yaml index 479fc938a0..9f42316727 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-full-direct/dependencies.yaml +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-full-direct/dependencies.yaml @@ -32,3 +32,14 @@ spec: name: computehealthcheck-${uniqueId} location: global protocol: TCP +--- + apiVersion: compute.cnrm.cloud.google.com/v1beta1 + kind: ComputeBackendService + metadata: + name: computebackendservice-2-${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/update.yaml b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-full-direct/update.yaml index a55980feac..59aac878c5 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 @@ -22,6 +22,6 @@ metadata: spec: description: "test target tcp proxy" backendServiceRef: - name: computebackendservice-${uniqueId} + name: computebackendservice-2-${uniqueId} proxyBind: false proxyHeader: PROXY_V1 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 index 320b868b4d..4eb4a133f9 100644 --- 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 @@ -15,7 +15,7 @@ metadata: namespace: ${uniqueId} spec: backendServiceRef: - name: computebackendservice-${uniqueId} + name: computebackendservice-2-${uniqueId} description: test target tcp proxy proxyBind: false proxyHeader: PROXY_V1 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 index e83ff3a1e7..1ebf1de697 100644 --- 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 @@ -19,11 +19,11 @@ X-Xss-Protection: 0 "errors": [ { "domain": "global", - "message": "healthCheck \"projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}\" not found", + "message": "The resource 'projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}' was not found", "reason": "notFound" } ], - "message": "healthCheck \"projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}\" not found" + "message": "The resource 'projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}' was not found" } } @@ -62,10 +62,46 @@ X-Xss-Protection: 0 "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": "DONE" + "status": "RUNNING", + "targetId": "3851802364374817541", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/healthChecks/computehealthcheck-${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": "3851802364374817541", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}", + "user": "user@example.com" } --- @@ -172,10 +208,46 @@ X-Xss-Protection: 0 "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": "DONE" + "status": "RUNNING", + "targetId": "4910521161572555544", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${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": "4910521161572555544", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}", + "user": "user@example.com" } --- @@ -196,10 +268,75 @@ X-Frame-Options: SAMEORIGIN X-Xss-Protection: 0 { + "affinityCookieTtlSec": 0, "connectionDraining": { "drainingTimeoutSec": 300 }, "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "description": "", + "enableCDN": false, + "fingerprint": "abcdef0123A=", + "healthChecks": [ + "https://www.googleapis.com/compute/beta/projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}" + ], + "iap": { + "enabled": false, + "oauth2ClientId": "", + "oauth2ClientSecretSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "id": "000000000000000000000", + "kind": "compute#backendService", + "loadBalancingScheme": "EXTERNAL", + "name": "computebackendservice-${uniqueId}", + "port": 80, + "portName": "http", + "protocol": "TCP", + "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}", + "sessionAffinity": "NONE", + "timeoutSec": 30 +} + +--- + +GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-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": "The resource 'projects/${projectId}/global/backendServices/computebackendservice-2-${uniqueId}' was not found", + "reason": "notFound" + } + ], + "message": "The resource 'projects/${projectId}/global/backendServices/computebackendservice-2-${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}" ], @@ -208,12 +345,113 @@ X-Xss-Protection: 0 "oauth2ClientId": "", "oauth2ClientSecret": "" }, + "loadBalancingScheme": "EXTERNAL", + "name": "computebackendservice-2-${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}", + "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": "5649337042078931171", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-2-${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": "5649337042078931171", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-2-${uniqueId}", + "user": "user@example.com" +} + +--- + +GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-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 + +{ + "affinityCookieTtlSec": 0, + "connectionDraining": { + "drainingTimeoutSec": 300 + }, + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "description": "", + "enableCDN": false, + "fingerprint": "abcdef0123A=", + "healthChecks": [ + "https://www.googleapis.com/compute/beta/projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}" + ], + "iap": { + "enabled": false, + "oauth2ClientId": "", + "oauth2ClientSecretSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, "id": "000000000000000000000", "kind": "compute#backendService", "loadBalancingScheme": "EXTERNAL", - "name": "computebackendservice-${uniqueId}", + "name": "computebackendservice-2-${uniqueId}", + "port": 80, + "portName": "http", "protocol": "TCP", - "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}" + "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-2-${uniqueId}", + "sessionAffinity": "NONE", + "timeoutSec": 30 } --- @@ -343,7 +581,7 @@ X-Xss-Protection: 0 "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}" + "service": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}" } --- @@ -416,6 +654,74 @@ X-Xss-Protection: 0 --- +POST https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/${targetTcpProxyID}/setBackendService?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "service": "projects/${projectId}/global/backendServices/computebackendservice-2-${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": "TargetTcpProxySetBackendService", + "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": "TargetTcpProxySetBackendService", + "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 @@ -439,7 +745,7 @@ X-Xss-Protection: 0 "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}" + "service": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/backendServices/computebackendservice-2-${uniqueId}" } --- @@ -508,6 +814,116 @@ X-Xss-Protection: 0 --- +GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-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 + +{ + "affinityCookieTtlSec": 0, + "connectionDraining": { + "drainingTimeoutSec": 300 + }, + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "description": "", + "enableCDN": false, + "fingerprint": "abcdef0123A=", + "healthChecks": [ + "https://www.googleapis.com/compute/beta/projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}" + ], + "iap": { + "enabled": false, + "oauth2ClientId": "", + "oauth2ClientSecretSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "id": "000000000000000000000", + "kind": "compute#backendService", + "loadBalancingScheme": "EXTERNAL", + "name": "computebackendservice-2-${uniqueId}", + "port": 80, + "portName": "http", + "protocol": "TCP", + "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-2-${uniqueId}", + "sessionAffinity": "NONE", + "timeoutSec": 30 +} + +--- + +DELETE https://compute.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-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}", + "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": "5649337042078931171", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-2-${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": "5649337042078931171", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-2-${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 @@ -524,24 +940,32 @@ X-Frame-Options: SAMEORIGIN X-Xss-Protection: 0 { + "affinityCookieTtlSec": 0, "connectionDraining": { "drainingTimeoutSec": 300 }, "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "description": "", + "enableCDN": false, + "fingerprint": "abcdef0123A=", "healthChecks": [ - "https://www.googleapis.com/compute/v1/projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}" + "https://www.googleapis.com/compute/beta/projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}" ], "iap": { "enabled": false, "oauth2ClientId": "", - "oauth2ClientSecret": "" + "oauth2ClientSecretSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" }, "id": "000000000000000000000", "kind": "compute#backendService", "loadBalancingScheme": "EXTERNAL", "name": "computebackendservice-${uniqueId}", + "port": 80, + "portName": "http", "protocol": "TCP", - "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}" + "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}", + "sessionAffinity": "NONE", + "timeoutSec": 30 } --- @@ -566,10 +990,46 @@ X-Xss-Protection: 0 "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": "DONE" + "status": "RUNNING", + "targetId": "4910521161572555544", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${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": "4910521161572555544", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}", + "user": "user@example.com" } --- @@ -628,8 +1088,44 @@ X-Xss-Protection: 0 "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": "DONE" + "status": "RUNNING", + "targetId": "3851802364374817541", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/healthChecks/computehealthcheck-${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": "3851802364374817541", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/healthChecks/computehealthcheck-${uniqueId}", + "user": "user@example.com" } \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-full/dependencies.yaml b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-full/dependencies.yaml index 41e379a2fe..20c14c6b6b 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-full/dependencies.yaml +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-full/dependencies.yaml @@ -32,4 +32,15 @@ spec: name: computehealthcheck-${uniqueId} location: global protocol: TCP +--- +apiVersion: compute.cnrm.cloud.google.com/v1beta1 +kind: ComputeBackendService +metadata: + name: computebackendservice-2-${uniqueId} +spec: + healthChecks: + - healthCheckRef: + name: computehealthcheck-${uniqueId} + location: global + protocol: TCP 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 index 3019011cd8..bb86e5a309 100644 --- 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 @@ -21,6 +21,6 @@ metadata: spec: description: "test target tcp proxy" backendServiceRef: - name: computebackendservice-${uniqueId} + name: computebackendservice-2-${uniqueId} proxyBind: false proxyHeader: PROXY_V1