|
| 1 | +# Copyright 2024 Google Inc. |
| 2 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 3 | +# you may not use this file except in compliance with the License. |
| 4 | +# You may obtain a copy of the License at |
| 5 | +# |
| 6 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 7 | +# |
| 8 | +# Unless required by applicable law or agreed to in writing, software |
| 9 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 10 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 11 | +# See the License for the specific language governing permissions and |
| 12 | +# limitations under the License. |
| 13 | + |
| 14 | +--- |
| 15 | +name: 'OrganizationKajPolicyConfig' |
| 16 | +api_resource_type_kind: KeyAccessJustificationsPolicyConfig |
| 17 | +api_variant_patterns: |
| 18 | + - 'organizations/{{organization}}/kajPolicyConfig' |
| 19 | +description: | |
| 20 | + `OrganizationKajPolicyConfig` is a organization-level singleton resource |
| 21 | + used to configure the default KAJ policy of newly created key. |
| 22 | +
|
| 23 | + ~> **Note:** OrganizationKajPolicyConfig cannot be deleted from Google Cloud Platform. |
| 24 | + Destroying a Terraform-managed OrganizationKajPolicyConfig will remove it from state but |
| 25 | + *will not delete the resource from Google Cloud Platform.* |
| 26 | +min_version: 'beta' |
| 27 | +references: |
| 28 | + guides: |
| 29 | + 'Set default Key Access Justifications policy': 'https://cloud.google.com/assured-workloads/key-access-justifications/docs/set-default-policy' |
| 30 | + api: 'https://cloud.google.com/kms/docs/reference/rest/v1/KeyAccessJustificationsPolicyConfig' |
| 31 | +docs: |
| 32 | +id_format: 'organizations/{{organization}}/kajPolicyConfig' |
| 33 | +base_url: 'organizations/{{organization}}/kajPolicyConfig' |
| 34 | +self_link: 'organizations/{{organization}}/kajPolicyConfig' |
| 35 | +# This is a singleton resource that is already created, so create |
| 36 | +# is really an update, and therefore should be PATCHed. |
| 37 | +create_url: 'organizations/{{organization}}/kajPolicyConfig?updateMask=defaultKeyAccessJustificationPolicy' |
| 38 | +create_verb: 'PATCH' |
| 39 | +update_url: 'organizations/{{organization}}/kajPolicyConfig?updateMask=defaultKeyAccessJustificationPolicy' |
| 40 | +update_verb: 'PATCH' |
| 41 | +# This is a singleton resource that cannot be deleted. |
| 42 | +exclude_delete: true |
| 43 | +exclude_sweeper: true |
| 44 | +import_format: |
| 45 | + - 'organizations/{{organization}}/kajPolicyConfig' |
| 46 | +timeouts: |
| 47 | + insert_minutes: 20 |
| 48 | + update_minutes: 20 |
| 49 | + delete_minutes: 20 |
| 50 | +custom_code: |
| 51 | + post_create: 'templates/terraform/post_create/sleep_1_min.go.tmpl' |
| 52 | + post_update: 'templates/terraform/post_create/sleep_1_min.go.tmpl' |
| 53 | +examples: |
| 54 | + - name: 'kms_organization_kaj_policy_config_basic' |
| 55 | + primary_resource_id: "example" |
| 56 | + min_version: 'beta' |
| 57 | + test_env_vars: |
| 58 | + org_id: 'ORG_ID' |
| 59 | +parameters: |
| 60 | + - name: 'organization' |
| 61 | + type: String |
| 62 | + description: | |
| 63 | + The organization number for which to retrieve config. |
| 64 | + min_version: 'beta' |
| 65 | + url_param_only: true |
| 66 | + required: true |
| 67 | + immutable: true |
| 68 | +properties: |
| 69 | + - name: 'defaultKeyAccessJustificationPolicy' |
| 70 | + type: NestedObject |
| 71 | + description: | |
| 72 | + The default key access justification policy used when a CryptoKey is |
| 73 | + created in this organization. This is only used when a Key Access Justifications |
| 74 | + policy is not provided in the CreateCryptoKeyRequest. |
| 75 | + properties: |
| 76 | + - name: 'allowedAccessReasons' |
| 77 | + type: Array |
| 78 | + description: | |
| 79 | + A KeyAccessJustificationsPolicy specifies zero or more allowed |
| 80 | + AccessReason values for encrypt, decrypt, and sign operations on a |
| 81 | + CryptoKey. |
| 82 | + item_type: |
| 83 | + type: Enum |
| 84 | + description: | |
| 85 | + Describes the reason for a data access. Please refer to |
| 86 | + https://cloud.google.com/assured-workloads/key-access-justifications/docs/justification-codes |
| 87 | + for the detailed semantic meaning of justification reason codes. |
| 88 | + enum_values: |
| 89 | + - 'CUSTOMER_INITIATED_SUPPORT' |
| 90 | + - 'GOOGLE_INITIATED_SERVICE' |
| 91 | + - 'THIRD_PARTY_DATA_REQUEST' |
| 92 | + - 'GOOGLE_INITIATED_REVIEW' |
| 93 | + - 'CUSTOMER_INITIATED_ACCESS' |
| 94 | + - 'GOOGLE_INITIATED_SYSTEM_OPERATION' |
| 95 | + - 'REASON_NOT_EXPECTED' |
| 96 | + - 'MODIFIED_CUSTOMER_INITIATED_ACCESS' |
| 97 | + - 'MODIFIED_GOOGLE_INITIATED_SYSTEM_OPERATION' |
| 98 | + - 'GOOGLE_RESPONSE_TO_PRODUCTION_ALERT' |
| 99 | + - 'CUSTOMER_AUTHORIZED_WORKFLOW_SERVICING' |
0 commit comments