terraform-provider-jenkins
terraform-provider-jenkins copied to clipboard
expected element type <org.jenkinsci.plugins.plaincredentials.impl.StringCredentialsImpl> but have <html>
Getting expected element type <org.jenkinsci.plugins.plaincredentials.impl.StringCredentialsImpl> but have <html>
when attempting to apply secret text. Also happens with username but for com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl
. Jenkins 2.303.3, Credentials plugin 2.6.1
Code:
resource "jenkins_credential_secret_text" "slack_token" {
name = "test"
description = "test"
secret = "super-secret"
}
Version:
Terraform v1.0.11
on linux_amd64
+ provider registry.terraform.io/taiidani/jenkins v0.9.0
$ terraform apply
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following
symbols:
+ create
Terraform will perform the following actions:
# module.jenkins-test.jenkins_credential_secret_text.slack_token will be created
+ resource "jenkins_credential_secret_text" "slack_token" {
+ description = "test"
+ domain = "_"
+ id = (known after apply)
+ name = "test"
+ scope = "GLOBAL"
+ secret = (sensitive value)
}
Plan: 1 to add, 0 to change, 0 to destroy.
Do you want to perform these actions in workspace "sandbox"?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
module.jenkins-test.jenkins_credential_secret_text.slack_token: Creating...
╷
│ Error: Could not read secret text credentials: expected element type <org.jenkinsci.plugins.plaincredentials.impl.StringCredentialsImpl> but have <html>
│
│ with module.jenkins-test.jenkins_credential_secret_text.slack_token,
│ on jenkins-instance-config/main.tf line 10, in resource "jenkins_credential_secret_text" "slack_token":
│ 10: resource "jenkins_credential_secret_text" "slack_token" {
│
╵
Stale issue message
I feel like this may be a leaky abstraction from the underlying https://github.com/bndr/gojenkins library. Currently unable to reproduce. Are you able to reproduce it using the Dockerized Jenkins instance in example/?
Stale issue message