Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional (computed) Direct Connect attributes #7131

Merged
merged 1 commit into from
Mar 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions aws/resource_aws_dx_bgp_peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ func resourceAwsDxBgpPeer() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},
"bgp_peer_id": {
Type: schema.TypeString,
Computed: true,
},
"aws_device": {
Type: schema.TypeString,
Computed: true,
},
},

Timeouts: &schema.ResourceTimeout{
Expand Down Expand Up @@ -141,6 +149,8 @@ func resourceAwsDxBgpPeerRead(d *schema.ResourceData, meta interface{}) error {
d.Set("bgp_auth_key", bgpPeer.AuthKey)
d.Set("customer_address", bgpPeer.CustomerAddress)
d.Set("bgp_status", bgpPeer.BgpStatus)
d.Set("bgp_peer_id", bgpPeer.BgpPeerId)
d.Set("aws_device", bgpPeer.AwsDeviceV2)

return nil
}
Expand Down
10 changes: 10 additions & 0 deletions aws/resource_aws_dx_connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ func resourceAwsDxConnection() *schema.Resource {
Computed: true,
},
"tags": tagsSchema(),
"has_logical_redundancy": {
Type: schema.TypeString,
Computed: true,
},
"aws_device": {
Type: schema.TypeString,
Computed: true,
},
},
}
}
Expand Down Expand Up @@ -116,6 +124,8 @@ func resourceAwsDxConnectionRead(d *schema.ResourceData, meta interface{}) error
d.Set("bandwidth", connection.Bandwidth)
d.Set("location", connection.Location)
d.Set("jumbo_frame_capable", connection.JumboFrameCapable)
d.Set("has_logical_redundancy", connection.HasLogicalRedundancy)
d.Set("aws_device", connection.AwsDeviceV2)

err1 := getTagsDX(conn, d, arn)
return err1
Expand Down
5 changes: 5 additions & 0 deletions aws/resource_aws_dx_hosted_private_virtual_interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ func resourceAwsDxHostedPrivateVirtualInterface() *schema.Resource {
Type: schema.TypeBool,
Computed: true,
},
"aws_device": {
Type: schema.TypeString,
Computed: true,
},
},

Timeouts: &schema.ResourceTimeout{
Expand Down Expand Up @@ -172,6 +176,7 @@ func resourceAwsDxHostedPrivateVirtualInterfaceRead(d *schema.ResourceData, meta
d.Set("owner_account_id", vif.OwnerAccount)
d.Set("mtu", vif.Mtu)
d.Set("jumbo_frame_capable", vif.JumboFrameCapable)
d.Set("aws_device", vif.AwsDeviceV2)

return nil
}
Expand Down
5 changes: 5 additions & 0 deletions aws/resource_aws_dx_hosted_public_virtual_interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ func resourceAwsDxHostedPublicVirtualInterface() *schema.Resource {
Elem: &schema.Schema{Type: schema.TypeString},
MinItems: 1,
},
"aws_device": {
Type: schema.TypeString,
Computed: true,
},
},

Timeouts: &schema.ResourceTimeout{
Expand Down Expand Up @@ -177,6 +181,7 @@ func resourceAwsDxHostedPublicVirtualInterfaceRead(d *schema.ResourceData, meta
d.Set("amazon_address", vif.AmazonAddress)
d.Set("route_filter_prefixes", flattenDxRouteFilterPrefixes(vif.RouteFilterPrefixes))
d.Set("owner_account_id", vif.OwnerAccount)
d.Set("aws_device", vif.AwsDeviceV2)

return nil
}
Expand Down
10 changes: 10 additions & 0 deletions aws/resource_aws_dx_lag.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,15 @@ func resourceAwsDxLag() *schema.Resource {
Optional: true,
Default: false,
},
"jumbo_frame_capable": {
Type: schema.TypeBool,
Computed: true,
},
"tags": tagsSchema(),
"has_logical_redundancy": {
Type: schema.TypeString,
Computed: true,
},
},
}
}
Expand Down Expand Up @@ -135,6 +143,8 @@ func resourceAwsDxLagRead(d *schema.ResourceData, meta interface{}) error {
d.Set("name", lag.LagName)
d.Set("connections_bandwidth", lag.ConnectionsBandwidth)
d.Set("location", lag.Location)
d.Set("jumbo_frame_capable", lag.JumboFrameCapable)
d.Set("has_logical_redundancy", lag.HasLogicalRedundancy)

err1 := getTagsDX(conn, d, arn)
return err1
Expand Down
1 change: 1 addition & 0 deletions aws/resource_aws_dx_private_virtual_interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ func resourceAwsDxPrivateVirtualInterfaceRead(d *schema.ResourceData, meta inter
d.Set("dx_gateway_id", vif.DirectConnectGatewayId)
d.Set("mtu", vif.Mtu)
d.Set("jumbo_frame_capable", vif.JumboFrameCapable)
d.Set("aws_device", vif.AwsDeviceV2)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing schema definition

err1 := getTagsDX(conn, d, d.Get("arn").(string))
return err1
}
Expand Down
5 changes: 5 additions & 0 deletions aws/resource_aws_dx_public_virtual_interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ func resourceAwsDxPublicVirtualInterface() *schema.Resource {
MinItems: 1,
},
"tags": tagsSchema(),
"aws_device": {
Type: schema.TypeString,
Computed: true,
},
},

Timeouts: &schema.ResourceTimeout{
Expand Down Expand Up @@ -160,6 +164,7 @@ func resourceAwsDxPublicVirtualInterfaceRead(d *schema.ResourceData, meta interf
d.Set("customer_address", vif.CustomerAddress)
d.Set("amazon_address", vif.AmazonAddress)
d.Set("route_filter_prefixes", flattenDxRouteFilterPrefixes(vif.RouteFilterPrefixes))
d.Set("aws_device", vif.AwsDeviceV2)
err1 := getTagsDX(conn, d, d.Get("arn").(string))
return err1
}
Expand Down
2 changes: 2 additions & 0 deletions website/docs/r/dx_bgp_peer.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ In addition to all arguments above, the following attributes are exported:

* `id` - The ID of the BGP peer.
* `bgp_status` - The Up/Down state of the BGP peer.
* `bgp_peer_id` - The ID of the BGP peer.
* `aws_device` - The Direct Connect endpoint on which the BGP peer terminates.

## Timeouts

Expand Down
2 changes: 2 additions & 0 deletions website/docs/r/dx_connection.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ In addition to all arguments above, the following attributes are exported:
* `id` - The ID of the connection.
* `arn` - The ARN of the connection.
* `jumbo_frame_capable` - Boolean value representing if jumbo frames have been enabled for this connection.
* `has_logical_redundancy` - Indicates whether the connection supports a secondary BGP peer in the same address family (IPv4/IPv6).
* `aws_device` - The Direct Connect endpoint on which the physical connection terminates.

## Import

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ In addition to all arguments above, the following attributes are exported:
* `id` - The ID of the virtual interface.
* `arn` - The ARN of the virtual interface.
* `jumbo_frame_capable` - Indicates whether jumbo frames (9001 MTU) are supported.
* `aws_device` - The Direct Connect endpoint on which the virtual interface terminates.

## Timeouts

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ In addition to all arguments above, the following attributes are exported:

* `id` - The ID of the virtual interface.
* `arn` - The ARN of the virtual interface.
* `aws_device` - The Direct Connect endpoint on which the virtual interface terminates.

## Timeouts

Expand Down
2 changes: 2 additions & 0 deletions website/docs/r/dx_lag.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ In addition to all arguments above, the following attributes are exported:

* `id` - The ID of the LAG.
* `arn` - The ARN of the LAG.
* `jumbo_frame_capable` -Indicates whether jumbo frames (9001 MTU) are supported.
* `has_logical_redundancy` - Indicates whether the LAG supports a secondary BGP peer in the same address family (IPv4/IPv6).

## Import

Expand Down
1 change: 1 addition & 0 deletions website/docs/r/dx_private_virtual_interface.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ In addition to all arguments above, the following attributes are exported:
* `id` - The ID of the virtual interface.
* `arn` - The ARN of the virtual interface.
* `jumbo_frame_capable` - Indicates whether jumbo frames (9001 MTU) are supported.
* `aws_device` - The Direct Connect endpoint on which the virtual interface terminates.

## Timeouts

Expand Down
1 change: 1 addition & 0 deletions website/docs/r/dx_public_virtual_interface.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ In addition to all arguments above, the following attributes are exported:

* `id` - The ID of the virtual interface.
* `arn` - The ARN of the virtual interface.
* `aws_device` - The Direct Connect endpoint on which the virtual interface terminates.

## Timeouts

Expand Down