-
Notifications
You must be signed in to change notification settings - Fork 9.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
providers/google: Add support for encrypting a disk #11167
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -28,6 +28,17 @@ func resourceComputeDisk() *schema.Resource { | |||
ForceNew: true, | |||
}, | |||
|
|||
"disk_encryption_key_raw": &schema.Schema{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this a sensitive key? If so, we should add Sensitive: true to the schema
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -75,6 +75,17 @@ func resourceComputeInstance() *schema.Resource { | |||
Type: schema.TypeString, | |||
Optional: true, | |||
}, | |||
|
|||
"disk_encryption_key_raw": &schema.Schema{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this also need Sensitive: true ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
"auto_delete": d.Get(fmt.Sprintf("disk.%d.auto_delete", i)), | ||
"size": d.Get(fmt.Sprintf("disk.%d.size", i)), | ||
"device_name": d.Get(fmt.Sprintf("disk.%d.device_name", i)), | ||
"disk_encryption_key_raw": d.Get(fmt.Sprintf("disk.%d.disk_encryption_key_raw", i)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to add the raw encryption key to the state?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, this is not happening in compute_disk
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you're right. Removed.
this looks great now @danawillow :)
|
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
This provides the ability to use raw customer-supplied encryption keys for disks created using the disk or instance resources.
https://cloud.google.com/compute/docs/disks/customer-supplied-encryption