Commit Graph

11 Commits

Author SHA1 Message Date
The Magician
f306b84d31 Make sure KMS key "deletion" disables rotation (#3624)
Signed-off-by: Modular Magician <magic-modules@google.com>
2019-05-15 10:25:09 -07:00
The Magician
55bbc252a9 Allow empty string for kms crypto key rotation period (#3468)
Signed-off-by: Modular Magician <magic-modules@google.com>
2019-04-22 10:40:11 -07:00
The Magician
a1e5c4fff0 Add support for protection_level to google_kms_crypto_key (#2751)
<!-- This change is generated by MagicModules. -->
/cc @rileykarson
2018-12-27 10:07:51 -08:00
The Magician
29c665d865 Various linter cleanups (conversions, unused, misspellings) (#2681)
<!-- This change is generated by MagicModules. -->
/cc @rileykarson
2018-12-20 17:22:22 -08:00
The Magician
c605b0bc4b [Terraform]: Apply gofmt -s to all files managed by MM (#2676)
<!-- This change is generated by MagicModules. -->
/cc @rileykarson
2018-12-20 17:22:22 -08:00
Nathan McKinley
d77c0adbb2
Add support for bucket encryption (#1876)
* Support encryption in Storage bucket.
* Add self links to crypto keys and key ring ids
* Update ID documentation to talk about self link instead.
2018-08-17 14:33:27 -07:00
Michael Haro
2c4afd3aec Allow other forms of project names to be matched. (#1865) 2018-08-14 11:48:08 -07:00
Ian L
b4be2fa124 Add basic update for google_kms_crypto_key resource (#1511)
* Add basic update for `google_kms_crypto_key` resource

Prior to this commit, any changes to `rotation_period` would
force a new resource as no `Update` was defined for the resource.
This commit introduces a basic `Update` through calling the
`Patch` service method. It only modifies the `rotation_period`,
and `next_rotation_time` at the moment, but this is reflective
of what is "allowed" on https://console.cloud.google.com/security/kms.

* Remove unused `Purpose` value in `CryptoKey`

We are only patching the `rotation_period`, and `next_rotation_time`,
so that value will not be affected.

* nit: format `Patch` operation to be in a single line

* Extend `TestAccKmsCryptoKey_rotation` test steps

- Test change in rotation period
- Test removal of rotation period

* Do not parse `NextRotationTime` if it is not set

* remove ForceNew: false
2018-05-29 17:20:32 -07:00
Dana Hoffman
51f9424dbf Fix IAM tests (#1337) 2018-04-19 14:30:20 -07:00
Nathan McKinley
bea8642a1b
Bugfix: add read back in to the KMS crypto key read method. (#853)
* Bugfix: add read back in to the KMS crypto key read method.
Impact of this bug: if a user deleted a crypto key outside terraform and then reran `apply`, the old key would stay in the plan.

* Fix panic in validate method.
* Make import test confirm validity of reads.
2017-12-13 13:08:35 -08:00
Andrew Farrell
56d633a8d4 Adds support for creating KMS CryptoKeys resources (#692)
* Adds support for creating KMS CryptoKeys resources

* Destroy extant CryptoKeyVersions on CryptoKey destroy

* Inherit project, location etc from KeyRing in CryptoKey

* Add function to calculate next rotation

* Implement RotationPeriod parameter on CryptoKey

* Import CryptoKey state

* Uncommit my local acceptance test hacks

* Docs for google_kms_crypto_key

* Clear id at the end of CryptoKey deletion

Also add more detail to warning message.

* Fix parseCryptoKeyId error messages

* Use correct naming in CryptoKeyIdParsing test

* Check RotationPeriod is present in acceptance test

* Rename variable in test function for consistency

* Fix wrong resource name in cryptokey docs

* Add KeyRing to CryptoKey doc example

* Run test CryptoKey configs through terraform fmt

* Don't set CryptoKey purpose in terraform state on import

* Fix indentation in CryptoKey test

* Parallelise CryptoKey tests

* Set rotation_key on CryptoKey read

* Move RotationPeriod validation to planning phase

* Use import state passthrough for CryptoKey

* Correct casing issues in test case names

* Remove redundant CheckDestroy calls in CryptoKey tests

* Add explanatory comment about extra test steps

* More explicit error handling in CryptoKey tests

* Explicit dependency on project services in test keyring configs

* Clean up comments in cryptokey resource

* Do not repeat in cryptokey id regexes
2017-11-14 13:21:25 -08:00