Skip to content
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

Mark DiskEncryptionKey.rawKey as sensitive for Terraform #2728

Closed
wants to merge 2 commits into from
Closed

Conversation

Shegox
Copy link

@Shegox Shegox commented Nov 20, 2019

This PR marks the raw disk encryption key in Terraform as sensitive and therefore doesn't output it to the console log.

Inspired by:

snapshotEncryptionKey.rawKey: !ruby/object:Overrides::Terraform::PropertyOverride
# This is _correct_, but we don't support ignore_read on nested fields
# so we use a custom_flatten for now.
# https://github.com/GoogleCloudPlatform/magic-modules/issues/1019
ignore_read: true
sensitive: true
required: true
custom_flatten: templates/terraform/custom_flatten/compute_snapshot_snapshot_encryption_raw_key.go.erb

I'm not 100% sure if changes to at other points are required or not.

Changes need to end in the end in the terraform-provider-google resource_compute_disk.

Release Note Template for Downstream PRs (will be copied)

compute: `google_compute_disk` `disk_encryption_key.raw_key` is now sensitive

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@modular-magician
Copy link
Collaborator

Hello! I am a robot who works on Magic Modules PRs.

I have detected that you are a community contributor, so your PR will be assigned to someone with a commit-bit on this repo for initial review. They will authorize it to run through our CI pipeline, which will generate downstream PRs.

Thanks for your contribution! A human will be with you soon.

@emilymye, please review this PR or find an appropriate assignee.

@@ -401,6 +401,8 @@ overrides: !ruby/object:Overrides::ResourceOverrides
[google_compute_image data source](/docs/providers/google/d/datasource_compute_image.html).
For instance, the image `centos-6-v20180104` includes its family name `centos-6`.
These images can be referred by family name here.
DiskEncryptionKey.rawKey: !ruby/object:Overrides::Terraform::PropertyOverride
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needs to be lowercase camel, but once that's done it should be ok!

Copy link
Author

@Shegox Shegox Nov 20, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick look and good catch, fixed it in 219cfe6.

CCLA should be signed soonish as well when I get added to the group from our team.

@emilymye
Copy link
Contributor

@Shegox let me know when you've gotten the CLA fixed or comment/edit PR and the googlebot should fix it? i can also override

@Shegox
Copy link
Author

Shegox commented Nov 25, 2019

@emilymye I'm still waiting on the internal process to get added to our corporate CLA group. I would like to give it another day and otherwise just do it as a personal contribution otherwise.

@Shegox
Copy link
Author

Shegox commented Nov 26, 2019

@googlebot I signed it!

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@modular-magician
Copy link
Collaborator

Hello! I am a robot who works on Magic Modules PRs.

I have detected that you are a community contributor, so your PR will be assigned to someone with a commit-bit on this repo for initial review. They will authorize it to run through our CI pipeline, which will generate downstream PRs.

Thanks for your contribution! A human will be with you soon.

@danawillow, please review this PR or find an appropriate assignee.

@danawillow
Copy link
Contributor

Thanks @modular-magician, but looks like @emilymye has this one covered :)

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician, I work on Magic Modules.
I see that this PR has already had some downstream PRs generated. Any open downstreams are already updated to your most recent commit, 219cfe6.

Pull request statuses

No diff detected in terraform-google-conversion.
No diff detected in Ansible.
No diff detected in Inspec.

New Pull Requests

I built this PR into one or more new PRs on other repositories, and when those are closed, this PR will also be merged and closed.
depends: hashicorp/terraform-provider-google-beta#1445
depends: hashicorp/terraform-provider-google#5009

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician, I work on Magic Modules.
I see that this PR has already had some downstream PRs generated. Any open downstreams are already updated to your most recent commit, ce16f36.

Pull request statuses

No diff detected in terraform-google-conversion.
No diff detected in terraform-provider-google.
No diff detected in Ansible.
No diff detected in Inspec.

New Pull Requests

I built this PR into one or more new PRs on other repositories, and when those are closed, this PR will also be merged and closed.
depends: hashicorp/terraform-provider-google-beta#1452

Shegox and others added 2 commits December 2, 2019 20:32
Tracked submodules are build/terraform-beta build/terraform-mapper build/terraform build/ansible build/inspec.
@emilymye
Copy link
Contributor

emilymye commented Dec 2, 2019

@Shegox I moved this over to #2766 - I merged the downstreams but didn't realize merge would fail on this PR because it's from a master branch and our tool currently doesn't handle it very well. It'll still show up as your commit without extra work on your end - just wanted to let you know why you're getting tagged in an identical PR

modular-magician pushed a commit that referenced this pull request Dec 2, 2019
@emilymye
Copy link
Contributor

emilymye commented Dec 2, 2019

merged via #2766, closing

@emilymye emilymye closed this Dec 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants