mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-06 14:13:16 -06:00
provider/azurerm: Fix a potential panic in the
`azurerm_template_deployment` resource
This commit is contained in:
parent
fe79dcf6c1
commit
6aa11e57e5
@ -143,9 +143,8 @@ func resourceArmTemplateDeploymentRead(d *schema.ResourceData, meta interface{})
|
||||
}
|
||||
var outputs map[string]string
|
||||
if resp.Properties.Outputs != nil && len(*resp.Properties.Outputs) > 0 {
|
||||
outputs = make(map[string]string)
|
||||
for key, output := range *resp.Properties.Outputs {
|
||||
log.Printf("[INFO] Found Key %s", key)
|
||||
|
||||
outputMap := output.(map[string]interface{})
|
||||
outputValue, ok := outputMap["value"]
|
||||
if !ok {
|
||||
@ -156,6 +155,7 @@ func resourceArmTemplateDeploymentRead(d *schema.ResourceData, meta interface{})
|
||||
outputs[key] = outputValue.(string)
|
||||
}
|
||||
}
|
||||
|
||||
d.Set("outputs", outputs)
|
||||
|
||||
return nil
|
||||
|
Loading…
Reference in New Issue
Block a user