Merge pull request #2215 from hashicorp/b-route-cidr-block-optional
provider/aws: fix panic when route has no cidr_block
This commit is contained in:
commit
328db1c418
|
@ -361,7 +361,10 @@ func resourceAwsRouteTableDelete(d *schema.ResourceData, meta interface{}) error
|
||||||
func resourceAwsRouteTableHash(v interface{}) int {
|
func resourceAwsRouteTableHash(v interface{}) int {
|
||||||
var buf bytes.Buffer
|
var buf bytes.Buffer
|
||||||
m := v.(map[string]interface{})
|
m := v.(map[string]interface{})
|
||||||
buf.WriteString(fmt.Sprintf("%s-", m["cidr_block"].(string)))
|
|
||||||
|
if v, ok := m["cidr_block"]; ok {
|
||||||
|
buf.WriteString(fmt.Sprintf("%s-", v.(string)))
|
||||||
|
}
|
||||||
|
|
||||||
if v, ok := m["gateway_id"]; ok {
|
if v, ok := m["gateway_id"]; ok {
|
||||||
buf.WriteString(fmt.Sprintf("%s-", v.(string)))
|
buf.WriteString(fmt.Sprintf("%s-", v.(string)))
|
||||||
|
|
Loading…
Reference in New Issue