diff --git a/pkg/test/resourcefixture/testdata/basic/secretmanager/v1beta1/fullsecretmanagersecret/_generated_object_fullsecretmanagersecret.golden.yaml b/pkg/test/resourcefixture/testdata/basic/secretmanager/v1beta1/fullsecretmanagersecret/_generated_object_fullsecretmanagersecret.golden.yaml index f06c7db672..5295606e4f 100644 --- a/pkg/test/resourcefixture/testdata/basic/secretmanager/v1beta1/fullsecretmanagersecret/_generated_object_fullsecretmanagersecret.golden.yaml +++ b/pkg/test/resourcefixture/testdata/basic/secretmanager/v1beta1/fullsecretmanagersecret/_generated_object_fullsecretmanagersecret.golden.yaml @@ -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" diff --git a/pkg/test/resourcefixture/testdata/basic/secretmanager/v1beta1/fullsecretmanagersecret/_http.log b/pkg/test/resourcefixture/testdata/basic/secretmanager/v1beta1/fullsecretmanagersecret/_http.log index c98265932f..e439ee7c33 100644 --- a/pkg/test/resourcefixture/testdata/basic/secretmanager/v1beta1/fullsecretmanagersecret/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/secretmanager/v1beta1/fullsecretmanagersecret/_http.log @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", diff --git a/pkg/test/resourcefixture/testdata/basic/secretmanager/v1beta1/fullsecretmanagersecret/create.yaml b/pkg/test/resourcefixture/testdata/basic/secretmanager/v1beta1/fullsecretmanagersecret/create.yaml index d98b921443..04756f7df2 100644 --- a/pkg/test/resourcefixture/testdata/basic/secretmanager/v1beta1/fullsecretmanagersecret/create.yaml +++ b/pkg/test/resourcefixture/testdata/basic/secretmanager/v1beta1/fullsecretmanagersecret/create.yaml @@ -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} diff --git a/pkg/test/resourcefixture/testdata/basic/secretmanager/v1beta1/fullsecretmanagersecret/dependencies.yaml b/pkg/test/resourcefixture/testdata/basic/secretmanager/v1beta1/fullsecretmanagersecret/dependencies.yaml index 62b66ed452..3f66d4327a 100644 --- a/pkg/test/resourcefixture/testdata/basic/secretmanager/v1beta1/fullsecretmanagersecret/dependencies.yaml +++ b/pkg/test/resourcefixture/testdata/basic/secretmanager/v1beta1/fullsecretmanagersecret/dependencies.yaml @@ -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} diff --git a/pkg/test/resourcefixture/testdata/basic/secretmanager/v1beta1/fullsecretmanagersecret/update.yaml b/pkg/test/resourcefixture/testdata/basic/secretmanager/v1beta1/fullsecretmanagersecret/update.yaml index eacf717fae..718beaf082 100644 --- a/pkg/test/resourcefixture/testdata/basic/secretmanager/v1beta1/fullsecretmanagersecret/update.yaml +++ b/pkg/test/resourcefixture/testdata/basic/secretmanager/v1beta1/fullsecretmanagersecret/update.yaml @@ -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}