From 79a3c395ae51cc46df673e28fab2862f668c2de8 Mon Sep 17 00:00:00 2001 From: Gemma Hou Date: Wed, 30 Oct 2024 22:45:45 +0000 Subject: [PATCH] Add direct controller for regional tcp proxy --- .../v1beta1/targettcpproxy_reference.go | 62 +- apis/compute/v1beta1/zz_generated.deepcopy.go | 15 - .../mockcompute/regionaltargettcpproxyv1.go | 138 ++++ mockgcp/mockcompute/service.go | 1 + .../targettcpproxy_controller.go | 120 +++- .../contexts/compute_context.go | 5 + .../globalcomputeforwardingruletcp/_http.log | 138 ++-- .../_http.log | 184 ++++- .../create.yaml | 2 +- .../dependencies.yaml | 3 +- .../update.yaml | 2 +- .../create.yaml | 1 + .../dependencies.yaml | 1 - .../update.yaml | 1 + .../_http.log | 184 ++++- .../create.yaml | 2 +- .../dependencies.yaml | 3 +- .../update.yaml | 2 +- ...obalcomputetargettcpproxy-full.golden.yaml | 7 +- .../_http.log | 66 +- ...alcomputetargettcpproxy-direct.golden.yaml | 38 + .../_http.log | 666 ++++++++++++++++++ .../create.yaml | 28 + .../dependencies.yaml | 38 + 24 files changed, 1505 insertions(+), 202 deletions(-) create mode 100644 mockgcp/mockcompute/regionaltargettcpproxyv1.go create mode 100644 pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/regionalcomputetargettcpproxy-direct/_generated_object_regionalcomputetargettcpproxy-direct.golden.yaml create mode 100644 pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/regionalcomputetargettcpproxy-direct/_http.log create mode 100644 pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/regionalcomputetargettcpproxy-direct/create.yaml create mode 100644 pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/regionalcomputetargettcpproxy-direct/dependencies.yaml diff --git a/apis/compute/v1beta1/targettcpproxy_reference.go b/apis/compute/v1beta1/targettcpproxy_reference.go index 42f9a522a4..1e28b254fd 100644 --- a/apis/compute/v1beta1/targettcpproxy_reference.go +++ b/apis/compute/v1beta1/targettcpproxy_reference.go @@ -19,6 +19,8 @@ import ( "fmt" "strings" + "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/controller/direct" + refsv1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/apis/refs/v1beta1" "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/k8s" apierrors "k8s.io/apimachinery/pkg/api/errors" @@ -33,7 +35,8 @@ var _ refsv1beta1.ExternalNormalizer = &ComputeTargetTCPProxyRef{} // holds the GCP identifier for the KRM object. type ComputeTargetTCPProxyRef struct { // A reference to an externally managed ComputeTargetTCPProxy resource. - // Should be in the format "projects//regions//targetTcpProxies/". + // Should be in the format "projects//global/targetTcpProxies/" + // or "projects//regions//targetTcpProxies/". External string `json:"external,omitempty"` // The name of a ComputeTargetTCPProxy resource. @@ -95,7 +98,13 @@ func NewComputeTargetTCPProxyRef(ctx context.Context, reader client.Reader, obj return nil, fmt.Errorf("cannot resolve project") } - id.parent = &ComputeTargetTCPProxyParent{ProjectID: projectID} + // Get Region + if obj.Spec.Location == nil { + id.parent = &ComputeTargetTCPProxyParent{ProjectID: projectID, Region: "global"} + } else { + region := direct.ValueOf(obj.Spec.Location) + id.parent = &ComputeTargetTCPProxyParent{ProjectID: projectID, Region: region} + } // Get desired ID resourceID := valueOf(obj.Spec.ResourceID) @@ -127,7 +136,6 @@ func NewComputeTargetTCPProxyRef(ctx context.Context, reader client.Reader, obj resourceID, actualResourceID) } id.External = externalRef - id.parent = &ComputeTargetTCPProxyParent{ProjectID: projectID} return id, nil } @@ -147,19 +155,15 @@ func (r *ComputeTargetTCPProxyRef) Parent() (*ComputeTargetTCPProxyParent, error type ComputeTargetTCPProxyParent struct { ProjectID string -} - -type RegionalComputeTargetTCPProxyParent struct { - ProjectID string Region string } func (p *ComputeTargetTCPProxyParent) String() string { - return "projects/" + p.ProjectID + "/global" -} - -func (p *RegionalComputeTargetTCPProxyParent) String() string { - return "projects/" + p.ProjectID + "/regions/" + p.Region + if p.Region == "global" { + return "projects/" + p.ProjectID + "/global" + } else { + return "projects/" + p.ProjectID + "/regions/" + p.Region + } } func asComputeTargetTCPProxyExternal(parent *ComputeTargetTCPProxyParent, resourceID string) (external string) { @@ -169,28 +173,22 @@ func asComputeTargetTCPProxyExternal(parent *ComputeTargetTCPProxyParent, resour func parseComputeTargetTCPProxyExternal(external string) (parent *ComputeTargetTCPProxyParent, resourceID string, err error) { external = strings.TrimPrefix(external, "/") tokens := strings.Split(external, "/") - if len(tokens) != 5 || tokens[0] != "projects" || tokens[3] != "targetTcpProxies" { - return nil, "", fmt.Errorf("format of ComputeTargetTCPProxy external=%q was not known (use projects//global/targetTcpProxies/)", external) - } - parent = &ComputeTargetTCPProxyParent{ - ProjectID: tokens[1], + if len(tokens) == 5 && tokens[0] == "projects" && tokens[3] == "targetTcpProxies" { + parent = &ComputeTargetTCPProxyParent{ + ProjectID: tokens[1], + } + resourceID = tokens[4] + return parent, resourceID, nil + } else if len(tokens) == 6 && tokens[0] == "projects" && tokens[2] == "regions" && tokens[4] == "targetTcpProxies" { + parent = &ComputeTargetTCPProxyParent{ + ProjectID: tokens[1], + Region: tokens[3], + } + resourceID = tokens[5] + return parent, resourceID, nil } - resourceID = tokens[4] - return parent, resourceID, nil -} + return nil, "", fmt.Errorf("ExternalRef format invalid: %s", external) -func parseRegionalComputeTargetTCPProxyExternal(external string) (parent *RegionalComputeTargetTCPProxyParent, resourceID string, err error) { - external = strings.TrimPrefix(external, "/") - tokens := strings.Split(external, "/") - if len(tokens) != 6 || tokens[0] != "projects" || tokens[2] != "regions" || tokens[4] != "targetTcpProxies" { - return nil, "", fmt.Errorf("format of ComputeTargetTCPProxy external=%q was not known (use projects//regions//targetTcpProxies/)", external) - } - parent = &RegionalComputeTargetTCPProxyParent{ - ProjectID: tokens[1], - Region: tokens[3], - } - resourceID = tokens[5] - return parent, resourceID, nil } func valueOf[T any](t *T) T { diff --git a/apis/compute/v1beta1/zz_generated.deepcopy.go b/apis/compute/v1beta1/zz_generated.deepcopy.go index 6b066735c6..ca24003cfc 100644 --- a/apis/compute/v1beta1/zz_generated.deepcopy.go +++ b/apis/compute/v1beta1/zz_generated.deepcopy.go @@ -875,18 +875,3 @@ func (in *ForwardingruleTarget) DeepCopy() *ForwardingruleTarget { in.DeepCopyInto(out) return out } - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RegionalComputeTargetTCPProxyParent) DeepCopyInto(out *RegionalComputeTargetTCPProxyParent) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RegionalComputeTargetTCPProxyParent. -func (in *RegionalComputeTargetTCPProxyParent) DeepCopy() *RegionalComputeTargetTCPProxyParent { - if in == nil { - return nil - } - out := new(RegionalComputeTargetTCPProxyParent) - in.DeepCopyInto(out) - return out -} diff --git a/mockgcp/mockcompute/regionaltargettcpproxyv1.go b/mockgcp/mockcompute/regionaltargettcpproxyv1.go new file mode 100644 index 0000000000..f7b03da014 --- /dev/null +++ b/mockgcp/mockcompute/regionaltargettcpproxyv1.go @@ -0,0 +1,138 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package mockcompute + +import ( + "context" + "strings" + + "github.com/GoogleCloudPlatform/k8s-config-connector/mockgcp/common/projects" + pb "github.com/GoogleCloudPlatform/k8s-config-connector/mockgcp/generated/mockgcp/cloud/compute/v1" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +type RegionalTargetTcpProxyV1 struct { + *MockService + pb.UnimplementedRegionTargetTcpProxiesServer +} + +func (s *RegionalTargetTcpProxyV1) Get(ctx context.Context, req *pb.GetRegionTargetTcpProxyRequest) (*pb.TargetTcpProxy, error) { + reqName := "projects/" + req.GetProject() + "/regions/" + req.GetRegion() + "/targetTcpProxies/" + req.GetTargetTcpProxy() + name, err := s.parseRegionalTargetTcpProxyName(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, status.Errorf(codes.NotFound, "The resource '%s' was not found", fqn) + } + + return obj, nil +} + +func (s *RegionalTargetTcpProxyV1) Insert(ctx context.Context, req *pb.InsertRegionTargetTcpProxyRequest) (*pb.Operation, error) { + reqName := "projects/" + req.GetProject() + "/regions/" + req.GetRegion() + "/targetTcpProxies/" + req.GetTargetTcpProxyResource().GetName() + name, err := s.parseRegionalTargetTcpProxyName(reqName) + if err != nil { + return nil, err + } + + fqn := name.String() + + id := s.generateID() + + obj := proto.Clone(req.GetTargetTcpProxyResource()).(*pb.TargetTcpProxy) + obj.SelfLink = PtrTo("https://www.googleapis.com/compute/v1/" + name.String()) + obj.CreationTimestamp = PtrTo(s.nowString()) + obj.Id = &id + obj.Kind = PtrTo("compute#targetTcpProxy") + obj.Region = PtrTo("https://www.googleapis.com/compute/v1/projects/${projectId}/regions/" + req.GetRegion()) + + if err := s.storage.Create(ctx, fqn, obj); err != nil { + return nil, err + } + + op := &pb.Operation{ + TargetId: obj.Id, + TargetLink: obj.SelfLink, + OperationType: PtrTo("insert"), + User: PtrTo("user@example.com"), + } + return s.startRegionalLRO(ctx, name.Project.ID, name.Region, op, func() (proto.Message, error) { + return obj, nil + }) +} + +func (s *RegionalTargetTcpProxyV1) Delete(ctx context.Context, req *pb.DeleteRegionTargetTcpProxyRequest) (*pb.Operation, error) { + reqName := "projects/" + req.GetProject() + "/regions/" + req.GetRegion() + "/targetTcpProxies/" + req.GetTargetTcpProxy() + name, err := s.parseRegionalTargetTcpProxyName(reqName) + if err != nil { + return nil, err + } + + fqn := name.String() + + deleted := &pb.TargetTcpProxy{} + if err := s.storage.Delete(ctx, fqn, deleted); err != nil { + return nil, err + } + + op := &pb.Operation{ + TargetId: deleted.Id, + TargetLink: deleted.SelfLink, + OperationType: PtrTo("delete"), + User: PtrTo("user@example.com"), + } + return s.startRegionalLRO(ctx, name.Project.ID, name.Region, op, func() (proto.Message, error) { + return deleted, nil + }) +} + +type regionalTargetTcpProxyName struct { + Project *projects.ProjectData + Region string + Name string +} + +func (n *regionalTargetTcpProxyName) String() string { + return "projects/" + n.Project.ID + "/regions/" + n.Region + "/targetTcpProxies/" + n.Name +} + +// parseRegionalTargetTcpProxyName parses a string into a targetTcpProxyName. +// The expected form is `projects/*/regions/*/targetTcpProxies/*`. +func (s *MockService) parseRegionalTargetTcpProxyName(name string) (*regionalTargetTcpProxyName, error) { + tokens := strings.Split(name, "/") + + if len(tokens) == 6 && tokens[0] == "projects" && tokens[2] == "regions" && tokens[4] == "targetTcpProxies" { + project, err := s.Projects.GetProjectByID(tokens[1]) + if err != nil { + return nil, err + } + name := ®ionalTargetTcpProxyName{ + Project: project, + Region: tokens[3], + Name: tokens[5], + } + + return name, nil + } else { + return nil, status.Errorf(codes.InvalidArgument, "name %q is not valid", name) + } +} diff --git a/mockgcp/mockcompute/service.go b/mockgcp/mockcompute/service.go index 083577f79b..bde2e8d14e 100644 --- a/mockgcp/mockcompute/service.go +++ b/mockgcp/mockcompute/service.go @@ -88,6 +88,7 @@ func (s *MockService) Register(grpcServer *grpc.Server) { pb.RegisterRegionSslCertificatesServer(grpcServer, &RegionalSSLCertificatesV1{MockService: s}) pb.RegisterTargetSslProxiesServer(grpcServer, &TargetSslProxyV1{MockService: s}) pb.RegisterTargetTcpProxiesServer(grpcServer, &GlobalTargetTcpProxyV1{MockService: s}) + pb.RegisterRegionTargetTcpProxiesServer(grpcServer, &RegionalTargetTcpProxyV1{MockService: s}) pb.RegisterServiceAttachmentsServer(grpcServer, &RegionalServiceAttachmentV1{MockService: s}) diff --git a/pkg/controller/direct/compute/targettcpproxy/targettcpproxy_controller.go b/pkg/controller/direct/compute/targettcpproxy/targettcpproxy_controller.go index 2de289414f..ab5ef08d9e 100644 --- a/pkg/controller/direct/compute/targettcpproxy/targettcpproxy_controller.go +++ b/pkg/controller/direct/compute/targettcpproxy/targettcpproxy_controller.go @@ -53,11 +53,12 @@ type targetTCPProxyModel struct { var _ directbase.Model = &targetTCPProxyModel{} type targetTCPProxyAdapter struct { - id *krm.ComputeTargetTCPProxyRef - targetTcpProxiesClient *gcp.TargetTcpProxiesClient - desired *krm.ComputeTargetTCPProxy - actual *computepb.TargetTcpProxy - reader client.Reader + id *krm.ComputeTargetTCPProxyRef + targetTcpProxiesClient *gcp.TargetTcpProxiesClient + regionalTargetTcpProxiesClient *gcp.RegionTargetTcpProxiesClient + desired *krm.ComputeTargetTCPProxy + actual *computepb.TargetTcpProxy + reader client.Reader } var _ directbase.Adapter = &targetTCPProxyAdapter{} @@ -75,15 +76,25 @@ func (m *targetTCPProxyModel) client(ctx context.Context) (*gcp.TargetTcpProxies return gcpClient, err } +func (m *targetTCPProxyModel) regionalClient(ctx context.Context) (*gcp.RegionTargetTcpProxiesClient, error) { + var opts []option.ClientOption + opts, err := m.config.RESTClientOptions() + if err != nil { + return nil, err + } + gcpClient, err := gcp.NewRegionTargetTcpProxiesRESTClient(ctx, opts...) + if err != nil { + return nil, fmt.Errorf("building TargetTcpProxy client: %w", err) + } + return gcpClient, err +} + func (m *targetTCPProxyModel) AdapterForObject(ctx context.Context, reader client.Reader, u *unstructured.Unstructured) (directbase.Adapter, error) { obj := &krm.ComputeTargetTCPProxy{} if err := runtime.DefaultUnstructuredConverter.FromUnstructured(u.Object, &obj); err != nil { return nil, fmt.Errorf("error converting to %T: %w", obj, err) } - // Set label managed-by-cnrm: true - obj.ObjectMeta.Labels["managed-by-cnrm"] = "true" - computeTargetTCPProxyRef, err := krm.NewComputeTargetTCPProxyRef(ctx, reader, obj, u) if err != nil { return nil, err @@ -95,13 +106,27 @@ func (m *targetTCPProxyModel) AdapterForObject(ctx context.Context, reader clien reader: reader, } - // Get GCP client - gcpClient, err := m.client(ctx) + // Get location + parent, err := computeTargetTCPProxyRef.Parent() if err != nil { - return nil, fmt.Errorf("building gcp client: %w", err) + return nil, fmt.Errorf("get ComputeTargetTCPProxyAdapter parent %s: %w", computeTargetTCPProxyRef.External, err) } - targetTCPProxyAdapter.targetTcpProxiesClient = gcpClient + location := parent.Region + // Get GCP client + if location == "global" { + gcpClient, err := m.client(ctx) + if err != nil { + return nil, fmt.Errorf("building gcp client: %w", err) + } + targetTCPProxyAdapter.targetTcpProxiesClient = gcpClient + } else { + gcpClient, err := m.regionalClient(ctx) + if err != nil { + return nil, fmt.Errorf("building gcp client: %w", err) + } + targetTCPProxyAdapter.regionalTargetTcpProxiesClient = gcpClient + } return targetTCPProxyAdapter, nil } @@ -111,7 +136,7 @@ func (m *targetTCPProxyModel) AdapterForURL(ctx context.Context, url string) (di } func (a *targetTCPProxyAdapter) Find(ctx context.Context) (bool, error) { - log := klog.FromContext(ctx).WithName(ctrlName) + log := klog.FromContext(ctx) log.V(2).Info("getting ComputeTargetTCPProxy", "name", a.id.External) targetTCPProxy, err := a.get(ctx) @@ -133,7 +158,7 @@ func (a *targetTCPProxyAdapter) Create(ctx context.Context, createOp *directbase return err } - log := klog.FromContext(ctx).WithName(ctrlName) + log := klog.FromContext(ctx) log.V(2).Info("creating ComputeTargetTCPProxy", "name", a.id.External) mapCtx := &direct.MapContext{} @@ -148,15 +173,26 @@ func (a *targetTCPProxyAdapter) Create(ctx context.Context, createOp *directbase if err != nil { return fmt.Errorf("get ComputeTargetTCPProxy parent %s: %w", a.id.External, err) } + region := parent.Region tokens := strings.Split(a.id.External, "/") targetTCPProxy.Name = direct.LazyPtr(tokens[len(tokens)-1]) - req := &computepb.InsertTargetTcpProxyRequest{ - Project: parent.ProjectID, - TargetTcpProxyResource: targetTCPProxy, + op := &gcp.Operation{} + if region == "global" { + req := &computepb.InsertTargetTcpProxyRequest{ + Project: parent.ProjectID, + TargetTcpProxyResource: targetTCPProxy, + } + op, err = a.targetTcpProxiesClient.Insert(ctx, req) + } else { + req := &computepb.InsertRegionTargetTcpProxyRequest{ + Project: parent.ProjectID, + Region: region, + TargetTcpProxyResource: targetTCPProxy, + } + op, err = a.regionalTargetTcpProxiesClient.Insert(ctx, req) } - op, err := a.targetTcpProxiesClient.Insert(ctx, req) if err != nil { return fmt.Errorf("creating ComputeTargetTCPProxy %s: %w", a.id.External, err) @@ -214,10 +250,13 @@ func (a *targetTCPProxyAdapter) Update(ctx context.Context, updateOp *directbase if err != nil { return fmt.Errorf("get ComputeTargetTCPProxy parent %s: %w", a.id.External, err) } + region := parent.Region + tokens := strings.Split(a.id.External, "/") targetTCPProxy.Name = direct.LazyPtr(tokens[len(tokens)-1]) - if !reflect.DeepEqual(targetTCPProxy.Service, a.actual.Service) { + // Regional API does not support Update + if !reflect.DeepEqual(targetTCPProxy.Service, a.actual.Service) && region == "global" { setBackendServiceReq := &computepb.SetBackendServiceTargetTcpProxyRequest{ Project: parent.ProjectID, TargetTcpProxiesSetBackendServiceRequestResource: &computepb.TargetTcpProxiesSetBackendServiceRequest{Service: targetTCPProxy.Service}, @@ -228,7 +267,7 @@ func (a *targetTCPProxyAdapter) Update(ctx context.Context, updateOp *directbase return fmt.Errorf("updating ComputeTargetTCPProxy backend service %s: %w", a.id.External, err) } } - if !reflect.DeepEqual(targetTCPProxy.ProxyHeader, a.actual.ProxyHeader) { + if !reflect.DeepEqual(targetTCPProxy.ProxyHeader, a.actual.ProxyHeader) && region == "global" { setProxyHeaderReq := &computepb.SetProxyHeaderTargetTcpProxyRequest{ Project: parent.ProjectID, TargetTcpProxiesSetProxyHeaderRequestResource: &computepb.TargetTcpProxiesSetProxyHeaderRequest{ProxyHeader: targetTCPProxy.ProxyHeader}, @@ -285,21 +324,31 @@ func (a *targetTCPProxyAdapter) Export(ctx context.Context) (*unstructured.Unstr // Delete implements the Adapter interface. func (a *targetTCPProxyAdapter) Delete(ctx context.Context, deleteOp *directbase.DeleteOperation) (bool, error) { - log := klog.FromContext(ctx).WithName(ctrlName) + log := klog.FromContext(ctx) log.V(2).Info("deleting ComputeTargetTcpProxy", "name", a.id.External) parent, err := a.id.Parent() if err != nil { return false, fmt.Errorf("get ComputeTargetTcpProxy parent %s: %w", a.id.External, err) } + region := parent.Region + op := &gcp.Operation{} tokens := strings.Split(a.id.External, "/") - - delReq := &computepb.DeleteTargetTcpProxyRequest{ - Project: parent.ProjectID, - TargetTcpProxy: tokens[len(tokens)-1], + if region == "global" { + delReq := &computepb.DeleteTargetTcpProxyRequest{ + Project: parent.ProjectID, + TargetTcpProxy: tokens[len(tokens)-1], + } + op, err = a.targetTcpProxiesClient.Delete(ctx, delReq) + } else { + delReq := &computepb.DeleteRegionTargetTcpProxyRequest{ + Project: parent.ProjectID, + Region: region, + TargetTcpProxy: tokens[len(tokens)-1], + } + op, err = a.regionalTargetTcpProxiesClient.Delete(ctx, delReq) } - op, err := a.targetTcpProxiesClient.Delete(ctx, delReq) if err != nil { return false, fmt.Errorf("deleting ComputeTargetTcpProxy %s: %w", a.id.External, err) @@ -319,12 +368,21 @@ func (a *targetTCPProxyAdapter) get(ctx context.Context) (*computepb.TargetTcpPr if err != nil { return nil, fmt.Errorf("get ComputeTargetTcpProxy parent %s: %w", a.id.External, err) } + region := parent.Region tokens := strings.Split(a.id.External, "/") - - getReq := &computepb.GetTargetTcpProxyRequest{ - Project: parent.ProjectID, - TargetTcpProxy: tokens[len(tokens)-1], + if region == "global" { + getReq := &computepb.GetTargetTcpProxyRequest{ + Project: parent.ProjectID, + TargetTcpProxy: tokens[len(tokens)-1], + } + return a.targetTcpProxiesClient.Get(ctx, getReq) + } else { + getReq := &computepb.GetRegionTargetTcpProxyRequest{ + Project: parent.ProjectID, + Region: region, + TargetTcpProxy: tokens[len(tokens)-1], + } + return a.regionalTargetTcpProxiesClient.Get(ctx, getReq) } - return a.targetTcpProxiesClient.Get(ctx, getReq) } diff --git a/pkg/test/resourcefixture/contexts/compute_context.go b/pkg/test/resourcefixture/contexts/compute_context.go index 49b5be197b..4007a22e9b 100644 --- a/pkg/test/resourcefixture/contexts/compute_context.go +++ b/pkg/test/resourcefixture/contexts/compute_context.go @@ -189,6 +189,11 @@ func init() { SkipUpdate: true, } + resourceContextMap["regionalcomputetargettcpproxy"] = ResourceContext{ + ResourceKind: "ComputeTargetTCPProxy", + SkipUpdate: true, // API does not support UPDATE/PATCH. + } + resourceContextMap["computetargettcpproxy"] = ResourceContext{ ResourceKind: "ComputeTargetTCPProxy", } diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingruletcp/_http.log b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingruletcp/_http.log index a099b5230a..6e1fa399f1 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingruletcp/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingruletcp/_http.log @@ -1,4 +1,4 @@ -GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/addresses/${addressID}?alt=json +GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/addresses/computeaddress-${uniqueId}?alt=json Content-Type: application/json User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager @@ -63,7 +63,7 @@ X-Xss-Protection: 0 "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", "startTime": "2024-04-01T12:34:56.123456Z", "status": "RUNNING", - "targetId": "${addressID}", + "targetId": "${addressesId}", "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/addresses/computeaddress-${uniqueId}", "user": "user@example.com" } @@ -95,14 +95,14 @@ X-Xss-Protection: 0 "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", "startTime": "2024-04-01T12:34:56.123456Z", "status": "DONE", - "targetId": "${addressID}", + "targetId": "${addressesId}", "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/addresses/computeaddress-${uniqueId}", "user": "user@example.com" } --- -GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/addresses/${addressID}?alt=json +GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/addresses/computeaddress-${uniqueId}?alt=json Content-Type: application/json User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager @@ -134,7 +134,7 @@ X-Xss-Protection: 0 --- -POST https://compute.googleapis.com/compute/v1/projects/${projectId}/global/addresses/${addressID}/setLabels?alt=json +POST https://compute.googleapis.com/compute/v1/projects/${projectId}/global/addresses/computeaddress-${uniqueId}/setLabels?alt=json Content-Type: application/json User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager @@ -170,7 +170,7 @@ X-Xss-Protection: 0 --- -GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/addresses/${addressID}?alt=json +GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/addresses/computeaddress-${uniqueId}?alt=json Content-Type: application/json User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager @@ -424,9 +424,10 @@ X-Xss-Protection: 0 --- -GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/${targetTcpProxyID}?alt=json +GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId} Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager +User-Agent: kcc/controller-manager +x-goog-request-params: project=${projectId}&target_tcp_proxy=computetargettcpproxy-${uniqueId} 404 Not Found Cache-Control: private @@ -455,15 +456,16 @@ X-Xss-Protection: 0 --- -POST https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies?alt=json +POST https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager +User-Agent: kcc/controller-manager +x-goog-request-params: project=${projectId} { "description": "test description", "name": "computetargettcpproxy-${uniqueId}", "proxyHeader": "NONE", - "service": "projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}" + "service": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}" } 200 OK @@ -487,15 +489,17 @@ X-Xss-Protection: 0 "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", "startTime": "2024-04-01T12:34:56.123456Z", "status": "RUNNING", - "targetId": "${targetTcpProxyID}", + "targetId": "${targetTcpProxiesId}", "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 +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 @@ -519,16 +523,17 @@ X-Xss-Protection: 0 "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", "startTime": "2024-04-01T12:34:56.123456Z", "status": "DONE", - "targetId": "${targetTcpProxyID}", + "targetId": "${targetTcpProxiesId}", "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 +GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId} Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager +User-Agent: kcc/controller-manager +x-goog-request-params: project=${projectId}&target_tcp_proxy=computetargettcpproxy-${uniqueId} 200 OK Cache-Control: private @@ -549,14 +554,15 @@ 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/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}" } --- -GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/${targetTcpProxyID}?alt=json +GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy2-${uniqueId} Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager +User-Agent: kcc/controller-manager +x-goog-request-params: project=${projectId}&target_tcp_proxy=computetargettcpproxy2-${uniqueId} 404 Not Found Cache-Control: private @@ -585,15 +591,16 @@ X-Xss-Protection: 0 --- -POST https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies?alt=json +POST https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager +User-Agent: kcc/controller-manager +x-goog-request-params: project=${projectId} { "description": "other test description", "name": "computetargettcpproxy2-${uniqueId}", "proxyHeader": "NONE", - "service": "projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}" + "service": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}" } 200 OK @@ -617,15 +624,17 @@ X-Xss-Protection: 0 "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", "startTime": "2024-04-01T12:34:56.123456Z", "status": "RUNNING", - "targetId": "${targetTcpProxyID}", + "targetId": "${targetTcpProxiesId}", "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy2-${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 +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 @@ -649,16 +658,17 @@ X-Xss-Protection: 0 "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", "startTime": "2024-04-01T12:34:56.123456Z", "status": "DONE", - "targetId": "${targetTcpProxyID}", + "targetId": "${targetTcpProxiesId}", "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy2-${uniqueId}", "user": "user@example.com" } --- -GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/${targetTcpProxyID}?alt=json +GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy2-${uniqueId} Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager +User-Agent: kcc/controller-manager +x-goog-request-params: project=${projectId}&target_tcp_proxy=computetargettcpproxy2-${uniqueId} 200 OK Cache-Control: private @@ -679,7 +689,7 @@ X-Xss-Protection: 0 "name": "computetargettcpproxy2-${uniqueId}", "proxyHeader": "NONE", "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy2-${uniqueId}", - "service": "projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}" + "service": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}" } --- @@ -757,7 +767,7 @@ X-Xss-Protection: 0 "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", "startTime": "2024-04-01T12:34:56.123456Z", "status": "RUNNING", - "targetId": "${forwardingRuleID}", + "targetId": "${forwardingRulesId}", "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/forwardingRules/computeglobalforwardingrule-${uniqueId}", "user": "user@example.com" } @@ -791,7 +801,7 @@ X-Xss-Protection: 0 "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", "startTime": "2024-04-01T12:34:56.123456Z", "status": "DONE", - "targetId": "${forwardingRuleID}", + "targetId": "${forwardingRulesId}", "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/forwardingRules/computeglobalforwardingrule-${uniqueId}", "user": "user@example.com" } @@ -869,7 +879,7 @@ X-Xss-Protection: 0 "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", "startTime": "2024-04-01T12:34:56.123456Z", "status": "DONE", - "targetId": "${forwardingRuleID}", + "targetId": "${forwardingRulesId}", "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/forwardingRules/computeglobalforwardingrule-${uniqueId}", "user": "user@example.com" } @@ -952,7 +962,7 @@ X-Xss-Protection: 0 "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", "startTime": "2024-04-01T12:34:56.123456Z", "status": "DONE", - "targetId": "${forwardingRuleID}", + "targetId": "${forwardingRulesId}", "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/forwardingRules/computeglobalforwardingrule-${uniqueId}", "user": "user@example.com" } @@ -989,7 +999,7 @@ X-Xss-Protection: 0 "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", "startTime": "2024-04-01T12:34:56.123456Z", "status": "RUNNING", - "targetId": "${forwardingRuleID}", + "targetId": "${forwardingRulesId}", "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/forwardingRules/computeglobalforwardingrule-${uniqueId}", "user": "user@example.com" } @@ -1023,7 +1033,7 @@ X-Xss-Protection: 0 "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", "startTime": "2024-04-01T12:34:56.123456Z", "status": "DONE", - "targetId": "${forwardingRuleID}", + "targetId": "${forwardingRulesId}", "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/forwardingRules/computeglobalforwardingrule-${uniqueId}", "user": "user@example.com" } @@ -1096,7 +1106,7 @@ X-Xss-Protection: 0 "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", "startTime": "2024-04-01T12:34:56.123456Z", "status": "RUNNING", - "targetId": "${forwardingRuleID}", + "targetId": "${forwardingRulesId}", "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/forwardingRules/computeglobalforwardingrule-${uniqueId}", "user": "user@example.com" } @@ -1130,16 +1140,17 @@ X-Xss-Protection: 0 "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", "startTime": "2024-04-01T12:34:56.123456Z", "status": "DONE", - "targetId": "${forwardingRuleID}", + "targetId": "${forwardingRulesId}", "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/forwardingRules/computeglobalforwardingrule-${uniqueId}", "user": "user@example.com" } --- -GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/${targetTcpProxyID}?alt=json +GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy2-${uniqueId} Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager +User-Agent: kcc/controller-manager +x-goog-request-params: project=${projectId}&target_tcp_proxy=computetargettcpproxy2-${uniqueId} 200 OK Cache-Control: private @@ -1160,14 +1171,15 @@ X-Xss-Protection: 0 "name": "computetargettcpproxy2-${uniqueId}", "proxyHeader": "NONE", "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy2-${uniqueId}", - "service": "projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}" + "service": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}" } --- -DELETE https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/${targetTcpProxyID}?alt=json +DELETE https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy2-${uniqueId} Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager +User-Agent: kcc/controller-manager +x-goog-request-params: project=${projectId}&target_tcp_proxy=computetargettcpproxy2-${uniqueId} 200 OK Cache-Control: private @@ -1190,15 +1202,17 @@ X-Xss-Protection: 0 "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", "startTime": "2024-04-01T12:34:56.123456Z", "status": "RUNNING", - "targetId": "${targetTcpProxyID}", + "targetId": "${targetTcpProxiesId}", "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy2-${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 +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 @@ -1222,16 +1236,17 @@ X-Xss-Protection: 0 "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", "startTime": "2024-04-01T12:34:56.123456Z", "status": "DONE", - "targetId": "${targetTcpProxyID}", + "targetId": "${targetTcpProxiesId}", "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy2-${uniqueId}", "user": "user@example.com" } --- -GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/${targetTcpProxyID}?alt=json +GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId} Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager +User-Agent: kcc/controller-manager +x-goog-request-params: project=${projectId}&target_tcp_proxy=computetargettcpproxy-${uniqueId} 200 OK Cache-Control: private @@ -1252,14 +1267,15 @@ 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/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}" } --- -DELETE https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/${targetTcpProxyID}?alt=json +DELETE https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId} Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager +User-Agent: kcc/controller-manager +x-goog-request-params: project=${projectId}&target_tcp_proxy=computetargettcpproxy-${uniqueId} 200 OK Cache-Control: private @@ -1282,15 +1298,17 @@ X-Xss-Protection: 0 "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", "startTime": "2024-04-01T12:34:56.123456Z", "status": "RUNNING", - "targetId": "${targetTcpProxyID}", + "targetId": "${targetTcpProxiesId}", "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 +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 @@ -1314,7 +1332,7 @@ X-Xss-Protection: 0 "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", "startTime": "2024-04-01T12:34:56.123456Z", "status": "DONE", - "targetId": "${targetTcpProxyID}", + "targetId": "${targetTcpProxiesId}", "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId}", "user": "user@example.com" } @@ -1450,7 +1468,7 @@ X-Xss-Protection: 0 --- -GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/addresses/${addressID}?alt=json +GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/addresses/computeaddress-${uniqueId}?alt=json Content-Type: application/json User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager @@ -1482,7 +1500,7 @@ X-Xss-Protection: 0 --- -DELETE https://compute.googleapis.com/compute/v1/projects/${projectId}/global/addresses/${addressID}?alt=json +DELETE https://compute.googleapis.com/compute/v1/projects/${projectId}/global/addresses/computeaddress-${uniqueId}?alt=json Content-Type: application/json User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager @@ -1507,7 +1525,7 @@ X-Xss-Protection: 0 "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", "startTime": "2024-04-01T12:34:56.123456Z", "status": "RUNNING", - "targetId": "${addressID}", + "targetId": "${addressesId}", "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/addresses/computeaddress-${uniqueId}", "user": "user@example.com" } @@ -1539,7 +1557,7 @@ X-Xss-Protection: 0 "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", "startTime": "2024-04-01T12:34:56.123456Z", "status": "DONE", - "targetId": "${addressID}", + "targetId": "${addressesId}", "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/addresses/computeaddress-${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/_http.log b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-basic-direct/_http.log index 13129433c9..aa6ca67b2e 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": "496471658159130357", + "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": "496471658159130357", + "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": "6389387949022103241", + "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": "6389387949022103241", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}", + "user": "user@example.com" } --- @@ -196,24 +268,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 } --- @@ -433,24 +513,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 +563,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": "6389387949022103241", + "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": "6389387949022103241", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}", + "user": "user@example.com" } --- @@ -537,8 +661,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": "496471658159130357", + "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": "496471658159130357", + "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/create.yaml b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-basic-direct/create.yaml index 4fa897d040..a0a6cfca7b 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-basic-direct/create.yaml +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-basic-direct/create.yaml @@ -1,4 +1,4 @@ -# Copyright 2022 Google LLC +# Copyright 2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. 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 41e379a2fe..479fc938a0 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 @@ -1,4 +1,4 @@ -# Copyright 2022 Google LLC +# Copyright 2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -32,4 +32,3 @@ spec: 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 4fa897d040..a0a6cfca7b 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 @@ -1,4 +1,4 @@ -# Copyright 2022 Google LLC +# Copyright 2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-basic/create.yaml b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-basic/create.yaml index 5ce9fad643..4fa897d040 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-basic/create.yaml +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-basic/create.yaml @@ -17,6 +17,7 @@ kind: ComputeTargetTCPProxy metadata: annotations: cnrm.cloud.google.com/project-id: ${projectId} + alpha.cnrm.cloud.google.com/reconciler: "direct" name: computetargettcpproxy-${uniqueId} spec: backendServiceRef: diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-basic/dependencies.yaml b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-basic/dependencies.yaml index 41e379a2fe..fdc8db7396 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,4 +32,3 @@ spec: 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..4fa897d040 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 @@ -17,6 +17,7 @@ kind: ComputeTargetTCPProxy metadata: annotations: cnrm.cloud.google.com/project-id: ${projectId} + alpha.cnrm.cloud.google.com/reconciler: "direct" name: computetargettcpproxy-${uniqueId} spec: backendServiceRef: diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-full-direct/_http.log b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-full-direct/_http.log index bc776e6c89..07bcd8c52a 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": "5819644504094787561", + "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": "5819644504094787561", + "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": "6890552611752101885", + "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": "6890552611752101885", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}", + "user": "user@example.com" } --- @@ -196,24 +268,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 } --- @@ -539,24 +619,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 +669,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": "6890552611752101885", + "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": "6890552611752101885", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}", + "user": "user@example.com" } --- @@ -643,8 +767,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": "5819644504094787561", + "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": "5819644504094787561", + "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/create.yaml b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-full-direct/create.yaml index 502a07ed29..ac752438cd 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-full-direct/create.yaml +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-full-direct/create.yaml @@ -1,4 +1,4 @@ -# Copyright 2022 Google LLC +# Copyright 2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. 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 41e379a2fe..479fc938a0 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 @@ -1,4 +1,4 @@ -# Copyright 2022 Google LLC +# Copyright 2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -32,4 +32,3 @@ spec: 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 34f627e368..a55980feac 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 @@ -1,4 +1,4 @@ -# Copyright 2022 Google LLC +# Copyright 2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. 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..d1f6e98310 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 @@ -4,11 +4,10 @@ metadata: annotations: cnrm.cloud.google.com/management-conflict-prevention-policy: none cnrm.cloud.google.com/project-id: ${projectId} - cnrm.cloud.google.com/state-into-spec: absent finalizers: - cnrm.cloud.google.com/finalizer - cnrm.cloud.google.com/deletion-defender - generation: 3 + generation: 2 labels: cnrm-test: "true" name: computetargettcpproxy-${uniqueId} @@ -19,7 +18,6 @@ spec: description: test target tcp proxy proxyBind: false proxyHeader: PROXY_V1 - resourceID: computetargettcpproxy-${uniqueId} status: conditions: - lastTransitionTime: "1970-01-01T00:00:00Z" @@ -28,6 +26,7 @@ status: status: "True" type: Ready creationTimestamp: "1970-01-01T00:00:00Z" - observedGeneration: 3 + externalRef: projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId} + 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-full/_http.log b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-full/_http.log index e83ff3a1e7..68f67e0b8f 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 @@ -218,9 +218,10 @@ X-Xss-Protection: 0 --- -GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/${targetTcpProxyID}?alt=json +GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId} Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager +User-Agent: kcc/controller-manager +x-goog-request-params: project=${projectId}&target_tcp_proxy=computetargettcpproxy-${uniqueId} 404 Not Found Cache-Control: private @@ -249,15 +250,16 @@ X-Xss-Protection: 0 --- -POST https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies?alt=json +POST https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager +User-Agent: kcc/controller-manager +x-goog-request-params: project=${projectId} { "description": "test target tcp proxy", "name": "computetargettcpproxy-${uniqueId}", "proxyHeader": "NONE", - "service": "projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}" + "service": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}" } 200 OK @@ -281,15 +283,17 @@ X-Xss-Protection: 0 "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", "startTime": "2024-04-01T12:34:56.123456Z", "status": "RUNNING", - "targetId": "${targetTcpProxyID}", + "targetId": "${targetTcpProxiesId}", "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 +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 @@ -313,16 +317,17 @@ X-Xss-Protection: 0 "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", "startTime": "2024-04-01T12:34:56.123456Z", "status": "DONE", - "targetId": "${targetTcpProxyID}", + "targetId": "${targetTcpProxiesId}", "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 +GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId} Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager +User-Agent: kcc/controller-manager +x-goog-request-params: project=${projectId}&target_tcp_proxy=computetargettcpproxy-${uniqueId} 200 OK Cache-Control: private @@ -343,14 +348,15 @@ 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/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}" } --- -POST https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/${targetTcpProxyID}/setProxyHeader?alt=json +POST https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId}/setProxyHeader Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager +User-Agent: kcc/controller-manager +x-goog-request-params: project=${projectId}&target_tcp_proxy=computetargettcpproxy-${uniqueId} { "proxyHeader": "PROXY_V1" @@ -377,15 +383,17 @@ X-Xss-Protection: 0 "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", "startTime": "2024-04-01T12:34:56.123456Z", "status": "RUNNING", - "targetId": "${targetTcpProxyID}", + "targetId": "${targetTcpProxiesId}", "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 +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 @@ -409,16 +417,17 @@ X-Xss-Protection: 0 "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", "startTime": "2024-04-01T12:34:56.123456Z", "status": "DONE", - "targetId": "${targetTcpProxyID}", + "targetId": "${targetTcpProxiesId}", "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 +GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId} Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager +User-Agent: kcc/controller-manager +x-goog-request-params: project=${projectId}&target_tcp_proxy=computetargettcpproxy-${uniqueId} 200 OK Cache-Control: private @@ -439,14 +448,15 @@ 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/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}" } --- -DELETE https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/${targetTcpProxyID}?alt=json +DELETE https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId} Content-Type: application/json -User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager +User-Agent: kcc/controller-manager +x-goog-request-params: project=${projectId}&target_tcp_proxy=computetargettcpproxy-${uniqueId} 200 OK Cache-Control: private @@ -469,15 +479,17 @@ X-Xss-Protection: 0 "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", "startTime": "2024-04-01T12:34:56.123456Z", "status": "RUNNING", - "targetId": "${targetTcpProxyID}", + "targetId": "${targetTcpProxiesId}", "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 +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 @@ -501,7 +513,7 @@ X-Xss-Protection: 0 "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", "startTime": "2024-04-01T12:34:56.123456Z", "status": "DONE", - "targetId": "${targetTcpProxyID}", + "targetId": "${targetTcpProxiesId}", "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId}", "user": "user@example.com" } diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/regionalcomputetargettcpproxy-direct/_generated_object_regionalcomputetargettcpproxy-direct.golden.yaml b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/regionalcomputetargettcpproxy-direct/_generated_object_regionalcomputetargettcpproxy-direct.golden.yaml new file mode 100644 index 0000000000..a677ded153 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/regionalcomputetargettcpproxy-direct/_generated_object_regionalcomputetargettcpproxy-direct.golden.yaml @@ -0,0 +1,38 @@ +apiVersion: compute.cnrm.cloud.google.com/v1beta1 +kind: ComputeTargetTCPProxy +metadata: + annotations: + alpha.cnrm.cloud.google.com/reconciler: direct + cnrm.cloud.google.com/management-conflict-prevention-policy: none + cnrm.cloud.google.com/project-id: ${projectId} + finalizers: + - cnrm.cloud.google.com/finalizer + - cnrm.cloud.google.com/deletion-defender + generation: 1 + labels: + cnrm-test: "true" + name: computetargettcpproxy-${uniqueId} + namespace: ${uniqueId} +spec: + backendServiceRef: + name: computebackendservice-${uniqueId} +<<<<<<<< HEAD:pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-full-direct/_generated_object_globalcomputetargettcpproxy-full-direct.golden.yaml + description: test target tcp proxy + proxyBind: false + proxyHeader: PROXY_V1 +======== + location: europe-west4 + proxyHeader: NONE +>>>>>>>> 51fc5efd2 (Add direct controller for regional tcp proxy):pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/regionalcomputetargettcpproxy-direct/_generated_object_regionalcomputetargettcpproxy-direct.golden.yaml +status: + conditions: + - lastTransitionTime: "1970-01-01T00:00:00Z" + message: The resource is up to date + reason: UpToDate + status: "True" + type: Ready + creationTimestamp: "1970-01-01T00:00:00Z" + externalRef: projects/${projectId}/regions/europe-west4/targetTcpProxies/computetargettcpproxy-${uniqueId} + observedGeneration: 1 + proxyId: 1111111111111111 + selfLink: https://www.googleapis.com/compute/v1/projects/${projectId}/regions/europe-west4/targetTcpProxies/computetargettcpproxy-${uniqueId} diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/regionalcomputetargettcpproxy-direct/_http.log b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/regionalcomputetargettcpproxy-direct/_http.log new file mode 100644 index 0000000000..78a9fc49ec --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/regionalcomputetargettcpproxy-direct/_http.log @@ -0,0 +1,666 @@ +GET https://compute.googleapis.com/compute/v1/projects/${projectId}/regions/europe-west4/healthChecks/computehealthcheck-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +404 Not Found +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "error": { + "code": 404, + "errors": [ + { + "domain": "global", + "message": "healthCheck \"projects/${projectId}/regions/europe-west4/healthChecks/computehealthcheck-${uniqueId}\" not found", + "reason": "notFound" + } + ], + "message": "healthCheck \"projects/${projectId}/regions/europe-west4/healthChecks/computehealthcheck-${uniqueId}\" not found" + } +} + +--- + +POST https://compute.googleapis.com/compute/v1/projects/${projectId}/regions/europe-west4/healthChecks?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +{ + "checkIntervalSec": 10, + "healthyThreshold": 2, + "name": "computehealthcheck-${uniqueId}", + "region": "projects/${projectId}/global/regions/europe-west4", + "tcpHealthCheck": { + "port": 443, + "proxyHeader": "NONE" + }, + "timeoutSec": 5, + "type": "TCP", + "unhealthyThreshold": 2 +} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "id": "000000000000000000000", + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "compute#operation", + "name": "${operationID}", + "progress": 0, + "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "DONE" +} + +--- + +GET https://compute.googleapis.com/compute/v1/projects/${projectId}/regions/europe-west4/healthChecks/computehealthcheck-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "checkIntervalSec": 10, + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "healthyThreshold": 2, + "id": "000000000000000000000", + "kind": "compute#healthCheck", + "name": "computehealthcheck-${uniqueId}", + "region": "projects/${projectId}/global/regions/europe-west4", + "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/regions/europe-west4/healthChecks/computehealthcheck-${uniqueId}", + "tcpHealthCheck": { + "port": 443, + "proxyHeader": "NONE" + }, + "timeoutSec": 5, + "type": "TCP", + "unhealthyThreshold": 2 +} + +--- + +GET https://compute.googleapis.com/compute/v1/projects/${projectId}/regions/europe-west4/backendServices/computebackendservice-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +404 Not Found +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "error": { + "code": 404, + "errors": [ + { + "domain": "global", + "message": "The resource 'projects/${projectId}/regions/europe-west4/backendServices/computebackendservice-${uniqueId}' was not found", + "reason": "notFound" + } + ], + "message": "The resource 'projects/${projectId}/regions/europe-west4/backendServices/computebackendservice-${uniqueId}' was not found" + } +} + +--- + +POST https://compute.googleapis.com/compute/v1/projects/${projectId}/regions/europe-west4/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": 0 + }, + "healthChecks": [ + "https://www.googleapis.com/compute/v1/projects/${projectId}/regions/europe-west4/healthChecks/computehealthcheck-${uniqueId}" + ], + "iap": { + "enabled": false, + "oauth2ClientId": "", + "oauth2ClientSecret": "" + }, + "loadBalancingScheme": "INTERNAL_MANAGED", + "name": "computebackendservice-${uniqueId}", + "protocol": "TCP", + "region": "projects/${projectId}/global/regions/europe-west4" +} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "id": "000000000000000000000", + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "compute#operation", + "name": "${operationID}", + "progress": 0, + "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "DONE" +} + +--- + +GET https://compute.googleapis.com/compute/v1/projects/${projectId}/regions/europe-west4/backendServices/computebackendservice-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "connectionDraining": { + "drainingTimeoutSec": 0 + }, + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "healthChecks": [ + "https://www.googleapis.com/compute/v1/projects/${projectId}/regions/europe-west4/healthChecks/computehealthcheck-${uniqueId}" + ], + "iap": { + "enabled": false, + "oauth2ClientId": "", + "oauth2ClientSecret": "" + }, + "id": "000000000000000000000", + "kind": "compute#backendService", + "loadBalancingScheme": "INTERNAL_MANAGED", + "name": "computebackendservice-${uniqueId}", + "protocol": "TCP", + "region": "projects/${projectId}/global/regions/europe-west4", + "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/regions/europe-west4/backendServices/computebackendservice-${uniqueId}" +} + +--- + +GET https://compute.googleapis.com/compute/v1/projects/${projectId}/regions/europe-west4/targetTcpProxies/computetargettcpproxy-${uniqueId} +Content-Type: application/json +User-Agent: kcc/controller-manager +x-goog-request-params: project=${projectId}®ion=europe-west4&target_tcp_proxy=computetargettcpproxy-${uniqueId} + +404 Not Found +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "error": { + "code": 404, + "errors": [ + { + "domain": "global", + "message": "The resource 'projects/${projectId}/regions/europe-west4/targetTcpProxies/computetargettcpproxy-${uniqueId}' was not found", + "reason": "notFound" + } + ], + "message": "The resource 'projects/${projectId}/regions/europe-west4/targetTcpProxies/computetargettcpproxy-${uniqueId}' was not found" + } +} + +--- + +POST https://compute.googleapis.com/compute/v1/projects/${projectId}/regions/europe-west4/targetTcpProxies +Content-Type: application/json +User-Agent: kcc/controller-manager +x-goog-request-params: project=${projectId}®ion=europe-west4 + +{ + "description": "test target tcp proxy", + "name": "computetargettcpproxy-${uniqueId}", + "proxyBind": false, + "proxyHeader": "NONE", + "region": "europe-west4", + "service": "https://www.googleapis.com/compute/v1/projects/${projectId}/regions/europe-west4/backendServices/computebackendservice-${uniqueId}" +} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "id": "000000000000000000000", + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "compute#operation", + "name": "${operationID}", + "operationType": "insert", + "progress": 0, + "region": "https://www.googleapis.com/compute/v1/projects/${projectId}/regions/europe-west4", + "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/regions/europe-west4/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetId": "${targetTcpProxiesId}", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/regions/europe-west4/targetTcpProxies/computetargettcpproxy-${uniqueId}", + "user": "user@example.com" +} + +--- + +GET https://compute.googleapis.com/compute/v1/projects/${projectId}/regions/europe-west4/operations/${operationID} +Content-Type: application/json +User-Agent: kcc/controller-manager +x-goog-request-params: project=${projectId}®ion=europe-west4&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": "insert", + "progress": 100, + "region": "https://www.googleapis.com/compute/v1/projects/${projectId}/regions/europe-west4", + "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/regions/europe-west4/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "DONE", + "targetId": "${targetTcpProxiesId}", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/regions/europe-west4/targetTcpProxies/computetargettcpproxy-${uniqueId}", + "user": "user@example.com" +} + +--- + +GET https://compute.googleapis.com/compute/v1/projects/${projectId}/regions/europe-west4/targetTcpProxies/computetargettcpproxy-${uniqueId} +Content-Type: application/json +User-Agent: kcc/controller-manager +x-goog-request-params: project=${projectId}®ion=europe-west4&target_tcp_proxy=computetargettcpproxy-${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 + +{ + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "description": "test target tcp proxy", + "id": "000000000000000000000", + "kind": "compute#targetTcpProxy", + "name": "computetargettcpproxy-${uniqueId}", + "proxyBind": false, + "proxyHeader": "NONE", + "region": "https://www.googleapis.com/compute/v1/projects/${projectId}/regions/europe-west4", + "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/regions/europe-west4/targetTcpProxies/computetargettcpproxy-${uniqueId}", + "service": "https://www.googleapis.com/compute/v1/projects/${projectId}/regions/europe-west4/backendServices/computebackendservice-${uniqueId}" +} + +--- + +DELETE https://compute.googleapis.com/compute/v1/projects/${projectId}/regions/europe-west4/targetTcpProxies/computetargettcpproxy-${uniqueId} +Content-Type: application/json +User-Agent: kcc/controller-manager +<<<<<<<< HEAD:pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/globalcomputetargettcpproxy-full-direct/_http.log +x-goog-request-params: project=${projectId}&target_tcp_proxy=computetargettcpproxy-${uniqueId} + +{ + "proxyHeader": "PROXY_V1" +} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "id": "000000000000000000000", + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "compute#operation", + "name": "${operationID}", + "operationType": "TargetTcpProxySetProxyHeader", + "progress": 0, + "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetId": "${targetTcpProxiesId}", + "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": "TargetTcpProxySetProxyHeader", + "progress": 100, + "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "DONE", + "targetId": "${targetTcpProxiesId}", + "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/computetargettcpproxy-${uniqueId} +Content-Type: application/json +User-Agent: kcc/controller-manager +x-goog-request-params: project=${projectId}&target_tcp_proxy=computetargettcpproxy-${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 + +{ + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "description": "test target tcp proxy", + "id": "000000000000000000000", + "kind": "compute#targetTcpProxy", + "name": "computetargettcpproxy-${uniqueId}", + "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}" +} + +--- + +DELETE https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId} +Content-Type: application/json +User-Agent: kcc/controller-manager +x-goog-request-params: project=${projectId}&target_tcp_proxy=computetargettcpproxy-${uniqueId} +======== +x-goog-request-params: project=${projectId}®ion=europe-west4&target_tcp_proxy=computetargettcpproxy-${uniqueId} +>>>>>>>> 51fc5efd2 (Add direct controller for regional tcp proxy):pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/regionalcomputetargettcpproxy-direct/_http.log + +200 OK +Cache-Control: private +Content-Type: application/json; charset=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, + "region": "https://www.googleapis.com/compute/v1/projects/${projectId}/regions/europe-west4", + "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/regions/europe-west4/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "RUNNING", + "targetId": "${targetTcpProxiesId}", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/regions/europe-west4/targetTcpProxies/computetargettcpproxy-${uniqueId}", + "user": "user@example.com" +} + +--- + +GET https://compute.googleapis.com/compute/v1/projects/${projectId}/regions/europe-west4/operations/${operationID} +Content-Type: application/json +User-Agent: kcc/controller-manager +x-goog-request-params: project=${projectId}®ion=europe-west4&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": "delete", + "progress": 100, + "region": "https://www.googleapis.com/compute/v1/projects/${projectId}/regions/europe-west4", + "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/regions/europe-west4/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "DONE", + "targetId": "${targetTcpProxiesId}", + "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/regions/europe-west4/targetTcpProxies/computetargettcpproxy-${uniqueId}", + "user": "user@example.com" +} + +--- + +GET https://compute.googleapis.com/compute/v1/projects/${projectId}/regions/europe-west4/backendServices/computebackendservice-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "connectionDraining": { + "drainingTimeoutSec": 0 + }, + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "healthChecks": [ + "https://www.googleapis.com/compute/v1/projects/${projectId}/regions/europe-west4/healthChecks/computehealthcheck-${uniqueId}" + ], + "iap": { + "enabled": false, + "oauth2ClientId": "", + "oauth2ClientSecret": "" + }, + "id": "000000000000000000000", + "kind": "compute#backendService", + "loadBalancingScheme": "INTERNAL_MANAGED", + "name": "computebackendservice-${uniqueId}", + "protocol": "TCP", + "region": "projects/${projectId}/global/regions/europe-west4", + "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/regions/europe-west4/backendServices/computebackendservice-${uniqueId}" +} + +--- + +DELETE https://compute.googleapis.com/compute/v1/projects/${projectId}/regions/europe-west4/backendServices/computebackendservice-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "id": "000000000000000000000", + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "compute#operation", + "name": "${operationID}", + "progress": 0, + "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "DONE" +} + +--- + +GET https://compute.googleapis.com/compute/v1/projects/${projectId}/regions/europe-west4/healthChecks/computehealthcheck-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "checkIntervalSec": 10, + "creationTimestamp": "2024-04-01T12:34:56.123456Z", + "healthyThreshold": 2, + "id": "000000000000000000000", + "kind": "compute#healthCheck", + "name": "computehealthcheck-${uniqueId}", + "region": "projects/${projectId}/global/regions/europe-west4", + "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/regions/europe-west4/healthChecks/computehealthcheck-${uniqueId}", + "tcpHealthCheck": { + "port": 443, + "proxyHeader": "NONE" + }, + "timeoutSec": 5, + "type": "TCP", + "unhealthyThreshold": 2 +} + +--- + +DELETE https://compute.googleapis.com/compute/v1/projects/${projectId}/regions/europe-west4/healthChecks/computehealthcheck-${uniqueId}?alt=json +Content-Type: application/json +User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "id": "000000000000000000000", + "insertTime": "2024-04-01T12:34:56.123456Z", + "kind": "compute#operation", + "name": "${operationID}", + "progress": 0, + "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", + "startTime": "2024-04-01T12:34:56.123456Z", + "status": "DONE" +} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/regionalcomputetargettcpproxy-direct/create.yaml b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/regionalcomputetargettcpproxy-direct/create.yaml new file mode 100644 index 0000000000..7e384eaa4f --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/regionalcomputetargettcpproxy-direct/create.yaml @@ -0,0 +1,28 @@ +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: compute.cnrm.cloud.google.com/v1beta1 +kind: ComputeTargetTCPProxy +metadata: + annotations: + cnrm.cloud.google.com/project-id: ${projectId} + alpha.cnrm.cloud.google.com/reconciler: "direct" + name: computetargettcpproxy-${uniqueId} +spec: + description: "test target tcp proxy" + backendServiceRef: + name: computebackendservice-${uniqueId} + proxyBind: false + proxyHeader: NONE + location: europe-west4 diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/regionalcomputetargettcpproxy-direct/dependencies.yaml b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/regionalcomputetargettcpproxy-direct/dependencies.yaml new file mode 100644 index 0000000000..870c8c0c3b --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/regionalcomputetargettcpproxy-direct/dependencies.yaml @@ -0,0 +1,38 @@ +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: compute.cnrm.cloud.google.com/v1beta1 +kind: ComputeHealthCheck +metadata: + name: computehealthcheck-${uniqueId} +spec: + checkIntervalSec: 10 + tcpHealthCheck: + port: 443 + location: europe-west4 +--- +apiVersion: compute.cnrm.cloud.google.com/v1beta1 +kind: ComputeBackendService +metadata: + name: computebackendservice-${uniqueId} +spec: + healthChecks: + - healthCheckRef: + name: computehealthcheck-${uniqueId} + location: europe-west4 + protocol: TCP + # Default loadBalancingScheme for regional backend service is INTERNAL + # Set to INTERNAL_MANAGED when being referenced by Regional Target TCP Proxy + # googleapi error: Regional Target TCP Proxy cannot be used with BackendServices with schema INTERNAL + loadBalancingScheme: INTERNAL_MANAGED