Skip to content

Commit

Permalink
fix: encryption crn for volume attachment
Browse files Browse the repository at this point in the history
  • Loading branch information
deepaksibm authored and hkantare committed Sep 14, 2021
1 parent 31b532f commit 7a70b6a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ibm/resource_ibm_is_instance_volume_attachment.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,13 @@ func instanceVolAttachmentCreate(d *schema.ResourceData, meta interface{}, insta
ID: &volSnapshotStr,
}
}
encryptionCRNStr := ""
if encryptionCRN, ok := d.GetOk(isInstanceVolEncryptionKey); ok {
encryptionCRNStr = encryptionCRN.(string)
volProtoVol.EncryptionKey = &vpcv1.EncryptionKeyIdentity{
CRN: &encryptionCRNStr,
}
}
var snapCapacity int64
if volSnapshotStr != "" {
snapshotGet, _, err := sess.GetSnapshot(&vpcv1.GetSnapshotOptions{
Expand Down

0 comments on commit 7a70b6a

Please sign in to comment.