-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add account metrics resource #94
Add account metrics resource #94
Conversation
thank you for all of the hard work on these 🙏 I will check this out! |
@ennyjfrick thank you for your PR. The protos/apis you are referring from the tcld repo are meant to be deprecated, and will be replaced by the once in api-cloud repo. |
@anekkanti totally fine with me! |
@anekkanti hey! wondering if there was any update on the updated account management APIs |
@anekkanti can you share any updates you have here? |
@ennyjfrick @swgillespie |
@swgillespie @anekkanti I just opened temporalio/api-go#181 to update the generated client with the account get & update operations, will work on redoing this PR so the metrics endpoint resources uses those changes. |
71041da
to
acca221
Compare
@swgillespie ok, should be good to go and ready for review here. Two things to note:
|
@rohitgup14 @anekkanti can you check this out? ^ |
@ennyjfrick Just merged the changes that moves to using the enums in the new apis. |
014570e
to
9f7f783
Compare
@anekkanti all done! |
} | ||
|
||
// example endpoint that uses the CA cert generated in this example | ||
resource "temporalcloud_metrics_endpoint" "terraform2" { |
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.
What happens when you create 2 of the temporalcloud_metrics_endpoint
resources? Which one will be applied to the account.
Is there a way to make this resource singleton? Not even sure if terraform supports such concept.
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.
@anekkanti there's no terraform support for singletons explicitly unfortunately, although we could put in some logic that does not allow you to create the resource if the endpoint is already configured and add some annotations stating this is an account singleton; this is what I've seen recommended for similar situations.
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.
put in some logic that does not allow you to create the resource if the endpoint is already configured and add some annotations stating this is an account singleton
I definitely like this, it will elevate some of the confusion when someone accidentally creates multiple resources.
LGTM, a few things to address:
|
a20904b
to
c551ed4
Compare
@anekkanti howdy! sorry for the delay, should be good to go now |
@swgillespie / @anekkanti following up |
50423ca
to
76bf4bd
Compare
@swgillespie @anekkanti think I need one of you to hit the merge button, it's greyed out for me |
What was changed
Hi again! This PR adds a new resource to configure account-level metrics. It allows enabling and disabling of an account's metrics endpoint, configuring the CA cert accepted by the metrics endpoint, and exporting the metrics endpoint URI once created.
Why?
The new resource is intended to enable a better experience for operators with certificate and observability infrastructure already in Terraform. Instead of needing to configure certificates and Prometheus scrapes for Temporal Cloud out-of-band, Temporal Cloud observability features can now slot nicely in with existing Terraform configuration.
Checklist
How was this tested:
Run acceptance tests
Any docs updates needed?
Docs generated!