diff --git a/website/docs/d/policy_segment_realization.html.markdown b/website/docs/d/policy_segment_realization.html.markdown index 47c5f9c13..24ee2fa1e 100644 --- a/website/docs/d/policy_segment_realization.html.markdown +++ b/website/docs/d/policy_segment_realization.html.markdown @@ -28,7 +28,7 @@ data "nsxt_policy_segment_realization" "s1" { # usage in vsphere provider data "vsphere_network" "net" { - name = nsxt_policy_segment_realization.s1.network_name + name = data.nsxt_policy_segment_realization.s1.network_name datacenter_id = data.vsphere_datacenter.datacenter.id } ``` diff --git a/website/docs/r/policy_predefined_gateway_policy.html.markdown b/website/docs/r/policy_predefined_gateway_policy.html.markdown index af82639df..4b0a6e20c 100644 --- a/website/docs/r/policy_predefined_gateway_policy.html.markdown +++ b/website/docs/r/policy_predefined_gateway_policy.html.markdown @@ -13,13 +13,21 @@ There are two separate use cases for this resource: * Modify predefined Gateway Policy that is not listed under Default category, and add rules to it. This use case is relevant for VMC. +~> **NOTE:** An absolute path, can be provided for this resource (this approach will work slightly faster, as the roundtrip for data source retrieval will be spared). In one of the examples below a data source is used in order to pull the predefined policy, while the other uses absolute path. + +~> **NOTE:** Default gateway policy generation behavior have changed in NSX 3.1.0. Below this version, there is a single default policy, while default rules are created under it per Gateway. Above NSX 3.1.0, a default policy is generated per Gateway. The first example provided here is limited to NSX 3.0.0 and below. + This resource is applicable to NSX Global Manager, NSX Policy Manager and VMC. ## Example Usage for NSX Policy Manager ```hcl +data "nsxt_policy_gateway_policy" "default" { + category = "Default" +} + resource "nsxt_policy_predefined_gateway_policy" "test" { - path = "/infra/domains/default/gateway-policies/Policy_Default_Infra" + path = data.nsxt_policy_gateway_policy.default.path tag { scope = "color" diff --git a/website/docs/r/policy_predefined_security_policy.html.markdown b/website/docs/r/policy_predefined_security_policy.html.markdown index 4c27ff52d..100867170 100644 --- a/website/docs/r/policy_predefined_security_policy.html.markdown +++ b/website/docs/r/policy_predefined_security_policy.html.markdown @@ -11,13 +11,20 @@ This resource provides a method to modify default Security Policy and its rules. This can be default layer2 policy or default layer3 policy. Maximum one resource for each type should exist in your configuration. +~> **NOTE:** An absolute path, such as `/infra/domains/default/security-policies/default-layer3-section`, can be provided for this resource (this approach will work slightly faster, as the roundtrip for data source retrieval will be spared) In the example below a data source is used in order to pull the predefined policy. + This resource is applicable to NSX Global Manager, NSX Policy Manager and VMC. ## Example Usage ```hcl +data "nsxt_policy_security_policy" "default_l3" { + is_default = true + category = "Application" +} + resource "nsxt_policy_predefined_security_policy" "test" { - path = "/infra/domains/default/security-policies/default-layer3-section" + path = data.nsxt_policy_security_policy.default_l3.path tag { scope = "color"