Repository navigation
fix(0-bootstrap): use DENY condition on custom.kmsRotation so key destroy succeeds - #284
Merged
Calvin-Cheng1 merged 1 commit intoOct 22, 2026
Conversation
aghassemlouei
requested review from
Calvin-Cheng1,
LanceWray and
mgcarey-google
October 8, 2026 21:04
aghassemlouei
force-pushed
the
feat/org-policy-kms-destroy-regime-and-exceptions
branch
from
October 9, 2026 01:32
7177ea2 to
eabe838
Compare
aghassemlouei
marked this pull request as ready for review
October 9, 2026 01:58
aghassemlouei
force-pushed
the
feat/org-policy-kms-destroy-regime-and-exceptions
branch
2 times, most recently
from
October 13, 2026 14:47
67c9bf6 to
0a44a04
Compare
aghassemlouei
force-pushed
the
feat/org-policy-kms-destroy-regime-and-exceptions
branch
from
October 13, 2026 17:18
0a44a04 to
1ab3f87
Compare
Member
Author
|
/gemini review |
aghassemlouei
force-pushed
the
feat/org-policy-kms-destroy-regime-and-exceptions
branch
3 times, most recently
from
October 20, 2026 02:30
7de4512 to
f0f7a0e
Compare
aghassemlouei
force-pushed
the
feat/org-policy-kms-destroy-regime-and-exceptions
branch
from
October 20, 2026 15:06
f0f7a0e to
a2e6b18
Compare
Calvin-Cheng1
requested changes
Oct 20, 2026
Calvin-Cheng1
left a comment
Collaborator
There was a problem hiding this comment.
Suggest using the CFF implementation of this update adds a gap where keys could be created with duration < 90 but updated to be < 90 after the fact.
custom.cloudkmsAllowedRotationPeriod:
action_type: DENY
condition: |-
has(resource.rotationPeriod) && resource.rotationPeriod > duration("7776000s")
method_types:
- CREATE
- UPDATE
resource_types: - cloudkms.googleapis.com/CryptoKey
aghassemlouei
force-pushed
the
feat/org-policy-kms-destroy-regime-and-exceptions
branch
from
October 20, 2026 22:33
a2e6b18 to
9dc9158
Compare
aghassemlouei
force-pushed
the
feat/org-policy-kms-destroy-regime-and-exceptions
branch
from
October 20, 2026 22:57
9dc9158 to
70780db
Compare
aghassemlouei
force-pushed
the
feat/org-policy-kms-destroy-regime-and-exceptions
branch
3 times, most recently
from
October 21, 2026 00:06
2d27768 to
6807456
Compare
aghassemlouei
force-pushed
the
feat/org-policy-kms-destroy-regime-and-exceptions
branch
from
October 21, 2026 00:16
6807456 to
f22a660
Compare
Member
Author
|
Thanks for catching the |
aghassemlouei
force-pushed
the
feat/org-policy-kms-destroy-regime-and-exceptions
branch
from
October 21, 2026 00:18
f22a660 to
3d84609
Compare
aghassemlouei
force-pushed
the
feat/org-policy-kms-destroy-regime-and-exceptions
branch
2 times, most recently
from
October 21, 2026 03:00
cb0f161 to
c49b660
Compare
…troy succeeds Fixes #9
aghassemlouei
force-pushed
the
feat/org-policy-kms-destroy-regime-and-exceptions
branch
from
October 22, 2026 02:14
c49b660 to
888b0bf
Compare
Calvin-Cheng1
approved these changes
Oct 22, 2026
Calvin-Cheng1
deleted the
feat/org-policy-kms-destroy-regime-and-exceptions
branch
October 22, 2026 04:51
Merged
18 of 19 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
custom.kmsRotationcustom organization policy constraint infast/stages-aw/0-bootstrap/data/custom-constraint-policies/cloudkms.yamlto the Cloud Foundation Fabricaction_type: DENYimplementation (has(resource.rotationPeriod) && resource.rotationPeriod > duration('7776000s')) across bothCREATEandUPDATEso keys cannot be created or updated with a rotation period exceeding 90 days whileterraform destroycan clearrotationPeriodviaUPDATEprior to key version destruction, fixing [Bug] Custom KMS Org policy breaks terraform destroy operations of KMS keys #9..gemini/styleguide.mdwith the updatedcustom.kmsRotationDENYconstraint definition.Fixes #9
Type of Change
Deployment & Compliance Impact
Checklist
Code Quality & Reusability
modules/orfast/stages-aw/can be leveraged for this change.docs/naming-convention.md.Documentation
README.mdof the modified module or blueprint.Security
Testing
Testing Performed
bash tools/run_tests.sh,ruff check .,ruff format --check ., andpython3 tools/check_documentation.py(all Python unit tests, shell syntax checks, shell unit tests, and CodeQL AST checks pass).