Skip to content

Commit

Permalink
Merge pull request #477 from vmware/doc_fixes
Browse files Browse the repository at this point in the history
Clarify documentation for predefined policies
  • Loading branch information
annakhm authored Oct 5, 2020
2 parents 2122a4b + 10c7fdc commit 3005cd4
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion website/docs/d/policy_segment_realization.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
```
Expand Down
10 changes: 9 additions & 1 deletion website/docs/r/policy_predefined_gateway_policy.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 3005cd4

Please sign in to comment.