Skip to content

Commit

Permalink
Merge pull request #24530 from pbuchner/main
Browse files Browse the repository at this point in the history
Always include AttachmentsSources when updating SSM documents
  • Loading branch information
ewbankkit authored May 5, 2022
2 parents 9bb800f + 38ab51e commit a0d6930
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .changelog/24530.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
resource/aws_ssm_document: Always include `attachment_sources` when updating SSM documents
```
4 changes: 2 additions & 2 deletions internal/service/ssm/document.go
Original file line number Diff line number Diff line change
Expand Up @@ -673,8 +673,8 @@ func updateDocument(d *schema.ResourceData, meta interface{}) error {
updateDocInput.VersionName = aws.String(v.(string))
}

if d.HasChange("attachments_source") {
updateDocInput.Attachments = expandSsmAttachmentsSources(d.Get("attachments_source").([]interface{}))
if v, ok := d.GetOk("attachments_source"); ok {
updateDocInput.Attachments = expandSsmAttachmentsSources(v.([]interface{}))
}

newDefaultVersion := d.Get("default_version").(string)
Expand Down

0 comments on commit a0d6930

Please sign in to comment.