Closed Rambatino closed 2 years ago
Hi @Rambatino, Ivan from the team working on the provider here.
We are currently working on releasing a preview version of the provider quite soon (within this week hopefully), but as it will be a preview release some of the resources will not be available in it.
Do you mind telling a bit more about how you want to use the provider? I also will be more than happy to jump on a call to discuss that if works for you.
Hi @kavalerov, just wanted to do a couple of simple things. But mainly fit the production of ably apps within our workflow and continuous deployment - i.e. have a sandbox/staging/production app and be able to pass the api key to the services that require it. We're following a strict gitops flow so all resources (internal and external) ideally need to be created through code and committed.
The only other thing is to set a few channel rules.
We're in the early stages of the development of moving our socket implementation over to you guys right now.
Thanks for sharing! So great thing is that api_key and channel_rules (that are called namespaces in our Control API and in the Terraform provider as well) resources will be included in the preview release of the provider (and, of course, the ably_app resource) - so hopefully you will be able to use the provider really soon!
amazing thank you @kavalerov!
@Rambatino hope you are having a great day - just wanted to let you know that a preview version of the provider is now available on the Terraform Registry: https://registry.terraform.io/providers/ably/ably/0.1.0-beta
Please let us know if you will have any questions, or any issues using the provider.
Hi @kavalerov correct me if I'm wrong, but given that there's no ability to update the channel rules through the control API, I assume this functionality won't be supported through this provider for a while?
@Rambatino my apologies for a confusion, but actually it is possible to control channel rules via Control API (https://ably.com/docs/api/control-api#tag/namespaces), and via Terraform Provider as well (https://registry.terraform.io/providers/ably/ably/latest/docs/resources/namespace), they are behind a namespace
resource.
I completely understand that right now the naming is confusing, and there are some historical reasons for the difference in naming. We are planning to harmonise naming throughout the product, documentation, and Control API / Terraform Provider in the future so this shouldn't be a problem quite soon!
Aha Fab! Thanks for letting me know :)
Hi @kavalerov I think if you create an api key resource with incorrect capabilities, then correct it, when you try and access the key it doesn't appear:
> ably_api_key.api_key
{
"app_id" = "I0_Xlw"
"capabilities" = tomap({
"*" = tolist([
"publish",
])
})
"created" = 1662626917401
"id" = "M-RG2A"
"key" = ""
"modified" = 1662626917401
"name" = "master-key"
"status" = 0
}
I'm going out on a limb here and saying that it could be due to the missing Key here: https://github.com/ably/terraform-provider-ably/blob/main/internal/provider/resource_ably_key.go#L219
I haven't tested that theory out. Also the read() func doesn't assign the Key param either so not sure.
Eitherway, I ended up with a state of the resource whereby I wasn't able to access the key.
(on deleting and recreating it did fix the issue)
Actually, it does appear that only on the initial creation of the resource are you able to access the key. On re-applies, it returns an empty string: value = "I0_Xlw.isIMNw:CE...4dhYmRD3lXeIWXfhsF05Hsjk" -> null
@Rambatino I moved the conversation to a new issue to make sure that it is properly visible: https://github.com/ably/terraform-provider-ably/issues/101
➤ Automation for Jira commented:
The link to the corresponding Jira issue is https://ably.atlassian.net/browse/SDK-3071
Hello, I saw the manifest being added 3 days ago - wondering what the timeframe is until this provider maybe released to the terraform registry?
Thanks!
┆Issue is synchronized with this Jira Task by Unito