cloudamqp / terraform-provider-cloudamqp

Terraform Provider for CloudAMQP
https://registry.terraform.io/providers/cloudamqp/cloudamqp
Mozilla Public License 2.0
35 stars 38 forks source link

[Question] Setup when subscribed via Azure Marketplace #256

Closed black-snow closed 8 months ago

black-snow commented 9 months ago

Hi,

it seems to me that you need an API key to use this provider. But that's probably an API key I have to generate via the CloudAMQP GUI, right? I don't see any Azure resources providing me any sort of authentication and auth against this provider probably does not work the same way as it does against the Azure cli, right?

Which means that as for now there's no way to set up instances through marketplace in one go, right? You have to do the marketplace thing first, go to the CloudAMQP GUI, grab an API key and use it in your provider set up.

dentarg commented 9 months ago

Indeed, that's correct. It is only a one-time thing though, unless you're doing multiple subscriptions in Azure, but there shouldn't be a need for that, you can have multiple clusters on a single marketplace subscription.

Are you able to programmatically create Azure marketplace subscriptions? (I'm curious)

black-snow commented 9 months ago

@dentarg thanks for the quick reply! That's a pity - I'd really like to be able to terraform apply my whole infra in one go.

Are you able to programmatically create Azure marketplace subscriptions? (I'm curious)

I thought so - haven't tried it out yet, though. I assumed that this was the Azure part and something like this would do:

resource "azurerm_marketplace_agreement" "rabbit" {
  publisher = "84codes"
  offer     = "cloudamqp-v4"
  plan      = "CloudAMQP"
}
black-snow commented 9 months ago

I think it's rather:

resource "azurerm_marketplace_agreement" "cloudampq" {
  publisher = "84codes"
  offer     = "cloudamqp-v4"
  plan      = "cloudamqp-hosting"
}
black-snow commented 9 months ago

@dentarg how do I find out my instance ID when using the azure marketplace integration? Apparently, https://docs.cloudamqp.com/#authentication-3 doesn't work.

dentarg commented 9 months ago

@black-snow Can you give more details than "doesn't work"? :) Feel free to email our support also and I can take a look (please mention this issue)

black-snow commented 9 months ago

@dentarg thanks, I had already reached out to support and apparently the legacy Azure subscription only has instance API and the tf provider doesn't work for it either.
I'll quickly try the provider after the upgrade and then close this issue. I think there's no good solution atm to do this "in one go".