Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
Signed-off-by: Dainius Serplis <[email protected]>
  • Loading branch information
Didainius committed Mar 1, 2022
1 parent 444928e commit fc2debf
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
12 changes: 6 additions & 6 deletions vcd/datasource_vcd_nsxt_edgegateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,18 @@ func datasourceVcdNsxtEdgeGateway() *schema.Resource {
ConflictsWith: []string{"owner_id"},
Deprecated: "This field is deprecated in favor of 'owner_id' which supports both - VDC and VDC group IDs",
},
"name": {
Type: schema.TypeString,
Required: true,
Description: "Edge Gateway name",
},
"owner_id": {
Type: schema.TypeString,
Optional: true,
Computed: true,
Description: "ID of VDC or VDC group",
Description: "ID of VDC or VDC Group",
ConflictsWith: []string{"vdc"},
},
"name": {
Type: schema.TypeString,
Required: true,
Description: "Edge Gateway name",
},
"description": {
Type: schema.TypeString,
Computed: true,
Expand Down
4 changes: 2 additions & 2 deletions vcd/resource_vcd_nsxt_edgegateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func resourceVcdNsxtEdgeGateway() *schema.Resource {
Type: schema.TypeString,
Optional: true,
Computed: true,
Description: "ID of VDC Group or VDC",
Description: "ID of VDC or VDC Group",
ConflictsWith: []string{"vdc"},
},
"starting_vdc_id": {
Expand Down Expand Up @@ -155,7 +155,7 @@ func resourceVcdNsxtEdgeGatewayCreate(ctx context.Context, d *schema.ResourceDat
d.SetId(createdEdgeGateway.EdgeGateway.ID)

// NSX-T Edge Gateway cannot be directly created in VDC group, but can only be assigned to VDC
// group after creation. Function `getNsxtEdgeGatewayType` decided the initial location of VDC,
// Group after creation. Function `getNsxtEdgeGatewayType` decided the initial location of VDC,
// but if the `owner_id` was set to VDC Group for creation - it must be moved to that VDC Group
// explicitly after creation.
ownerIdField := d.Get("owner_id").(string)
Expand Down
2 changes: 1 addition & 1 deletion website/docs/d/nsxt_edgegateway.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ The following arguments are supported:
* `vdc` - (Optional) **Deprecated** - please use `owner_id` field. The name of VDC that owns the
NSX-T Edge Gateway. Optional if defined at provider level.
* `owner_id` - (Optional, *v3.6+*,*VCD 10.2+*) **Replaces** `vdc` field. The ID of VDC or VDC group
that this Edge Gateway belongs to. **Note.** Data source
that this Edge Gateway belongs to. **Note:** Data source
[vcd_vdc_group](/providers/vmware/vcd/latest/docs/data-sources/vdc_group) can be used to lookup ID
by name.

Expand Down
18 changes: 9 additions & 9 deletions website/docs/r/nsxt_edgegateway.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,14 @@ resource "vcd_nsxt_edgegateway" "nsxt-edge" {
org = "my-org"
owner_id = data.vcd_vdc_group.group1.id
# VDC Group cannot be created directly in VDC Group - it
# must originate in some VDC (belonging to destination VDC Group)
# VDC Group cannot be created directly in VDC Group -
# it must originate in some VDC (belonging to
# destination VDC Group)
#
# `starting_vdc_id` field is optional. If only VDC Group
# ID is specified in `owner_id` field - this resource
# will will pick a random member
# VDC to precreate it and will move to destination
# VDC Group in a single apply cycle
# ID is specified in `owner_id` field - this resource will
# will pick a random member VDC to precreate it and will
# move to destination VDC Group in a single apply cycle
starting_vdc_id = data.vcd_org_vdc.vdc-1.id
name = "nsxt-edge"
Expand Down Expand Up @@ -202,7 +202,7 @@ The following arguments are supported:
* `org` - (Optional) The name of organization to which the VDC belongs. Optional if defined at provider level.
* `vdc` - (Optional) **Deprecated** in favor of `owner_id`. The name of VDC that owns the edge
gateway. Can be inherited from `provider` configuration if not defined here.
* `owner_id` - (Optional, *v3.6+*,*VCD 10.2+*) The ID of VDC or VDC Group. **Note.** Data sources
* `owner_id` - (Optional, *v3.6+*,*VCD 10.2+*) The ID of VDC or VDC Group. **Note:** Data sources
[vcd_vdc_group](/providers/vmware/vcd/latest/docs/data-sources/vdc_group) or
[vcd_org_vdc](/providers/vmware/vcd/latest/docs/data-sources/org_vdc) can be used to lookup IDs by
name
Expand All @@ -216,11 +216,11 @@ definition at provider level.

* `starting_vdc_id` - (Optional, *v3.6+*,*VCD 10.2+*) If `owner_id` is a VDC Group, this field
allows to specify initial VDC for Edge Gateway (this can define Egress location of traffic in the
VDC Group) **Note.** It can only be used when `owner_id` is a VDC Group.
VDC Group) **Note:** It can only be used when `owner_id` is a VDC Group.

* `name` - (Required) A unique name for the edge gateway.
* `description` - (Optional) A unique name for the edge gateway.
* `external_network_id` - (Required) An external network ID. **Note.** Data source [vcd_external_network_v2](/providers/vmware/vcd/latest/docs/data-sources/external_network_v2)
* `external_network_id` - (Required) An external network ID. **Note:** Data source [vcd_external_network_v2](/providers/vmware/vcd/latest/docs/data-sources/external_network_v2)
can be used to lookup ID by name.
* `subnet` - (Required) One or more [subnets](#edgegateway-subnet) defined for edge gateway.
* `edge_cluster_id` - (Optional) Specific Edge Cluster ID if required
Expand Down

0 comments on commit fc2debf

Please sign in to comment.