From 46149df0add7774c08d62502338b99d026c6c35e Mon Sep 17 00:00:00 2001 From: Anna Khmelnitsky Date: Wed, 21 Jun 2023 21:32:49 +0000 Subject: [PATCH] Add doc clarification for T1 route adv types In addition, fix linter issues Signed-off-by: Anna Khmelnitsky --- nsxt/data_source_nsxt_policy_tier1_gateway.go | 1 + nsxt/resource_nsxt_policy_tier1_gateway.go | 4 ++-- nsxt/resource_nsxt_policy_tier1_gateway_gm_test.go | 1 - website/docs/r/policy_tier1_gateway.html.markdown | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/nsxt/data_source_nsxt_policy_tier1_gateway.go b/nsxt/data_source_nsxt_policy_tier1_gateway.go index dc71aa43d..ad0f66ee1 100644 --- a/nsxt/data_source_nsxt_policy_tier1_gateway.go +++ b/nsxt/data_source_nsxt_policy_tier1_gateway.go @@ -5,6 +5,7 @@ package nsxt import ( "fmt" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/vmware/vsphere-automation-sdk-go/runtime/bindings" "github.com/vmware/vsphere-automation-sdk-go/services/nsxt/model" diff --git a/nsxt/resource_nsxt_policy_tier1_gateway.go b/nsxt/resource_nsxt_policy_tier1_gateway.go index 9b730e371..2cebff6c7 100644 --- a/nsxt/resource_nsxt_policy_tier1_gateway.go +++ b/nsxt/resource_nsxt_policy_tier1_gateway.go @@ -500,9 +500,9 @@ func resourceNsxtPolicyTier1GatewayCreate(d *schema.ResourceData, m interface{}) if err != nil { return err } - + obj, err := policyTier1GatewayResourceToInfraStruct(getSessionContext(d, m), d, connector, id) - + if err != nil { return err } diff --git a/nsxt/resource_nsxt_policy_tier1_gateway_gm_test.go b/nsxt/resource_nsxt_policy_tier1_gateway_gm_test.go index ff412a684..9721c001d 100644 --- a/nsxt/resource_nsxt_policy_tier1_gateway_gm_test.go +++ b/nsxt/resource_nsxt_policy_tier1_gateway_gm_test.go @@ -65,7 +65,6 @@ func TestAccResourceNsxtPolicyTier1Gateway_globalManager(t *testing.T) { testAccNsxtPolicyTier1Exists(testResourceName), resource.TestCheckResourceAttr(testResourceName, "display_name", defaultTestResourceName), resource.TestCheckResourceAttr(testResourceName, "tier0_path", ""), - resource.TestCheckResourceAttr(testResourceName, "route_advertisement_types.#", "0"), resource.TestCheckResourceAttr(testResourceName, "route_advertisement_rule.#", "0"), resource.TestCheckResourceAttr(testResourceName, "locale_service.#", "0"), resource.TestCheckResourceAttr(testResourceName, "intersite_config.#", "1"), diff --git a/website/docs/r/policy_tier1_gateway.html.markdown b/website/docs/r/policy_tier1_gateway.html.markdown index 73dc162bb..02f13f0e4 100644 --- a/website/docs/r/policy_tier1_gateway.html.markdown +++ b/website/docs/r/policy_tier1_gateway.html.markdown @@ -137,7 +137,7 @@ The following arguments are supported: * `action` - (Required) Action to advertise filtered routes to the connected Tier0 gateway. PERMIT (which is the default): Enables the advertisement, DENY: Disables the advertisement. * `subnets` - (Required) list of network CIDRs to be routed. * `prefix_operator` - (Optional) Prefix operator to apply on subnets. GE prefix operator (which is the default|) filters all the routes having network subset of any of the networks configured in Advertise rule. EQ prefix operator filter all the routes having network equal to any of the network configured in Advertise rule.The name of the rule. -* `route_advertisement_types` - (Optional) List of desired types of route advertisements, supported values: `TIER1_STATIC_ROUTES`, `TIER1_CONNECTED`, `TIER1_NAT`, `TIER1_LB_VIP`, `TIER1_LB_SNAT`, `TIER1_DNS_FORWARDER_IP`, `TIER1_IPSEC_LOCAL_ENDPOINT`. +* `route_advertisement_types` - (Optional) List of desired types of route advertisements, supported values: `TIER1_STATIC_ROUTES`, `TIER1_CONNECTED`, `TIER1_NAT`, `TIER1_LB_VIP`, `TIER1_LB_SNAT`, `TIER1_DNS_FORWARDER_IP`, `TIER1_IPSEC_LOCAL_ENDPOINT`. This field is Computed, meaning that NSX can auto-assign types. Hence, in order to revert to default behavior, set route advertisement values explicitly rather than removing this clause from configuration. * `ingress_qos_profile_path` - (Optional) QoS Profile path for ingress traffic on link connected to Tier0 gateway. * `egress_qos_profile_path` - (Optional) QoS Profile path for egress traffic on link connected to Tier0 gateway. * `intersite_config` - (Optional) This clause is relevant for Global Manager only.