terraform-provider-pagerduty
terraform-provider-pagerduty copied to clipboard
Segmentation violation error instead of a "wrong credentials" message when trying to apply with an invalid token
Terraform Version
Terraform v1.0.11 on linux_amd64
Affected Resource(s)
- pagerduty_user
- pagerduty_team
- Probably others
The problem occurs when trying to apply using a bad token.
Terraform Configuration Files
terraform {
required_providers {
pagerduty = {
source = "PagerDuty/pagerduty"
version = "2.1.1"
}
}
}
provider "pagerduty" {
token = "any_incorrect_token"
}
resource "pagerduty_user" "muser" {
name = "Mister User"
email = "[email protected]"
}
Debug Output
https://gist.github.com/christianbrideau/7af93697c93092e7b6e36a55bcb12c62
Panic Output
No crash.log file created.
Expected Behavior
Expecting a message of type "access denied" or "wrong credentials" when a bad token is used (missed a character when copying/pasting).
Actual Behavior
Getting a segmentation fault error. I can see the access denied message, but only when turning on debugging. This sent me on a wild goose chase to find out why it segfaulted. Tried different versions of Terraform, the provider and operating system, when it was just me not being able to do a copy/paste correctly.
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
- Use the config file from above.
- Use a wrong token.
terraform apply
Important Factoids
This was done on a sandbox account.
References
No
This may now be addressed as part of #458, released as part of 2.3.0.
In this particular case the error message should now be surfaced rather than causing a segfault.