provider/aws: Always use either body or URL for all updates
- fixes #4332
This commit is contained in:
parent
99b3bcd280
commit
202b0aef1b
|
@ -258,12 +258,14 @@ func resourceAwsCloudFormationStackUpdate(d *schema.ResourceData, meta interface
|
||||||
StackName: aws.String(d.Get("name").(string)),
|
StackName: aws.String(d.Get("name").(string)),
|
||||||
}
|
}
|
||||||
|
|
||||||
if d.HasChange("template_body") {
|
// Either TemplateBody or TemplateURL are required for each change
|
||||||
input.TemplateBody = aws.String(normalizeJson(d.Get("template_body").(string)))
|
if v, ok := d.GetOk("template_body"); ok {
|
||||||
|
input.TemplateBody = aws.String(normalizeJson(v.(string)))
|
||||||
}
|
}
|
||||||
if d.HasChange("template_url") {
|
if v, ok := d.GetOk("template_url"); ok {
|
||||||
input.TemplateURL = aws.String(d.Get("template_url").(string))
|
input.TemplateURL = aws.String(v.(string))
|
||||||
}
|
}
|
||||||
|
|
||||||
if d.HasChange("capabilities") {
|
if d.HasChange("capabilities") {
|
||||||
input.Capabilities = expandStringList(d.Get("capabilities").(*schema.Set).List())
|
input.Capabilities = expandStringList(d.Get("capabilities").(*schema.Set).List())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue