terraform-provider-argocd
terraform-provider-argocd copied to clipboard
Error: Provider produced inconsistent result after apply
argocd version: 2.0.4 terraform version: 1.0.1 agrocd provider version: 1.2.1 kubernetes version: 1.19.10-gke.1600
agrocd.tf
provider "argocd" {
server_addr = "argocd.example.com:443"
auth_token = var.agro_token
insecure = true
}
resource "argocd_cluster" "cluster-1-stage" {
server = format("https://%s", module.cluster1-stage.endpoint)
config {
tls_client_config {
ca_data = base64decode(module.cluster1-stage.cluster_ca_certificate)
cert_data = base64decode(module.cluster1-stage.client_certificate)
key_data = base64decode(module.cluster1-stage.client_key)
}
}
}
Error
argocd_cluster.cluster-1-stage: Creating...
╷
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to argocd_cluster.cluster-1-stage, provider "provider[\"registry.terraform.io/oboukili/argocd\"]" produced an unexpected new value: Root resource was present, but now absent.
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
Same issue here:
│ Error: Provider produced inconsistent result after apply │ │ When applying changes to argocd_repository_credentials.argocd_template_repo_creds, provider "provider["registry.terraform.io/oboukili/argocd"]" produced an unexpected new │ value: Root resource was present, but now absent. │ │ This is a bug in the provider, which should be reported in the provider's own issue tracker.
Resource is simply defined as:
resource "argocd_repository_credentials" "argocd_template_repo_creds" {
url = var.repository_url
username = var.repository_user
password = var.repository_pw
}
where var.repository_url
is a GIT HTTPS Url: https://gitlab.com/someproject/somepath/argocd-templates.git
Same here but with a argocd_repository
ressource.
argocd version: 2.0.4
terraform version: 1.0.2
agrocd provider version: 1.2.1
kubernetes version: 1.18.0
same here when adding a Cluster...
@wolfganghuse @Matroxt
Since ArgoCD is easily configurable through either kubernetes configMaps and secrets, for now we did migrate to Terraform's kubernetes provider. This may be a possible workaround for you, too.
Take a look at Argocd's declarative page for YAML templates
Hello.... i found one cause for the Issue.... I created a Cluster without "name" attribute, so the system tried to use the URL as Name... this is possible but results in a configuration where you can´t do anything with the Cluster as the name has characters :// which are not allowed there.
After adding the name attribute the provider works as expected.
Original issue affecting argocd_cluster
was resolved in #165.
Unable to reproduce issue with ~argocd_repository_credentials
(reported here) and/or~ argocd_repository
resource (reported here), so I am assuming these have been resolved. Feel free to open a new issue if this persists.
Edit: managed to reproduce issue with argocd_repository_credentials
. Have opened #242.