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

chore: do not show sensitive certificate details in Terraform cmd out… #16932

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/9684.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
sql: update `replica_configuration`, `ca_cert`, and `server_ca_cert` fields to be flagged sensitive in `google_sql_instance` and `google_sql_ssl_cert` resources
```
8 changes: 5 additions & 3 deletions google/services/sql/resource_sql_database_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,8 @@ is set to true. Defaults to ZONAL.`,
Optional: true,
MaxItems: 1,
// Returned from API on all replicas
Computed: true,
Computed: true,
Sensitive: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"ca_certificate": {
Expand Down Expand Up @@ -865,8 +866,9 @@ is set to true. Defaults to ZONAL.`,
Description: `The configuration for replication.`,
},
"server_ca_cert": {
Type: schema.TypeList,
Computed: true,
Type: schema.TypeList,
Computed: true,
Sensitive: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"cert": {
Expand Down
2 changes: 2 additions & 0 deletions google/services/sql/resource_sql_ssl_cert.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ func ResourceSqlSslCert() *schema.Resource {
"cert": {
Type: schema.TypeString,
Computed: true,
Sensitive: true,
Description: `The actual certificate data for this client certificate.`,
},

Expand Down Expand Up @@ -89,6 +90,7 @@ func ResourceSqlSslCert() *schema.Resource {
"server_ca_cert": {
Type: schema.TypeString,
Computed: true,
Sensitive: true,
Description: `The CA cert of the server this client cert was generated from.`,
},

Expand Down