-
Notifications
You must be signed in to change notification settings - Fork 71
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
Add storage bucket IAM resources #41
Conversation
…s, members and ACLs. Signed-off-by: Stuart Paterson <[email protected]>
…r consistency. Signed-off-by: Stuart Paterson <[email protected]>
Signed-off-by: Stuart Paterson <[email protected]>
Signed-off-by: Stuart Paterson <[email protected]>
…ces, update README and tf file. Signed-off-by: Stuart Paterson <[email protected]>
@@ -41,7 +41,13 @@ module GCPInspecConfig | |||
:gcp_ext_vm_data_disk_name => "gcp-inspec-generic-ext-linux-vm-data-disk", | |||
:gcp_ext_vm_data_disk_size => "f1-micro", | |||
:gcp_ext_vm_data_disk_image => "ubuntu-os-cloud/ubuntu-1604-lts", | |||
:gcp_storage_bucket_name => "gcp-inspec-storage-bucket-#{(0...15).map { (65 + rand(26)).chr }.join.downcase}", | |||
:gcp_storage_bucket_name => "gcp-inspec-storage-bucket-#{(0...25).map { (65 + rand(26)).chr }.join.downcase}", |
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.
Minor but this could surely be pulled out into an any_string
function
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.
agreed, can revisit next time round
|
||
control 'gcp-storage-object-acl-1.0' do | ||
|
||
only_if { gcp_enable_privileged_resources.to_i == 1 } |
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.
what's the benefit of to_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.
we're comparing integers - the config comes through as a string
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.
Ah - at a glance looked like boolean to integer
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.
it's funny as I'd have preferred to use booleans but tf converts true/false values to "0" and "1" - https://www.terraform.io/docs/configuration/variables.html
Adding Storage Bucket IAM resources. More details below: