diff --git a/nsxt/resource_nsxt_policy_bgp_config.go b/nsxt/resource_nsxt_policy_bgp_config.go index 44d79245d..dc10f9569 100644 --- a/nsxt/resource_nsxt_policy_bgp_config.go +++ b/nsxt/resource_nsxt_policy_bgp_config.go @@ -128,7 +128,9 @@ func resourceNsxtPolicyBgpConfigToStruct(d *schema.ResourceData, isVRF bool) (*m routeStruct.Tags = tags routeStruct.InterSrIbgp = &interSrIbgp - routeStruct.LocalAsNum = &localAsNum + if len(localAsNum) > 0 { + routeStruct.LocalAsNum = &localAsNum + } routeStruct.MultipathRelax = &multipathRelax routeStruct.GracefulRestartConfig = &restartConfigStruct } diff --git a/nsxt/resource_nsxt_policy_tier0_gateway.go b/nsxt/resource_nsxt_policy_tier0_gateway.go index 305974375..d39510686 100644 --- a/nsxt/resource_nsxt_policy_tier0_gateway.go +++ b/nsxt/resource_nsxt_policy_tier0_gateway.go @@ -172,6 +172,7 @@ func getPolicyBGPConfigSchema() map[string]*schema.Schema { Description: "BGP AS number in ASPLAIN/ASDOT Format", Optional: true, ValidateFunc: validateASPlainOrDot, + Computed: true, }, "multipath_relax": { Type: schema.TypeBool,