Skip to content

Commit

Permalink
deprecate pgp_key from google service account key resource
Browse files Browse the repository at this point in the history
  • Loading branch information
megan07 authored Nov 4, 2019
2 parents 3e21d75 + a9f9bf8 commit 51d6fa0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
7 changes: 4 additions & 3 deletions google/resource_google_service_account_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ func resourceGoogleServiceAccountKey() *schema.Resource {
ValidateFunc: validation.StringInSlice([]string{"KEY_ALG_UNSPECIFIED", "KEY_ALG_RSA_1024", "KEY_ALG_RSA_2048"}, false),
},
"pgp_key": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Deprecated: "The pgp_key field has been deprecated and support for encrypting values in state will be removed in version 3.0.0. See https://www.terraform.io/docs/extend/best-practices/sensitive-state.html for more information.",
},
"private_key_type": {
Type: schema.TypeString,
Expand Down
8 changes: 4 additions & 4 deletions website/docs/r/google_service_account_key.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ resource "google_service_account" "myaccount" {
resource "google_service_account_key" "mykey" {
service_account_id = "${google_service_account.myaccount.name}"
pgp_key = "keybase:keybaseusername"
public_key_type = "TYPE_X509_PEM_FILE"
}
```
Expand All @@ -79,13 +78,14 @@ Valid values are listed at

* `private_key_type` (Optional) The output format of the private key. TYPE_GOOGLE_CREDENTIALS_FILE is the default output format.

* `pgp_key` – (Optional) An optional PGP key to encrypt the resulting private
* `pgp_key` – (Optional, Deprecated) An optional PGP key to encrypt the resulting private
key material. Only used when creating or importing a new key pair. May either be
a base64-encoded public key or a `keybase:keybaseusername` string for looking up
in Vault.

~> **NOTE:** a PGP key is not required, however it is strongly encouraged.
Without a PGP key, the private key material will be stored in state unencrypted.
~> **NOTE:** The pgp_key field has been deprecated and support for encrypting values in state will be removed in version 3.0.0.
See https://www.terraform.io/docs/extend/best-practices/sensitive-state.html for more information.


## Attributes Reference

Expand Down

0 comments on commit 51d6fa0

Please sign in to comment.