Skip to content

Commit

Permalink
Add custom flattens for passwords (#2376)
Browse files Browse the repository at this point in the history
Merged PR #2376.
  • Loading branch information
Ty Larrabee authored and modular-magician committed Oct 8, 2019
1 parent afb887f commit 13ea31a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build/terraform-beta
2 changes: 2 additions & 0 deletions products/securityscanner/terraform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ overrides: !ruby/object:Overrides::ResourceOverrides
function: 'validation.IntBetween(5, 20)'
authentication.googleAccount.password: !ruby/object:Overrides::Terraform::PropertyOverride
sensitive: true
custom_flatten: 'templates/terraform/custom_flatten/scan_config_auth_custom_password.go.erb'
authentication.customAccount.password: !ruby/object:Overrides::Terraform::PropertyOverride
sensitive: true
custom_flatten: 'templates/terraform/custom_flatten/scan_config_auth_google_password.go.erb'
schedule: !ruby/object:Overrides::Terraform::PropertyOverride
properties:
scheduleTime: !ruby/object:Overrides::Terraform::PropertyOverride
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
func flatten<%= prefix -%><%= titlelize_property(property) -%>(v interface{}, d *schema.ResourceData) interface{} {
return d.Get("authentication.0.custom_account.0.password")
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
func flatten<%= prefix -%><%= titlelize_property(property) -%>(v interface{}, d *schema.ResourceData) interface{} {
return d.Get("authentication.0.google_account.0.password")
}

0 comments on commit 13ea31a

Please sign in to comment.