Skip to content

Commit

Permalink
azurerm_container_group - Fix dynamic setting dns_config crash is…
Browse files Browse the repository at this point in the history
…sue (#20002)
  • Loading branch information
sinbai committed Jan 13, 2023
1 parent 5d54521 commit 0efe996
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/services/containers/container_group_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -1972,7 +1972,7 @@ func flattenContainerGroupDnsConfig(input *containerinstance.DnsConfiguration) [

func expandContainerGroupDnsConfig(input interface{}) *containerinstance.DnsConfiguration {
dnsConfigRaw := input.([]interface{})
if len(dnsConfigRaw) > 0 {
if len(dnsConfigRaw) > 0 && dnsConfigRaw[0] != nil {
config := dnsConfigRaw[0].(map[string]interface{})

nameservers := []string{}
Expand Down

0 comments on commit 0efe996

Please sign in to comment.