terraform-provider-pagerduty
terraform-provider-pagerduty copied to clipboard
token as an optional field
Terraform Version
$ terraform -v
Terraform v1.3.9
on linux_amd64
+ provider registry.terraform.io/pagerduty/pagerduty v2.11.2
Affected Resource(s)
Provider
Terraform Configuration Files
terraform {
required_providers {
pagerduty = {
source = "pagerduty/pagerduty"
version = "2.11.2"
}
}
}
provider "pagerduty" {
api_url_override = "http://my-proxy-server.com"
skip_credentials_validation = true
}
data "pagerduty_user" "me" {
email = "[email protected]"
}
Expected Behavior
I understand that token is a required field.
However, given that we have skip_credentials_validation
, I would expect the provider to have token as an optional field and only return invalidCreds
error when the token value is missing and skip_credentials_validation
is set to false
(default behaviour)
Reason for that is that I have a proxy endpoint (http://my-proxy-server.com
) that adds Auth header to the request and sends it to api.pagerduty.com
Current hack is to add token field with a random string.
Other terraform providers (DataDog's provider for example) support this behaviour.
Actual Behavior
Forces to enter a value for token.
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
-
terraform plan
using the provided snippet