terraform-provider-dynatrace
terraform-provider-dynatrace copied to clipboard
Issue with dynatrace_credentials Resource and PEM File Upload
Hello,
I’m working on creating a new dynatrace_credentials resource to upload a PEM certificate for validating extensions. The resource definition I’m using is as follows:
resource "dynatrace_credentials" "root_certificate" {
name = "Root Certificate"
description = "Root certificate for validating Extension 2.0 signatures"
certificate = file("modules/plugins/temp/root.pem")
format = "PEM"
public = true
}
When uploading the same PEM file through the Dynatrace UI, the file is accepted, and the credential is created successfully. However, when applying these changes via Terraform, I encounter the following error: Could not add credential: Failed to decode certificate payload Illegal base64 character 2d
. Since the file works without issue in the UI, I’m wondering if there’s a specific configuration I’m missing in Terraform, or if there’s something unique about how the certificate field is being processed. Any guidance on resolving this would be greatly appreciated.
Version used : 1.72.6
Thank you!