Skip to content

Commit

Permalink
Some documentation clarifications and format fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Anna Khmelnitsky <[email protected]>
  • Loading branch information
annakhm committed Mar 4, 2023
1 parent 52f879b commit 7463827
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 18 deletions.
19 changes: 4 additions & 15 deletions website/docs/guides/faq.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ description: |-

Consider the following error:

```
Error: Failed to delete <object>: The object path=[..] cannot be deleted as either it
has children or it is being referenced by other objects
```
```Error: Failed to delete <object>: The object path=[..] cannot be deleted as either it has children or it is being referenced by other objects```

Usually this error results from terraform engine assuming certain order of delete/update operation that is not consistent with NSX. In order to imply correct order on terraform and thus fix the issue, add the following clause to affected resources:

Expand All @@ -35,10 +32,7 @@ However, sometimes the error above is symptom of misconfiguration, i.e. there ar

Consider same error as above:

```
Error: Failed to delete <object>: The object path=[..] cannot be deleted as either it has
children or it is being referenced by other objects..
```
```Error: Failed to delete <object>: The object path=[..] cannot be deleted as either it haschildren or it is being referenced by other objects..```

Sometimes this error is due to the fact that certain resource cleanup on NSX needs more time. For now, the workaround would be to re-run the destroy command after few seconds. In future versions of provider, this issue will be solved with automatic retry.

Expand Down Expand Up @@ -68,9 +62,7 @@ Be sure to also specify `enforcement_point` as `vmc-enforcementpoint` in provide

Consider the following error:

```
Failed to read <object type> (Error unmarshalling server response)
```
```Failed to read <object type> (Error unmarshalling server response)```

This issue is usually caused by proxy timeout on VMC side. Re-apply can help. If you run into this a lot, please consider direct connection to NSX in your VMC environment to avoid the proxy overhead. If this is not an option for you, another way to reduce the load on the proxy could be to avoid heavy usage of data sources, and instead use policy path directly in your configuration.

Expand All @@ -79,10 +71,7 @@ This issue is usually caused by proxy timeout on VMC side. Re-apply can help. If

Consider the following error:

```
User is not authorized to perform this operation on the application.
Please contact the system administrator to get access. (code 401)
```
```User is not authorized to perform this operation on the application. Please contact the system administrator to get access. (code 401)```

Provided your VMC token is accurate and you have sufficient permissions, it is likely that `domain` is missing from resource configuration. Domains of VMC are different from default value that is set in the provider.For group resource, the fix would be specifying relevant domain like in the example below:

Expand Down
1 change: 1 addition & 0 deletions website/docs/r/policy_evpn_config.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ The following arguments are supported:
* `gateway_path` - (Required) Policy Path for Tier0 Gateway to configure EVPN on.
* `mode` - (Required) EVPN Mode, one of `INLINE` or `ROUTE_SERVER`. In `ROUTE_SERVER` mode, edge nodes participate in the BGP EVPN control plane route exchanges only and do not participate in data forwarding.
* `vni_pool_path` - (Optional) Path of VNI pool to use. This setting is only applicable (and required) with `INLINE` mode.
* `evpn_tenant_path` - (Optional) Policy path for EVPN tenant. Relevant for `ROUTE_SERVER` mode.
* `tag` - (Optional) A list of scope + tag pairs to associate with this resource.

## Attributes Reference
Expand Down
10 changes: 9 additions & 1 deletion website/docs/r/policy_gateway_policy.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ resource "nsxt_policy_gateway_policy" "test" {
scope = [nsxt_policy_tier1_gateway.policygateway.path]
}
lifecycle {
create_before_destroy = true
}
}
```

Expand Down Expand Up @@ -72,10 +75,15 @@ resource "nsxt_policy_gateway_policy" "test" {
scope = [nsxt_policy_tier1_gateway.policygateway.path]
}
lifecycle {
create_before_destroy = true
}
}
```
## Argument Reference

-> We recommend using `lifecycle` directive as in samples above, in order to avoid dependency issues when updating groups/services simultaneously with the rule.

## Argument Reference

The following arguments are supported:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ resource "nsxt_policy_ipsec_vpn_local_endpoint" "test" {
local_address = "20.20.0.10"
local_id = "test"
certificate_path = data.nsxt_policy_certificate.cert.path
trust_ca_paths = [data.nsxt_policy_certificate.trust_ca.path]
}
```

Expand Down
12 changes: 11 additions & 1 deletion website/docs/r/policy_security_policy.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,14 @@ resource "nsxt_policy_security_policy" "policy1" {
disabled = true
notes = "Disabled by starfish for debugging"
}
lifecycle {
create_before_destroy = true
}
}
```

Note: This usage is for Global Manager only
## Global Manager example

```hcl
data "nsxt_policy_site" "paris" {
Expand Down Expand Up @@ -80,9 +84,15 @@ resource "nsxt_policy_security_policy" "policy1" {
disabled = true
notes = "Disabled by starfish for debugging"
}
lifecycle {
create_before_destroy = true
}
}
```

-> We recommend using `lifecycle` directive as in samples above, in order to avoid dependency issues when updating groups/services simultaneously with the rule.

## Argument Reference

The following arguments are supported:
Expand Down

0 comments on commit 7463827

Please sign in to comment.