You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -14,6 +16,88 @@ var loggingProjectBucketConfigSchema = map[string]*schema.Schema{
14
16
ForceNew: true,
15
17
Description: `The parent project that contains the logging bucket.`,
16
18
},
19
+
"name": {
20
+
Type: schema.TypeString,
21
+
Computed: true,
22
+
Description: `The resource name of the bucket`,
23
+
},
24
+
"location": {
25
+
Type: schema.TypeString,
26
+
Required: true,
27
+
ForceNew: true,
28
+
Description: `The location of the bucket.`,
29
+
},
30
+
"bucket_id": {
31
+
Type: schema.TypeString,
32
+
Required: true,
33
+
ForceNew: true,
34
+
Description: `The name of the logging bucket. Logging automatically creates two log buckets: _Required and _Default.`,
35
+
},
36
+
"description": {
37
+
Type: schema.TypeString,
38
+
Optional: true,
39
+
Computed: true,
40
+
Description: `An optional description for this bucket.`,
41
+
},
42
+
"retention_days": {
43
+
Type: schema.TypeInt,
44
+
Optional: true,
45
+
Default: 30,
46
+
Description: `Logs will be retained by default for this amount of time, after which they will automatically be deleted. The minimum retention period is 1 day. If this value is set to zero at bucket creation time, the default time of 30 days will be used.`,
47
+
},
48
+
"enable_analytics": {
49
+
Type: schema.TypeBool,
50
+
Optional: true,
51
+
Description: `Enable log analytics for the bucket. Cannot be disabled once enabled.`,
Description: `The bucket's lifecycle such as active or deleted.`,
58
+
},
59
+
"cmek_settings": {
60
+
Type: schema.TypeList,
61
+
MaxItems: 1,
62
+
Optional: true,
63
+
Description: `The CMEK settings of the log bucket. If present, new log entries written to this log bucket are encrypted using the CMEK key provided in this configuration. If a log bucket has CMEK settings, the CMEK settings cannot be disabled later by updating the log bucket. Changing the KMS key is allowed.`,
64
+
Elem: &schema.Resource{
65
+
Schema: map[string]*schema.Schema{
66
+
"name": {
67
+
Type: schema.TypeString,
68
+
Computed: true,
69
+
Description: `The resource name of the CMEK settings.`,
70
+
},
71
+
"kms_key_name": {
72
+
Type: schema.TypeString,
73
+
Required: true,
74
+
Description: `The resource name for the configured Cloud KMS key.
To enable CMEK for the bucket, set this field to a valid kmsKeyName for which the associated service account has the required cloudkms.cryptoKeyEncrypterDecrypter roles assigned for the key.
78
+
The Cloud KMS key used by the bucket can be updated by changing the kmsKeyName to a new valid key name. Encryption operations that are in progress will be completed with the key that was in use when they started. Decryption operations will be completed using the key that was used at the time of encryption unless access to that key has been revoked.
79
+
See [Enabling CMEK for Logging Buckets](https://cloud.google.com/logging/docs/routing/managed-encryption-storage) for more information.`,
80
+
},
81
+
"kms_key_version_name": {
82
+
Type: schema.TypeString,
83
+
Computed: true,
84
+
Description: `The CryptoKeyVersion resource name for the configured Cloud KMS key.
This is a read-only field used to convey the specific configured CryptoKeyVersion of kms_key that has been configured. It will be populated in cases where the CMEK settings are bound to a single key version.`,
90
+
},
91
+
"service_account_id": {
92
+
Type: schema.TypeString,
93
+
Computed: true,
94
+
Description: `The service account associated with a project for which CMEK will apply.
95
+
Before enabling CMEK for a logging bucket, you must first assign the cloudkms.cryptoKeyEncrypterDecrypter role to the service account associated with the project for which CMEK will apply. Use [v2.getCmekSettings](https://cloud.google.com/logging/docs/reference/v2/rest/v2/TopLevel/getCmekSettings#google.logging.v2.ConfigServiceV2.GetCmekSettings) to obtain the service account ID.
96
+
See [Enabling CMEK for Logging Buckets](https://cloud.google.com/logging/docs/routing/managed-encryption-storage) for more information.`,
0 commit comments