-
Notifications
You must be signed in to change notification settings - Fork 18
Audit log sink management terraform #380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
go.mod
Outdated
| gopkg.in/yaml.v3 v3.0.1 // indirect | ||
| ) | ||
|
|
||
| replace go.temporal.io/cloud-sdk => github.com/temporalio/cloud-sdk-go v0.6.1-0.20251031194819-5117604c8a4f |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: remove this after API update
| }, nil | ||
| } | ||
|
|
||
| diags.AddError("Invalid sink configuration", "Either Kinesis or PubSub must be configured") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be removed as it should not be hitting here.
| pubsubSinkSpec := &sinkv1.PubSubSpec{ | ||
| ServiceAccountId: pubsubSpec.ServiceAccountId.ValueString(), | ||
| TopicName: pubsubSpec.TopicName.ValueString(), | ||
| GcpProjectId: pubsubSpec.GcpProjectId.ValueString(), | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may hit a similar ask that customer wants sa email other than saId and gcp project. I got a customer ask for gcp and I added https://github.com/temporalio/terraform-provider-temporalcloud/pull/305/files#diff-0f9ac5989d3371aad25f7ab3f9c8663c66551ffc889f50f3a3cc96c9385d6456
|
cursor review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ Bugbot reviewed your changes and found no bugs!
dc778fa to
7d01344
Compare
| } | ||
|
|
||
| ctx, cancel := context.WithTimeout(ctx, deleteTimeout) | ||
| defer cancel() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Delete timeout applied after pre-deletion API call
The delete timeout context is created after the GetAccountAuditLogSink call on line 288, but it's only applied to the context starting at line 305. This means if the pre-deletion check hangs or is slow, it won't be subject to the configured delete timeout. The timeout should be applied to the context before line 288 to ensure all delete-related operations respect the timeout configuration.
What was changed
Adds terraform for audit log sink crud
Why?
Checklist
Closes
How was this tested:
locally tested
3. Any docs updates needed?
Note
Adds Terraform resource and data source to manage account audit log sinks (Kinesis/PubSub), with docs, examples, tests, and provider registration; updates deps.
temporalcloud_account_audit_log_sinkadded with CRUD,enabled(default true),timeouts, and mutually exclusivekinesis/pubsubconfigs.temporalcloud_account_audit_log_sinkto read sink details (enabled,state,kinesis/pubsub).KinesisSpecModelandPubSubSpecModelwith attribute type maps.go.temporal.io/apitov1.53.0,go.temporal.io/sdktov1.36.0, and minorgrpc/protobufupdates.Written by Cursor Bugbot for commit 1ba9d9c. This will update automatically on new commits. Configure here.