Add EVE schema and mapping - #430
Conversation
|
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
Reviewed by Cursor Bugbot for commit 3a5cd01. Configure here.
| `encryption_validation cannot be removed once set; to disable, explicitly set encryption_validation { mode = "disabled" }`, | ||
| ) | ||
| return | ||
| } |
There was a problem hiding this comment.
Empty config bypasses removal guard
High Severity
The encryption_validation removal checks only IsNull(), so encryption_validation = {} slips through after a real mode was configured. That path treats the plan as zero, sends a nil spec, and selects the stable API client, so the Cloud value can remain while Terraform keeps planning the empty object away.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit 3a5cd01. Configure here.
| MetadataValues: metadataValues, | ||
| InspectHeader: encryptionValidation.InspectHeader.ValueBool(), | ||
| InspectFailure: encryptionValidation.InspectFailure.ValueBool(), | ||
| }, diags |
There was a problem hiding this comment.
Mode not required when fields set
Medium Severity
Schema text says that if any encryption_validation field is set, mode must be disabled, warn, or deny, but nothing enforces that. A non-zero object with only metadata_key, metadata_values, or inspect_* still maps omitted mode to UNSPECIFIED and sends it to the API.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit 3a5cd01. Configure here.


What was changed
Why?
Users need to configure and read namespace payload encryption validation through Terraform while keeping Terraform state consistent with the Cloud API.
Checklist
Closes #
How was this tested:
go test ./internal/provider -count=1make test-namespace-encryption-validationgo generate ./....Note
Medium Risk
Changes namespace create/update/read paths and depends on a development API version for encryption validation; misrouting or SDK/API drift could affect namespace operations, but scope is limited to the new optional block with explicit guards and tests.
Overview
Adds optional
encryption_validationontemporalcloud_namespaceso users can configure payload encryption validation (modesdisabled,warn,deny, metadata key/values, header/failure inspection). The same block is exposed read-only ontemporalcloud_namespaceandtemporalcloud_namespacesdata sources.API client: Namespace create/update and reads that need encryption validation use a second Cloud API client with
developmentAPI version (DevelopmentCloudService()); stable client remains for other operations.go.temporal.io/cloud-sdkis bumped to a pre-release build that includes encryption validation types.Lifecycle: Once set,
encryption_validationcannot be removed from config (same pattern asfairness); users must setmode = "disabled". Empty{}leaves the feature unconfigured.Docs, examples, Makefile target
test-namespace-encryption-validation, unit tests, and acceptance tests cover mapping, import, and validation.Reviewed by Cursor Bugbot for commit 3a5cd01. Bugbot is set up for automated code reviews on this repo. Configure here.