diff --git a/pkg/controller/direct/compute/forwardingrule_controller.go b/pkg/controller/direct/compute/forwardingrule_controller.go index 9c8293b5e0..5ae9c04f4a 100644 --- a/pkg/controller/direct/compute/forwardingrule_controller.go +++ b/pkg/controller/direct/compute/forwardingrule_controller.go @@ -318,6 +318,11 @@ func (a *forwardingRuleAdapter) Create(ctx context.Context, createOp *directbase var err error op := &gcp.Operation{} if a.id.location == "global" { + // todo(yuhou): TF does not support networkTier field for global forwarding rule + // It will always use GCP's default value, which is "PREMIUM." Any value set by the user will be ignored and not sent to GCP. + // To align with the TF controller, I remove this field. + // Ideally, direct controller should support this field and validate that the value. + forwardingRule.NetworkTier = nil req := &computepb.InsertGlobalForwardingRuleRequest{ ForwardingRuleResource: forwardingRule, Project: a.id.project, diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingrulefull/_http.log b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingrulefull/_http.log index 8708236ffb..362f5a2fc6 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingrulefull/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingrulefull/_http.log @@ -770,7 +770,6 @@ x-goog-request-params: project=${projectId} ], "name": "computeglobalforwardingrule-${uniqueId}", "network": "projects/${projectId}/global/networks/${networkID}", - "networkTier": "PREMIUM", "portRange": "80", "target": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/targetHttpProxies/computetargethttpproxy-${uniqueId}" }