Closed rmvangun closed 1 month ago
@rmvangun Hi there!
This sounds strange since I've also recently started to configure our both teams in Betteruptime with Terraform.
provider "betteruptime" {
api_token = local.betteruptime_api_token_team_1
alias = "team_1"
}
provider "betteruptime" {
api_token = local.betteruptime_api_token_team_2
alias = "team_2"
}
and this works just fine.
We are using the provider version 0.3.17
and TF is also 1.5.3
Hello @rmvangun, @peter-hippo 👋
Thanks for reaching out and for your patience 🙏
I just wanted to say the workaround with aliases is no longer needed since we now support Global tokens. You can find them in API Tokens in your account on a separate tab:
Using a global token requires using team_name
field with your resources.
You can still of course keep using team-bound tokens if you want the distinction.
Hope this helps 🙌
Because the BetterUptime provider requires a separate API token per team, and we prefer to define all our BetterUptime resources in a single Terraform project, we need a unique API token per team in Terraform. This means multiple provider blocks are necessary (note that this is a little unusual... most providers allow a single global API token for the service/account) . However, if I configure the
alias
property, I get:If I remove the alias, which requires I only use a single BetterUptime provider block, this goes away. So, maybe it is a problem of not supporting the "alias", or maybe it is a problem validating the
provider
block?This works:
This does not work:
I'm running
0.3.20
of the provider and terraform1.5.3
.