Skip to content

Commit

Permalink
Merge pull request #3052 from yuwenma/secret-manager-secret
Browse files Browse the repository at this point in the history
chore: Enable more SecretManagerSecret fields
  • Loading branch information
google-oss-prow[bot] authored Nov 1, 2024
2 parents 9ddb92e + 6df335a commit aa336a6
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ spec:
foo: secretmanagersecret
expireTime: "2025-10-03T15:01:23Z"
replication:
auto:
customerManagedEncryption:
kmsKeyRef:
name: kmscryptokey-${uniqueId}
automatic: true
rotation:
nextRotationTime: "2025-10-03T15:01:23Z"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,11 @@ x-goog-request-params: parent=projects%2F${projectId}
"managed-by-cnrm": "true"
},
"replication": {
"automatic": {}
"automatic": {
"customerManagedEncryption": {
"kmsKeyName": "projects/${projectId}/locations/global/keyRings/kmskeyring-${uniqueId}/cryptoKeys/kmscryptokey-${uniqueId}"
}
}
},
"rotation": {
"nextRotationTime": "2025-10-02T15:01:23Z",
Expand Down Expand Up @@ -737,7 +741,11 @@ X-Xss-Protection: 0
},
"name": "projects/${projectNumber}/secrets/secretmanagersecret-${uniqueId}",
"replication": {
"automatic": {}
"automatic": {
"customerManagedEncryption": {
"kmsKeyName": "projects/${projectId}/locations/global/keyRings/kmskeyring-${uniqueId}/cryptoKeys/kmscryptokey-${uniqueId}"
}
}
},
"rotation": {
"nextRotationTime": "2025-10-02T15:01:23Z",
Expand Down Expand Up @@ -782,7 +790,11 @@ X-Xss-Protection: 0
},
"name": "projects/${projectNumber}/secrets/secretmanagersecret-${uniqueId}",
"replication": {
"automatic": {}
"automatic": {
"customerManagedEncryption": {
"kmsKeyName": "projects/${projectId}/locations/global/keyRings/kmskeyring-${uniqueId}/cryptoKeys/kmscryptokey-${uniqueId}"
}
}
},
"rotation": {
"nextRotationTime": "2025-10-02T15:01:23Z",
Expand Down Expand Up @@ -816,7 +828,11 @@ x-goog-request-params: secret.name=projects%2F${projectId}%2Fsecrets%2Fsecretman
},
"name": "projects/${projectId}/secrets/secretmanagersecret-${uniqueId}",
"replication": {
"automatic": {}
"automatic": {
"customerManagedEncryption": {
"kmsKeyName": "projects/${projectId}/locations/global/keyRings/kmskeyring-${uniqueId}/cryptoKeys/kmscryptokey-${uniqueId}"
}
}
},
"rotation": {
"nextRotationTime": "2025-10-03T15:01:23Z",
Expand Down Expand Up @@ -855,7 +871,11 @@ X-Xss-Protection: 0
},
"name": "projects/${projectNumber}/secrets/secretmanagersecret-${uniqueId}",
"replication": {
"automatic": {}
"automatic": {
"customerManagedEncryption": {
"kmsKeyName": "projects/${projectId}/locations/global/keyRings/kmskeyring-${uniqueId}/cryptoKeys/kmscryptokey-${uniqueId}"
}
}
},
"rotation": {
"nextRotationTime": "2025-10-03T15:01:23Z",
Expand Down Expand Up @@ -901,7 +921,11 @@ X-Xss-Protection: 0
},
"name": "projects/${projectNumber}/secrets/secretmanagersecret-${uniqueId}",
"replication": {
"automatic": {}
"automatic": {
"customerManagedEncryption": {
"kmsKeyName": "projects/${projectId}/locations/global/keyRings/kmskeyring-${uniqueId}/cryptoKeys/kmscryptokey-${uniqueId}"
}
}
},
"rotation": {
"nextRotationTime": "2025-10-03T15:01:23Z",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ spec:
automatic: true
# TF-based resource is broken, got the error even if not changing this field
# "cannot make changes to immutable field(s): [Field Name: replication.0.auto.#, Got: 1, Wanted: 0]"
# auto:
# customerManagedEncryption:
# kmsKeyRef:
# name: kmscryptokey-${uniqueId}
auto:
customerManagedEncryption:
kmsKeyRef:
name: kmscryptokey-${uniqueId}
topics:
- topicRef:
name: topic-${uniqueId}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ apiVersion: kms.cnrm.cloud.google.com/v1beta1
kind: KMSCryptoKey
metadata:
name: kmscryptokey-${uniqueId}
annotations:
cnrm.cloud.google.com/project-id: ${projectId}
spec:
keyRingRef:
name: kmskeyring-${uniqueId}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ metadata:
spec:
replication:
automatic: true
# TF-based resource is broken, got the error even if not changing this field
# "cannot make changes to immutable field(s): [Field Name: replication.0.auto.#, Got: 1, Wanted: 0]"
# auto:
# customerManagedEncryption:
# kmsKeyRef:
# name: kmscryptokey-${uniqueId}
# TF-based resource is broken, got the error even if not changing this field
# "cannot make changes to immutable field(s): [Field Name: replication.0.auto.#, Got: 1, Wanted: 0]"
auto:
customerManagedEncryption:
kmsKeyRef:
name: kmscryptokey-${uniqueId}
topics:
- topicRef:
name: topic-2-${uniqueId}
Expand Down

0 comments on commit aa336a6

Please sign in to comment.