-
Notifications
You must be signed in to change notification settings - Fork 10
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
provider/stack: add new stack resource for Stacks API integration #155
Conversation
945ef82
to
d12fd62
Compare
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.
I've done some quick manual testing for the following scenarios:
- creating a new cluster using work in this pull request: no issues
- updating a cluster created with v1.6.1: no issues, no state differences
LGTM!
d12fd62
to
8d0df00
Compare
I wasn't able to delete the cluster after I approved the PR.
@rjeczalik , could you please point me to the docs/code of stack API, I having problems with locating it, is it on siren? Could you also please provide test/example for |
I will look into that.
siren-byok
Relevant part of the example: {
"provider": {
"scylladbcloud": {
"endpoint": "...",
"token": "${ format(\"%s:%s\", var.StackID, var.StackSecret) }"
}
},
"resource": {
"scylladbcloud_stack": {
"scylladb_cloud": {
"attributes": {
"google_kms_crypto_key_id": "${ google_kms_crypto_key.scylladb_cloud.id }",
"google_kms_key_ring_id": "${ google_kms_key_ring.scylladb_cloud.id }",
"stack_id": "${ var.StackID }"
}
}
}
}
} It is on purpose not documented, as it is meant to be used only for stack creation flows with siren-byok. |
It is not clear, it is public tf provider using public API, what exactly are we trying to hide by not providing example? |
I don't understand the question. I replied very clear, that this resource is not intended for direct usage, because from the perspective of Terraform Provider user it does not bring any features. It is used from automation flow Your assumption that it uses public api is also incorrect. If there are any more further questions, please contact me off-list. |
What is automation flow mean in this context ? It is testing ? |
It failed on following:
|
8d0df00
to
b753f89
Compare
@ksinica Please take a look, I took different approach - I left the metadata loading on by default with an env var that can turn it off. Should be less error-prone. |
b753f89
to
298140c
Compare
This PR adds a "scylladbcloud_stack" resource which is used for accounting managed resources with the Stacks API. It uses new client, as the payloads for Stacks API are HMAC signed.
298140c
to
5dcb717
Compare
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.
LGTM, I did a few quick manual tests and was able to create and destroy the clusters.
This PR adds a "scylladbcloud_stack" resource which is used for accounting managed resources with the Stacks API.
It uses new client, as the payloads for Stacks API are HMAC signed.