Merge pull request #5747 from hashicorp/b-5647
provider/aws: Fix panic in VPN connection resource
This commit is contained in:
commit
b9203710e1
|
@ -305,11 +305,13 @@ func resourceAwsVpnConnectionRead(d *schema.ResourceData, meta interface{}) erro
|
||||||
// Set read only attributes.
|
// Set read only attributes.
|
||||||
d.Set("customer_gateway_configuration", vpnConnection.CustomerGatewayConfiguration)
|
d.Set("customer_gateway_configuration", vpnConnection.CustomerGatewayConfiguration)
|
||||||
|
|
||||||
|
if vpnConnection.CustomerGatewayConfiguration != nil {
|
||||||
tunnelInfo := xmlConfigToTunnelInfo(*vpnConnection.CustomerGatewayConfiguration)
|
tunnelInfo := xmlConfigToTunnelInfo(*vpnConnection.CustomerGatewayConfiguration)
|
||||||
d.Set("tunnel1_address", tunnelInfo.Tunnel1Address)
|
d.Set("tunnel1_address", tunnelInfo.Tunnel1Address)
|
||||||
d.Set("tunnel1_preshared_key", tunnelInfo.Tunnel1PreSharedKey)
|
d.Set("tunnel1_preshared_key", tunnelInfo.Tunnel1PreSharedKey)
|
||||||
d.Set("tunnel2_address", tunnelInfo.Tunnel2Address)
|
d.Set("tunnel2_address", tunnelInfo.Tunnel2Address)
|
||||||
d.Set("tunnel2_preshared_key", tunnelInfo.Tunnel2PreSharedKey)
|
d.Set("tunnel2_preshared_key", tunnelInfo.Tunnel2PreSharedKey)
|
||||||
|
}
|
||||||
|
|
||||||
if err := d.Set("vgw_telemetry", telemetryToMapList(vpnConnection.VgwTelemetry)); err != nil {
|
if err := d.Set("vgw_telemetry", telemetryToMapList(vpnConnection.VgwTelemetry)); err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in New Issue