Skip to content

argocd Provider 7.9.0, 7.10.0 - githubapp_id, githubapp_installation_id are both set to null #697

@Trikenstein

Description

@Trikenstein

Terraform Version, ArgoCD Provider Version and ArgoCD Version

Terraform version: v1.12.2
ArgoCD provider version: 7.9.0 and 7.10.0
ArgoCD version: v2.12.2+560953c

Affected Resource(s)

  • argocd_repository

Terraform Configuration Files

#-----------------------------------------------------------
# these resources are located in a module named "MyModule"
#-----------------------------------------------------------

resource "argocd_repository" "source-repo" {
  repo = "https://github.com/MyCompany/MyRepo.git"

  githubapp_id              = 12345
  githubapp_installation_id = 987654
  githubapp_private_key     = var.githubapp_private_key
}

resource "argocd_application" "application" {
  # skip
  # this resource is not affected by the problem described in this issue

  depends_on = [
    argocd_repository.source-repo
  ]
}

Steps to Reproduce

  1. terraform apply -target module.MyModule

The terraform plan detects a change for the attributes githubapp_id and githubapp_installation_id while there is NO CHANGE at all for those values.

  # module.MyModule.argocd_repository.source-repo will be updated in-place
  ~ resource "argocd_repository" "source-repo" {
      ~ connection_state_status   = "Successful" -> (known after apply)
      + githubapp_id              = (sensitive value)
      + githubapp_installation_id = (sensitive value)
      ~ id                        = "https://github.com/MyCompany/MyRepo.git" -> (known after apply)
      ~ inherited_creds           = false -> (known after apply)
        # (6 unchanged attributes hidden)
    }

Expected Behavior

As our githubapp_id and githubapp_installation_id values are unchanged. There should be no change detected related to argocd_repository. Confirmed by reverting the argoproj-labs/argocd provider to version 7.8.2. The Terraform plan didn't show any change related to argocd_repository

Actual Behavior

With argoproj-labs/argocd provider version 7.9.0 and 7.10.0, at the time of this writing, ie. 2025-07-31, Terraform detects change in argocd_repository on the two attributes githubapp_id and githubapp_installation_id. We thought that is an harmless change and went ahead to apply the terraform plan.

After that, githubapp_id and githubapp_installation_id are both set to null . Verified by terraform state pull ./MyTFstate.json. Reviewing the MyTFstate.json file, search for keyword "githubapp_id": and we see

    {
      "module": "module.MyModule",
      "mode": "managed",
      "type": "argocd_repository",
      "name": "source-repo",
      "provider": "provider[\"registry.terraform.io/argoproj-labs/argocd\"]",
      "instances": [
        {
          "schema_version": 0,
          "attributes": {
            "connection_state_status": null,
            "enable_lfs": false,
            "enable_oci": false,
            "githubapp_enterprise_base_url": null,
            "githubapp_id": null, # <----- BUG -----
            "githubapp_installation_id": null, # <----- BUG -----
            "githubapp_private_key": "-----BEGIN RSA PRIVATE KEY- blabla"

Subsequently, any terraform apply related to any ArgoCD resource (eg. create new argocd_application) failed immediately with the error

│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to module.MyModule.argocd_repository.source-repo,
│ provider "provider[\"registry.terraform.io/argoproj-labs/argocd\"]" produced an unexpected new value: .githubapp_id: inconsistent values for
│ sensitive attribute.
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
╵
╷
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to module.MyModule.argocd_repository.source-repo,
│ provider "provider[\"registry.terraform.io/argoproj-labs/argocd\"]" produced an unexpected new value: .githubapp_installation_id: inconsistent
│ values for sensitive attribute.
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.

WORK AROUND

Revert argoproj-labs/argocd provider to version 7.8.2

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions