Open graudeejs opened 1 year ago
Is there any workaround available for this? It looks like this provider is unusable in GH Actions without this working.
It looks like this is a usable workaround:
variable "pagerduty_token" {}
provider "pagerduty" {
token = var.pagerduty_token
}
TF_VAR_pagerduty_token=foobar terraform plan ...
The documentation seems to indicate that the token doesn't need to be passed in as plaintext, with no examples, support and it's broken right out of the box.
It can also be sourced from the PAGERDUTY_USER_TOKEN environment variable. See [API Documentation](https://developer.pagerduty.com/docs/ZG9jOjExMDI5NTUx-authentication) for more information.
Looks like this was fixed in https://github.com/PagerDuty/terraform-provider-pagerduty/pull/708. Setting PAGERDUTY_TOKEN
works for me now.
Terraform Version
Terraform v1.4.6 on darwin_arm64
Affected Resource(s)
Provider
Terraform Configuration Files
Debug Output
https://gist.github.com/graudeejs/9c5a265088aef7e3937504d8f7021be6
Expected Behavior
token set in
PAGERDUTY_TOKEN
environment variable should be usedActual Behavior
Terraform complains about missing required argument
token
Steps to Reproduce
Setup minimal terraform project using PagerDuty. Provide PAGERDUTY_TOKEN as environment variable as mentioned in documentation.
References