[
  {
    "path": ".devcontainer.json",
    "content": "{\n  \"name\": \"terraform-provider-argocd\",\n  // officiall MS template from https://github.com/devcontainers/templates/tree/main/src/go\n  \"image\": \"mcr.microsoft.com/devcontainers/go:2.1-bookworm\",\n  \"features\": {\n    // https://github.com/devcontainers/features/tree/main/src/docker-in-docker\n    \"ghcr.io/devcontainers/features/docker-in-docker:2\": {\n      \"enableNonRootDocker\": \"false\",\n      \"disableIp6tables\": true // experienced issues with missing chains in ip6tables when creating kind clusters\n    },\n    // https://github.com/devcontainers/features/tree/main/src/terraform\n    \"ghcr.io/devcontainers/features/terraform:1\": {},\n    // https://github.com/mpriscella/features/tree/main/src/kind\n    \"ghcr.io/mpriscella/features/kind:1\": {},\n    // https://github.com/devcontainers/features/tree/main/src/kubectl-helm-minikube\n    \"ghcr.io/devcontainers/features/kubectl-helm-minikube:1\": {},\n    // https://github.com/rio/features/tree/main/src/kustomize\n    \"ghcr.io/rio/features/kustomize:1\": {}\n  },\n  \"forwardPorts\": [\n    8080 // the \"hard-coded\" port for forwarded argo-cd\"\n  ]\n}\n"
  },
  {
    "path": ".github/CODEOWNERS",
    "content": "* @oboukili @onematchfox @blakepettersson @the-technat @mkilchhofer\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug-report.md",
    "content": "---\nname: \"\\U0001F41B Bug Report\"\nabout: \"If something isn't working as expected \\U0001F914.\"\ntitle: ''\nlabels: bug\ntype: bug\n\n---\n\n<!---\nHi there,\n\nThank you for opening an issue. Please provide as much detail as possible when reporting issue as this benefits all parties and will most likely lead to a quicker resolution of the issue.\n--->\n\n\n### Terraform Version, ArgoCD Provider Version and ArgoCD Version\n<!--- Run `terraform -v` to show the version. If you are not running the latest version of Terraform, please upgrade because your issue may have already been fixed. --->\n```\nTerraform version:\nArgoCD provider version:\nArgoCD version:\n```\n\n### Affected Resource(s)\n<!-- Please list the resources as a list, for example:\n- argocd_application\n- argocd_cluster\nIf this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this. -->\n\n### Terraform Configuration Files\n```hcl\n# Copy-paste your Terraform configurations here - for large Terraform configs,\n# please use an online file storage service and share a link to the ZIP file. For\n# security, you can also encrypt the files using our GPG public release key.\n```\n\n### Debug Output\n<!--Please provider a link to a GitHub Gist containing the complete debug output: https://www.terraform.io/docs/internals/debugging.html. Please do NOT paste the debug output in the issue; just paste a link to the Gist. -->\n\n### Panic Output\n<!--If Terraform produced a panic, please provide a link to a GitHub Gist containing the output of the `crash.log` -->\n\n### Steps to Reproduce\n<!-- Please list the steps required to reproduce the issue, for example:\n1. `terraform apply` -->\n\n### Expected Behavior\n<!-- What should have happened? -->\n\n### Actual Behavior\n<!-- What actually happened? -->\n\n### Important Factoids\n<!-- Are there anything atypical about your accounts that we should know? For example: For general provider/connectivity issues, how is your ArgoCD server exposed? When dealing with cluster resources, what type of cluster are you referencing (where is it hosted)?  -->\n\n### References\n<!--Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example:\n- GH-1234\n-->\n\n### Community Note\n<!--- Please keep this note for the community --->\n* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request\n* If you are interested in working on this issue or have submitted a pull request, please leave a comment"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/config.yml",
    "content": "blank_issues_enabled: false\ncontact_links:\n  - name: Provider Slack Channel\n    url: https://cloud-native.slack.com/archives/C07PQF40SF8\n    about: Slack Channel to discuss on the CNCF Workspace\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature-request.md",
    "content": "---\nname: \"\\U0001F680 Feature Request\"\nabout: \"I have a suggestion (and might want to implement myself \\U0001F642)!\"\ntitle: ''\nlabels: enhancement\ntype: feature\n\n---\n\n\n### Description\n\n<!-- Please leave a helpful description of the feature request here. -->\n\n### Potential Terraform Configuration\n<!-- Information about code formatting: https://help.github.com/articles/basic-writing-and-formatting-syntax/#quoting-code -->\n\n```hcl\n# Copy-paste a potential Terraform configuration here - for large Terraform configs,\n# please use an online file storage service and share a link to the ZIP file. For\n# security, you can also encrypt the files using our GPG public release key.\n```\n\n### References\n<!-- Information about referencing Github Issues: https://help.github.com/articles/basic-writing-and-formatting-syntax/#referencing-issues-and-pull-requests\nAre there any other GitHub issues (open or closed) or pull requests that should be linked here? Vendor blog posts or documentation? -->\n\n\n### Community Note\n<!-- Please keep this note for the community -->\n* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request\n* If you are interested in working on this issue or have submitted a pull request, please leave a comment"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/question.md",
    "content": "---\nname: \"\\U0001F914 Question\"\nabout: \"If you need help figuring something out\"\ntitle: ''\nlabels: question\n\n---\n\n<!---\nHi, \n\nPlease provide as much information as possible when asking your question. \n\nPlease understand that we make a best effort attempt to address questions, but our focus is on provider development. It's still valuable to ask your question because you may receive help from the community, and help us understand common asks.\n-->\n\n### Terraform Version, ArgoCD Provider Version and ArgoCD Version\n<!--- Run `terraform -v` to show the version. If you are not running the latest version of Terraform, please upgrade because your issue may have already been fixed. --->\n```\nTerraform version:\nArgoCD provider version:\nArgoCD version:\n```\n\n## Terraform configuration\n```hcl\n# Enter your configuration here.\n```\n\n## Question\n<!-- Enter your question here. -->"
  },
  {
    "path": ".github/PULL_REQUEST_TEMPLATE.MD",
    "content": "**What type of PR is this?**\n\n[//]: # (Uncomment only one <!-- /kind ... --> line, and delete the rest.)\n[//]: # (For example, <!-- /kind bug --> would simply become: /kind bug  )\n\n<!-- /kind bug -->\n<!-- /kind chore -->\n<!-- /kind cleanup -->\n<!-- /kind failing-test -->\n<!-- /kind enhancement -->\n<!-- /kind documentation -->\n<!-- /kind code-refactoring -->\n\n\n**What does this PR do / why we need it**:\n\n**Have you updated the necessary documentation?**\n\n* [ ] Documentation update is required by this PR.\n* [ ] Documentation has been updated.\n\n**Which issue(s) this PR fixes**:\n\nFixes #?\n\n**How to test changes / Special notes to the reviewer**:"
  },
  {
    "path": ".github/renovate.json",
    "content": "{\n  \"$schema\": \"https://docs.renovatebot.com/renovate-schema.json\",\n  \"extends\": [\n    \"config:recommended\",\n    \"schedule:weekly\"\n  ],\n  \"ignoreDeps\": [\n    \"k8s.io/api\",\n    \"k8s.io/apiextensions-apiserver\",\n    \"k8s.io/apimachinery\",\n    \"k8s.io/apiserver\",\n    \"k8s.io/cli-runtime\",\n    \"k8s.io/client-go\",\n    \"k8s.io/cloud-provider\",\n    \"k8s.io/cluster-bootstrap\",\n    \"k8s.io/code-generator\",\n    \"k8s.io/component-base\",\n    \"k8s.io/component-helpers\",\n    \"k8s.io/controller-manager\",\n    \"k8s.io/cri-api\",\n    \"k8s.io/cri-client\",\n    \"k8s.io/csi-translation-lib\",\n    \"k8s.io/dynamic-resource-allocation\",\n    \"k8s.io/endpointslice\",\n    \"k8s.io/externaljwt\",\n    \"k8s.io/kms\",\n    \"k8s.io/kube-aggregator\",\n    \"k8s.io/kube-controller-manager\",\n    \"k8s.io/kube-proxy\",\n    \"k8s.io/kube-scheduler\",\n    \"k8s.io/kubectl\",\n    \"k8s.io/kubelet\",\n    \"k8s.io/legacy-cloud-providers\",\n    \"k8s.io/metrics\",\n    \"k8s.io/mount-utils\",\n    \"k8s.io/pod-security-admission\",\n    \"k8s.io/sample-apiserver\",\n    \"k8s.io/sample-cli-plugin\",\n    \"k8s.io/sample-controller\"\n  ],\n  \"postUpdateOptions\": [\n    \"gomodTidy\"\n  ],\n  \"labels\": [\n    \"dependencies\"\n  ],\n  \"packageRules\": [\n    {\n      \"matchPackageNames\": [\n        \"/terraform-plugin-framework/\",\n        \"/terraform-plugin-mux/\",\n        \"/terraform-plugin-go/\",\n        \"/terraform-plugin-testing/\",\n        \"/terraform-plugin-sdk/\"\n      ],\n      \"groupName\": \"terraform-plugin-framework\"\n    },\n    {\n      \"matchPackageNames\": [\n        \"/go/\"\n      ],\n      \"addLabels\": [\n        \"go\"\n      ]\n    },\n    {\n      \"matchDepTypes\": [\n        \"/github/\"\n      ],\n      \"addLabels\": [\n        \"github_actions\"\n      ]\n    }\n  ],\n  \"customManagers\": [\n    {\n      \"customType\": \"regex\",\n      \"managerFilePatterns\": [\n        \"/(^|\\\\/).*\\\\.ya?ml$/\"\n      ],\n      \"matchStrings\": [\n        \"# renovate: datasource=(?<datasource>.*?) depName=(?<depName>.*?)\\\\s+.+[vV]ersion: (?<currentValue>.*)\"\n      ]\n    }\n  ]\n}\n"
  },
  {
    "path": ".github/workflows/codeql-analysis.yml",
    "content": "name: \"CodeQL\"\n\non:\n  push:\n    branches: [\"main\"]\n  pull_request:\n    branches: [\"main\"]\n  schedule:\n    - cron: \"15 0 * * 5\"\n\njobs:\n  analyze:\n    name: Analyze (${{ matrix.language }})\n    runs-on: ubuntu-24.04\n    permissions:\n      security-events: write\n      packages: read\n      actions: read\n      contents: read\n    strategy:\n      fail-fast: false\n      matrix:\n        include:\n          - language: actions\n            build-mode: none\n          - language: go\n            build-mode: manual\n    steps:\n      - name: Checkout repository\n        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n      - name: Set up Go\n        if: matrix.language == 'go'\n        uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0\n        with:\n          go-version-file: \"go.mod\"\n          cache: true\n      - name: Initialize CodeQL\n        uses: github/codeql-action/init@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1\n        with:\n          languages: ${{ matrix.language }}\n          build-mode: ${{ matrix.build-mode }}\n          queries: security-extended,security-and-quality\n      - name: Build provider\n        if: matrix.language == 'go'\n        run: make build\n      - name: Build tests\n        if: matrix.language == 'go'\n        run: TF_ACC=1 go test -c ./...\n      - name: Perform CodeQL Analysis\n        uses: github/codeql-action/analyze@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1\n        with:\n          category: \"/language:${{matrix.language}}\"\n"
  },
  {
    "path": ".github/workflows/release.yml",
    "content": "---\nname: Release\n\non:\n  push:\n    tags: ['v*']\n\n# Releases need permissions to read and write the repository contents.\n# GitHub considers creating releases and uploading assets as writing contents.\npermissions:\n  contents: write\n\njobs:\n  goreleaser:\n    runs-on: ubuntu-24.04\n    steps:\n    - name: Free up disk space\n      run: |\n        # Remove Java (JDKs)\n        sudo rm -rf /usr/lib/jvm\n\n        # Remove .NET SDKs\n        sudo rm -rf /usr/share/dotnet\n\n        # Remove Swift toolchain\n        sudo rm -rf /usr/share/swift\n\n        # Remove Haskell (GHC)\n        sudo rm -rf /usr/local/.ghcup\n\n        # Remove Julia\n        sudo rm -rf /usr/local/julia*\n\n        # Remove Android SDKs\n        sudo rm -rf /usr/local/lib/android\n\n        # Remove Chromium (optional if not using for browser tests)\n        sudo rm -rf /usr/local/share/chromium\n\n        # Remove Microsoft/Edge and Google Chrome builds\n        sudo rm -rf /opt/microsoft /opt/google\n\n        # Remove Azure CLI\n        sudo rm -rf /opt/az\n\n        # Remove PowerShell\n        sudo rm -rf /usr/local/share/powershell\n\n        docker system prune -af || true\n        docker builder prune -af || true\n        df -h\n    - name: Checkout\n      uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n      with:\n        fetch-depth: 0\n\n    - name: Set up Go\n      uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0\n      with:\n        go-version-file: 'go.mod'\n        cache: true\n\n    - name: Import GPG key\n      id: import_gpg\n      uses: crazy-max/ghaction-import-gpg@2dc316deee8e90f13e1a351ab510b4d5bc0c82cd # v7.0.0\n      with:\n        gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}\n        passphrase: ${{ secrets.GPG_PASSPHRASE }}\n\n    - name: Run GoReleaser\n      uses: goreleaser/goreleaser-action@ec59f474b9834571250b370d4735c50f8e2d1e29 # v7.0.0\n      with:\n        args: release --clean\n      env:\n        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n        GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}\n"
  },
  {
    "path": ".github/workflows/stale.yml",
    "content": "## Reference: https://github.com/actions/stale\nname: 'Close stale Issues/PRs'\non:\n  schedule:\n    - cron: '30 12 * * *'\n\npermissions:\n  contents: read\n\njobs:\n  stale:\n    permissions:\n      issues: write  # for actions/stale to close stale issues\n      pull-requests: write  # for actions/stale to close stale PRs\n    runs-on: ubuntu-24.04\n    steps:\n      - uses: actions/stale@b5d41d4e1d5dceea10e7104786b73624c18a190f # v10.2.0\n        with:\n          repo-token: ${{ secrets.GITHUB_TOKEN }}\n          days-before-stale: 90\n          days-before-close: 20\n          # Issue settings\n          stale-issue-message: >\n            This issue has been automatically marked as stale because it has not had\n            recent activity. It will be closed if no further activity occurs. Thank you\n            for your contributions.\n          exempt-issue-labels: \"on-hold,pinned,good first issue,help wanted\"\n          # PR Settings\n          stale-pr-message: >\n            This pull request has been automatically marked as stale because it has not had\n            recent activity. It will be closed if no further activity occurs. Thank you\n            for your contributions.\n          exempt-pr-labels: \"on-hold,pinned\"\n"
  },
  {
    "path": ".github/workflows/tests.yml",
    "content": "---\nname: Tests\n\non:\n  push:\n    branches: [main]\n    paths-ignore:\n      - 'README.md'\n  pull_request:\n    branches: [main]\n    paths-ignore:\n      - 'README.md'\n\npermissions:\n  contents: read\n\njobs:\n  build:\n    name: Build\n    runs-on: ubuntu-24.04\n    timeout-minutes: 10\n    steps:\n      - name: Check out code into the Go module directory\n        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n      - name: Set up Go\n        uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0\n        with:\n          go-version-file: 'go.mod'\n          cache: true\n      - name: Build provider\n        run: make build\n      - name: Run linters\n        uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0\n        with:\n          # renovate: datasource=github-tags depName=golangci/golangci-lint\n          version: v2.11.4\n\n  generate:\n    name: Generate\n    runs-on: ubuntu-24.04\n    steps:\n      - name: Check out code into the Go module directory\n        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n      - name: Set up Go\n        uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0\n        with:\n          go-version-file: 'go.mod'\n          cache: true\n      # We need the latest version of Terraform for our documentation generation to use\n      - uses: hashicorp/setup-terraform@5e8dbf3c6d9deaf4193ca7a8fb23f2ac83bb6c85 # v4.0.0\n        name: Setup Terraform\n        with:\n          terraform_wrapper: false\n      - name: Generate\n        run: make generate\n      - name: Confirm no diff\n        run: |\n          git diff --compact-summary --exit-code || \\\n            (echo; echo \"Unexpected difference in directories after code generation. Run 'make generate' command and commit.\"; exit 1)\n\n  acceptance_tests:\n    name: Acceptance Tests\n    needs:\n      - build\n      - generate\n    runs-on: ubuntu-24.04\n    timeout-minutes: 20\n    strategy:\n      fail-fast: false\n      matrix:\n        argocd_version: ['v3.1.12', 'v3.2.6', 'v3.3.0']\n        terraform_version: ['1.13.*']\n    steps:\n      - name: Check out code\n        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n      - name: Setup Go\n        uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0\n        with:\n          go-version-file: 'go.mod'\n          check-latest: true\n          cache: true\n      - name: Setup Terraform ${{ matrix.terraform_version }}\n        uses: hashicorp/setup-terraform@5e8dbf3c6d9deaf4193ca7a8fb23f2ac83bb6c85 # v4.0.0\n        with:\n          terraform_version: ${{ matrix.terraform_version }}\n          terraform_wrapper: false\n      - name: Install Kustomize\n        run: |\n          curl -sL \"https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh\" | bash\n          chmod +x ./kustomize\n      - name: Install Kind 0.24.0\n        run: |\n          curl -sLo ./kind https://kind.sigs.k8s.io/dl/v0.20.0/kind-$(uname)-amd64\n          chmod +x ./kind\n      - name: Set up ArgoCD ${{ matrix.argocd_version }}\n        env:\n          ARGOCD_VERSION: ${{ matrix.argocd_version }}\n        run: |\n          make testacc_prepare_env\n          until $(nc -z 127.0.0.1 8080); do sleep 2;done\n          netstat -tulpn\n      - name: Download go deps for tests\n        run: go mod download\n      - name: Run acceptance tests\n        env:\n          ARGOCD_VERSION: ${{ matrix.argocd_version }}\n          USE_TESTCONTAINERS: false\n        run: make testacc\n\n  # This job aggregates test results. It's the required check for branch protection.\n  # https://github.com/marketplace/actions/alls-green#why\n  # https://github.com/orgs/community/discussions/33579\n  success:\n    name: Acceptance Tests successful\n    if: always()\n    needs:\n      - acceptance_tests\n    runs-on: ubuntu-24.04\n    steps:\n      - name: Decide whether the needed jobs succeeded or failed\n        uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2\n        with:\n          jobs: ${{ toJSON(needs) }}\n"
  },
  {
    "path": ".gitignore",
    "content": "terraform-provider-argocd\n/manifests/install/argocd.yml\n/bin\n.idea\n\n# Env variables settings\n/scripts/testacc\n/scripts/testacc_prepare_env\n\n# debug build\n__debug_bin*\n\n# local reproduction folders\nreproduce/\n"
  },
  {
    "path": ".golangci.yml",
    "content": "version: \"2\"\nlinters:\n  default: none\n  enable:\n    - asasalint\n    - asciicheck\n    - containedctx\n    - contextcheck\n    - copyloopvar\n    - depguard\n    - dogsled\n    - durationcheck\n    - errcheck\n    - errname\n    - errorlint\n    - goconst\n    - gocritic\n    - govet\n    - ineffassign\n    - makezero\n    - misspell\n    - mnd\n    - nakedret\n    - nilerr\n    - nolintlint\n    - paralleltest\n    - predeclared\n    - staticcheck\n    - tparallel\n    - unconvert\n    - unparam\n    - unused\n    - usetesting\n    - whitespace\n  settings:\n    depguard:\n      rules:\n        main:\n          deny:\n            - pkg: github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest\n              desc: \"Use github.com/hashicorp/terraform-plugin-testing/helper/acctest instead\"\n            - pkg: github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource\n              desc: \"Use github.com/hashicorp/terraform-plugin-testing/helper/resource instead\"\n            - pkg: github.com/hashicorp/terraform-plugin-sdk/v2/terraform\n              desc: \"Use github.com/hashicorp/terraform-plugin-testing/terraform instead\"\n    dogsled:\n      max-blank-identifiers: 3\n    errcheck:\n      exclude-functions:\n        - github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema:ForceNew|Set\n        - fmt:.*\n        - io:Close\n    errorlint:\n      errorf: false\n    goconst:\n      min-occurrences: 6\n    gocritic:\n      enabled-tags:\n        - diagnostic\n      disabled-tags:\n        - style\n        - performance\n        - experimental\n        - opinionated\n    mnd:\n      checks:\n        - argument\n      ignored-functions:\n        - resource.Retry\n        - schema.DefaultTimeout\n        - validation.*\n        - int64validator.*\n        - listvalidator.*\n        - stringvalidator.*\n        - SetDefaultCreateTimeout\n        - SetDefaultReadTimeout\n        - SetDefaultUpdateTimeout\n        - SetDefaultDeleteTimeout\n        - make\n        - strconv.FormatFloat\n        - strconv.FormatInt\n        - strconv.ParseFloat\n        - strconv.ParseInt\n        - strings.SplitN\n    nolintlint:\n      require-explanation: true\n      require-specific: true\n      allow-no-explanation:\n        - gomnd\n        - paralleltest\n        - tparallel\n        - unparam\n      allow-unused: false\n    predeclared:\n      ignore:\n        - cap\n        - close\n        - copy\n        - delete\n        - len\n        - new\n    staticcheck:\n      checks:\n        - -SA1019\n        - -ST1005\n        - all\n  exclusions:\n    generated: lax\n    presets:\n      - comments\n      - common-false-positives\n      - legacy\n      - std-error-handling\n    rules:\n      - linters:\n          - paralleltest\n        text: Function TestAcc\n      - linters:\n          - tparallel\n        text: TestAcc\n      - linters:\n          - unparam\n        text: always receives\n      - linters:\n          - contextcheck\n        path: _test\\.go\n      - linters:\n          - goconst\n        path: (.+)_test\\.go\n      - linters:\n          - staticcheck\n        text: \"ST1003:\"\n      - linters:\n          - staticcheck\n        text: \"SA1019:\"\n        path: internal/types/pgp_public_key.go\n    paths:\n      - third_party$\n      - builtin$\n      - examples$\nissues:\n  max-same-issues: 0\nformatters:\n  enable:\n    - gofmt\n  exclusions:\n    generated: lax\n    paths:\n      - third_party$\n      - builtin$\n      - examples$\n"
  },
  {
    "path": ".goreleaser.yml",
    "content": "---\nversion: 2\nbuilds:\n  - env:\n      - CGO_ENABLED=0\n    mod_timestamp: \"{{ .CommitTimestamp }}\"\n    flags:\n      - -trimpath\n    ldflags:\n      - \"-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}\"\n    targets:\n      - darwin_arm64\n      - darwin_amd64\n      - linux_amd64\n      - linux_arm\n      - linux_arm64\n      - windows_amd64\n      - windows_arm\n      - windows_386\n      - freebsd_amd64\n      - freebsd_arm\n    binary: \"{{ .ProjectName }}_v{{ .Version }}\"\narchives:\n  - formats: [\"zip\"]\n    name_template: \"{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}\"\nchecksum:\n  name_template: \"{{ .ProjectName }}_{{ .Version }}_SHA256SUMS\"\n  algorithm: sha256\nsigns:\n  - artifacts: checksum\n    args:\n      - \"--batch\"\n      - \"--local-user\"\n      - \"{{ .Env.GPG_FINGERPRINT }}\"\n      - \"--output\"\n      - \"${signature}\"\n      - \"--detach-sign\"\n      - \"${artifact}\"\nrelease:\n  draft: false\n  disable: false\n  github:\n    owner: argoproj-labs\n    name: terraform-provider-argocd\nchangelog:\n  use: github-native\n"
  },
  {
    "path": ".run/Template Go Test.run.xml",
    "content": "<component name=\"ProjectRunConfigurationManager\">\n  <configuration default=\"true\" type=\"GoTestRunConfiguration\" factoryName=\"Go Test\">\n    <module name=\"terraform-provider-argocd\" />\n    <working_directory value=\"$PROJECT_DIR$\" />\n    <go_parameters value=\"-i\" />\n    <envs>\n      <env name=\"ARGOCD_VERSION\" value=\"v3.3.0\" />\n      <env name=\"ARGOCD_INSECURE\" value=\"true\" />\n      <env name=\"ARGOCD_SERVER\" value=\"127.0.0.1:8080\" />\n      <env name=\"ARGOCD_AUTH_USERNAME\" value=\"admin\" />\n      <env name=\"ARGOCD_AUTH_PASSWORD\" value=\"acceptancetesting\" />\n      <env name=\"ARGOCD_CONTEXT\" value=\"kind-argocd\" />\n      <env name=\"USE_TESTCONTAINERS\" value=\"true\" />\n      <env name=\"K3S_VERSION\" value=\"v1.34.3-k3s3\" />\n      <env name=\"TF_ACC\" value=\"1\" />\n    </envs>\n    <framework value=\"gotest\" />\n    <kind value=\"DIRECTORY\" />\n    <package value=\"github.com/argoproj-labs/terraform-provider-argocd\" />\n    <directory value=\"$PROJECT_DIR$\" />\n    <filePath value=\"$PROJECT_DIR$\" />\n    <method v=\"2\" />\n  </configuration>\n</component>\n"
  },
  {
    "path": ".vscode/launch.json",
    "content": "{\n  \"version\": \"0.2.0\",\n  \"configurations\": [\n    {\n      \"name\": \"Debug Terraform Provider\",\n      \"type\": \"go\",\n      \"request\": \"launch\",\n      \"mode\": \"debug\",\n      \"outputMode\": \"remote\",\n      \"program\": \"${workspaceFolder}\",\n      \"env\": {},\n      \"args\": [\n        \"-debug\"\n      ]\n    },\n    {\n      \"name\": \"Debug Selected Test\",\n      \"request\": \"launch\",\n      \"type\": \"go\",\n      \"args\": [\n        \"-test.v\",\n        \"-test.run\",\n        \"^${selectedText}$\"\n      ],\n      \"mode\": \"auto\",\n      \"program\": \"${fileDirname}\",\n      \"env\": {\n        \"PKG_NAME\": \"${relativeFileDirname}\",\n        \"TF_ACC\": \"1\",\n        \"TF_LOG\": \"info\",\n        \"ARGOCD_INSECURE\": \"true\",\n        \"ARGOCD_SERVER\": \"127.0.0.1:8080\",\n        \"ARGOCD_AUTH_USERNAME\": \"admin\",\n        \"ARGOCD_AUTH_PASSWORD\": \"acceptancetesting\"\n      },\n      \"showLog\": true\n    }\n  ]\n}\n"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "content": "# Code of conduct\n\nWhile this provider is not a [Cloud Native Computing Foundation](https://www.cncf.io/) (CNCF) project, it supports, endorses, and\nechoes the code of conduct presented by the CNCF. The CNCF code of conduct can be found\n[here](https://github.com/cncf/foundation/blob/main/code-of-conduct.md). Full credit goes to the CNCF project for\nestablishing the linked code of conduct principles.\n\nInstances of behaviors that are not aligned with the values proposed by CNCF can be reported to the repository admins via Github's reporting feature.\nSee [Reporting Abuse or Spam](https://docs.github.com/en/communities/maintaining-your-safety-on-github/reporting-abuse-or-spam) for details how to do so.\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "# Contributing\n\nContributions are welcome! \n\n[![Contributors](https://img.shields.io/github/contributors/argoproj-labs/terraform-provider-argocd)](https://github.com/argoproj-labs/terraform-provider-argocd)\n[![Last commit](https://img.shields.io/github/last-commit/argoproj-labs/terraform-provider-argocd)](https://github.com/argoproj-labs/terraform-provider-argocd)\n[![Stars](https://img.shields.io/github/stars/argoproj-labs/terraform-provider-argocd)](https://github.com/argoproj-labs/hera/terraofrm-provider-argocd)\n\n## New Contributor Guide\n\nIf you are a new contributor this section aims to show you everything you need to get started.\n\nWe especially welcome contributions to issues that are labeled with [\"good-first-issue\"](https://github.com/argoproj-labs/terraform-provider-argocd/issues?q=is%3Aopen%20is%3Aissue%20label%3A%22good%20first%20issue%22)\nor\n[\"help-wanted\"](https://github.com/argoproj-labs/terraform-provider-argocd/issues?q=is%3Aopen%20is%3Aissue%20label%3A%22help%20wanted%22).\n\nWe also encourage contributions in the form of:\n- bug/crash reports\n- Answering questions on [Slack](https://cloud-native.slack.com/archives/C07PQF40SF8)\n- Posting your use-case for the provider on [Slack](https://cloud-native.slack.com/archives/C07PQF40SF8) / Blog Post\n\n### Setting up\n\nTo contribute to this Provider you need the following tools installed locally:\n* [Go](https://go.dev/doc/install) (1.25)\n* [GNU Make](https://www.gnu.org/software/make/)\n* [Kustomize](https://kubectl.docs.kubernetes.io/installation/kustomize/)\n* [Container runtime](https://java.testcontainers.org/supported_docker_environment/)\n* [Kind](https://kind.sigs.k8s.io) (optional)\n* [golangci-lint](https://golangci-lint.run/usage/install/#local-installation) (optional)\n\n#### Codespaces\n\nIf you don't want to install tools locally you can use Github Codespaces to contribute to this project. We have a pre-configured codespace that should have all tools installed already:\n\n[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new/argoproj-labs/terraform-provider-argocd)\n\n## Contributing checklist\n\nPlease keep in mind the following guidelines and practices when contributing to the Provider:\n\n1. Your commit must be signed (`git commit --signoff`). We use the [DCO application](https://github.com/apps/dco)\n   that enforces the Developer Certificate of Origin (DCO) on commits.\n1. Use `make fmt` to format the repository code. \n1. Use `make lint` to lint the project.\n1. Use `make generate` to generate documentation on schema changes\n1. Add unit tests for any new code you write.\n1. Add an example, or extend an existing example in the [examples](./examples), with any new features you may add. Use `make generate` to add examples to the docs\n\n## Building \n\n1. `git clone` this repository and `cd` into its directory\n2. `make build` will trigger the Golang build and place it's binary in `<git-repo-path>/bin/terraform-provider-argocd`\n\nThe provided `GNUmakefile` defines additional commands generally useful during\ndevelopment, like for running tests, generating documentation, code formatting\nand linting. Taking a look at its content is recommended.\n\n## Testing\n\nThe acceptance tests run against a disposable ArgoCD installation within a containerized-K3s cluster. We are using [testcontainers](https://testcontainers.com) for this. If you have a [supported container runtime](https://java.testcontainers.org/supported_docker_environment/) installed you can simply run the tests using:\n\n```sh\nmake testacc # to run all the Terraform tests\nmake test # to only run helper unit tests (minority of the testcases)\n```\n\n## Documentation\n\nThis provider uses [terraform-plugin-docs](https://github.com/hashicorp/terraform-plugin-docs/)\nto generate documentation and store it in the `docs/` directory.\nOnce a release is cut, the Terraform Registry will download the documentation from `docs/`\nand associate it with the release version. Read more about how this works on the\n[official page](https://www.terraform.io/registry/providers/docs).\n\nUse `make generate` to ensure the documentation is regenerated with any changes.\n\n## Debugging\n\nWe have some pre-made config to debug and run the provider using VSCode. If you are using another IDE take a look at [Hashicorp's Debug docs](https://developer.hashicorp.com/terraform/plugin/debugging#starting-a-provider-in-debug-mode) for instructions or adapt [.vscode/launch.json](.vscode/launch.json) for your IDE\n\n### Running the Terraform provider in debug mode (VSCode-specific)\n\nTo use the preconfigured debug config in VS Code open the Debug tab and select the profile \"Debug Terraform Provider\". Set some breakpoints and then run this task. \n\nHead to the debug console and copy the line where it says `TF_REATTACH_PROVIDERS` to the clipboard. \n\nOpen a terminal session and export the `TF_REATTACH_PROVIDERS` variable in this session. Every Terraform CLI command in this terminal session will then ensure it's using the provider already running inside VS Code and attach to it.\n\nExample of such a command:\n\n```console\nexport TF_REATTACH_PROVIDERS='{\"registry.terraform.io/argoproj-labs/argocd\":{\"Protocol\":\"grpc\",\"ProtocolVersion\":6,\"Pid\":2065,\"Test\":true,\"Addr\":{\"Network\":\"unix\",\"String\":\"/var/folders/rj/_02y2jmn3k1bxx45wlzt2dkc0000gn/T/plugin193859953\"}}}' \nterraform apply -auto-approve # will use the provider running in debug-mode\n```\n\n**Note**: if the provider crashes or you restart the debug-session you have to re-export this variable to your terminal for the Terraform CLI to find the already running provider!\n\n### Running acceptance tests in debug mode (VSCode-specific)\n\nOpen a test file, **hover** over a test function's name and then in the Debug tab of VSCode select \"Debug selected Test\". This will run the test you selected with the specific arguments required for Terraform to run the acceptance test.\n\n**Note**: You shouldn't use the builtin \"Debug Test\" profile that is shown when hovering over a test function since it doesn't contain the necessary configuration to find your Argo CD environment.\n\n## Run Terraform using a local build\n\nIt's possible to set up a local terraform configuration to use a development build of the\nprovider. This can be achieved by leveraging the Terraform CLI [configuration\nfile development\noverrides](https://www.terraform.io/cli/config/config-file#development-overrides-for-provider-developers).\n\nFirst, use `make install` to place a fresh development build of the provider in\nyour\n[`${GOBIN}`](https://pkg.go.dev/cmd/go#hdr-Compile_and_install_packages_and_dependencies)\n(defaults to `${GOPATH}/bin` or `${HOME}/go/bin` if `${GOPATH}` is not set).\nRepeat this every time you make changes to the provider locally.\n\nNote: you can also use `make build` to place the binary into `<git-repo-path>/bin/terraform-provider-argocd` instead.\n\n\nThen write this config to a file:\n```hcl filename=\"../reproduce/.terraformrc\"\nprovider_installation {\n  dev_overrides {\n    \"argoproj-labs/argocd\" = \"/Users/username/go/bin\" # path must be absolute and point to the directoy containing the binary\n  }\n\n  direct {}\n}\n```\n\nAnd lastly use the following environment variable in a terminal session to tell Terraform to use this file for picking up the development binary:\n```console\nexport TF_CLI_CONFIG_FILE=../.reproduce/.terraformrc\nterraform plan # will not use the local provider build \n```\n\nFor further reference consult [HashiCorp's article](https://www.terraform.io/plugin/debugging#terraform-cli-development-overrides) about this topic.\n\n## Dependency Management\n\n### K8s version\nIn our CI we test against a Kubernetes version that is supported by all Argo CD versions we support.\n\nThat version can be obtained when looking at [this table](https://argo-cd.readthedocs.io/en/stable/operator-manual/installation/#tested-versions) in the Argo CD documentation.\n\n### Argo CD client-lib\n\nSome dependencies we use are strictly aligned with the Argo CD client-lib that we use and should only be updated together:\n- github.com/argoproj/gitops-engine\n- k8s.io/*\n\nPlease **don't update** any of these dependencies without having discussed this first!\n\n"
  },
  {
    "path": "GNUmakefile",
    "content": "default: build\n\n# To see which other env vars are set, please refer to internal/testhelpers/suite.go\nTEST_FILTER?=\n\nexport\n\nbuild:\n\tgo build -v -o bin/ ./...\n\ninstall: build\n\tgo install -v ./...\n\n# See https://golangci-lint.run/\nlint:\n\tgolangci-lint run\n\ngenerate:\n\tcd tools; go generate ./...\n\nfmt:\n\tgofmt -s -w -e .\n\ntest:\n\tgo test -v -cover -timeout=120s -parallel=4 -run=\"$(TEST_FILTER)\" ./...\n\ntestacc:\n\tTF_ACC=1 go test -v -cover -timeout 20m -run=\"$(TEST_FILTER)\" ./...\n\ntestacc_clean_env:\n\tkind delete cluster --name argocd\n\ntestacc_prepare_env:\n\techo \"\\n--- Clearing current kube context\\n\"\n\tkubectl config unset current-context\n\n\techo \"\\n--- Kustomize sanity checks\\n\"\n\tkustomize version || exit 1\n\n\techo \"\\n--- Create Kind cluster\\n\"\n\tkind create cluster --config kind-config.yml \n\n\techo \"\\n--- Kind sanity checks\\n\"\n\tkubectl get nodes -o wide\n\tkubectl get pods --all-namespaces -o wide\n\tkubectl get services --all-namespaces -o wide\n\n\techo \"\\n--- Install ArgoCD ${ARGOCD_VERSION}\\n\"\n\tkustomize build manifests/overlays/${ARGOCD_VERSION} | kubectl apply --server-side --force-conflicts -f -\n\n\techo \"\\n--- Wait until CRDs are established\\n\"\n\tkubectl wait --for=condition=Established crd/applications.argoproj.io --timeout=60s\n\tkubectl wait --for=condition=Established crd/applicationsets.argoproj.io --timeout=60s\n\tkubectl wait --for=condition=Established crd/appprojects.argoproj.io --timeout=60s\n\n\techo \"\\n--- Install ArgoCD test data\\n\"\n\tkubectl apply -f manifests/testdata/\n\n\techo \"\\n--- Wait for ArgoCD components to be ready...\\n\"\n\tkubectl wait --for=condition=available --timeout=600s deployment/argocd-server -n argocd\n\tkubectl wait --for=condition=available --timeout=30s deployment/argocd-repo-server -n argocd\n\tkubectl wait --for=condition=available --timeout=30s deployment/argocd-dex-server -n argocd\n\tkubectl wait --for=condition=available --timeout=30s deployment/argocd-redis -n argocd\n\t\nclean:\n\tgit clean -fXd -e \\!vendor -e \\!vendor/**/* -e \\!.vscode\n\n.PHONY: build install lint generate fmt test testacc testacc_testcontainers testacc_clean_env testacc_prepare_env clean\n"
  },
  {
    "path": "LICENSE",
    "content": "Mozilla Public License Version 2.0\n==================================\n\n1. Definitions\n--------------\n\n1.1. \"Contributor\"\n    means each individual or legal entity that creates, contributes to\n    the creation of, or owns Covered Software.\n\n1.2. \"Contributor Version\"\n    means the combination of the Contributions of others (if any) used\n    by a Contributor and that particular Contributor's Contribution.\n\n1.3. \"Contribution\"\n    means Covered Software of a particular Contributor.\n\n1.4. \"Covered Software\"\n    means Source Code Form to which the initial Contributor has attached\n    the notice in Exhibit A, the Executable Form of such Source Code\n    Form, and Modifications of such Source Code Form, in each case\n    including portions thereof.\n\n1.5. \"Incompatible With Secondary Licenses\"\n    means\n\n    (a) that the initial Contributor has attached the notice described\n        in Exhibit B to the Covered Software; or\n\n    (b) that the Covered Software was made available under the terms of\n        version 1.1 or earlier of the License, but not also under the\n        terms of a Secondary License.\n\n1.6. \"Executable Form\"\n    means any form of the work other than Source Code Form.\n\n1.7. \"Larger Work\"\n    means a work that combines Covered Software with other material, in\n    a separate file or files, that is not Covered Software.\n\n1.8. \"License\"\n    means this document.\n\n1.9. \"Licensable\"\n    means having the right to grant, to the maximum extent possible,\n    whether at the time of the initial grant or subsequently, any and\n    all of the rights conveyed by this License.\n\n1.10. \"Modifications\"\n    means any of the following:\n\n    (a) any file in Source Code Form that results from an addition to,\n        deletion from, or modification of the contents of Covered\n        Software; or\n\n    (b) any new file in Source Code Form that contains any Covered\n        Software.\n\n1.11. \"Patent Claims\" of a Contributor\n    means any patent claim(s), including without limitation, method,\n    process, and apparatus claims, in any patent Licensable by such\n    Contributor that would be infringed, but for the grant of the\n    License, by the making, using, selling, offering for sale, having\n    made, import, or transfer of either its Contributions or its\n    Contributor Version.\n\n1.12. \"Secondary License\"\n    means either the GNU General Public License, Version 2.0, the GNU\n    Lesser General Public License, Version 2.1, the GNU Affero General\n    Public License, Version 3.0, or any later versions of those\n    licenses.\n\n1.13. \"Source Code Form\"\n    means the form of the work preferred for making modifications.\n\n1.14. \"You\" (or \"Your\")\n    means an individual or a legal entity exercising rights under this\n    License. For legal entities, \"You\" includes any entity that\n    controls, is controlled by, or is under common control with You. For\n    purposes of this definition, \"control\" means (a) the power, direct\n    or indirect, to cause the direction or management of such entity,\n    whether by contract or otherwise, or (b) ownership of more than\n    fifty percent (50%) of the outstanding shares or beneficial\n    ownership of such entity.\n\n2. License Grants and Conditions\n--------------------------------\n\n2.1. Grants\n\nEach Contributor hereby grants You a world-wide, royalty-free,\nnon-exclusive license:\n\n(a) under intellectual property rights (other than patent or trademark)\n    Licensable by such Contributor to use, reproduce, make available,\n    modify, display, perform, distribute, and otherwise exploit its\n    Contributions, either on an unmodified basis, with Modifications, or\n    as part of a Larger Work; and\n\n(b) under Patent Claims of such Contributor to make, use, sell, offer\n    for sale, have made, import, and otherwise transfer either its\n    Contributions or its Contributor Version.\n\n2.2. Effective Date\n\nThe licenses granted in Section 2.1 with respect to any Contribution\nbecome effective for each Contribution on the date the Contributor first\ndistributes such Contribution.\n\n2.3. Limitations on Grant Scope\n\nThe licenses granted in this Section 2 are the only rights granted under\nthis License. No additional rights or licenses will be implied from the\ndistribution or licensing of Covered Software under this License.\nNotwithstanding Section 2.1(b) above, no patent license is granted by a\nContributor:\n\n(a) for any code that a Contributor has removed from Covered Software;\n    or\n\n(b) for infringements caused by: (i) Your and any other third party's\n    modifications of Covered Software, or (ii) the combination of its\n    Contributions with other software (except as part of its Contributor\n    Version); or\n\n(c) under Patent Claims infringed by Covered Software in the absence of\n    its Contributions.\n\nThis License does not grant any rights in the trademarks, service marks,\nor logos of any Contributor (except as may be necessary to comply with\nthe notice requirements in Section 3.4).\n\n2.4. Subsequent Licenses\n\nNo Contributor makes additional grants as a result of Your choice to\ndistribute the Covered Software under a subsequent version of this\nLicense (see Section 10.2) or under the terms of a Secondary License (if\npermitted under the terms of Section 3.3).\n\n2.5. Representation\n\nEach Contributor represents that the Contributor believes its\nContributions are its original creation(s) or it has sufficient rights\nto grant the rights to its Contributions conveyed by this License.\n\n2.6. Fair Use\n\nThis License is not intended to limit any rights You have under\napplicable copyright doctrines of fair use, fair dealing, or other\nequivalents.\n\n2.7. Conditions\n\nSections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted\nin Section 2.1.\n\n3. Responsibilities\n-------------------\n\n3.1. Distribution of Source Form\n\nAll distribution of Covered Software in Source Code Form, including any\nModifications that You create or to which You contribute, must be under\nthe terms of this License. You must inform recipients that the Source\nCode Form of the Covered Software is governed by the terms of this\nLicense, and how they can obtain a copy of this License. You may not\nattempt to alter or restrict the recipients' rights in the Source Code\nForm.\n\n3.2. Distribution of Executable Form\n\nIf You distribute Covered Software in Executable Form then:\n\n(a) such Covered Software must also be made available in Source Code\n    Form, as described in Section 3.1, and You must inform recipients of\n    the Executable Form how they can obtain a copy of such Source Code\n    Form by reasonable means in a timely manner, at a charge no more\n    than the cost of distribution to the recipient; and\n\n(b) You may distribute such Executable Form under the terms of this\n    License, or sublicense it under different terms, provided that the\n    license for the Executable Form does not attempt to limit or alter\n    the recipients' rights in the Source Code Form under this License.\n\n3.3. Distribution of a Larger Work\n\nYou may create and distribute a Larger Work under terms of Your choice,\nprovided that You also comply with the requirements of this License for\nthe Covered Software. If the Larger Work is a combination of Covered\nSoftware with a work governed by one or more Secondary Licenses, and the\nCovered Software is not Incompatible With Secondary Licenses, this\nLicense permits You to additionally distribute such Covered Software\nunder the terms of such Secondary License(s), so that the recipient of\nthe Larger Work may, at their option, further distribute the Covered\nSoftware under the terms of either this License or such Secondary\nLicense(s).\n\n3.4. Notices\n\nYou may not remove or alter the substance of any license notices\n(including copyright notices, patent notices, disclaimers of warranty,\nor limitations of liability) contained within the Source Code Form of\nthe Covered Software, except that You may alter any license notices to\nthe extent required to remedy known factual inaccuracies.\n\n3.5. Application of Additional Terms\n\nYou may choose to offer, and to charge a fee for, warranty, support,\nindemnity or liability obligations to one or more recipients of Covered\nSoftware. However, You may do so only on Your own behalf, and not on\nbehalf of any Contributor. You must make it absolutely clear that any\nsuch warranty, support, indemnity, or liability obligation is offered by\nYou alone, and You hereby agree to indemnify every Contributor for any\nliability incurred by such Contributor as a result of warranty, support,\nindemnity or liability terms You offer. You may include additional\ndisclaimers of warranty and limitations of liability specific to any\njurisdiction.\n\n4. Inability to Comply Due to Statute or Regulation\n---------------------------------------------------\n\nIf it is impossible for You to comply with any of the terms of this\nLicense with respect to some or all of the Covered Software due to\nstatute, judicial order, or regulation then You must: (a) comply with\nthe terms of this License to the maximum extent possible; and (b)\ndescribe the limitations and the code they affect. Such description must\nbe placed in a text file included with all distributions of the Covered\nSoftware under this License. Except to the extent prohibited by statute\nor regulation, such description must be sufficiently detailed for a\nrecipient of ordinary skill to be able to understand it.\n\n5. Termination\n--------------\n\n5.1. The rights granted under this License will terminate automatically\nif You fail to comply with any of its terms. However, if You become\ncompliant, then the rights granted under this License from a particular\nContributor are reinstated (a) provisionally, unless and until such\nContributor explicitly and finally terminates Your grants, and (b) on an\nongoing basis, if such Contributor fails to notify You of the\nnon-compliance by some reasonable means prior to 60 days after You have\ncome back into compliance. Moreover, Your grants from a particular\nContributor are reinstated on an ongoing basis if such Contributor\nnotifies You of the non-compliance by some reasonable means, this is the\nfirst time You have received notice of non-compliance with this License\nfrom such Contributor, and You become compliant prior to 30 days after\nYour receipt of the notice.\n\n5.2. If You initiate litigation against any entity by asserting a patent\ninfringement claim (excluding declaratory judgment actions,\ncounter-claims, and cross-claims) alleging that a Contributor Version\ndirectly or indirectly infringes any patent, then the rights granted to\nYou by any and all Contributors for the Covered Software under Section\n2.1 of this License shall terminate.\n\n5.3. In the event of termination under Sections 5.1 or 5.2 above, all\nend user license agreements (excluding distributors and resellers) which\nhave been validly granted by You or Your distributors under this License\nprior to termination shall survive termination.\n\n************************************************************************\n*                                                                      *\n*  6. Disclaimer of Warranty                                           *\n*  -------------------------                                           *\n*                                                                      *\n*  Covered Software is provided under this License on an \"as is\"       *\n*  basis, without warranty of any kind, either expressed, implied, or  *\n*  statutory, including, without limitation, warranties that the       *\n*  Covered Software is free of defects, merchantable, fit for a        *\n*  particular purpose or non-infringing. The entire risk as to the     *\n*  quality and performance of the Covered Software is with You.        *\n*  Should any Covered Software prove defective in any respect, You     *\n*  (not any Contributor) assume the cost of any necessary servicing,   *\n*  repair, or correction. This disclaimer of warranty constitutes an   *\n*  essential part of this License. No use of any Covered Software is   *\n*  authorized under this License except under this disclaimer.         *\n*                                                                      *\n************************************************************************\n\n************************************************************************\n*                                                                      *\n*  7. Limitation of Liability                                          *\n*  --------------------------                                          *\n*                                                                      *\n*  Under no circumstances and under no legal theory, whether tort      *\n*  (including negligence), contract, or otherwise, shall any           *\n*  Contributor, or anyone who distributes Covered Software as          *\n*  permitted above, be liable to You for any direct, indirect,         *\n*  special, incidental, or consequential damages of any character      *\n*  including, without limitation, damages for lost profits, loss of    *\n*  goodwill, work stoppage, computer failure or malfunction, or any    *\n*  and all other commercial damages or losses, even if such party      *\n*  shall have been informed of the possibility of such damages. This   *\n*  limitation of liability shall not apply to liability for death or   *\n*  personal injury resulting from such party's negligence to the       *\n*  extent applicable law prohibits such limitation. Some               *\n*  jurisdictions do not allow the exclusion or limitation of           *\n*  incidental or consequential damages, so this exclusion and          *\n*  limitation may not apply to You.                                    *\n*                                                                      *\n************************************************************************\n\n8. Litigation\n-------------\n\nAny litigation relating to this License may be brought only in the\ncourts of a jurisdiction where the defendant maintains its principal\nplace of business and such litigation shall be governed by laws of that\njurisdiction, without reference to its conflict-of-law provisions.\nNothing in this Section shall prevent a party's ability to bring\ncross-claims or counter-claims.\n\n9. Miscellaneous\n----------------\n\nThis License represents the complete agreement concerning the subject\nmatter hereof. If any provision of this License is held to be\nunenforceable, such provision shall be reformed only to the extent\nnecessary to make it enforceable. Any law or regulation which provides\nthat the language of a contract shall be construed against the drafter\nshall not be used to construe this License against a Contributor.\n\n10. Versions of the License\n---------------------------\n\n10.1. New Versions\n\nMozilla Foundation is the license steward. Except as provided in Section\n10.3, no one other than the license steward has the right to modify or\npublish new versions of this License. Each version will be given a\ndistinguishing version number.\n\n10.2. Effect of New Versions\n\nYou may distribute the Covered Software under the terms of the version\nof the License under which You originally received the Covered Software,\nor under the terms of any subsequent version published by the license\nsteward.\n\n10.3. Modified Versions\n\nIf you create software not governed by this License, and you want to\ncreate a new license for such software, you may create and use a\nmodified version of this License if you rename the license and remove\nany references to the name of the license steward (except to note that\nsuch modified license differs from this License).\n\n10.4. Distributing Source Code Form that is Incompatible With Secondary\nLicenses\n\nIf You choose to distribute Source Code Form that is Incompatible With\nSecondary Licenses under the terms of this version of the License, the\nnotice described in Exhibit B of this License must be attached.\n\nExhibit A - Source Code Form License Notice\n-------------------------------------------\n\n  This Source Code Form is subject to the terms of the Mozilla Public\n  License, v. 2.0. If a copy of the MPL was not distributed with this\n  file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\nIf it is not possible or desirable to put the notice in a particular\nfile, then You may include the notice in a location (such as a LICENSE\nfile in a relevant directory) where a recipient would be likely to look\nfor such a notice.\n\nYou may add additional accurate notices of copyright ownership.\n\nExhibit B - \"Incompatible With Secondary Licenses\" Notice\n---------------------------------------------------------\n\n  This Source Code Form is \"Incompatible With Secondary Licenses\", as\n  defined by the Mozilla Public License, v. 2.0.\n"
  },
  {
    "path": "README.md",
    "content": "<a href=\"https://terraform.io\">\n    <img src=\".github/tf.png\" alt=\"Terraform logo\" title=\"Terraform\" align=\"left\" height=\"50\" />\n</a>\n\n<a href=\"https://argoproj.github.io/cd\">\n    <img src=\".github/argo-cd.png\" alt=\"Terraform logo\" title=\"Terraform\" align=\"right\" height=\"50\" />\n</a>\n\n# Terraform Provider for ArgoCD\n\n[![Tests](https://github.com/argoproj-labs/terraform-provider-argocd/actions/workflows/tests.yml/badge.svg)](https://github.com/argoproj-labs/terraform-provider-argocd/actions/workflows/tests.yml)\n\nThe [ArgoCD Terraform\nProvider](https://registry.terraform.io/providers/argoproj-labs/argocd/latest/docs)\nprovides lifecycle management of\n[ArgoCD](https://argo-cd.readthedocs.io/en/stable/) resources.\n\n**NB**: The provider is not concerned with the installation/configuration of\nArgoCD itself. To make use of the provider, you will need to have an existing\nArgoCD deployment and, the ArgoCD API server must be\n[accessible](https://argo-cd.readthedocs.io/en/stable/getting_started/#3-access-the-argo-cd-api-server)\nfrom where you are running Terraform.\n\n---\n\n## Documentation\n\nOfficial documentation on how to use this provider can be found on the\n[Terraform\nRegistry](https://registry.terraform.io/providers/argoproj-labs/argocd/latest/docs).\n\n## Version Compatibility \n\nThe provider supports all versions Argo-CD itself currently supports. See the [Argo CD documentation](https://argo-cd.readthedocs.io/en/stable/operator-manual/installation/#supported-versions) for supported versions.\n\nThe following table shows the versions of Argo CD that are tested with each version of the provider.\n\n| Provider version | Argo CD versions |\n|---|---|\n| 7.13 | v3.1, v3.2, v3.3 | \n| 7.12 | v3.0, v3.1, v3.2 | \n| 7.11 | v2.14, v3.0, v3.1 | \n| 7.7 | v2.13, v2.14, v3.0 | \n| 7.5 | v2.12, v2.13, v2.14 | \n| 7.4 | v2.11, v2.12, v2.13 | \n| 7.2 | v2.10, v2.11, v2.12 | \n| 7.1 | v2.9, v2.10, v2.11 | \n| 7.0 | v2.8, v2.9, v2.10 | \n| 6.x | v2.8, v2.9, v2.10 | \n\nNote: these numbers are based on our testing matrix that tests the provider against these versions of Argo CD. You may be able to use other provider versions as the ones listed here and it may still work.\n\n## Motivations\n\n### *I thought ArgoCD already allowed for 100% declarative configuration?*\n\nWhile that is true through the use of ArgoCD Kubernetes Custom Resources, there\nare some resources that simply cannot be managed using Kubernetes manifests,\nsuch as project roles JWTs whose respective lifecycles are better handled by a\ntool like Terraform. Even more so when you need to export these JWTs to another\nexternal system using Terraform, like a CI platform.\n\n### *Wouldn't using a Kubernetes provider to handle ArgoCD configuration be enough?*\n\nExisting Kubernetes providers do not patch arrays of objects, losing project\nrole JWTs when doing small project changes just happen.\n\nArgoCD Kubernetes admission webhook controller is not as exhaustive as ArgoCD\nAPI validation, this can be seen with RBAC policies, where no validation occur\nwhen creating/patching a project.\n\nUsing Terraform to manage Kubernetes Custom Resource becomes increasingly\ndifficult the further you use HCL2 DSL to merge different data structures *and*\nwant to preserve type safety.\n\nWhatever the Kubernetes CRD provider you are using, you will probably end up\nusing `locals` and the `yamlencode` function **which does not preserve the\nvalues' type**. In these cases, not only the readability of your Terraform plan\nwill worsen, but you will also be losing some safeties that Terraform provides\nin the process.\n\n## Upgrading\n\n### Migrate provider source `oboukili` -> `argoproj-labs`\n\nAs announced in the releases [v6.2.0] and [v7.0.0], we moved the provider from \"github.com/**oboukili**/terraform-provider-argocd/\" \nto \"github.com/**argoproj-labs**/terraform-provider-argocd\". Users need to migrate their Terraform state according to\nHashiCorps [replace-provider] docs. In summary, you can do the following:\n\n1. List currently used providers\n\n    ```bash\n    $ terraform providers\n\n    Providers required by configuration:\n    .\n    ├── provider[registry.terraform.io/hashicorp/helm] 2.15.0\n    ├── (..)\n    └── provider[registry.terraform.io/oboukili/argocd] 6.1.1\n\n    Providers required by state:\n\n        (..)\n\n        provider[registry.terraform.io/oboukili/argocd]\n\n        provider[registry.terraform.io/hashicorp/helm]\n    ```\n\n2. **If you see** the provider \"registry.terraform.io/**oboukili**/argocd\", you can update the provider specification:\n\n    ```diff\n    --- a/versions.tf\n    +++ b/versions.tf\n    @@ -5,7 +5,7 @@ terraform {\n        }\n        argocd = {\n    -      source  = \"oboukili/argocd\"\n    +      source  = \"argoproj-labs/argocd\"\n        version = \"6.1.1\"\n        }\n        helm = {\n    ```\n\n3. Download the new provider via `terraform init`:\n\n    ```bash\n    $ terraform init\n    Initializing HCP Terraform...\n    Initializing provider plugins...\n    - Finding (..)\n    - Finding oboukili/argocd versions matching \"6.1.1\"...\n    - Finding latest version of argoproj-labs/argocd...\n    - (..)\n    - Installing oboukili/argocd v6.1.1...\n    - Installed oboukili/argocd v6.1.1 (self-signed, key ID 09A6EABF546E8638)\n    - Installing argoproj-labs/argocd v7.0.0...\n    - Installed argoproj-labs/argocd v7.0.0 (self-signed, key ID 6421DA8DFD8F48D0)\n    (..)\n\n    HCP Terraform has been successfully initialized!\n\n    (..)\n    ```\n\n4. Then, execute the migration via `terraform state replace-provider`:\n\n    ```bash\n    $ terraform state replace-provider registry.terraform.io/oboukili/argocd registry.terraform.io/argoproj-labs/argocd\n    Terraform will perform the following actions:\n\n    ~ Updating provider:\n        - registry.terraform.io/oboukili/argocd\n        + registry.terraform.io/argoproj-labs/argocd\n\n    Changing 5 resources:\n\n    argocd_project.apps_with_clusterroles\n    argocd_application.app_of_apps\n    argocd_project.base\n    argocd_project.apps_restricted\n    argocd_project.core_services_unrestricted\n\n    Do you want to make these changes?\n    Only 'yes' will be accepted to continue.\n\n    Enter a value: yes\n\n    Successfully replaced provider for 5 resources.\n    ```\n\n5. You have successfully migrated\n\n## Credits\n\n* We would like to thank [Olivier Boukili] for creating this awesome Terraform provider and moving the project over to\n  [argoproj-labs] on Apr 5th 2024.\n\n[argoproj-labs]: https://github.com/argoproj-labs\n[Olivier Boukili]: https://github.com/oboukili\n[v6.2.0]: https://github.com/argoproj-labs/terraform-provider-argocd/releases/tag/v6.2.0\n[v7.0.0]: https://github.com/argoproj-labs/terraform-provider-argocd/releases/tag/v7.0.0\n[replace-provider]: https://developer.hashicorp.com/terraform/cli/commands/state/replace-provider\n"
  },
  {
    "path": "RELEASE.md",
    "content": "# Provider release process\n\nOur release process relies on [Goreleaser](https://goreleaser.com) for automatically building provider binaries for all architectures, signing them and generating a Github release with the binaries attached.\n\n## Publishing a new version\n\nOnce the maintainers are ready to publish a new version, they can create a new git tag starting with `v*` and following [semver](https://semver.org). Pushing this tag will trigger a Github action that runs goreleaser.\n\nThey will find a new release with the appropriate version, changelog and attached artifacts on github, that was automatically marked as latest.\n"
  },
  {
    "path": "SECURITY.md",
    "content": "# Security Policy\n\n## Reporting a Vulnerability \n\nWe have enabled the ability to privately report security issues through the  Security tab above.\n\n[Here are the details on how to file a new vulnerability](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability).\n\nA repository owner/maintainer will respond as fast as possible to coordinate confirmation of the issue and remediation.\n\nThank you for helping to ensure this code stays secure!"
  },
  {
    "path": "argocd/model_provider.go",
    "content": "package argocd\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"fmt\"\n\t\"net/url\"\n\n\t\"github.com/argoproj-labs/terraform-provider-argocd/internal/diagnostics\"\n\t\"github.com/argoproj/argo-cd/v3/cmd/argocd/commands/headless\"\n\t\"github.com/argoproj/argo-cd/v3/pkg/apiclient\"\n\t\"github.com/argoproj/argo-cd/v3/pkg/apiclient/session\"\n\t\"github.com/argoproj/argo-cd/v3/util/io\"\n\t\"github.com/argoproj/argo-cd/v3/util/localconfig\"\n\t\"github.com/hashicorp/terraform-plugin-framework/diag\"\n\t\"github.com/hashicorp/terraform-plugin-framework/types\"\n\tapimachineryschema \"k8s.io/apimachinery/pkg/runtime/schema\"\n\t\"k8s.io/apimachinery/pkg/util/runtime\"\n\t\"k8s.io/client-go/rest\"\n\t\"k8s.io/client-go/tools/clientcmd\"\n\t\"k8s.io/client-go/tools/clientcmd/api\"\n)\n\ntype ArgoCDProviderConfig struct {\n\t// Configuration for standard login using either with username/password or auth_token\n\tAuthToken types.String `tfsdk:\"auth_token\"`\n\tUsername  types.String `tfsdk:\"username\"`\n\tPassword  types.String `tfsdk:\"password\"`\n\n\t// When using standard login either server address or port forwarding must be used\n\tServerAddr               types.String `tfsdk:\"server_addr\"`\n\tPortForward              types.Bool   `tfsdk:\"port_forward\"`\n\tPortForwardWithNamespace types.String `tfsdk:\"port_forward_with_namespace\"`\n\tKubernetes               []Kubernetes `tfsdk:\"kubernetes\"`\n\n\t// Run ArgoCD API server locally\n\tCore types.Bool `tfsdk:\"core\"`\n\n\t// Login using credentials from local ArgoCD config file\n\tUseLocalConfig types.Bool   `tfsdk:\"use_local_config\"`\n\tConfigPath     types.String `tfsdk:\"config_path\"`\n\tContext        types.String `tfsdk:\"context\"`\n\n\t// Other configuration\n\tCertFile        types.String `tfsdk:\"cert_file\"`\n\tClientCertFile  types.String `tfsdk:\"client_cert_file\"`\n\tClientCertKey   types.String `tfsdk:\"client_cert_key\"`\n\tGRPCWeb         types.Bool   `tfsdk:\"grpc_web\"`\n\tGRPCWebRootPath types.String `tfsdk:\"grpc_web_root_path\"`\n\tHeaders         types.Set    `tfsdk:\"headers\"`\n\tInsecure        types.Bool   `tfsdk:\"insecure\"`\n\tPlainText       types.Bool   `tfsdk:\"plain_text\"`\n\tUserAgent       types.String `tfsdk:\"user_agent\"`\n}\n\nfunc (p ArgoCDProviderConfig) getApiClientOptions(ctx context.Context) (*apiclient.ClientOptions, diag.Diagnostics) {\n\tvar diags diag.Diagnostics\n\n\topts := &apiclient.ClientOptions{\n\t\tAuthToken:            getDefaultString(p.AuthToken, \"ARGOCD_AUTH_TOKEN\"),\n\t\tCertFile:             p.CertFile.ValueString(),\n\t\tClientCertFile:       p.ClientCertFile.ValueString(),\n\t\tClientCertKeyFile:    p.ClientCertKey.ValueString(),\n\t\tGRPCWeb:              p.GRPCWeb.ValueBool(),\n\t\tGRPCWebRootPath:      p.GRPCWebRootPath.ValueString(),\n\t\tInsecure:             getDefaultBool(ctx, p.Insecure, \"ARGOCD_INSECURE\"),\n\t\tPlainText:            p.PlainText.ValueBool(),\n\t\tPortForward:          p.PortForward.ValueBool(),\n\t\tPortForwardNamespace: p.PortForwardWithNamespace.ValueString(),\n\t\tServerAddr:           getDefaultString(p.ServerAddr, \"ARGOCD_SERVER\"),\n\t\tUserAgent:            p.Username.ValueString(),\n\t}\n\n\tif !p.Headers.IsNull() {\n\t\tvar h []string\n\n\t\tdiags.Append(p.Headers.ElementsAs(ctx, &h, false)...)\n\n\t\topts.Headers = h\n\t}\n\n\tcoreEnabled, d := p.setCoreOpts(opts)\n\n\tdiags.Append(d...)\n\n\tlocalConfigEnabled, d := p.setLocalConfigOpts(opts)\n\n\tdiags.Append(d...)\n\n\tportForwardingEnabled, d := p.setPortForwardingOpts(ctx, opts)\n\n\tdiags.Append(d...)\n\n\tusername := getDefaultString(p.Username, \"ARGOCD_AUTH_USERNAME\")\n\tpassword := getDefaultString(p.Password, \"ARGOCD_AUTH_PASSWORD\")\n\n\tusernameAndPasswordSet := username != \"\" && password != \"\"\n\n\tswitch {\n\t// Provider configuration errors\n\tcase !coreEnabled && !portForwardingEnabled && !localConfigEnabled && opts.ServerAddr == \"\":\n\t\tdiags.Append(diagnostics.Error(\"invalid provider configuration: one of `core,port_forward,port_forward_with_namespace,use_local_config,server_addr` must be specified\", nil)...)\n\tcase portForwardingEnabled && opts.AuthToken == \"\" && !usernameAndPasswordSet:\n\t\tdiags.Append(diagnostics.Error(\"invalid provider configuration: either `username/password` or `auth_token` must be specified when port forwarding is enabled\", nil)...)\n\tcase opts.ServerAddr != \"\" && !coreEnabled && opts.AuthToken == \"\" && !usernameAndPasswordSet:\n\t\tdiags.Append(diagnostics.Error(\"invalid provider configuration: either `username/password` or `auth_token` must be specified if `server_addr` is specified\", nil)...)\n\t}\n\n\tif diags.HasError() {\n\t\treturn nil, diags\n\t}\n\n\tswitch {\n\t// Handle \"special\" configuration use-cases\n\tcase coreEnabled:\n\t\t// HACK: `headless.StartLocalServer` manipulates this global variable\n\t\t// when starting the local server without checking it's length/contents\n\t\t// which leads to a panic if called multiple times. So, we need to\n\t\t// ensure we \"reset\" it before calling the method.\n\t\tif runtimeErrorHandlers == nil {\n\t\t\truntimeErrorHandlers = runtime.ErrorHandlers\n\t\t} else {\n\t\t\truntime.ErrorHandlers = runtimeErrorHandlers\n\t\t}\n\n\t\t_, err := headless.MaybeStartLocalServer(ctx, opts, \"\", nil, nil, nil)\n\t\tif err != nil {\n\t\t\tdiags.Append(diagnostics.Error(\"failed to start local server\", err)...)\n\t\t\treturn nil, diags\n\t\t}\n\tcase opts.ServerAddr != \"\" && opts.AuthToken == \"\" && usernameAndPasswordSet:\n\t\tapiClient, err := apiclient.NewClient(opts)\n\t\tif err != nil {\n\t\t\tdiags.Append(diagnostics.Error(\"failed to create new API client\", err)...)\n\t\t\treturn nil, diags\n\t\t}\n\n\t\tcloser, sc, err := apiClient.NewSessionClient()\n\t\tif err != nil {\n\t\t\tdiags.Append(diagnostics.Error(\"failed to create new session client\", err)...)\n\t\t\treturn nil, diags\n\t\t}\n\n\t\tdefer io.Close(closer)\n\n\t\tsessionOpts := session.SessionCreateRequest{\n\t\t\tUsername: username,\n\t\t\tPassword: password,\n\t\t}\n\n\t\tresp, err := sc.Create(ctx, &sessionOpts)\n\t\tif err != nil {\n\t\t\tdiags.Append(diagnostics.Error(\"failed to create new session\", err)...)\n\t\t\treturn nil, diags\n\t\t}\n\n\t\topts.AuthToken = resp.Token\n\t}\n\n\treturn opts, diags\n}\n\nfunc (p ArgoCDProviderConfig) setCoreOpts(opts *apiclient.ClientOptions) (bool, diag.Diagnostics) {\n\tvar diags diag.Diagnostics\n\n\tcoreEnabled := p.Core.ValueBool()\n\tif coreEnabled {\n\t\tif opts.ServerAddr != \"\" {\n\t\t\tdiags.AddWarning(\"`server_addr` is ignored by the provider and overwritten when `core = true`.\", \"\")\n\t\t}\n\n\t\topts.ServerAddr = \"kubernetes\"\n\t\topts.Core = true\n\n\t\tif !p.Username.IsNull() {\n\t\t\tdiags.AddWarning(\"`username` is ignored when `core = true`.\", \"\")\n\t\t}\n\t}\n\n\treturn coreEnabled, diags\n}\n\nfunc (p ArgoCDProviderConfig) setLocalConfigOpts(opts *apiclient.ClientOptions) (bool, diag.Diagnostics) {\n\tvar diags diag.Diagnostics\n\n\tuseLocalConfig := p.UseLocalConfig.ValueBool()\n\tswitch useLocalConfig {\n\tcase true:\n\t\tif opts.ServerAddr != \"\" {\n\t\t\tdiags.AddWarning(\"setting `server_addr` alongside `use_local_config = true` is unnecessary and not recommended as this will overwrite the address retrieved from the local ArgoCD context.\", \"\")\n\t\t}\n\n\t\tif !p.Username.IsNull() {\n\t\t\tdiags.AddWarning(\"`username` is ignored when `use_local_config = true`.\", \"\")\n\t\t}\n\n\t\topts.Context = getDefaultString(p.Context, \"ARGOCD_CONTEXT\")\n\n\t\tcp := getDefaultString(p.ConfigPath, \"ARGOCD_CONFIG_PATH\")\n\n\t\tif cp != \"\" {\n\t\t\topts.ConfigPath = p.ConfigPath.ValueString()\n\t\t\tbreak\n\t\t}\n\n\t\tcp, err := localconfig.DefaultLocalConfigPath()\n\t\tif err == nil {\n\t\t\topts.ConfigPath = cp\n\t\t\tbreak\n\t\t}\n\n\t\tdiags.Append(diagnostics.Error(\"failed to find default ArgoCD config path\", err)...)\n\tcase false:\n\t\t// Log warnings if explicit configuration has been provided for local config when `use_local_config` is not enabled.\n\t\tif !p.ConfigPath.IsNull() {\n\t\t\tdiags.AddWarning(\"`config_path` is ignored by provider unless `use_local_config = true`.\", \"\")\n\t\t}\n\n\t\tif !p.Context.IsNull() {\n\t\t\tdiags.AddWarning(\"`context` is ignored by provider unless `use_local_config = true`.\", \"\")\n\t\t}\n\t}\n\n\treturn useLocalConfig, diags\n}\n\nfunc (p ArgoCDProviderConfig) setPortForwardingOpts(ctx context.Context, opts *apiclient.ClientOptions) (bool, diag.Diagnostics) {\n\tvar diags diag.Diagnostics\n\n\tportForwardingEnabled := opts.PortForward || opts.PortForwardNamespace != \"\"\n\tswitch portForwardingEnabled {\n\tcase true:\n\t\tif opts.ServerAddr != \"\" {\n\t\t\tdiags.AddWarning(\"`server_addr` is ignored by the provider and overwritten when port forwarding is enabled.\", \"\")\n\t\t}\n\n\t\topts.ServerAddr = \"localhost\" // will be overwritten by ArgoCD module when we initialize the API client but needs to be set here to ensure we\n\t\topts.ServerName = \"argocd-server\"\n\n\t\tif opts.PortForwardNamespace == \"\" {\n\t\t\topts.PortForwardNamespace = \"argocd\"\n\t\t}\n\n\t\tif p.Kubernetes == nil {\n\t\t\tbreak\n\t\t}\n\n\t\tk := p.Kubernetes[0]\n\t\topts.KubeOverrides = &clientcmd.ConfigOverrides{\n\t\t\tAuthInfo: api.AuthInfo{\n\t\t\t\tClientCertificateData: bytes.NewBufferString(getDefaultString(k.ClientCertificate, \"KUBE_CLIENT_CERT_DATA\")).Bytes(),\n\t\t\t\tUsername:              getDefaultString(k.Username, \"KUBE_USER\"),\n\t\t\t\tPassword:              getDefaultString(k.Password, \"KUBE_PASSWORD\"),\n\t\t\t\tClientKeyData:         bytes.NewBufferString(getDefaultString(k.ClientKey, \"KUBE_CLIENT_KEY_DATA\")).Bytes(),\n\t\t\t\tToken:                 getDefaultString(k.Token, \"KUBE_TOKEN\"),\n\t\t\t},\n\t\t\tClusterInfo: api.Cluster{\n\t\t\t\tInsecureSkipTLSVerify:    getDefaultBool(ctx, k.Insecure, \"KUBE_INSECURE\"),\n\t\t\t\tCertificateAuthorityData: bytes.NewBufferString(getDefaultString(k.ClusterCACertificate, \"KUBE_CLUSTER_CA_CERT_DATA\")).Bytes(),\n\t\t\t},\n\t\t\tCurrentContext: getDefaultString(k.ConfigContext, \"KUBE_CTX\"),\n\t\t\tContext: api.Context{\n\t\t\t\tAuthInfo: getDefaultString(k.ConfigContextAuthInfo, \"KUBE_CTX_AUTH_INFO\"),\n\t\t\t\tCluster:  getDefaultString(k.ConfigContextCluster, \"KUBE_CTX_CLUSTER\"),\n\t\t\t},\n\t\t}\n\n\t\th := getDefaultString(k.Host, \"KUBE_HOST\")\n\t\tif h != \"\" {\n\t\t\t// Server has to be the complete address of the Kubernetes cluster (scheme://hostname:port), not just the hostname,\n\t\t\t// because `overrides` are processed too late to be taken into account by `defaultServerUrlFor()`.\n\t\t\t// This basically replicates what defaultServerUrlFor() does with config but for overrides,\n\t\t\t// see https://github.com/Kubernetes/client-go/blob/v12.0.0/rest/url_utils.go#L85-L87\n\t\t\thasCA := len(opts.KubeOverrides.ClusterInfo.CertificateAuthorityData) != 0\n\t\t\thasCert := len(opts.KubeOverrides.AuthInfo.ClientCertificateData) != 0\n\t\t\tdefaultTLS := hasCA || hasCert || opts.KubeOverrides.ClusterInfo.InsecureSkipTLSVerify\n\n\t\t\tvar host *url.URL\n\n\t\t\thost, _, err := rest.DefaultServerURL(h, \"\", apimachineryschema.GroupVersion{}, defaultTLS)\n\t\t\tif err == nil {\n\t\t\t\topts.KubeOverrides.ClusterInfo.Server = host.String()\n\t\t\t} else {\n\t\t\t\tdiags.Append(diagnostics.Error(fmt.Sprintf(\"failed to extract default server URL for host %s\", h), err)...)\n\t\t\t}\n\t\t}\n\n\t\tif k.Exec == nil {\n\t\t\tbreak\n\t\t}\n\n\t\te := k.Exec[0]\n\t\texec := &api.ExecConfig{\n\t\t\tInteractiveMode: api.IfAvailableExecInteractiveMode,\n\t\t\tAPIVersion:      e.APIVersion.ValueString(),\n\t\t\tCommand:         e.Command.ValueString(),\n\t\t}\n\n\t\tvar a []string\n\n\t\tdiags.Append(e.Args.ElementsAs(ctx, &a, false)...)\n\t\texec.Args = a\n\n\t\tvar env map[string]string\n\n\t\tdiags.Append(e.Env.ElementsAs(ctx, &env, false)...)\n\n\t\tfor k, v := range env {\n\t\t\texec.Env = append(exec.Env, api.ExecEnvVar{Name: k, Value: v})\n\t\t}\n\n\t\topts.KubeOverrides.AuthInfo.Exec = exec\n\tcase false:\n\t\tif p.Kubernetes != nil {\n\t\t\tdiags.AddWarning(\"`Kubernetes` configuration block is ignored by provider unless `port_forward` or `port_forward_with_namespace` are configured.\", \"\")\n\t\t}\n\t}\n\n\treturn portForwardingEnabled, diags\n}\n\ntype Kubernetes struct {\n\tHost                  types.String     `tfsdk:\"host\"`\n\tUsername              types.String     `tfsdk:\"username\"`\n\tPassword              types.String     `tfsdk:\"password\"`\n\tInsecure              types.Bool       `tfsdk:\"insecure\"`\n\tClientCertificate     types.String     `tfsdk:\"client_certificate\"`\n\tClientKey             types.String     `tfsdk:\"client_key\"`\n\tClusterCACertificate  types.String     `tfsdk:\"cluster_ca_certificate\"`\n\tConfigContext         types.String     `tfsdk:\"config_context\"`\n\tConfigContextAuthInfo types.String     `tfsdk:\"config_context_auth_info\"`\n\tConfigContextCluster  types.String     `tfsdk:\"config_context_cluster\"`\n\tToken                 types.String     `tfsdk:\"token\"`\n\tExec                  []KubernetesExec `tfsdk:\"exec\"`\n}\n\ntype KubernetesExec struct {\n\tAPIVersion types.String `tfsdk:\"api_version\"`\n\tCommand    types.String `tfsdk:\"command\"`\n\tEnv        types.Map    `tfsdk:\"env\"`\n\tArgs       types.List   `tfsdk:\"args\"`\n}\n"
  },
  {
    "path": "argocd/provider.go",
    "content": "package argocd\n\nimport (\n\t\"context\"\n\t\"sync\"\n\n\tfwdiag \"github.com/hashicorp/terraform-plugin-framework/diag\"\n\t\"github.com/hashicorp/terraform-plugin-framework/types\"\n\t\"github.com/hashicorp/terraform-plugin-sdk/v2/diag\"\n\t\"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema\"\n\n\t// Import to initialize client auth plugins.\n\n\t_ \"k8s.io/client-go/plugin/pkg/client/auth\"\n)\n\n// Used to handle concurrent access to ArgoCD common configuration\nvar tokenMutexConfiguration = &sync.RWMutex{}\n\n// Used to handle concurrent access to ArgoCD clusters\nvar tokenMutexClusters = &sync.RWMutex{}\n\n// Used to handle concurrent access to ArgoCD secrets\nvar tokenMutexSecrets = &sync.RWMutex{}\n\nfunc Provider() *schema.Provider {\n\treturn &schema.Provider{\n\t\tSchema: map[string]*schema.Schema{\n\t\t\t\"server_addr\": {\n\t\t\t\tType:        schema.TypeString,\n\t\t\t\tOptional:    true,\n\t\t\t\tDescription: \"ArgoCD server address with port. Can be set through the `ARGOCD_SERVER` environment variable.\",\n\t\t\t},\n\t\t\t\"auth_token\": {\n\t\t\t\tType:        schema.TypeString,\n\t\t\t\tOptional:    true,\n\t\t\t\tDescription: \"ArgoCD authentication token, takes precedence over `username`/`password`. Can be set through the `ARGOCD_AUTH_TOKEN` environment variable.\",\n\t\t\t\tSensitive:   true,\n\t\t\t},\n\t\t\t\"username\": {\n\t\t\t\tType:        schema.TypeString,\n\t\t\t\tOptional:    true,\n\t\t\t\tDescription: \"Authentication username. Can be set through the `ARGOCD_AUTH_USERNAME` environment variable.\",\n\t\t\t},\n\t\t\t\"password\": {\n\t\t\t\tType:        schema.TypeString,\n\t\t\t\tOptional:    true,\n\t\t\t\tDescription: \"Authentication password. Can be set through the `ARGOCD_AUTH_PASSWORD` environment variable.\",\n\t\t\t\tSensitive:   true,\n\t\t\t},\n\t\t\t\"cert_file\": {\n\t\t\t\tType:        schema.TypeString,\n\t\t\t\tOptional:    true,\n\t\t\t\tDescription: \"Additional root CA certificates file to add to the client TLS connection pool.\",\n\t\t\t},\n\t\t\t\"client_cert_file\": {\n\t\t\t\tType:        schema.TypeString,\n\t\t\t\tOptional:    true,\n\t\t\t\tDescription: \"Client certificate.\",\n\t\t\t},\n\t\t\t\"client_cert_key\": {\n\t\t\t\tType:        schema.TypeString,\n\t\t\t\tOptional:    true,\n\t\t\t\tDescription: \"Client certificate key.\",\n\t\t\t},\n\t\t\t\"plain_text\": {\n\t\t\t\tType:        schema.TypeBool,\n\t\t\t\tOptional:    true,\n\t\t\t\tDescription: \"Whether to initiate an unencrypted connection to ArgoCD server.\",\n\t\t\t},\n\t\t\t\"context\": {\n\t\t\t\tType:        schema.TypeString,\n\t\t\t\tOptional:    true,\n\t\t\t\tDescription: \"Context to choose when using a local ArgoCD config file. Only relevant when `use_local_config`. Can be set through `ARGOCD_CONTEXT` environment variable.\",\n\t\t\t},\n\t\t\t\"user_agent\": {\n\t\t\t\tType:        schema.TypeString,\n\t\t\t\tOptional:    true,\n\t\t\t\tDescription: \"User-Agent request header override.\",\n\t\t\t},\n\t\t\t\"core\": {\n\t\t\t\tType:     schema.TypeBool,\n\t\t\t\tOptional: true,\n\t\t\t\tDescription: \"Configure direct access using Kubernetes API server.\\n\\n  \" +\n\t\t\t\t\t\"**Warning**: this feature works by starting a local ArgoCD API server that talks directly to the Kubernetes API using the **current context \" +\n\t\t\t\t\t\"in the default kubeconfig** (`~/.kube/config`). This behavior cannot be overridden using either environment variables or the `kubernetes` block \" +\n\t\t\t\t\t\"in the provider configuration at present).\\n\\n  If the server fails to start (e.g. your kubeconfig is misconfigured) then the provider will \" +\n\t\t\t\t\t\"fail as a result of the `argocd` module forcing it to exit and no logs will be available to help you debug this. The error message will be \" +\n\t\t\t\t\t\"similar to\\n  > `The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ReadResource call. The plugin logs may \" +\n\t\t\t\t\t\"contain more details.`\\n\\n  To debug this, you will need to login via the ArgoCD CLI using `argocd login --core` and then running an operation. \" +\n\t\t\t\t\t\"E.g. `argocd app list`.\",\n\t\t\t},\n\t\t\t\"grpc_web\": {\n\t\t\t\tType:        schema.TypeBool,\n\t\t\t\tOptional:    true,\n\t\t\t\tDescription: \"Whether to use gRPC web proxy client. Useful if Argo CD server is behind proxy which does not support HTTP2.\",\n\t\t\t},\n\t\t\t\"grpc_web_root_path\": {\n\t\t\t\tType:        schema.TypeString,\n\t\t\t\tOptional:    true,\n\t\t\t\tDescription: \"Use the gRPC web proxy client and set the web root, e.g. `argo-cd`. Useful if the Argo CD server is behind a proxy at a non-root path.\",\n\t\t\t},\n\t\t\t\"use_local_config\": {\n\t\t\t\tType:        schema.TypeBool,\n\t\t\t\tOptional:    true,\n\t\t\t\tDescription: \"Use the authentication settings found in the local config file. Useful when you have previously logged in using SSO. Conflicts with `auth_token`, `username` and `password`.\",\n\t\t\t},\n\t\t\t\"config_path\": {\n\t\t\t\tType:        schema.TypeString,\n\t\t\t\tOptional:    true,\n\t\t\t\tDescription: \"Override the default config path of `$HOME/.config/argocd/config`. Only relevant when `use_local_config`. Can be set through the `ARGOCD_CONFIG_PATH` environment variable.\",\n\t\t\t},\n\t\t\t\"port_forward\": {\n\t\t\t\tType:        schema.TypeBool,\n\t\t\t\tDescription: \"Connect to a random argocd-server port using port forwarding.\",\n\t\t\t\tOptional:    true,\n\t\t\t},\n\t\t\t\"port_forward_with_namespace\": {\n\t\t\t\tType:        schema.TypeString,\n\t\t\t\tDescription: \"Namespace name which should be used for port forwarding.\",\n\t\t\t\tOptional:    true,\n\t\t\t},\n\t\t\t\"headers\": {\n\t\t\t\tType:        schema.TypeSet,\n\t\t\t\tOptional:    true,\n\t\t\t\tDescription: \"Additional headers to add to each request to the ArgoCD server.\",\n\t\t\t\tElem:        &schema.Schema{Type: schema.TypeString},\n\t\t\t},\n\t\t\t\"insecure\": {\n\t\t\t\tType:        schema.TypeBool,\n\t\t\t\tOptional:    true,\n\t\t\t\tDescription: \"Whether to skip TLS server certificate. Can be set through the `ARGOCD_INSECURE` environment variable.\",\n\t\t\t},\n\t\t\t\"kubernetes\": {\n\t\t\t\tType:        schema.TypeList,\n\t\t\t\tMaxItems:    1,\n\t\t\t\tOptional:    true,\n\t\t\t\tDescription: \"Kubernetes configuration overrides.  Only relevant when `port_forward = true` or `port_forward_with_namespace = \\\"foo\\\"`. The kubeconfig file that is used can be overridden using the [`KUBECONFIG` environment variable](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#the-kubeconfig-environment-variable)).\",\n\t\t\t\tElem:        kubernetesResource(),\n\t\t\t},\n\t\t},\n\n\t\tResourcesMap: map[string]*schema.Resource{\n\t\t\t\"argocd_account_token\":   resourceArgoCDAccountToken(),\n\t\t\t\"argocd_application\":     resourceArgoCDApplication(),\n\t\t\t\"argocd_application_set\": resourceArgoCDApplicationSet(),\n\t\t\t\"argocd_cluster\":         resourceArgoCDCluster(),\n\t\t},\n\t\tConfigureContextFunc: func(ctx context.Context, d *schema.ResourceData) (interface{}, diag.Diagnostics) {\n\t\t\tconfig, diags := argoCDProviderConfigFromResourceData(ctx, d)\n\n\t\t\tserver := NewServerInterface(config)\n\n\t\t\treturn server, diags\n\t\t},\n\t}\n}\n\nfunc kubernetesResource() *schema.Resource {\n\treturn &schema.Resource{\n\t\tSchema: map[string]*schema.Schema{\n\t\t\t\"host\": {\n\t\t\t\tType:        schema.TypeString,\n\t\t\t\tOptional:    true,\n\t\t\t\tDescription: \"The hostname (in form of URI) of the Kubernetes API. Can be sourced from `KUBE_HOST`.\",\n\t\t\t},\n\t\t\t\"username\": {\n\t\t\t\tType:        schema.TypeString,\n\t\t\t\tOptional:    true,\n\t\t\t\tDescription: \"The username to use for HTTP basic authentication when accessing the Kubernetes API. Can be sourced from `KUBE_USER`.\",\n\t\t\t},\n\t\t\t\"password\": {\n\t\t\t\tType:        schema.TypeString,\n\t\t\t\tOptional:    true,\n\t\t\t\tDescription: \"The password to use for HTTP basic authentication when accessing the Kubernetes API. Can be sourced from `KUBE_PASSWORD`.\",\n\t\t\t\tSensitive:   true,\n\t\t\t},\n\t\t\t\"insecure\": {\n\t\t\t\tType:        schema.TypeBool,\n\t\t\t\tOptional:    true,\n\t\t\t\tDescription: \"Whether server should be accessed without verifying the TLS certificate. Can be sourced from `KUBE_INSECURE`.\",\n\t\t\t},\n\t\t\t\"client_certificate\": {\n\t\t\t\tType:        schema.TypeString,\n\t\t\t\tOptional:    true,\n\t\t\t\tDescription: \"PEM-encoded client certificate for TLS authentication. Can be sourced from `KUBE_CLIENT_CERT_DATA`.\",\n\t\t\t},\n\t\t\t\"client_key\": {\n\t\t\t\tType:        schema.TypeString,\n\t\t\t\tOptional:    true,\n\t\t\t\tDescription: \"PEM-encoded client certificate key for TLS authentication. Can be sourced from `KUBE_CLIENT_KEY_DATA`.\",\n\t\t\t\tSensitive:   true,\n\t\t\t},\n\t\t\t\"cluster_ca_certificate\": {\n\t\t\t\tType:        schema.TypeString,\n\t\t\t\tOptional:    true,\n\t\t\t\tDescription: \"PEM-encoded root certificates bundle for TLS authentication. Can be sourced from `KUBE_CLUSTER_CA_CERT_DATA`.\",\n\t\t\t},\n\t\t\t\"config_context\": {\n\t\t\t\tType:        schema.TypeString,\n\t\t\t\tOptional:    true,\n\t\t\t\tDescription: \"Context to choose from the config file. Can be sourced from `KUBE_CTX`.\",\n\t\t\t},\n\t\t\t\"config_context_auth_info\": {\n\t\t\t\tType:        schema.TypeString,\n\t\t\t\tOptional:    true,\n\t\t\t\tDescription: \"\",\n\t\t\t},\n\t\t\t\"config_context_cluster\": {\n\t\t\t\tType:        schema.TypeString,\n\t\t\t\tOptional:    true,\n\t\t\t\tDescription: \"\",\n\t\t\t},\n\t\t\t\"token\": {\n\t\t\t\tType:        schema.TypeString,\n\t\t\t\tOptional:    true,\n\t\t\t\tDescription: \"Token to authenticate an service account. Can be sourced from `KUBE_TOKEN`.\",\n\t\t\t\tSensitive:   true,\n\t\t\t},\n\t\t\t\"exec\": {\n\t\t\t\tType:        schema.TypeList,\n\t\t\t\tOptional:    true,\n\t\t\t\tMaxItems:    1,\n\t\t\t\tDescription: \"Configuration block to use an [exec-based credential plugin](https://kubernetes.io/docs/reference/access-authn-authz/authentication/#client-go-credential-plugins), e.g. call an external command to receive user credentials.\",\n\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\"api_version\": {\n\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\tRequired:    true,\n\t\t\t\t\t\t\tDescription: \"API version to use when decoding the ExecCredentials resource, e.g. `client.authentication.k8s.io/v1beta1`.\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"command\": {\n\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\tRequired:    true,\n\t\t\t\t\t\t\tDescription: \"Command to execute.\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"env\": {\n\t\t\t\t\t\t\tType:        schema.TypeMap,\n\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\tDescription: \"List of arguments to pass when executing the plugin.\",\n\t\t\t\t\t\t\tElem:        &schema.Schema{Type: schema.TypeString},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"args\": {\n\t\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\tDescription: \"Map of environment variables to set when executing the plugin.\",\n\t\t\t\t\t\t\tElem:        &schema.Schema{Type: schema.TypeString},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc argoCDProviderConfigFromResourceData(ctx context.Context, d *schema.ResourceData) (ArgoCDProviderConfig, diag.Diagnostics) {\n\tc := ArgoCDProviderConfig{\n\t\tAuthToken:                getStringFromResourceData(d, \"auth_token\"),\n\t\tCertFile:                 getStringFromResourceData(d, \"cert_file\"),\n\t\tClientCertFile:           getStringFromResourceData(d, \"client_cert_file\"),\n\t\tClientCertKey:            getStringFromResourceData(d, \"client_cert_key\"),\n\t\tConfigPath:               getStringFromResourceData(d, \"config_path\"),\n\t\tContext:                  getStringFromResourceData(d, \"context\"),\n\t\tCore:                     getBoolFromResourceData(d, \"core\"),\n\t\tGRPCWeb:                  getBoolFromResourceData(d, \"grpc_web\"),\n\t\tGRPCWebRootPath:          getStringFromResourceData(d, \"grpc_web_root_path\"),\n\t\tInsecure:                 getBoolFromResourceData(d, \"insecure\"),\n\t\tPassword:                 getStringFromResourceData(d, \"password\"),\n\t\tPlainText:                getBoolFromResourceData(d, \"plain_text\"),\n\t\tPortForward:              getBoolFromResourceData(d, \"port_forward\"),\n\t\tPortForwardWithNamespace: getStringFromResourceData(d, \"port_forward_with_namespace\"),\n\t\tServerAddr:               getStringFromResourceData(d, \"server_addr\"),\n\t\tUseLocalConfig:           getBoolFromResourceData(d, \"use_local_config\"),\n\t\tUserAgent:                getStringFromResourceData(d, \"user_agent\"),\n\t\tUsername:                 getStringFromResourceData(d, \"username\"),\n\t}\n\n\theaders, diags := getStringSetFromResourceData(ctx, d, \"headers\")\n\tc.Headers = headers\n\n\tk8s, ds := kubernetesConfigFromResourceData(ctx, d)\n\tc.Kubernetes = k8s\n\n\tdiags.Append(ds...)\n\n\treturn c, pluginSDKDiags(diags)\n}\n\nfunc kubernetesConfigFromResourceData(ctx context.Context, d *schema.ResourceData) ([]Kubernetes, fwdiag.Diagnostics) {\n\tif _, ok := d.GetOk(\"kubernetes\"); !ok {\n\t\treturn nil, nil\n\t}\n\n\tk8s := Kubernetes{\n\t\tClientCertificate:     getStringFromResourceData(d, \"kubernetes.0.client_certificate\"),\n\t\tClientKey:             getStringFromResourceData(d, \"kubernetes.0.client_key\"),\n\t\tClusterCACertificate:  getStringFromResourceData(d, \"kubernetes.0.cluster_ca_certificate\"),\n\t\tConfigContext:         getStringFromResourceData(d, \"kubernetes.0.config_context\"),\n\t\tConfigContextAuthInfo: getStringFromResourceData(d, \"kubernetes.0.config_context_auth_info\"),\n\t\tConfigContextCluster:  getStringFromResourceData(d, \"kubernetes.0.config_context_cluster\"),\n\t\tHost:                  getStringFromResourceData(d, \"kubernetes.0.host\"),\n\t\tInsecure:              getBoolFromResourceData(d, \"kubernetes.0.insecure\"),\n\t\tPassword:              getStringFromResourceData(d, \"kubernetes.0.password\"),\n\t\tToken:                 getStringFromResourceData(d, \"kubernetes.0.token\"),\n\t\tUsername:              getStringFromResourceData(d, \"kubernetes.0.username\"),\n\t}\n\n\tvar diags fwdiag.Diagnostics\n\n\tk8s.Exec, diags = kubernetesExecConfigFromResourceData(ctx, d)\n\n\treturn []Kubernetes{k8s}, diags\n}\n\nfunc kubernetesExecConfigFromResourceData(ctx context.Context, d *schema.ResourceData) ([]KubernetesExec, fwdiag.Diagnostics) {\n\tif _, ok := d.GetOk(\"kubernetes.0.exec\"); !ok {\n\t\treturn nil, nil\n\t}\n\n\texec := KubernetesExec{\n\t\tAPIVersion: getStringFromResourceData(d, \"kubernetes.0.exec.0.api_version\"),\n\t\tCommand:    getStringFromResourceData(d, \"kubernetes.0.exec.0.command\"),\n\t}\n\n\targs, diags := getStringListFromResourceData(ctx, d, \"kubernetes.0.exec.0.args\")\n\texec.Args = args\n\n\tenv, ds := getStringMapFromResourceData(ctx, d, \"kubernetes.0.exec.0.env\")\n\texec.Env = env\n\n\tdiags.Append(ds...)\n\n\treturn []KubernetesExec{exec}, diags\n}\n\nfunc getStringFromResourceData(d *schema.ResourceData, key string) types.String {\n\tif v, ok := d.GetOk(key); ok {\n\t\treturn types.StringValue(v.(string))\n\t}\n\n\treturn types.StringNull()\n}\n\nfunc getBoolFromResourceData(d *schema.ResourceData, key string) types.Bool {\n\tif v, ok := d.GetOk(key); ok {\n\t\treturn types.BoolValue(v.(bool))\n\t}\n\n\treturn types.BoolNull()\n}\n\nfunc getStringListFromResourceData(ctx context.Context, d *schema.ResourceData, key string) (types.List, fwdiag.Diagnostics) {\n\tif v, ok := d.GetOk(key); ok {\n\t\treturn types.ListValueFrom(ctx, types.StringType, v.([]interface{}))\n\t}\n\n\treturn types.ListNull(types.StringType), nil\n}\n\nfunc getStringMapFromResourceData(ctx context.Context, d *schema.ResourceData, key string) (types.Map, fwdiag.Diagnostics) {\n\tif v, ok := d.GetOk(key); ok {\n\t\treturn types.MapValueFrom(ctx, types.StringType, v.(map[string]interface{}))\n\t}\n\n\treturn types.MapNull(types.StringType), nil\n}\n\nfunc getStringSetFromResourceData(ctx context.Context, d *schema.ResourceData, key string) (types.Set, fwdiag.Diagnostics) {\n\tif v, ok := d.GetOk(key); ok {\n\t\treturn types.SetValueFrom(ctx, types.StringType, v.(*schema.Set).List())\n\t}\n\n\treturn types.SetNull(types.StringType), nil\n}\n"
  },
  {
    "path": "argocd/provider_test.go",
    "content": "package argocd\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"os\"\n\t\"testing\"\n\n\t\"github.com/Masterminds/semver/v3\"\n\t\"github.com/argoproj-labs/terraform-provider-argocd/internal/features\"\n\t\"github.com/argoproj-labs/terraform-provider-argocd/internal/provider\"\n\t\"github.com/argoproj-labs/terraform-provider-argocd/internal/testhelpers\"\n\t\"github.com/hashicorp/terraform-plugin-framework/providerserver\"\n\t\"github.com/hashicorp/terraform-plugin-go/tfprotov6\"\n\t\"github.com/hashicorp/terraform-plugin-mux/tf5to6server\"\n\t\"github.com/hashicorp/terraform-plugin-mux/tf6muxserver\"\n\t\"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema\"\n\t\"github.com/hashicorp/terraform-plugin-testing/helper/acctest\"\n\t\"github.com/hashicorp/terraform-plugin-testing/helper/resource\"\n)\n\nvar testAccProviders map[string]func() (*schema.Provider, error)\nvar testAccProtoV6ProviderFactories map[string]func() (tfprotov6.ProviderServer, error)\n\nfunc init() {\n\ttestAccProviders = map[string]func() (*schema.Provider, error){\n\t\t\"argocd\": func() (*schema.Provider, error) { //nolint:unparam\n\t\t\treturn Provider(), nil\n\t\t},\n\t}\n\n\ttestAccProtoV6ProviderFactories = map[string]func() (tfprotov6.ProviderServer, error){\n\t\t\"argocd\": func() (tfprotov6.ProviderServer, error) {\n\t\t\tctx := context.Background()\n\n\t\t\tupgradedSdkServer, err := tf5to6server.UpgradeServer(\n\t\t\t\tctx,\n\t\t\t\tProvider().GRPCProvider,\n\t\t\t)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\tproviders := []func() tfprotov6.ProviderServer{\n\t\t\t\tproviderserver.NewProtocol6(provider.New(\"test\")),\n\t\t\t\tfunc() tfprotov6.ProviderServer {\n\t\t\t\t\treturn upgradedSdkServer\n\t\t\t\t},\n\t\t\t}\n\n\t\t\tmuxServer, err := tf6muxserver.NewMuxServer(ctx, providers...)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn muxServer.ProviderServer(), nil\n\t\t},\n\t}\n}\n\nfunc TestMain(m *testing.M) {\n\ttesthelpers.TestMain(m)\n}\n\nfunc TestProvider(t *testing.T) {\n\tt.Parallel()\n\n\tif err := Provider().InternalValidate(); err != nil {\n\t\tt.Fatalf(\"err: %s\", err)\n\t}\n}\n\nfunc TestProvider_headers(t *testing.T) {\n\tt.Parallel()\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: fmt.Sprintf(\"%s %s\", `\n                provider \"argocd\" {\n                    headers = [\n                        \"Hello: HiThere\",\n                    ]\n                }`, testAccArgoCDApplicationSimple(acctest.RandomWithPrefix(\"test-acc\"), \"0.33.0\", false),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc testAccPreCheck(t *testing.T) {\n\tif v := os.Getenv(\"ARGOCD_AUTH_USERNAME\"); v == \"\" {\n\t\tt.Fatal(\"ARGOCD_AUTH_USERNAME must be set for acceptance tests\")\n\t}\n\n\tif v := os.Getenv(\"ARGOCD_AUTH_PASSWORD\"); v == \"\" {\n\t\tt.Fatal(\"ARGOCD_AUTH_PASSWORD must be set for acceptance tests\")\n\t}\n\n\tif v := os.Getenv(\"ARGOCD_SERVER\"); v == \"\" {\n\t\tt.Fatal(\"ARGOCD_SERVER must be set for acceptance tests\")\n\t}\n\n\tif v := os.Getenv(\"ARGOCD_INSECURE\"); v == \"\" {\n\t\tt.Fatal(\"ARGOCD_INSECURE should be set for acceptance tests\")\n\t}\n}\n\n// Skip test if feature is not supported\nfunc testAccPreCheckFeatureSupported(t *testing.T, feature features.Feature) {\n\tv := os.Getenv(\"ARGOCD_VERSION\")\n\tif v == \"\" {\n\t\tt.Skip(\"ARGOCD_VERSION must be set set for feature supported acceptance tests\")\n\t}\n\n\tserverVersion, err := semver.NewVersion(v)\n\tif err != nil {\n\t\tt.Fatalf(\"could not parse ARGOCD_VERSION as semantic version: %s\", v)\n\t}\n\n\tfc, ok := features.ConstraintsMap[feature]\n\tif !ok {\n\t\tt.Fatal(\"feature constraint is not handled by the provider\")\n\t}\n\n\tif i := fc.MinVersion.Compare(serverVersion); i == 1 {\n\t\tt.Skipf(\"version %s does not support feature\", v)\n\t}\n}\n\n// Skip test if feature is supported\n// Note: unused at present but left in the code in case it is needed again in future\n// func testAccPreCheckFeatureNotSupported(t *testing.T, feature int) {\n// \tv := os.Getenv(\"ARGOCD_VERSION\")\n// \tif v == \"\" {\n// \t\tt.Skip(\"ARGOCD_VERSION must be set for feature supported acceptance tests\")\n// \t}\n\n// \tserverVersion, err := semver.NewVersion(v)\n// \tif err != nil {\n// \t\tt.Fatalf(\"could not parse ARGOCD_VERSION as semantic version: %s\", v)\n// \t}\n\n// \tversionConstraint, ok := featureVersionConstraintsMap[feature]\n// \tif !ok {\n// \t\tt.Fatal(\"feature constraint is not handled by the provider\")\n// \t}\n\n// \tif i := versionConstraint.Compare(serverVersion); i != 1 {\n// \t\tt.Skipf(\"not running test if feature is already supported (%s)\", v)\n// \t}\n// }\n"
  },
  {
    "path": "argocd/resource_argocd_account_token.go",
    "content": "package argocd\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/argoproj/argo-cd/v3/pkg/apiclient/account\"\n\t\"github.com/argoproj/argo-cd/v3/pkg/apiclient/session\"\n\t\"github.com/cristalhq/jwt/v5\"\n\t\"github.com/hashicorp/terraform-plugin-sdk/v2/diag\"\n\t\"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema\"\n)\n\nfunc resourceArgoCDAccountToken() *schema.Resource {\n\treturn &schema.Resource{\n\t\tDescription:   \"Manages ArgoCD [account](https://argo-cd.readthedocs.io/en/latest/user-guide/commands/argocd_account/) JWT tokens.\\n\\n~> **Security Notice** The JWT token generated by this resource is treated as sensitive and, thus, not displayed in console output. However, it will be stored *unencrypted* in your Terraform state file. Read more about sensitive data handling in the [Terraform documentation](https://www.terraform.io/docs/language/state/sensitive-data.html).\\n\",\n\t\tCreateContext: resourceArgoCDAccountTokenCreate,\n\t\tReadContext:   resourceArgoCDAccountTokenRead,\n\t\tUpdateContext: resourceArgoCDAccountTokenUpdate,\n\t\tDeleteContext: resourceArgoCDAccountTokenDelete,\n\t\tCustomizeDiff: func(ctx context.Context, d *schema.ResourceDiff, m interface{}) error {\n\t\t\tia := d.Get(\"issued_at\").(string)\n\t\t\tif ia == \"\" {\n\t\t\t\t// Blank issued_at indicates a new token - nothing to do here\n\t\t\t\treturn nil\n\t\t\t}\n\n\t\t\tissuedAt, err := convertStringToInt64(ia)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"invalid issued_at: %w\", err)\n\t\t\t}\n\n\t\t\tif ra, ok := d.GetOk(\"renew_after\"); ok {\n\t\t\t\trenewAfterDuration, err := time.ParseDuration(ra.(string))\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"invalid renew_after: %w\", err)\n\t\t\t\t}\n\n\t\t\t\tif time.Now().Unix()-issuedAt > int64(renewAfterDuration.Seconds()) {\n\t\t\t\t\t// Token is older than renewAfterDuration - force recreation\n\t\t\t\t\tif err := d.SetNewComputed(\"issued_at\"); err != nil {\n\t\t\t\t\t\treturn fmt.Errorf(\"failed to force new resource on field %q: %w\", \"issued_at\", err)\n\t\t\t\t\t}\n\n\t\t\t\t\treturn nil\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tea, ok := d.GetOk(\"expires_at\")\n\t\t\tif !ok {\n\t\t\t\treturn nil\n\t\t\t}\n\n\t\t\texpiresAt, err := convertStringToInt64(ea.(string))\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"invalid expires_at: %w\", err)\n\t\t\t}\n\n\t\t\tif expiresAt == 0 {\n\t\t\t\t// Token not set to expire - no need to check anything else\n\t\t\t\treturn nil\n\t\t\t}\n\n\t\t\tif expiresAt < time.Now().Unix() {\n\t\t\t\t// Token has expired - force recreation\n\t\t\t\tif err := d.SetNewComputed(\"expires_at\"); err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"failed to force new resource on field %q: %w\", \"expires_at\", err)\n\t\t\t\t}\n\n\t\t\t\treturn nil\n\t\t\t}\n\n\t\t\trb, ok := d.GetOk(\"renew_before\")\n\t\t\tif !ok {\n\t\t\t\treturn nil\n\t\t\t}\n\n\t\t\trenewBeforeDuration, err := time.ParseDuration(rb.(string))\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"invalid renew_before: %w\", err)\n\t\t\t}\n\n\t\t\tif expiresAt-time.Now().Unix() < int64(renewBeforeDuration.Seconds()) {\n\t\t\t\t// Token will expire within renewBeforeDuration - force recreation\n\t\t\t\tif err := d.SetNewComputed(\"issued_at\"); err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"failed to force new resource on field %q: %w\", \"issued_at\", err)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn nil\n\t\t},\n\n\t\tSchema: map[string]*schema.Schema{\n\t\t\t\"account\": {\n\t\t\t\tType:        schema.TypeString,\n\t\t\t\tDescription: \"Account name. Defaults to the current account. I.e. the account configured on the `provider` block.\",\n\t\t\t\tOptional:    true,\n\t\t\t\tForceNew:    true,\n\t\t\t},\n\t\t\t\"expires_in\": {\n\t\t\t\tType:         schema.TypeString,\n\t\t\t\tDescription:  \"Duration before the token will expire. Valid time units are `ns`, `us` (or `µs`), `ms`, `s`, `m`, `h`. E.g. `30m`, `12h`. Default: No expiration.\",\n\t\t\t\tOptional:     true,\n\t\t\t\tForceNew:     true,\n\t\t\t\tValidateFunc: validateDuration,\n\t\t\t},\n\t\t\t\"renew_after\": {\n\t\t\t\tType:         schema.TypeString,\n\t\t\t\tDescription:  \"Duration to control token silent regeneration based on token age. Valid time units are `ns`, `us` (or `µs`), `ms`, `s`, `m`, `h`. If set, then the token will be regenerated if it is older than `renew_after`. I.e. if `currentDate - issued_at > renew_after`.\",\n\t\t\t\tOptional:     true,\n\t\t\t\tValidateFunc: validateDuration,\n\t\t\t},\n\t\t\t\"renew_before\": {\n\t\t\t\tType:         schema.TypeString,\n\t\t\t\tDescription:  \"Duration to control token silent regeneration based on remaining token lifetime. If `expires_in` is set, Terraform will regenerate the token if `expires_at - currentDate < renew_before`. Valid time units are `ns`, `us` (or `µs`), `ms`, `s`, `m`, `h`.\",\n\t\t\t\tOptional:     true,\n\t\t\t\tValidateFunc: validateDuration,\n\t\t\t\tRequiredWith: []string{\"expires_in\"},\n\t\t\t},\n\t\t\t\"jwt\": {\n\t\t\t\tType:        schema.TypeString,\n\t\t\t\tDescription: \"The raw JWT.\",\n\t\t\t\tComputed:    true,\n\t\t\t\tSensitive:   true,\n\t\t\t},\n\t\t\t\"issued_at\": {\n\t\t\t\tType:        schema.TypeString,\n\t\t\t\tDescription: \"Unix timestamp at which the token was issued.\",\n\t\t\t\tComputed:    true,\n\t\t\t\tForceNew:    true,\n\t\t\t},\n\t\t\t\"expires_at\": {\n\t\t\t\tType:        schema.TypeString,\n\t\t\t\tDescription: \"If `expires_in` is set, Unix timestamp upon which the token will expire.\",\n\t\t\t\tComputed:    true,\n\t\t\t\tForceNew:    true,\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc resourceArgoCDAccountTokenCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {\n\tsi := meta.(*ServerInterface)\n\tif diags := si.InitClients(ctx); diags != nil {\n\t\treturn pluginSDKDiags(diags)\n\t}\n\n\taccountName, err := getAccount(ctx, si, d)\n\tif err != nil {\n\t\treturn errorToDiagnostics(\"failed to get account\", err)\n\t}\n\n\topts := &account.CreateTokenRequest{\n\t\tName: accountName,\n\t}\n\n\tvar expiresIn int64\n\n\t_expiresIn, expiresInOk := d.GetOk(\"expires_in\")\n\tif expiresInOk {\n\t\tei := _expiresIn.(string)\n\t\texpiresInDuration, err := time.ParseDuration(ei)\n\n\t\tif err != nil {\n\t\t\treturn errorToDiagnostics(fmt.Sprintf(\"token expiration duration (%s) for account %s could not be parsed\", ei, accountName), err)\n\t\t}\n\n\t\texpiresIn = int64(expiresInDuration.Seconds())\n\t\topts.ExpiresIn = expiresIn\n\t}\n\n\t_renewBefore, renewBeforeOk := d.GetOk(\"renew_before\")\n\tif renewBeforeOk {\n\t\trb := _renewBefore.(string)\n\t\trenewBeforeDuration, err := time.ParseDuration(rb)\n\n\t\tif err != nil {\n\t\t\treturn errorToDiagnostics(fmt.Sprintf(\"token renewal duration (%s) for account %s could not be parsed\", rb, accountName), err)\n\t\t}\n\n\t\trenewBefore := int64(renewBeforeDuration.Seconds())\n\n\t\tif renewBefore > expiresIn {\n\t\t\treturn []diag.Diagnostic{\n\t\t\t\t{\n\t\t\t\t\tSeverity: diag.Error,\n\t\t\t\t\tSummary:  fmt.Sprintf(\"renew_before (%d) cannot be greater than expires_in (%d) for account token\", renewBefore, expiresIn),\n\t\t\t\t},\n\t\t\t}\n\t\t}\n\t}\n\n\ttokenMutexSecrets.Lock()\n\tresp, err := si.AccountClient.CreateToken(ctx, opts)\n\ttokenMutexSecrets.Unlock()\n\n\tif err != nil {\n\t\treturn argoCDAPIError(\"create\", \"token for account\", accountName, err)\n\t}\n\n\ttoken, err := jwt.ParseNoVerify([]byte(resp.GetToken()))\n\tif err != nil {\n\t\treturn errorToDiagnostics(fmt.Sprintf(\"token for account %s is not a valid jwt\", accountName), err)\n\t}\n\n\tvar claims jwt.RegisteredClaims\n\tif err = json.Unmarshal(token.Claims(), &claims); err != nil {\n\t\treturn errorToDiagnostics(fmt.Sprintf(\"token claims for account %s could not be parsed\", accountName), err)\n\t}\n\n\tif expiresInOk {\n\t\tif claims.ExpiresAt == nil {\n\t\t\treturn []diag.Diagnostic{\n\t\t\t\t{\n\t\t\t\t\tSeverity: diag.Error,\n\t\t\t\t\tSummary:  fmt.Sprintf(\"token claims expiration date for account %s is missing\", accountName),\n\t\t\t\t},\n\t\t\t}\n\t\t} else {\n\t\t\terr = d.Set(\"expires_at\", convertInt64ToString(claims.ExpiresAt.Unix()))\n\t\t\tif err != nil {\n\t\t\t\treturn errorToDiagnostics(fmt.Sprintf(\"token claims expiration date for account %s could not be persisted to state\", accountName), err)\n\t\t\t}\n\t\t}\n\t}\n\n\tif err = d.Set(\"issued_at\", convertInt64ToString(claims.IssuedAt.Unix())); err != nil {\n\t\treturn errorToDiagnostics(fmt.Sprintf(\"token claims issue date for account %s could not be persisted to state\", accountName), err)\n\t}\n\n\tif err := d.Set(\"jwt\", token.String()); err != nil {\n\t\treturn errorToDiagnostics(fmt.Sprintf(\"token for account %s could not be persisted to state\", accountName), err)\n\t}\n\n\td.SetId(claims.ID)\n\n\treturn resourceArgoCDAccountTokenRead(ctx, d, meta)\n}\n\nfunc resourceArgoCDAccountTokenRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {\n\tsi := meta.(*ServerInterface)\n\tif diags := si.InitClients(ctx); diags != nil {\n\t\treturn pluginSDKDiags(diags)\n\t}\n\n\taccountName, err := getAccount(ctx, si, d)\n\tif err != nil {\n\t\treturn errorToDiagnostics(\"failed to get account\", err)\n\t}\n\n\ttokenMutexConfiguration.RLock() // Yes, this is a different mutex - accounts are stored in `argocd-cm` whereas tokens are stored in `argocd-secret`\n\t_, err = si.AccountClient.GetAccount(ctx, &account.GetAccountRequest{\n\t\tName: accountName,\n\t})\n\ttokenMutexConfiguration.RUnlock()\n\n\tif err != nil {\n\t\tif strings.Contains(err.Error(), \"NotFound\") {\n\t\t\t// Delete token from state if account has been deleted in an out-of-band fashion\n\t\t\td.SetId(\"\")\n\t\t\treturn nil\n\t\t} else {\n\t\t\treturn argoCDAPIError(\"read\", \"account\", accountName, err)\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc resourceArgoCDAccountTokenUpdate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {\n\taccountName := d.Get(\"account\").(string)\n\n\tvar expiresIn int64\n\n\t_expiresIn, expiresInOk := d.GetOk(\"expires_in\")\n\tif expiresInOk {\n\t\tei := _expiresIn.(string)\n\t\texpiresInDuration, err := time.ParseDuration(ei)\n\n\t\tif err != nil {\n\t\t\treturn errorToDiagnostics(fmt.Sprintf(\"token expiration duration (%s) for account %s could not be parsed\", ei, accountName), err)\n\t\t}\n\n\t\texpiresIn = int64(expiresInDuration.Seconds())\n\t}\n\n\t_renewBefore, renewBeforeOk := d.GetOk(\"renew_before\")\n\tif renewBeforeOk {\n\t\trb := _renewBefore.(string)\n\t\trenewBeforeDuration, err := time.ParseDuration(rb)\n\n\t\tif err != nil {\n\t\t\treturn errorToDiagnostics(fmt.Sprintf(\"token renewal duration (%s) for account %s could not be parsed\", rb, accountName), err)\n\t\t}\n\n\t\trenewBefore := int64(renewBeforeDuration.Seconds())\n\t\tif renewBefore > expiresIn {\n\t\t\treturn []diag.Diagnostic{\n\t\t\t\t{\n\t\t\t\t\tSeverity: diag.Error,\n\t\t\t\t\tSummary:  fmt.Sprintf(\"renew_before (%d) cannot be greater than expires_in (%d) for account %s\", renewBefore, expiresIn, accountName),\n\t\t\t\t},\n\t\t\t}\n\t\t}\n\t}\n\n\treturn resourceArgoCDAccountTokenRead(ctx, d, meta)\n}\n\nfunc resourceArgoCDAccountTokenDelete(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {\n\tsi := meta.(*ServerInterface)\n\tif diags := si.InitClients(ctx); diags != nil {\n\t\treturn pluginSDKDiags(diags)\n\t}\n\n\taccountName, err := getAccount(ctx, si, d)\n\tif err != nil {\n\t\treturn errorToDiagnostics(\"failed to get account\", err)\n\t}\n\n\ttokenMutexSecrets.Lock()\n\t_, err = si.AccountClient.DeleteToken(ctx, &account.DeleteTokenRequest{\n\t\tName: accountName,\n\t\tId:   d.Id(),\n\t})\n\ttokenMutexSecrets.Unlock()\n\n\tif err != nil && !strings.Contains(err.Error(), \"NotFound\") {\n\t\treturn argoCDAPIError(\"delete\", \"token for account\", accountName, err)\n\t}\n\n\td.SetId(\"\")\n\n\treturn nil\n}\n\nfunc getAccount(ctx context.Context, si *ServerInterface, d *schema.ResourceData) (string, error) {\n\taccountName := d.Get(\"account\").(string)\n\tif len(accountName) > 0 {\n\t\treturn accountName, nil\n\t}\n\n\tuserInfo, err := si.SessionClient.GetUserInfo(ctx, &session.GetUserInfoRequest{})\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"failed to get current account: %w\", err)\n\t}\n\n\treturn userInfo.Username, nil\n}\n"
  },
  {
    "path": "argocd/resource_argocd_account_token_test.go",
    "content": "package argocd\n\nimport (\n\t\"fmt\"\n\t\"math/rand\"\n\t\"regexp\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/hashicorp/terraform-plugin-testing/helper/resource\"\n\t\"github.com/hashicorp/terraform-plugin-testing/terraform\"\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestAccArgoCDAccountToken_DefaultAccount(t *testing.T) {\n\texpIn1, err := time.ParseDuration(fmt.Sprintf(\"%ds\", rand.Intn(100000)))\n\tassert.NoError(t, err)\n\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDAccountToken_DefaultAccount(),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_account_token.this\",\n\t\t\t\t\t\t\"issued_at\",\n\t\t\t\t\t),\n\t\t\t\t\ttestCheckTokenIssuedAt(\n\t\t\t\t\t\t\"argocd_account_token.this\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDAccountToken_Expiry(int64(expIn1.Seconds())),\n\t\t\t\tCheck: testCheckTokenExpiresAt(\n\t\t\t\t\t\"argocd_account_token.this\",\n\t\t\t\t\tint64(expIn1.Seconds()),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDAccountToken_ExplicitAccount(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDAccountToken_ExplicitAccount(),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_account_token.this\",\n\t\t\t\t\t\t\"issued_at\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_account_token.this\",\n\t\t\t\t\t\t\"account\",\n\t\t\t\t\t\t\"test\",\n\t\t\t\t\t),\n\t\t\t\t\ttestCheckTokenIssuedAt(\n\t\t\t\t\t\t\"argocd_account_token.this\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDAccountToken_Multiple(t *testing.T) {\n\tcount := 3 + rand.Intn(7)\n\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDAccountToken_Multiple(count),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\ttestTokenIssuedAtSet(\n\t\t\t\t\t\t\"argocd_account_token.multiple1a\",\n\t\t\t\t\t\tcount,\n\t\t\t\t\t),\n\t\t\t\t\ttestTokenIssuedAtSet(\n\t\t\t\t\t\t\"argocd_account_token.multiple1b\",\n\t\t\t\t\t\tcount,\n\t\t\t\t\t),\n\t\t\t\t\ttestTokenIssuedAtSet(\n\t\t\t\t\t\t\"argocd_account_token.multiple2a\",\n\t\t\t\t\t\tcount,\n\t\t\t\t\t),\n\t\t\t\t\ttestTokenIssuedAtSet(\n\t\t\t\t\t\t\"argocd_account_token.multiple2b\",\n\t\t\t\t\t\tcount,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDAccountToken_RenewBefore(t *testing.T) {\n\tresourceName := \"argocd_account_token.renew_before\"\n\n\texpiresInSeconds := 30\n\texpiresIn := fmt.Sprintf(\"%ds\", expiresInSeconds)\n\texpiresInDuration, _ := time.ParseDuration(expiresIn)\n\n\trenewBeforeSeconds := expiresInSeconds - 1\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDAccountTokenRenewBeforeSuccess(expiresIn, \"20s\"),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\ttestCheckTokenExpiresAt(resourceName, int64(expiresInDuration.Seconds())),\n\t\t\t\t\tresource.TestCheckResourceAttr(resourceName, \"renew_before\", \"20s\"),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDAccountTokenRenewBeforeSuccess(expiresIn, fmt.Sprintf(\"%ds\", renewBeforeSeconds)),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(resourceName, \"renew_before\", fmt.Sprintf(\"%ds\", renewBeforeSeconds)),\n\t\t\t\t\ttestDelay(renewBeforeSeconds+1),\n\t\t\t\t),\n\t\t\t\tExpectNonEmptyPlan: true, // token should be recreated when refreshed at end of step due to delay above\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig:      testAccArgoCDAccountTokenRenewBeforeFailure(expiresInDuration),\n\t\t\t\tExpectError: regexp.MustCompile(\"renew_before .* cannot be greater than expires_in .*\"),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDAccountToken_RenewAfter(t *testing.T) {\n\tresourceName := \"argocd_account_token.renew_after\"\n\trenewAfterSeconds := 30\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDAccountTokenRenewAfter(renewAfterSeconds),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(resourceName, \"renew_after\", fmt.Sprintf(\"%ds\", renewAfterSeconds)),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDAccountTokenRenewAfter(renewAfterSeconds),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\ttestDelay(renewAfterSeconds + 1),\n\t\t\t\t),\n\t\t\t\tExpectNonEmptyPlan: true, // token should be recreated when refreshed at end of step due to delay above\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDAccountTokenRenewAfter(renewAfterSeconds),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(resourceName, \"renew_after\", fmt.Sprintf(\"%ds\", renewAfterSeconds)),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc testAccArgoCDAccountToken_DefaultAccount() string {\n\treturn `\nresource \"argocd_account_token\" \"this\" {}\n`\n}\n\nfunc testAccArgoCDAccountToken_Expiry(expiresIn int64) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_account_token\" \"this\" {\n\texpires_in = \"%ds\"\n}\n`, expiresIn)\n}\n\nfunc testAccArgoCDAccountToken_ExplicitAccount() string {\n\treturn `\nresource \"argocd_account_token\" \"this\" {\n\taccount = \"test\"\n}\n`\n}\n\nfunc testAccArgoCDAccountToken_Multiple(count int) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_account_token\" \"multiple1a\" {\n\tcount = %d\n}\n\nresource \"argocd_account_token\" \"multiple1b\" {\n\tcount = %d\n}\n\nresource \"argocd_account_token\" \"multiple2a\" {\n\taccount = \"test\"\n\tcount   = %d\n}\n\nresource \"argocd_account_token\" \"multiple2b\" {\n\taccount = \"test\"\n\tcount   = %d\n}\n\n`, count, count, count, count)\n}\n\nfunc testAccArgoCDAccountTokenRenewBeforeSuccess(expiresIn, renewBefore string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_account_token\" \"renew_before\" {\n\texpires_in   = \"%s\"\n\trenew_before = \"%s\"\n}\n`, expiresIn, renewBefore)\n}\n\nfunc testAccArgoCDAccountTokenRenewBeforeFailure(expiresInDuration time.Duration) string {\n\texpiresIn := int64(expiresInDuration.Seconds())\n\trenewBefore := int64(expiresInDuration.Seconds() + 1.0)\n\n\treturn fmt.Sprintf(`\nresource \"argocd_account_token\" \"renew_before\" {\n\texpires_in   = \"%ds\"\n\trenew_before = \"%ds\"\n}\n`, expiresIn, renewBefore)\n}\n\nfunc testAccArgoCDAccountTokenRenewAfter(renewAfter int) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_account_token\" \"renew_after\" {\n\taccount     = \"test\"\n\trenew_after = \"%ds\"\n}\n`, renewAfter)\n}\n\nfunc testCheckTokenIssuedAt(resourceName string) resource.TestCheckFunc {\n\treturn func(s *terraform.State) error {\n\t\trs, ok := s.RootModule().Resources[resourceName]\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"not found: %s\", resourceName)\n\t\t}\n\n\t\tif rs.Primary.ID == \"\" {\n\t\t\treturn fmt.Errorf(\"token ID is not set\")\n\t\t}\n\n\t\t_issuedAt, ok := rs.Primary.Attributes[\"issued_at\"]\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"testCheckTokenIssuedAt: issued_at is not set\")\n\t\t}\n\n\t\t_, err := convertStringToInt64(_issuedAt)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"testCheckTokenIssuedAt: string attribute 'issued_at' stored in state cannot be converted to int64: %s\", err)\n\t\t}\n\n\t\treturn nil\n\t}\n}\n\nfunc testCheckTokenExpiresAt(resourceName string, expiresIn int64) resource.TestCheckFunc {\n\treturn func(s *terraform.State) error {\n\t\trs, ok := s.RootModule().Resources[resourceName]\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"not found: %s\", resourceName)\n\t\t}\n\n\t\tif rs.Primary.ID == \"\" {\n\t\t\treturn fmt.Errorf(\"token ID is not set\")\n\t\t}\n\n\t\t_expiresAt, ok := rs.Primary.Attributes[\"expires_at\"]\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"expires_at is not set\")\n\t\t}\n\n\t\t_issuedAt, ok := rs.Primary.Attributes[\"issued_at\"]\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"testCheckTokenExpiresAt: issued_at is not set\")\n\t\t}\n\n\t\texpiresAt, err := convertStringToInt64(_expiresAt)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"testCheckTokenExpiresAt: string attribute 'expires_at' stored in state cannot be converted to int64: %s\", err)\n\t\t}\n\n\t\tissuedAt, err := convertStringToInt64(_issuedAt)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"testCheckTokenExpiresAt: string attribute 'issued_at' stored in state cannot be converted to int64: %s\", err)\n\t\t}\n\n\t\tif issuedAt+expiresIn != expiresAt {\n\t\t\treturn fmt.Errorf(\"testCheckTokenExpiresAt: issuedAt + expiresIn != expiresAt : %d + %d != %d\", issuedAt, expiresIn, expiresAt)\n\t\t}\n\n\t\treturn nil\n\t}\n}\n\nfunc testTokenIssuedAtSet(name string, count int) resource.TestCheckFunc {\n\treturn func(s *terraform.State) error {\n\t\tkey := \"issued_at\"\n\n\t\tfor i := 0; i < count; i++ {\n\t\t\tms := s.RootModule()\n\t\t\t_name := fmt.Sprintf(\"%s.%d\", name, i)\n\n\t\t\trs, ok := ms.Resources[_name]\n\t\t\tif !ok {\n\t\t\t\treturn fmt.Errorf(\"not found: %s in %s\", _name, ms.Path)\n\t\t\t}\n\n\t\t\tis := rs.Primary\n\t\t\tif is == nil {\n\t\t\t\treturn fmt.Errorf(\"no primary instance: %s in %s\", _name, ms.Path)\n\t\t\t}\n\n\t\t\tif val, ok := is.Attributes[key]; !ok || val == \"\" {\n\t\t\t\treturn fmt.Errorf(\"%s: Attribute '%s' expected to be set\", _name, key)\n\t\t\t}\n\t\t}\n\n\t\treturn nil\n\t}\n}\n\nfunc testDelay(seconds int) resource.TestCheckFunc {\n\treturn func(s *terraform.State) error {\n\t\ttime.Sleep(time.Duration(seconds) * time.Second)\n\t\treturn nil\n\t}\n}\n"
  },
  {
    "path": "argocd/resource_argocd_application.go",
    "content": "package argocd\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"strings\"\n\t\"time\"\n\n\tmetav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\"\n\n\t\"github.com/argoproj-labs/terraform-provider-argocd/internal/features\"\n\tapplicationClient \"github.com/argoproj/argo-cd/v3/pkg/apiclient/application\"\n\tapplication \"github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1\"\n\t\"github.com/argoproj/gitops-engine/pkg/health\"\n\t\"github.com/hashicorp/terraform-plugin-sdk/v2/diag\"\n\t\"github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry\"\n\t\"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema\"\n)\n\nfunc resourceArgoCDApplication() *schema.Resource {\n\treturn &schema.Resource{\n\t\tDescription:   \"Manages [applications](https://argo-cd.readthedocs.io/en/stable/operator-manual/declarative-setup/#applications) within ArgoCD.\",\n\t\tCreateContext: resourceArgoCDApplicationCreate,\n\t\tReadContext:   resourceArgoCDApplicationRead,\n\t\tUpdateContext: resourceArgoCDApplicationUpdate,\n\t\tDeleteContext: resourceArgoCDApplicationDelete,\n\t\tImporter: &schema.ResourceImporter{\n\t\t\tStateContext: schema.ImportStatePassthroughContext,\n\t\t},\n\t\tSchema: map[string]*schema.Schema{\n\t\t\t\"metadata\": metadataSchema(\"applications.argoproj.io\"),\n\t\t\t\"spec\":     applicationSpecSchemaV4(false, false),\n\t\t\t\"wait\": {\n\t\t\t\tType:        schema.TypeBool,\n\t\t\t\tDescription: \"Upon application creation or update, wait for application health/sync status to be healthy/Synced, upon application deletion, wait for application to be removed, when set to true. Wait timeouts are controlled by Terraform Create, Update and Delete resource timeouts (all default to 5 minutes). **Note**: if ArgoCD decides not to sync an application (e.g. because the project to which the application belongs has a `sync_window` applied) then you will experience an expected timeout event if `wait = true`.\",\n\t\t\t\tOptional:    true,\n\t\t\t\tDefault:     false,\n\t\t\t},\n\t\t\t\"sync\": {\n\t\t\t\tType:        schema.TypeBool,\n\t\t\t\tDescription: \"Trigger sync immediately after create/update. Helps in case when a Sync window is defined. It is required that the sync window is defined with `manual_sync = true`.\",\n\t\t\t\tOptional:    true,\n\t\t\t},\n\t\t\t\"cascade\": {\n\t\t\t\tType:        schema.TypeBool,\n\t\t\t\tDescription: \"Whether to applying cascading deletion when application is removed.\",\n\t\t\t\tOptional:    true,\n\t\t\t\tDefault:     true,\n\t\t\t},\n\t\t\t\"validate\": {\n\t\t\t\tType:        schema.TypeBool,\n\t\t\t\tDescription: \"Whether to validate the application spec before creating or updating the application.\",\n\t\t\t\tOptional:    true,\n\t\t\t\tDefault:     true,\n\t\t\t},\n\t\t\t\"status\": applicationStatusSchema(),\n\t\t},\n\t\tSchemaVersion: 4,\n\t\tStateUpgraders: []schema.StateUpgrader{\n\t\t\t{\n\t\t\t\tType:    resourceArgoCDApplicationV0().CoreConfigSchema().ImpliedType(),\n\t\t\t\tUpgrade: resourceArgoCDApplicationStateUpgradeV0,\n\t\t\t\tVersion: 0,\n\t\t\t},\n\t\t\t{\n\t\t\t\tType:    resourceArgoCDApplicationV1().CoreConfigSchema().ImpliedType(),\n\t\t\t\tUpgrade: resourceArgoCDApplicationStateUpgradeV1,\n\t\t\t\tVersion: 1,\n\t\t\t},\n\t\t\t{\n\t\t\t\tType:    resourceArgoCDApplicationV2().CoreConfigSchema().ImpliedType(),\n\t\t\t\tUpgrade: resourceArgoCDApplicationStateUpgradeV2,\n\t\t\t\tVersion: 2,\n\t\t\t},\n\t\t\t{\n\t\t\t\tType:    resourceArgoCDApplicationV3().CoreConfigSchema().ImpliedType(),\n\t\t\t\tUpgrade: resourceArgoCDApplicationStateUpgradeV3,\n\t\t\t\tVersion: 3,\n\t\t\t},\n\t\t},\n\t\tTimeouts: &schema.ResourceTimeout{\n\t\t\tCreate: schema.DefaultTimeout(5 * time.Minute),\n\t\t\tUpdate: schema.DefaultTimeout(5 * time.Minute),\n\t\t\tDelete: schema.DefaultTimeout(5 * time.Minute),\n\t\t},\n\t}\n}\n\nfunc resourceArgoCDApplicationCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {\n\tsi := meta.(*ServerInterface)\n\tif diags := si.InitClients(ctx); diags != nil {\n\t\treturn pluginSDKDiags(diags)\n\t}\n\n\tobjectMeta, spec, err := expandApplication(d, si.IsFeatureSupported(features.ApplicationSourceName))\n\tif err != nil {\n\t\treturn errorToDiagnostics(\"failed to expand application\", err)\n\t}\n\n\tapps, err := si.ApplicationClient.List(ctx, &applicationClient.ApplicationQuery{\n\t\tName:         &objectMeta.Name,\n\t\tAppNamespace: &objectMeta.Namespace,\n\t})\n\tif err != nil && !strings.Contains(err.Error(), \"NotFound\") {\n\t\treturn errorToDiagnostics(fmt.Sprintf(\"failed to list existing applications when creating application %s\", objectMeta.Name), err)\n\t}\n\n\tif apps != nil {\n\t\tl := len(apps.Items)\n\n\t\tswitch {\n\t\tcase l < 1:\n\t\t\tbreak\n\t\tcase l == 1:\n\t\t\tswitch apps.Items[0].DeletionTimestamp {\n\t\t\tcase nil:\n\t\t\tdefault:\n\t\t\t\t// Pre-existing app is still in Kubernetes soft deletion queue\n\t\t\t\ttime.Sleep(time.Duration(*apps.Items[0].DeletionGracePeriodSeconds))\n\t\t\t}\n\t\tcase l > 1:\n\t\t\treturn []diag.Diagnostic{\n\t\t\t\t{\n\t\t\t\t\tSeverity: diag.Error,\n\t\t\t\t\tSummary:  fmt.Sprintf(\"found multiple applications matching name '%s' and namespace '%s'\", objectMeta.Name, objectMeta.Namespace),\n\t\t\t\t},\n\t\t\t}\n\t\t}\n\t}\n\n\tl := len(spec.Sources)\n\n\tswitch {\n\tcase l == 1:\n\t\tspec.Source = &spec.Sources[0]\n\t\tspec.Sources = nil\n\tcase l > 1 && !si.IsFeatureSupported(features.MultipleApplicationSources):\n\t\treturn featureNotSupported(features.MultipleApplicationSources)\n\t}\n\n\tif spec.SyncPolicy != nil && spec.SyncPolicy.ManagedNamespaceMetadata != nil && !si.IsFeatureSupported(features.ManagedNamespaceMetadata) {\n\t\treturn featureNotSupported(features.ManagedNamespaceMetadata)\n\t}\n\n\tvalidate := d.Get(\"validate\").(bool)\n\tapp, err := si.ApplicationClient.Create(ctx, &applicationClient.ApplicationCreateRequest{\n\t\tApplication: &application.Application{\n\t\t\tObjectMeta: objectMeta,\n\t\t\tSpec:       spec,\n\t\t\tTypeMeta: metav1.TypeMeta{\n\t\t\t\tKind:       \"Application\",\n\t\t\t\tAPIVersion: \"argoproj.io/v1alpha1\",\n\t\t\t},\n\t\t},\n\t\tValidate: &validate,\n\t})\n\n\tif err != nil {\n\t\treturn argoCDAPIError(\"create\", \"application\", objectMeta.Name, err)\n\t} else if app == nil {\n\t\treturn []diag.Diagnostic{\n\t\t\t{\n\t\t\t\tSeverity: diag.Error,\n\t\t\t\tSummary:  fmt.Sprintf(\"application %s could not be created: unknown reason\", objectMeta.Name),\n\t\t\t},\n\t\t}\n\t}\n\n\td.SetId(fmt.Sprintf(\"%s:%s\", app.Name, objectMeta.Namespace))\n\n\tif sync, ok := d.GetOk(\"sync\"); ok && sync.(bool) {\n\t\tprune := false\n\t\tif spec.SyncPolicy.Automated != nil && spec.SyncPolicy.Automated.Prune {\n\t\t\tprune = true\n\t\t}\n\n\t\t_, err := si.ApplicationClient.Sync(ctx, &applicationClient.ApplicationSyncRequest{\n\t\t\tName:         &app.Name,\n\t\t\tAppNamespace: &app.Namespace,\n\t\t\tPrune:        &prune,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn errorToDiagnostics(fmt.Sprintf(\"error while triggering sync of application %s\", app.Name), err)\n\t\t}\n\t}\n\n\tif wait, ok := d.GetOk(\"wait\"); ok && wait.(bool) {\n\t\tif err = retry.RetryContext(ctx, d.Timeout(schema.TimeoutCreate), func() *retry.RetryError {\n\t\t\tvar list *application.ApplicationList\n\t\t\tif list, err = si.ApplicationClient.List(ctx, &applicationClient.ApplicationQuery{\n\t\t\t\tName:         &app.Name,\n\t\t\t\tAppNamespace: &app.Namespace,\n\t\t\t}); err != nil {\n\t\t\t\treturn retry.NonRetryableError(fmt.Errorf(\"error while waiting for application %s to be synced and healthy: %s\", app.Name, err))\n\t\t\t}\n\n\t\t\tif len(list.Items) != 1 {\n\t\t\t\treturn retry.NonRetryableError(fmt.Errorf(\"found unexpected number of applications matching name '%s' and namespace '%s'. Items: %d\", app.Name, app.Namespace, len(list.Items)))\n\t\t\t}\n\n\t\t\tif list.Items[0].Status.Health.Status != health.HealthStatusHealthy {\n\t\t\t\treturn retry.RetryableError(fmt.Errorf(\"expected application health status to be healthy but was %s\", list.Items[0].Status.Health.Status))\n\t\t\t}\n\n\t\t\tif list.Items[0].Status.Sync.Status != application.SyncStatusCodeSynced {\n\t\t\t\treturn retry.RetryableError(fmt.Errorf(\"expected application sync status to be synced but was %s\", list.Items[0].Status.Sync.Status))\n\t\t\t}\n\n\t\t\treturn nil\n\t\t}); err != nil {\n\t\t\treturn errorToDiagnostics(fmt.Sprintf(\"error while waiting for application %s to be created\", objectMeta.Name), err)\n\t\t}\n\t}\n\n\treturn resourceArgoCDApplicationRead(ctx, d, meta)\n}\n\nfunc resourceArgoCDApplicationRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {\n\tsi := meta.(*ServerInterface)\n\tif diags := si.InitClients(ctx); diags != nil {\n\t\treturn pluginSDKDiags(diags)\n\t}\n\n\tids := strings.Split(d.Id(), \":\")\n\tappName := ids[0]\n\tnamespace := ids[1]\n\n\tapps, err := si.ApplicationClient.List(ctx, &applicationClient.ApplicationQuery{\n\t\tName:         &appName,\n\t\tAppNamespace: &namespace,\n\t})\n\tif err != nil {\n\t\tif strings.Contains(err.Error(), \"NotFound\") {\n\t\t\td.SetId(\"\")\n\t\t\treturn diag.Diagnostics{}\n\t\t}\n\n\t\treturn argoCDAPIError(\"read\", \"application\", appName, err)\n\t}\n\n\tl := len(apps.Items)\n\n\tswitch {\n\tcase l < 1:\n\t\td.SetId(\"\")\n\t\treturn diag.Diagnostics{}\n\tcase l == 1:\n\t\tbreak\n\tcase l > 1:\n\t\treturn []diag.Diagnostic{\n\t\t\t{\n\t\t\t\tSeverity: diag.Error,\n\t\t\t\tSummary:  fmt.Sprintf(\"found multiple applications matching name '%s' and namespace '%s'\", appName, namespace),\n\t\t\t},\n\t\t}\n\t}\n\n\terr = flattenApplication(&apps.Items[0], d)\n\tif err != nil {\n\t\treturn errorToDiagnostics(fmt.Sprintf(\"failed to flatten application %s\", appName), err)\n\t}\n\n\treturn nil\n}\n\nfunc resourceArgoCDApplicationUpdate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {\n\tif ok := d.HasChanges(\"metadata\", \"spec\"); !ok {\n\t\treturn resourceArgoCDApplicationRead(ctx, d, meta)\n\t}\n\n\tsi := meta.(*ServerInterface)\n\tif diags := si.InitClients(ctx); diags != nil {\n\t\treturn pluginSDKDiags(diags)\n\t}\n\n\tids := strings.Split(d.Id(), \":\")\n\tappQuery := &applicationClient.ApplicationQuery{\n\t\tName:         &ids[0],\n\t\tAppNamespace: &ids[1],\n\t}\n\n\tobjectMeta, spec, err := expandApplication(d, si.IsFeatureSupported(features.ApplicationSourceName))\n\tif err != nil {\n\t\treturn errorToDiagnostics(fmt.Sprintf(\"failed to expand application %s\", *appQuery.Name), err)\n\t}\n\n\tl := len(spec.Sources)\n\n\tswitch {\n\tcase l == 1:\n\t\tspec.Source = &spec.Sources[0]\n\t\tspec.Sources = nil\n\tcase l > 1 && !si.IsFeatureSupported(features.MultipleApplicationSources):\n\t\treturn featureNotSupported(features.MultipleApplicationSources)\n\t}\n\n\tif spec.SyncPolicy != nil && spec.SyncPolicy.ManagedNamespaceMetadata != nil && !si.IsFeatureSupported(features.ManagedNamespaceMetadata) {\n\t\treturn featureNotSupported(features.ManagedNamespaceMetadata)\n\t}\n\n\tapps, err := si.ApplicationClient.List(ctx, appQuery)\n\tif err != nil {\n\t\treturn []diag.Diagnostic{\n\t\t\t{\n\t\t\t\tSeverity: diag.Error,\n\t\t\t\tSummary:  \"failed to get application\",\n\t\t\t\tDetail:   err.Error(),\n\t\t\t},\n\t\t}\n\t}\n\n\t// Kubernetes API requires providing the up-to-date correct ResourceVersion for updates\n\t// FIXME ResourceVersion not available anymore\n\t// if app != nil {\n\t// \t appRequest.ResourceVersion = app.ResourceVersion\n\t// }\n\n\tif len(apps.Items) > 1 {\n\t\treturn []diag.Diagnostic{\n\t\t\t{\n\t\t\t\tSeverity: diag.Error,\n\t\t\t\tSummary:  fmt.Sprintf(\"found multiple applications matching name '%s' and namespace '%s'\", *appQuery.Name, *appQuery.AppNamespace),\n\t\t\t\tDetail:   err.Error(),\n\t\t\t},\n\t\t}\n\t}\n\n\tvalidate := d.Get(\"validate\").(bool)\n\tif _, err = si.ApplicationClient.Update(ctx, &applicationClient.ApplicationUpdateRequest{\n\t\tApplication: &application.Application{\n\t\t\tObjectMeta: objectMeta,\n\t\t\tSpec:       spec,\n\t\t\tTypeMeta: metav1.TypeMeta{\n\t\t\t\tKind:       \"Application\",\n\t\t\t\tAPIVersion: \"argoproj.io/v1alpha1\",\n\t\t\t},\n\t\t},\n\t\tValidate: &validate,\n\t}); err != nil {\n\t\treturn argoCDAPIError(\"update\", \"application\", objectMeta.Name, err)\n\t}\n\n\tif sync, ok := d.GetOk(\"sync\"); ok && sync.(bool) {\n\t\tprune := false\n\t\tif spec.SyncPolicy.Automated != nil && spec.SyncPolicy.Automated.Prune {\n\t\t\tprune = true\n\t\t}\n\n\t\t_, err = si.ApplicationClient.Sync(ctx, &applicationClient.ApplicationSyncRequest{\n\t\t\tName:         &objectMeta.Name,\n\t\t\tAppNamespace: &objectMeta.Namespace,\n\t\t\tPrune:        &prune,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn errorToDiagnostics(fmt.Sprintf(\"error while triggering sync of application %s\", *appQuery.Name), err)\n\t\t}\n\t}\n\n\tif wait, _ok := d.GetOk(\"wait\"); _ok && wait.(bool) {\n\t\tif err = retry.RetryContext(ctx, d.Timeout(schema.TimeoutUpdate), func() *retry.RetryError {\n\t\t\tvar list *application.ApplicationList\n\t\t\tif list, err = si.ApplicationClient.List(ctx, appQuery); err != nil {\n\t\t\t\treturn retry.NonRetryableError(fmt.Errorf(\"error while waiting for application %s to be synced and healthy: %s\", list.Items[0].Name, err))\n\t\t\t}\n\n\t\t\tif len(list.Items) != 1 {\n\t\t\t\treturn retry.NonRetryableError(fmt.Errorf(\"found unexpected number of applications matching name '%s' and namespace '%s'. Items: %d\", *appQuery.Name, *appQuery.AppNamespace, len(list.Items)))\n\t\t\t}\n\n\t\t\tif list.Items[0].Status.ReconciledAt.Equal(apps.Items[0].Status.ReconciledAt) {\n\t\t\t\treturn retry.RetryableError(fmt.Errorf(\"reconciliation has not begun\"))\n\t\t\t}\n\n\t\t\tif list.Items[0].Status.Health.Status != health.HealthStatusHealthy {\n\t\t\t\treturn retry.RetryableError(fmt.Errorf(\"expected application health status to be healthy but was %s\", list.Items[0].Status.Health.Status))\n\t\t\t}\n\n\t\t\tif list.Items[0].Status.Sync.Status != application.SyncStatusCodeSynced {\n\t\t\t\treturn retry.RetryableError(fmt.Errorf(\"expected application sync status to be synced but was %s\", list.Items[0].Status.Sync.Status))\n\t\t\t}\n\n\t\t\treturn nil\n\t\t}); err != nil {\n\t\t\treturn errorToDiagnostics(fmt.Sprintf(\"error while waiting for application %s to be updated\", *appQuery.Name), err)\n\t\t}\n\t}\n\n\treturn resourceArgoCDApplicationRead(ctx, d, meta)\n}\n\nfunc resourceArgoCDApplicationDelete(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {\n\tsi := meta.(*ServerInterface)\n\tif diags := si.InitClients(ctx); diags != nil {\n\t\treturn pluginSDKDiags(diags)\n\t}\n\n\tids := strings.Split(d.Id(), \":\")\n\tappName := ids[0]\n\tnamespace := ids[1]\n\tcascade := d.Get(\"cascade\").(bool)\n\n\tif _, err := si.ApplicationClient.Delete(ctx, &applicationClient.ApplicationDeleteRequest{\n\t\tName:         &appName,\n\t\tCascade:      &cascade,\n\t\tAppNamespace: &namespace,\n\t}); err != nil && !strings.Contains(err.Error(), \"NotFound\") {\n\t\treturn argoCDAPIError(\"delete\", \"application\", appName, err)\n\t}\n\n\tif wait, ok := d.GetOk(\"wait\"); ok && wait.(bool) {\n\t\tif err := retry.RetryContext(ctx, d.Timeout(schema.TimeoutDelete), func() *retry.RetryError {\n\t\t\tapps, err := si.ApplicationClient.List(ctx, &applicationClient.ApplicationQuery{\n\t\t\t\tName:         &appName,\n\t\t\t\tAppNamespace: &namespace,\n\t\t\t})\n\n\t\t\tswitch err {\n\t\t\tcase nil:\n\t\t\t\tif apps != nil && len(apps.Items) > 0 {\n\t\t\t\t\treturn retry.RetryableError(fmt.Errorf(\"application %s is still present\", appName))\n\t\t\t\t}\n\t\t\tdefault:\n\t\t\t\tif !strings.Contains(err.Error(), \"NotFound\") {\n\t\t\t\t\treturn retry.NonRetryableError(err)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\td.SetId(\"\")\n\n\t\t\treturn nil\n\t\t}); err != nil {\n\t\t\treturn errorToDiagnostics(fmt.Sprintf(\"error while waiting for application %s to be deleted\", appName), err)\n\t\t}\n\t}\n\n\td.SetId(\"\")\n\n\treturn nil\n}\n"
  },
  {
    "path": "argocd/resource_argocd_application_set.go",
    "content": "package argocd\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/argoproj-labs/terraform-provider-argocd/internal/features\"\n\t\"github.com/argoproj/argo-cd/v3/pkg/apiclient/applicationset\"\n\tapplication \"github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1\"\n\t\"github.com/hashicorp/terraform-plugin-sdk/v2/diag\"\n\t\"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema\"\n\tmetav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\"\n)\n\nfunc resourceArgoCDApplicationSet() *schema.Resource {\n\treturn &schema.Resource{\n\t\tDescription:   \"Manages [application sets](https://argo-cd.readthedocs.io/en/stable/user-guide/application-set/) within ArgoCD.\",\n\t\tCreateContext: resourceArgoCDApplicationSetCreate,\n\t\tReadContext:   resourceArgoCDApplicationSetRead,\n\t\tUpdateContext: resourceArgoCDApplicationSetUpdate,\n\t\tDeleteContext: resourceArgoCDApplicationSetDelete,\n\t\tImporter: &schema.ResourceImporter{\n\t\t\tStateContext: schema.ImportStatePassthroughContext,\n\t\t},\n\t\tSchema: map[string]*schema.Schema{\n\t\t\t\"metadata\": metadataSchema(\"applicationsets.argoproj.io\"),\n\t\t\t\"spec\":     applicationSetSpecSchemaV1(),\n\t\t},\n\t\tSchemaVersion: 1,\n\t\tStateUpgraders: []schema.StateUpgrader{\n\t\t\t{\n\t\t\t\tType:    resourceArgoCDApplicationV1().CoreConfigSchema().ImpliedType(),\n\t\t\t\tUpgrade: resourceArgoCDApplicationSetStateUpgradeV0,\n\t\t\t\tVersion: 0,\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc resourceArgoCDApplicationSetCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {\n\tsi := meta.(*ServerInterface)\n\tif diags := si.InitClients(ctx); diags != nil {\n\t\treturn pluginSDKDiags(diags)\n\t}\n\n\tif !si.IsFeatureSupported(features.ApplicationSet) {\n\t\treturn featureNotSupported(features.ApplicationSet)\n\t}\n\n\tobjectMeta, spec, err := expandApplicationSet(\n\t\td,\n\t\tsi.IsFeatureSupported(features.MultipleApplicationSources),\n\t\tsi.IsFeatureSupported(features.ApplicationSetIgnoreApplicationDifferences),\n\t\tsi.IsFeatureSupported(features.ApplicationSetTemplatePatch),\n\t\tsi.IsFeatureSupported(features.ApplicationSourceName),\n\t)\n\tif err != nil {\n\t\treturn errorToDiagnostics(\"failed to expand application set\", err)\n\t}\n\n\tif !si.IsFeatureSupported(features.ApplicationSetProgressiveSync) && spec.Strategy != nil {\n\t\treturn featureNotSupported(features.ApplicationSetProgressiveSync)\n\t}\n\n\tif !si.IsFeatureSupported(features.ApplicationSetIgnoreApplicationDifferences) && spec.IgnoreApplicationDifferences != nil {\n\t\treturn featureNotSupported(features.ApplicationSetIgnoreApplicationDifferences)\n\t}\n\n\tif !si.IsFeatureSupported(features.ApplicationSetApplicationsSyncPolicy) && spec.SyncPolicy != nil && spec.SyncPolicy.ApplicationsSync != nil {\n\t\treturn featureNotSupported(features.ApplicationSetApplicationsSyncPolicy)\n\t}\n\n\tif !si.IsFeatureSupported(features.ApplicationSetTemplatePatch) && spec.TemplatePatch != nil {\n\t\treturn featureNotSupported(features.ApplicationSetTemplatePatch)\n\t}\n\n\tas, err := si.ApplicationSetClient.Create(ctx, &applicationset.ApplicationSetCreateRequest{\n\t\tApplicationset: &application.ApplicationSet{\n\t\t\tObjectMeta: objectMeta,\n\t\t\tSpec:       spec,\n\t\t\tTypeMeta: metav1.TypeMeta{\n\t\t\t\tKind:       \"ApplicationSet\",\n\t\t\t\tAPIVersion: \"argoproj.io/v1alpha1\",\n\t\t\t},\n\t\t},\n\t})\n\tif err != nil {\n\t\treturn argoCDAPIError(\"create\", \"application set\", objectMeta.Name, err)\n\t} else if as == nil {\n\t\treturn []diag.Diagnostic{\n\t\t\t{\n\t\t\t\tSeverity: diag.Error,\n\t\t\t\tSummary:  fmt.Sprintf(\"application set %s not created: unknown reason\", objectMeta.Name),\n\t\t\t},\n\t\t}\n\t}\n\n\td.SetId(fmt.Sprintf(\"%s:%s\", as.Name, objectMeta.Namespace))\n\n\treturn resourceArgoCDApplicationSetRead(ctx, d, meta)\n}\n\nfunc resourceArgoCDApplicationSetRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {\n\tsi := meta.(*ServerInterface)\n\tif diags := si.InitClients(ctx); diags != nil {\n\t\treturn pluginSDKDiags(diags)\n\t}\n\n\tids := strings.Split(d.Id(), \":\")\n\tappSetName := ids[0]\n\tnamespace := ids[1]\n\n\tappSet, err := si.ApplicationSetClient.Get(ctx, &applicationset.ApplicationSetGetQuery{\n\t\tName:            appSetName,\n\t\tAppsetNamespace: namespace,\n\t})\n\tif err != nil {\n\t\tif strings.Contains(err.Error(), \"NotFound\") {\n\t\t\td.SetId(\"\")\n\t\t\treturn diag.Diagnostics{}\n\t\t}\n\n\t\treturn argoCDAPIError(\"read\", \"application set\", appSetName, err)\n\t}\n\n\terr = flattenApplicationSet(appSet, d)\n\tif err != nil {\n\t\treturn errorToDiagnostics(fmt.Sprintf(\"failed to flatten application set %s\", appSetName), err)\n\t}\n\n\treturn nil\n}\n\nfunc resourceArgoCDApplicationSetUpdate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {\n\tsi := meta.(*ServerInterface)\n\tif diags := si.InitClients(ctx); diags != nil {\n\t\treturn pluginSDKDiags(diags)\n\t}\n\n\tif !si.IsFeatureSupported(features.ApplicationSet) {\n\t\treturn featureNotSupported(features.ApplicationSet)\n\t}\n\n\tif !d.HasChanges(\"metadata\", \"spec\") {\n\t\treturn nil\n\t}\n\n\tobjectMeta, spec, err := expandApplicationSet(\n\t\td,\n\t\tsi.IsFeatureSupported(features.MultipleApplicationSources),\n\t\tsi.IsFeatureSupported(features.ApplicationSetIgnoreApplicationDifferences),\n\t\tsi.IsFeatureSupported(features.ApplicationSetTemplatePatch),\n\t\tsi.IsFeatureSupported(features.ApplicationSourceName),\n\t)\n\tif err != nil {\n\t\treturn errorToDiagnostics(fmt.Sprintf(\"failed to expand application set %s\", d.Id()), err)\n\t}\n\n\tif !si.IsFeatureSupported(features.ApplicationSetProgressiveSync) && spec.Strategy != nil {\n\t\treturn featureNotSupported(features.ApplicationSetProgressiveSync)\n\t}\n\n\tif !si.IsFeatureSupported(features.ApplicationSetIgnoreApplicationDifferences) && spec.IgnoreApplicationDifferences != nil {\n\t\treturn featureNotSupported(features.ApplicationSetIgnoreApplicationDifferences)\n\t}\n\n\tif !si.IsFeatureSupported(features.ApplicationSetApplicationsSyncPolicy) && spec.SyncPolicy != nil && spec.SyncPolicy.ApplicationsSync != nil {\n\t\treturn featureNotSupported(features.ApplicationSetApplicationsSyncPolicy)\n\t}\n\n\t_, err = si.ApplicationSetClient.Create(ctx, &applicationset.ApplicationSetCreateRequest{\n\t\tApplicationset: &application.ApplicationSet{\n\t\t\tObjectMeta: objectMeta,\n\t\t\tSpec:       spec,\n\t\t\tTypeMeta: metav1.TypeMeta{\n\t\t\t\tKind:       \"ApplicationSet\",\n\t\t\t\tAPIVersion: \"argoproj.io/v1alpha1\",\n\t\t\t},\n\t\t},\n\t\tUpsert: true,\n\t})\n\n\tif err != nil {\n\t\treturn argoCDAPIError(\"update\", \"application set\", objectMeta.Name, err)\n\t}\n\n\treturn resourceArgoCDApplicationSetRead(ctx, d, meta)\n}\n\nfunc resourceArgoCDApplicationSetDelete(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {\n\tsi := meta.(*ServerInterface)\n\tif diags := si.InitClients(ctx); diags != nil {\n\t\treturn pluginSDKDiags(diags)\n\t}\n\n\tids := strings.Split(d.Id(), \":\")\n\tappSetName := ids[0]\n\tnamespace := ids[1]\n\n\tif _, err := si.ApplicationSetClient.Delete(ctx, &applicationset.ApplicationSetDeleteRequest{\n\t\tName:            appSetName,\n\t\tAppsetNamespace: namespace,\n\t}); err != nil && !strings.Contains(err.Error(), \"NotFound\") {\n\t\treturn argoCDAPIError(\"delete\", \"application set\", appSetName, err)\n\t}\n\n\td.SetId(\"\")\n\n\treturn nil\n}\n"
  },
  {
    "path": "argocd/resource_argocd_application_set_test.go",
    "content": "package argocd\n\nimport (\n\t\"fmt\"\n\t\"reflect\"\n\t\"regexp\"\n\t\"testing\"\n\n\t\"github.com/argoproj-labs/terraform-provider-argocd/internal/features\"\n\t\"github.com/hashicorp/terraform-plugin-testing/helper/acctest\"\n\t\"github.com/hashicorp/terraform-plugin-testing/helper/resource\"\n)\n\nfunc TestAccArgoCDApplicationSet_clusters(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t); testAccPreCheckFeatureSupported(t, features.ApplicationSet) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationSet_clusters(),\n\t\t\t\tCheck: resource.TestCheckResourceAttrSet(\n\t\t\t\t\t\"argocd_application_set.clusters\",\n\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application_set.clusters\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"metadata.0.resource_version\"},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplicationSet_clustersSelector(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t); testAccPreCheckFeatureSupported(t, features.ApplicationSet) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationSet_clustersSelector(),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.clusters_selector\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.clusters_selector\",\n\t\t\t\t\t\t\"spec.0.generator.0.clusters.0.selector.0.match_labels.%\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application_set.clusters_selector\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"metadata.0.resource_version\"},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplicationSet_clusterDecisionResource(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t); testAccPreCheckFeatureSupported(t, features.ApplicationSet) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationSet_clusterDecisionResource(),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.cluster_decision_resource\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.cluster_decision_resource\",\n\t\t\t\t\t\t\"spec.0.generator.0.cluster_decision_resource.0.config_map_ref\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.cluster_decision_resource\",\n\t\t\t\t\t\t\"spec.0.generator.0.cluster_decision_resource.0.name\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.cluster_decision_resource\",\n\t\t\t\t\t\t\"spec.0.generator.0.cluster_decision_resource.0.label_selector.0.match_labels.%\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application_set.cluster_decision_resource\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"metadata.0.resource_version\"},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplicationSet_gitDirectories(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t); testAccPreCheckFeatureSupported(t, features.ApplicationSet) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationSet_scmProviderGitDirectories(),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.git_directories\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.git_directories\",\n\t\t\t\t\t\t\"spec.0.generator.0.git.0.directory.0.path\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.git_directories\",\n\t\t\t\t\t\t\"spec.0.generator.0.git.0.directory.1.path\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.git_directories\",\n\t\t\t\t\t\t\"spec.0.generator.0.git.0.directory.1.exclude\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application_set.git_directories\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"metadata.0.resource_version\"},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplicationSet_gitFiles(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t); testAccPreCheckFeatureSupported(t, features.ApplicationSet) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationSet_scmProviderGitFiles(),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.git_files\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.git_files\",\n\t\t\t\t\t\t\"spec.0.generator.0.git.0.file.0.path\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application_set.git_files\",\n\t\t\t\t\t\t\"spec.0.generator.0.git.0.values.foo\",\n\t\t\t\t\t\t\"bar\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application_set.git_files\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"metadata.0.resource_version\"},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplicationSet_plugin(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t); testAccPreCheckFeatureSupported(t, features.ApplicationSet) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationSet_plugin(),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.plugin\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.plugin\",\n\t\t\t\t\t\t\"spec.0.generator.0.plugin.0.requeue_after_seconds\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.plugin\",\n\t\t\t\t\t\t\"spec.0.generator.0.plugin.0.config_map_ref\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.plugin\",\n\t\t\t\t\t\t\"spec.0.generator.0.plugin.0.input.0.parameters.key1\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application_set.plugin\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"metadata.0.resource_version\"},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplicationSet_list(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t); testAccPreCheckFeatureSupported(t, features.ApplicationSet) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationSet_list(),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.list\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.list\",\n\t\t\t\t\t\t\"spec.0.generator.0.list.0.elements.0.cluster\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.list\",\n\t\t\t\t\t\t\"spec.0.generator.0.list.0.elements.0.url\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application_set.list\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"metadata.0.resource_version\"},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplicationSet_listElementsYaml(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t); testAccPreCheckFeatureSupported(t, features.ApplicationSet) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationSet_listElementsYaml(),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.list_elements_yaml\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application_set.list_elements_yaml\",\n\t\t\t\t\t\t\"spec.0.generator.0.list.0.elements_yaml\",\n\t\t\t\t\t\t\"- cluster: engineering-dev\\n  url: https://kubernetes.default.svc\\n  environment: development\\n- cluster: engineering-prod\\n  url: https://kubernetes.default.svc\\n  environment: production\\n  foo: bar\\n\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application_set.list_elements_yaml\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"metadata.0.resource_version\"},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplicationSet_matrix(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t); testAccPreCheckFeatureSupported(t, features.ApplicationSet) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationSet_matrix(),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.matrix\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.matrix\",\n\t\t\t\t\t\t\"spec.0.generator.0.matrix.0.generator.0.git.0.directory.0.path\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.matrix\",\n\t\t\t\t\t\t\"spec.0.generator.0.matrix.0.generator.1.clusters.0.selector.0.match_labels.%\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application_set.matrix\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"metadata.0.resource_version\"},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplicationSet_matrixPluginGenerator(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t); testAccPreCheckFeatureSupported(t, features.ApplicationSet) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationSet_matrixPluginGenerator(),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.matrix-plugin_generator\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.matrix-plugin_generator\",\n\t\t\t\t\t\t\"spec.0.generator.0.matrix.0.generator.1.clusters.0.selector.0.match_labels.%\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.matrix-plugin_generator\",\n\t\t\t\t\t\t\"spec.0.generator.0.matrix.0.generator.0.plugin.0.requeue_after_seconds\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.matrix-plugin_generator\",\n\t\t\t\t\t\t\"spec.0.generator.0.matrix.0.generator.0.plugin.0.config_map_ref\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.matrix-plugin_generator\",\n\t\t\t\t\t\t\"spec.0.generator.0.matrix.0.generator.0.plugin.0.input.0.parameters.key1\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application_set.matrix-plugin_generator\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"metadata.0.resource_version\"},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplicationSet_matrixGitPathParamPrefix(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t); testAccPreCheckFeatureSupported(t, features.ApplicationSet) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationSet_matrixGitPathParamPrefix(),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.matrix_git_path_param_prefix\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application_set.matrix_git_path_param_prefix\",\n\t\t\t\t\t\t\"spec.0.generator.0.matrix.0.generator.0.git.0.path_param_prefix\",\n\t\t\t\t\t\t\"foo\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application_set.matrix_git_path_param_prefix\",\n\t\t\t\t\t\t\"spec.0.generator.0.matrix.0.generator.1.git.0.path_param_prefix\",\n\t\t\t\t\t\t\"bar\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application_set.matrix_git_path_param_prefix\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"metadata.0.resource_version\"},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplicationSet_matrixNested(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t); testAccPreCheckFeatureSupported(t, features.ApplicationSet) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationSet_matrixNested(),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.matrix_nested\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.matrix_nested\",\n\t\t\t\t\t\t\"spec.0.generator.0.matrix.0.generator.0.clusters.0.selector.0.match_labels.%\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.matrix_nested\",\n\t\t\t\t\t\t\"spec.0.generator.0.matrix.0.generator.1.matrix.0.generator.0.git.0.repo_url\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.matrix_nested\",\n\t\t\t\t\t\t\"spec.0.generator.0.matrix.0.generator.1.matrix.0.generator.1.list.0.elements.0.cluster\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application_set.matrix_nested\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"metadata.0.resource_version\"},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplicationSet_matrixInvalid(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t); testAccPreCheckFeatureSupported(t, features.ApplicationSet) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig:      testAccArgoCDApplicationSet_matrixInsufficientGenerators(),\n\t\t\t\tExpectError: regexp.MustCompile(\"Error: Insufficient generator blocks\"),\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig:      testAccArgoCDApplicationSet_matrixTooManyGenerators(),\n\t\t\t\tExpectError: regexp.MustCompile(\"Error: Too many generator blocks\"),\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig:      testAccArgoCDApplicationSet_matrixNestedInsufficientGenerators(),\n\t\t\t\tExpectError: regexp.MustCompile(\"Error: Insufficient generator blocks\"),\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig:      testAccArgoCDApplicationSet_matrixOnly1LevelOfNesting(),\n\t\t\t\tExpectError: regexp.MustCompile(\"Blocks of type \\\"matrix\\\" are not expected here.\"),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplicationSet_merge(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t); testAccPreCheckFeatureSupported(t, features.ApplicationSet) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationSet_merge(),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.merge\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application_set.merge\",\n\t\t\t\t\t\t\"spec.0.generator.0.merge.0.merge_keys.0\",\n\t\t\t\t\t\t\"server\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.merge\",\n\t\t\t\t\t\t\"spec.0.generator.0.merge.0.generator.0.clusters.0.values.%\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.merge\",\n\t\t\t\t\t\t\"spec.0.generator.0.merge.0.generator.1.clusters.0.selector.0.match_labels.%\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.merge\",\n\t\t\t\t\t\t\"spec.0.generator.0.merge.0.generator.2.list.0.elements.0.server\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application_set.merge\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"metadata.0.resource_version\", \"spec.0.template.0.spec.0.source.0.helm.0.parameter.0.force_string\", \"spec.0.template.0.spec.0.source.0.helm.0.parameter.1.force_string\"},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplicationSet_mergeNested(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t); testAccPreCheckFeatureSupported(t, features.ApplicationSet) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationSet_mergeNested(),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.merge_nested\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application_set.merge_nested\",\n\t\t\t\t\t\t\"spec.0.generator.0.merge.0.merge_keys.0\",\n\t\t\t\t\t\t\"server\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.merge_nested\",\n\t\t\t\t\t\t\"spec.0.generator.0.merge.0.generator.0.list.0.elements.0.server\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application_set.merge_nested\",\n\t\t\t\t\t\t\"spec.0.generator.0.merge.0.generator.1.merge.0.merge_keys.0\",\n\t\t\t\t\t\t\"server\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.merge_nested\",\n\t\t\t\t\t\t\"spec.0.generator.0.merge.0.generator.1.merge.0.generator.1.clusters.0.values.%\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.merge_nested\",\n\t\t\t\t\t\t\"spec.0.generator.0.merge.0.generator.1.merge.0.generator.1.clusters.0.selector.0.match_labels.%\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application_set.merge_nested\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"metadata.0.resource_version\", \"spec.0.template.0.spec.0.source.0.helm.0.parameter.0.force_string\", \"spec.0.template.0.spec.0.source.0.helm.0.parameter.1.force_string\"},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplicationSet_scmProviderAzureDevOps(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t); testAccPreCheckFeatureSupported(t, features.ApplicationSet) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationSet_scmProviderAzureDevOps(),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.scm_ado\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application_set.scm_ado\",\n\t\t\t\t\t\t\"spec.0.generator.0.scm_provider.0.azure_devops.0.organization\",\n\t\t\t\t\t\t\"myorg\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application_set.scm_ado\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"metadata.0.resource_version\"},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplicationSet_scmProviderBitbucketCloud(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t); testAccPreCheckFeatureSupported(t, features.ApplicationSet) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationSet_scmProviderBitbucketCloud(),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.scm_bitbucket_cloud\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application_set.scm_bitbucket_cloud\",\n\t\t\t\t\t\t\"spec.0.generator.0.scm_provider.0.bitbucket_cloud.0.owner\",\n\t\t\t\t\t\t\"example-owner\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application_set.scm_bitbucket_cloud\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"metadata.0.resource_version\"},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplicationSet_scmProviderBitbucketServer(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t); testAccPreCheckFeatureSupported(t, features.ApplicationSet) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationSet_scmProviderBitbucketServer(),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.scm_bitbucket_server\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application_set.scm_bitbucket_server\",\n\t\t\t\t\t\t\"spec.0.generator.0.scm_provider.0.bitbucket_server.0.project\",\n\t\t\t\t\t\t\"myproject\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application_set.scm_bitbucket_server\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"metadata.0.resource_version\"},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplicationSet_scmProviderGitea(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t); testAccPreCheckFeatureSupported(t, features.ApplicationSet) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationSet_scmProviderGitea(),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.scm_gitea\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application_set.scm_gitea\",\n\t\t\t\t\t\t\"spec.0.generator.0.scm_provider.0.gitea.0.owner\",\n\t\t\t\t\t\t\"myorg\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application_set.scm_gitea\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"metadata.0.resource_version\"},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplicationSet_scmProviderGithub(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t); testAccPreCheckFeatureSupported(t, features.ApplicationSet) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationSet_scmProviderGithub(),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.scm_github\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application_set.scm_github\",\n\t\t\t\t\t\t\"spec.0.generator.0.scm_provider.0.github.0.organization\",\n\t\t\t\t\t\t\"myorg\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application_set.scm_github\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"metadata.0.resource_version\"},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplicationSet_scmProviderGitlab(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t); testAccPreCheckFeatureSupported(t, features.ApplicationSet) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationSet_scmProviderGitlab(),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.scm_gitlab\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application_set.scm_gitlab\",\n\t\t\t\t\t\t\"spec.0.generator.0.scm_provider.0.gitlab.0.group\",\n\t\t\t\t\t\t\"8675309\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application_set.scm_gitlab\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"metadata.0.resource_version\"},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplicationSet_scmProviderWithFilters(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t); testAccPreCheckFeatureSupported(t, features.ApplicationSet) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationSet_scmProviderWithFilters(),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.scm_filters\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application_set.scm_filters\",\n\t\t\t\t\t\t\"spec.0.generator.0.scm_provider.0.filter.0.repository_match\",\n\t\t\t\t\t\t\"^myapp\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application_set.scm_filters\",\n\t\t\t\t\t\t\"spec.0.generator.0.scm_provider.0.filter.0.paths_exist.0\",\n\t\t\t\t\t\t\"kubernetes/kustomization.yaml\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application_set.scm_filters\",\n\t\t\t\t\t\t\"spec.0.generator.0.scm_provider.0.filter.1.repository_match\",\n\t\t\t\t\t\t\"^otherapp\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application_set.scm_filters\",\n\t\t\t\t\t\t\"spec.0.generator.0.scm_provider.0.filter.1.paths_do_not_exist.0\",\n\t\t\t\t\t\t\"disabledrepo.txt\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application_set.scm_filters\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"metadata.0.resource_version\"},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplicationSet_pullRequestBitbucketServer(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t); testAccPreCheckFeatureSupported(t, features.ApplicationSet) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationSet_pullRequestBitbucketServer(),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.pr_bitbucket_server\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application_set.pr_bitbucket_server\",\n\t\t\t\t\t\t\"spec.0.generator.0.pull_request.0.bitbucket_server.0.project\",\n\t\t\t\t\t\t\"myproject\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application_set.pr_bitbucket_server\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"metadata.0.resource_version\", \"spec.0.template.0.spec.0.source.0.helm.0.parameter.0.force_string\"},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplicationSet_pullRequestGitea(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t); testAccPreCheckFeatureSupported(t, features.ApplicationSet) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationSet_pullRequestGitea(),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.pr_gitea\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application_set.pr_gitea\",\n\t\t\t\t\t\t\"spec.0.generator.0.pull_request.0.gitea.0.owner\",\n\t\t\t\t\t\t\"myorg\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application_set.pr_gitea\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"metadata.0.resource_version\", \"spec.0.template.0.spec.0.source.0.helm.0.parameter.0.force_string\"},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplicationSet_pullRequestGithub(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t); testAccPreCheckFeatureSupported(t, features.ApplicationSet) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationSet_pullRequestGithub(),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.pr_github\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application_set.pr_github\",\n\t\t\t\t\t\t\"spec.0.generator.0.pull_request.0.github.0.owner\",\n\t\t\t\t\t\t\"myorg\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application_set.pr_github\",\n\t\t\t\t\t\t\"spec.0.generator.0.pull_request.0.github.0.labels.0\",\n\t\t\t\t\t\t\"preview\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application_set.pr_github\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"metadata.0.resource_version\", \"spec.0.template.0.spec.0.source.0.helm.0.parameter.0.force_string\"},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplicationSet_pullRequestGitlab(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t); testAccPreCheckFeatureSupported(t, features.ApplicationSet) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationSet_pullRequestGitlab(),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.pr_gitlab\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application_set.pr_gitlab\",\n\t\t\t\t\t\t\"spec.0.generator.0.pull_request.0.gitlab.0.project\",\n\t\t\t\t\t\t\"myproject\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application_set.pr_gitlab\",\n\t\t\t\t\t\t\"spec.0.generator.0.pull_request.0.gitlab.0.labels.0\",\n\t\t\t\t\t\t\"preview\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application_set.pr_gitlab\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"metadata.0.resource_version\", \"spec.0.template.0.spec.0.source.0.helm.0.parameter.0.force_string\"},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplicationSet_pullRequestGitlabInsecureAndCARef(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t); testAccPreCheckFeatureSupported(t, features.ApplicationSet) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationSet_pullRequestGitlabInsecureAndCARef(),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.pr_gitlab_insecure\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application_set.pr_gitlab_insecure\",\n\t\t\t\t\t\t\"spec.0.generator.0.pull_request.0.gitlab.0.project\",\n\t\t\t\t\t\t\"myproject\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application_set.pr_gitlab_insecure\",\n\t\t\t\t\t\t\"spec.0.generator.0.pull_request.0.gitlab.0.insecure\",\n\t\t\t\t\t\t\"true\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application_set.pr_gitlab_insecure\",\n\t\t\t\t\t\t\"spec.0.generator.0.pull_request.0.gitlab.0.ca_ref.0.key\",\n\t\t\t\t\t\t\"ca.crt\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application_set.pr_gitlab_insecure\",\n\t\t\t\t\t\t\"spec.0.generator.0.pull_request.0.gitlab.0.ca_ref.0.config_map_name\",\n\t\t\t\t\t\t\"gitlab-ca-cert\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application_set.pr_gitlab_insecure\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"metadata.0.resource_version\", \"spec.0.template.0.spec.0.source.0.helm.0.parameter.0.force_string\"},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplicationSet_pullRequestAzureDevOps(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t); testAccPreCheckFeatureSupported(t, features.ApplicationSet) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationSet_pullRequestAzureDevOps(),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.pr_azure_devops\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application_set.pr_azure_devops\",\n\t\t\t\t\t\t\"spec.0.generator.0.pull_request.0.azure_devops.0.organization\",\n\t\t\t\t\t\t\"myorg\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application_set.pr_azure_devops\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"metadata.0.resource_version\", \"spec.0.template.0.spec.0.source.0.helm.0.parameter.0.force_string\"},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplicationSet_mergeInvalid(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t); testAccPreCheckFeatureSupported(t, features.ApplicationSet) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig:      testAccArgoCDApplicationSet_mergeInsufficientGenerators(),\n\t\t\t\tExpectError: regexp.MustCompile(\"Error: Insufficient generator blocks\"),\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig:      testAccArgoCDApplicationSet_mergeNestedInsufficientGenerators(),\n\t\t\t\tExpectError: regexp.MustCompile(\"Error: Insufficient generator blocks\"),\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig:      testAccArgoCDApplicationSet_mergeOnly1LevelOfNesting(),\n\t\t\t\tExpectError: regexp.MustCompile(\"Blocks of type \\\"merge\\\" are not expected here.\"),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplicationSet_generatorTemplate(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t); testAccPreCheckFeatureSupported(t, features.ApplicationSet) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationSet_generatorTemplate(),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.generator_template\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application_set.generator_template\",\n\t\t\t\t\t\t\"spec.0.generator.0.list.0.elements.0.cluster\",\n\t\t\t\t\t\t\"engineering-dev\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application_set.generator_template\",\n\t\t\t\t\t\t\"spec.0.generator.0.list.0.template.0.spec.0.project\",\n\t\t\t\t\t\t\"default\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application_set.generator_template\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"metadata.0.resource_version\"},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplicationSet_goTemplate(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t); testAccPreCheckFeatureSupported(t, features.ApplicationSet) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationSet_goTemplate(),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.go_template\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application_set.go_template\",\n\t\t\t\t\t\t\"spec.0.go_template\",\n\t\t\t\t\t\t\"true\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application_set.go_template\",\n\t\t\t\t\t\t\"spec.0.go_template_options.0\",\n\t\t\t\t\t\t\"missingkey=error\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application_set.go_template\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"metadata.0.resource_version\"},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplicationSet_syncPolicy(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t); testAccPreCheckFeatureSupported(t, features.ApplicationSet) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationSet_syncPolicy(),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.sync_policy\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application_set.sync_policy\",\n\t\t\t\t\t\t\"spec.0.sync_policy.0.preserve_resources_on_deletion\",\n\t\t\t\t\t\t\"true\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application_set.sync_policy\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"metadata.0.resource_version\"},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplicationSet_syncPolicyWithApplicationsSyncPolicy(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck: func() {\n\t\t\ttestAccPreCheck(t)\n\t\t\ttestAccPreCheckFeatureSupported(t, features.ApplicationSetApplicationsSyncPolicy)\n\t\t},\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationSet_syncPolicyWithApplicationsSync(),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.applications_sync_policy\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application_set.applications_sync_policy\",\n\t\t\t\t\t\t\"spec.0.sync_policy.0.preserve_resources_on_deletion\",\n\t\t\t\t\t\t\"true\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application_set.applications_sync_policy\",\n\t\t\t\t\t\t\"spec.0.sync_policy.0.applications_sync\",\n\t\t\t\t\t\t\"create-update\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application_set.applications_sync_policy\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"metadata.0.resource_version\"},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplicationSet_progressiveSync(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t); testAccPreCheckFeatureSupported(t, features.ApplicationSetProgressiveSync) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationSet_progressiveSync(),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.progressive_sync\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application_set.progressive_sync\",\n\t\t\t\t\t\t\"spec.0.strategy.0.type\",\n\t\t\t\t\t\t\"RollingSync\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application_set.progressive_sync\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"metadata.0.resource_version\"},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplicationSet_templatePatch(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t); testAccPreCheckFeatureSupported(t, features.ApplicationSetTemplatePatch) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationSet_templatePatch(),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.template_patch\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application_set.template_patch\",\n\t\t\t\t\t\t\"spec.0.template_patch\",\n\t\t\t\t\t\t\"    spec:\\n      source:\\n        helm:\\n          valueFiles:\\n          {{- range $valueFile := .valueFiles }}\\n            - {{ $valueFile }}\\n          {{- end }}\\n    {{- if .autoSync }}\\n      syncPolicy:\\n        automated:\\n          prune: {{ .prune }}\\n    {{- end }}\\n\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application_set.template_patch\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"metadata.0.resource_version\"},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplicationSet_CustomNamespace(t *testing.T) {\n\tname := acctest.RandomWithPrefix(\"appset-ns\")\n\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t); testAccPreCheckFeatureSupported(t, features.ApplicationSet) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationSetCustomNamespace(name),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application_set.custom_namespace\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application_set.custom_namespace\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"wait\", \"cascade\", \"status\", \"validate\", \"metadata.0.resource_version\", \"spec.0.template.0.spec.0.source.0.helm.0.parameter.0.force_string\", \"spec.0.template.0.spec.0.source.0.helm.0.parameter.1.force_string\"},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestUpgradeSchemaApplicationSet_V0V1_Default_NoChange(t *testing.T) {\n\tt.Parallel()\n\n\tv0 := map[string]interface{}{\n\t\t\"metadata\": []interface{}{\n\t\t\tmap[string]interface{}{\n\t\t\t\t\"name\":      \"test\",\n\t\t\t\t\"namespace\": \"argocd\",\n\t\t\t},\n\t\t},\n\t\t\"spec\": []interface{}{\n\t\t\tmap[string]interface{}{\n\t\t\t\t\"generator\": []interface{}{\n\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\"clusters\": []interface{}{map[string]interface{}{}},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"template\": []interface{}{\n\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\"metadata\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\t\t\"name\": \"{{ name }}-clusters\",\n\t\t\t\t\t\t}},\n\t\t\t\t\t\t\"spec\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\t\t\"source\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\t\t\t\"repo_url\":        \"https://github.com/argoproj/argocd-example-apps\",\n\t\t\t\t\t\t\t\t\"target_revision\": \"HEAD\",\n\t\t\t\t\t\t\t\t\"path\":            \"guestbook\",\n\t\t\t\t\t\t\t}},\n\t\t\t\t\t\t\t\"destination\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\t\t\t\"server\":    \"{{ server }}\",\n\t\t\t\t\t\t\t\t\"namespace\": \"default\",\n\t\t\t\t\t\t\t}},\n\t\t\t\t\t\t}},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}\n\n\tactual, _ := resourceArgoCDApplicationStateUpgradeV0(t.Context(), v0, nil)\n\n\tif !reflect.DeepEqual(v0, actual) {\n\t\tt.Fatalf(\"\\n\\nexpected:\\n\\n%#v\\n\\ngot:\\n\\n%#v\\n\\n\", v0, actual)\n\t}\n}\n\nfunc testAccArgoCDApplicationSet_clusters() string {\n\treturn `\nresource \"argocd_application_set\" \"clusters\" {\n\tmetadata {\n\t\tname = \"clusters\"\n\t}\n\n\tspec {\n\t\tgenerator {\n\t\t\tclusters {} # Automatically use all clusters defined within Argo CD\n\t\t}\n\n\t\ttemplate {\n\t\t\tmetadata {\n\t\t\t\tname = \"{{name}}-clusters\"\n\t\t\t}\n\n\t\t\tspec {\n\t\t\t\tsource {\n\t\t\t\t\trepo_url        = \"https://github.com/argoproj/argo-cd/\"\n\t\t\t\t\ttarget_revision = \"HEAD\"\n\t\t\t\t\tpath            = \"test/e2e/testdata/guestbook\"\n\t\t\t\t}\n\n\t\t\t\tdestination {\n\t\t\t\t\tserver    = \"{{server}}\"\n\t\t\t\t\tnamespace = \"default\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}`\n}\n\nfunc testAccArgoCDApplicationSet_clustersSelector() string {\n\treturn `\nresource \"argocd_application_set\" \"clusters_selector\" {\n\tmetadata {\n\t\tname = \"clusters-selector\"\n\t}\n\n\tspec {\n\t\tgenerator {\n\t\t\tclusters {\n\t\t\t\tselector {\n\t\t\t\t\tmatch_labels = {\n\t\t\t\t\t\t\"argocd.argoproj.io/secret-type\" = \"cluster\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ttemplate {\n\t\t\tmetadata {\n\t\t\t\tname = \"{{name}}-clusters-selector\"\n\t\t\t}\n\n\t\t\tspec {\n\t\t\t\tsource {\n\t\t\t\t\trepo_url        = \"https://github.com/argoproj/argo-cd/\"\n\t\t\t\t\ttarget_revision = \"HEAD\"\n\t\t\t\t\tpath            = \"test/e2e/testdata/guestbook\"\n\t\t\t\t}\n\n\t\t\t\tdestination {\n\t\t\t\t\tserver    = \"{{server}}\"\n\t\t\t\t\tnamespace = \"default\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}`\n}\n\nfunc testAccArgoCDApplicationSet_clusterDecisionResource() string {\n\treturn `\nresource \"argocd_application_set\" \"cluster_decision_resource\" {\n\tmetadata {\n\t\tname = \"cluster-decision-resource\"\n\t}\n\n\tspec {\n\t\tgenerator {\n\t\t\tcluster_decision_resource {\n\t\t\t\tconfig_map_ref        = \"my-configmap\"\n\t\t\t\tname                  = \"quak\"\n\t\t\t\trequeue_after_seconds = \"180\"\n\n\t\t\t\tlabel_selector {\n\t\t\t\t\tmatch_labels = {\n\t\t\t\t\t\tduck = \"spotted\"\n\t\t\t\t\t}\n\n\t\t\t\t\tmatch_expressions {\n\t\t\t\t\t\tkey = \"duck\"\n\t\t\t\t\t\toperator = \"In\"\n\t\t\t\t\t\tvalues = [\n\t\t\t\t\t\t\t\"spotted\",\n\t\t\t\t\t\t\t\"canvasback\"\n\t\t\t\t\t\t]\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ttemplate {\n\t\t\tmetadata {\n\t\t\t\tname = \"{{name}}-cluster-decision-resource\"\n\t\t\t}\n\n\t\t\tspec {\n\t\t\t\tsource {\n\t\t\t\t\trepo_url        = \"https://github.com/argoproj/argo-cd/\"\n\t\t\t\t\ttarget_revision = \"HEAD\"\n\t\t\t\t\tpath            = \"test/e2e/testdata/guestbook\"\n\t\t\t\t}\n\n\t\t\t\tdestination {\n\t\t\t\t\tserver    = \"{{server}}\"\n\t\t\t\t\tnamespace = \"default\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}`\n}\n\nfunc testAccArgoCDApplicationSet_scmProviderGitDirectories() string {\n\treturn `\nresource \"argocd_application_set\" \"git_directories\" {\n\tmetadata {\n\t\tname = \"git-directories\"\n\t}\n\n\tspec {\n\t\tgenerator {\n\t\t\tgit {\n\t\t\t\trepo_url = \"https://github.com/argoproj/argo-cd.git\"\n      \t\t\trevision = \"HEAD\"\n\n\t\t\t\tdirectory {\n\t\t\t\t\tpath = \"applicationset/examples/git-generator-directory/cluster-addons/*\"\n\t\t\t\t}\n\n\t\t\t\tdirectory {\n\t\t\t\t\tpath = \"applicationset/examples/git-generator-directory/excludes/cluster-addons/exclude-helm-guestbook\"\n\t\t\t\t\texclude = true\n\t\t\t\t}\n\t\t\t\trequeue_after_seconds = \"30\"\n\t\t\t}\n\t\t}\n\n\t\ttemplate {\n\t\t\tmetadata {\n\t\t\t\tname = \"{{path.basename}}-git-directories\"\n\t\t\t}\n\n\t\t\tspec {\n\t\t\t\tsource {\n\t\t\t\t\trepo_url        = \"https://github.com/argoproj/argo-cd.git\"\n\t\t\t\t\ttarget_revision = \"HEAD\"\n\t\t\t\t\tpath            = \"{{path}}\"\n\t\t\t\t}\n\n\t\t\t\tdestination {\n\t\t\t\t\tserver    = \"https://kubernetes.default.svc\"\n\t\t\t\t\tnamespace = \"{{path.basename}}\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}`\n}\n\nfunc testAccArgoCDApplicationSet_scmProviderGitFiles() string {\n\treturn `\nresource \"argocd_application_set\" \"git_files\" {\n\tmetadata {\n\t\tname = \"git-files\"\n\t}\n\n\tspec {\n\t\tgenerator {\n\t\t\tgit {\n\t\t\t\trepo_url = \"https://github.com/argoproj/argo-cd.git\"\n      \t\t\trevision = \"HEAD\"\n\n\t\t\t\tfile {\n\t\t\t\t\tpath = \"applicationset/examples/git-generator-files-discovery/cluster-config/**/config.json\"\n\t\t\t\t}\n\t\t\t\tvalues = {\n\t\t\t\t\tfoo = \"bar\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ttemplate {\n\t\t\tmetadata {\n\t\t\t\tname = \"{{cluster.name}}-git-files\"\n\t\t\t}\n\n\t\t\tspec {\n\t\t\t\tsource {\n\t\t\t\t\trepo_url        = \"https://github.com/argoproj/argo-cd.git\"\n\t\t\t\t\ttarget_revision = \"HEAD\"\n\t\t\t\t\tpath            = \"applicationset/examples/git-generator-files-discovery/apps/guestbook\"\n\t\t\t\t}\n\n\t\t\t\tdestination {\n\t\t\t\t\tserver    = \"{{cluster.address}}\"\n\t\t\t\t\tnamespace = \"guestbook\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}`\n}\n\nfunc testAccArgoCDApplicationSet_plugin() string {\n\treturn `\nresource \"argocd_application_set\" \"plugin\" {\n\tmetadata {\n\t\tname = \"plugin\"\n\t}\n\n\tspec {\n\t\tgenerator {\n\t\t\tplugin {\n\t\t\t\tconfig_map_ref = \"plugin\"\n\n\t\t\t\tinput {\n\t\t\t\t\tparameters = {\n\t\t\t\t\t\tkey1 = \"value1\"\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\trequeue_after_seconds = 30\n\t\t\t}\n\t\t}\n\n\t\ttemplate {\n\t\t\tmetadata {\n\t\t\t\tname = \"{{cluster}}-guestbook\"\n\t\t\t}\n\n\t\t\tspec {\n\t\t\t\tproject = \"default\"\n\n\t\t\t\tsource {\n\t\t\t\t\trepo_url        = \"https://github.com/argoproj/argo-cd.git\"\n\t\t\t\t\ttarget_revision = \"HEAD\"\n\t\t\t\t\tpath            = \"applicationset/examples/list-generator/guestbook/{{cluster}}\"\n\t\t\t\t}\n\n\t\t\t\tdestination {\n\t\t\t\t\tserver    = \"{{url}}\"\n\t\t\t\t\tnamespace = \"guestbook\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}`\n}\n\nfunc testAccArgoCDApplicationSet_list() string {\n\treturn `\nresource \"argocd_application_set\" \"list\" {\n\tmetadata {\n\t\tname = \"list\"\n\t}\n\n\tspec {\n\t\tgenerator {\n\t\t\tlist {\n\t\t\t\telements = [\n\t\t\t\t\t{\n\t\t\t\t\t\tcluster = \"engineering-dev\"\n\t\t\t\t\t\turl     = \"https://kubernetes.default.svc\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t}\n\n\t\ttemplate {\n\t\t\tmetadata {\n\t\t\t\tname = \"{{cluster}}-guestbook\"\n\t\t\t}\n\n\t\t\tspec {\n\t\t\t\tproject = \"default\"\n\n\t\t\t\tsource {\n\t\t\t\t\trepo_url        = \"https://github.com/argoproj/argo-cd.git\"\n\t\t\t\t\ttarget_revision = \"HEAD\"\n\t\t\t\t\tpath            = \"applicationset/examples/list-generator/guestbook/{{cluster}}\"\n\t\t\t\t}\n\n\t\t\t\tdestination {\n\t\t\t\t\tserver    = \"{{url}}\"\n\t\t\t\t\tnamespace = \"guestbook\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}`\n}\n\nfunc testAccArgoCDApplicationSet_listElementsYaml() string {\n\treturn `\nresource \"argocd_application_set\" \"list_elements_yaml\" {\n\tmetadata {\n\t\tname = \"list-elements-yaml\"\n\t}\n\n\tspec {\n\t\tgenerator {\n\t\t\tlist {\n\t\t\t\telements = []\n\t\t\t\telements_yaml = <<-EOT\n\t\t\t\t\t- cluster: engineering-dev\n\t\t\t\t\t  url: https://kubernetes.default.svc\n\t\t\t\t\t  environment: development\n\t\t\t\t\t- cluster: engineering-prod\n\t\t\t\t\t  url: https://kubernetes.default.svc\n\t\t\t\t\t  environment: production\n\t\t\t\t\t  foo: bar\n\t\t\t\tEOT\n\t\t\t}\n\t\t}\n\n\t\ttemplate {\n\t\t\tmetadata {\n\t\t\t\tname = \"{{cluster}}-guestbook\"\n\t\t\t}\n\n\t\t\tspec {\n\t\t\t\tproject = \"default\"\n\n\t\t\t\tsource {\n\t\t\t\t\trepo_url        = \"https://github.com/argoproj/argo-cd.git\"\n\t\t\t\t\ttarget_revision = \"HEAD\"\n\t\t\t\t\tpath            = \"applicationset/examples/list-generator/guestbook/{{cluster}}\"\n\t\t\t\t}\n\n\t\t\t\tdestination {\n\t\t\t\t\tserver    = \"{{url}}\"\n\t\t\t\t\tnamespace = \"guestbook\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}`\n}\n\nfunc testAccArgoCDApplicationSet_matrix() string {\n\treturn `\nresource \"argocd_application_set\" \"matrix\" {\n\tmetadata {\n\t\tname = \"matrix\"\n\t}\n\n\tspec {\n\t\tgenerator {\n\t\t\tmatrix {\n\t\t\t\tgenerator {\n\t\t\t\t\tgit {\n\t\t\t\t\t\trepo_url = \"https://github.com/argoproj/argo-cd.git\"\n\t\t\t\t\t\trevision = \"HEAD\"\n\n\t\t\t\t\t\tdirectory {\n\t\t\t\t\t\t\tpath = \"applicationset/examples/matrix/cluster-addons/*\"\n\t\t\t\t\t\t}\n\t\t\t\t\t\trequeue_after_seconds = \"30\"\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tgenerator {\n\t\t\t\t\tclusters{\n\t\t\t\t\t\tselector{\n\t\t\t\t\t\t\tmatch_labels = {\n\t\t\t\t\t\t\t\t\"argocd.argoproj.io/secret-type\" = \"cluster\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ttemplate {\n\t\t\tmetadata {\n\t\t\t\tname = \"{{path.basename}}-{{name}}\"\n\t\t\t}\n\n\t\t\tspec {\n\t\t\t\tproject = \"default\"\n\n\t\t\t\tsource {\n\t\t\t\t\trepo_url        = \"https://github.com/argoproj/argo-cd.git\"\n\t\t\t\t\ttarget_revision = \"HEAD\"\n\t\t\t\t\tpath            = \"{{path}}\"\n\t\t\t\t}\n\n\t\t\t\tdestination {\n\t\t\t\t\tserver    = \"{{server}}\"\n\t\t\t\t\tnamespace = \"{{path.basename}}\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}`\n}\n\nfunc testAccArgoCDApplicationSet_matrixPluginGenerator() string {\n\treturn `\nresource \"argocd_application_set\" \"matrix-plugin_generator\" {\n\tmetadata {\n\t\tname = \"matrix-plugin-generator\"\n\t}\n\n\tspec {\n\t\tgenerator {\n\t\t\tmatrix {\n\t\t\t\tgenerator {\n\t\t\t\t\tplugin {\n\t\t\t\t\t\tconfig_map_ref = \"plugin\"\n\n\t\t\t\t\t\tinput {\n\t\t\t\t\t\t\tparameters = {\n\t\t\t\t\t\t\t\tkey1 = \"value1\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\trequeue_after_seconds = 30\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tgenerator {\n\t\t\t\t\tclusters{\n\t\t\t\t\t\tselector{\n\t\t\t\t\t\t\tmatch_labels = {\n\t\t\t\t\t\t\t\t\"argocd.argoproj.io/secret-type\" = \"cluster\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ttemplate {\n\t\t\tmetadata {\n\t\t\t\tname = \"{{path.basename}}-{{name}}\"\n\t\t\t}\n\n\t\t\tspec {\n\t\t\t\tproject = \"default\"\n\n\t\t\t\tsource {\n\t\t\t\t\trepo_url        = \"https://github.com/argoproj/argo-cd.git\"\n\t\t\t\t\ttarget_revision = \"HEAD\"\n\t\t\t\t\tpath            = \"{{path}}\"\n\t\t\t\t}\n\n\t\t\t\tdestination {\n\t\t\t\t\tserver    = \"{{server}}\"\n\t\t\t\t\tnamespace = \"{{path.basename}}\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}`\n}\n\nfunc testAccArgoCDApplicationSet_matrixGitPathParamPrefix() string {\n\treturn `\nresource \"argocd_application_set\" \"matrix_git_path_param_prefix\" {\n\tmetadata {\n\t\tname = \"matrix-git-path-param-prefix\"\n\t}\n\n\tspec {\n\t\tgenerator {\n\t\t\tmatrix {\n\t\t\t\tgenerator {\n\t\t\t\t\tgit {\n\t\t\t\t\t\trepo_url          = \"https://github.com/argoproj/argo-cd.git\"\n\t\t\t\t\t\trevision          = \"HEAD\"\n\t\t\t\t\t\tpath_param_prefix = \"foo\"\n\n\t\t\t\t\t\tfile {\n\t\t\t\t\t\t\tpath = \"applicationset/examples/git-generator-files-discovery/cluster-config/**/config.json\"\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tgenerator {\n\t\t\t\t\tgit {\n\t\t\t\t\t\trepo_url          = \"https://github.com/argoproj/argo-cd.git\"\n\t\t\t\t\t\trevision          = \"HEAD\"\n\t\t\t\t\t\tpath_param_prefix = \"bar\"\n\n\t\t\t\t\t\tfile {\n\t\t\t\t\t\t\tpath = \"applicationset/examples/git-generator-files-discovery/cluster-config/**/config.json\"\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ttemplate {\n\t\t\tmetadata {\n\t\t\t\tname = \"matrix-git-path-param-prefix\"\n\t\t\t}\n\n\t\t\tspec {\n\t\t\t\tsource {\n\t\t\t\t\trepo_url        = \"https://github.com/argoproj/argo-cd.git\"\n\t\t\t\t\ttarget_revision = \"HEAD\"\n\t\t\t\t\tpath            = \"applicationset/examples/git-generator-files-discovery/apps/guestbook\"\n\t\t\t\t}\n\n\t\t\t\tdestination {\n\t\t\t\t\tserver    = \"{{cluster.address}}\"\n\t\t\t\t\tnamespace = \"guestbook\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}`\n}\n\nfunc testAccArgoCDApplicationSet_matrixNested() string {\n\treturn `\nresource \"argocd_application_set\" \"matrix_nested\" {\n\tmetadata {\n\t\tname = \"matrix-nested\"\n\t}\n\n\tspec {\n\t\tgenerator {\n\t\t\tmatrix {\n\t\t\t\tgenerator {\n\t\t\t\t\tclusters{\n\t\t\t\t\t\tselector{\n\t\t\t\t\t\t\tmatch_labels = {\n\t\t\t\t\t\t\t\t\"argocd.argoproj.io/secret-type\" = \"cluster\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tgenerator {\n\t\t\t\t\tmatrix {\n\t\t\t\t\t\tgenerator {\n\t\t\t\t\t\t\tgit {\n\t\t\t\t\t\t\t\trepo_url = \"https://github.com/argoproj/argo-cd.git\"\n\t\t\t\t\t\t\t\trevision = \"HEAD\"\n\n\t\t\t\t\t\t\t\tdirectory {\n\t\t\t\t\t\t\t\t\tpath = \"applicationset/examples/matrix/cluster-addons/*\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tgenerator {\n\t\t\t\t\t\t\tlist {\n\t\t\t\t\t\t\t\telements = [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcluster = \"engineering-dev\"\n\t\t\t\t\t\t\t\t\t\turl     = \"https://kubernetes.default.svc\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ttemplate {\n\t\t\tmetadata {\n\t\t\t\tname = \"nested-{{path.basename}}-{{name}}\"\n\t\t\t}\n\n\t\t\tspec {\n\t\t\t\tproject = \"default\"\n\n\t\t\t\tsource {\n\t\t\t\t\trepo_url        = \"https://github.com/argoproj/argo-cd.git\"\n\t\t\t\t\ttarget_revision = \"HEAD\"\n\t\t\t\t\tpath            = \"{{path}}\"\n\t\t\t\t}\n\n\t\t\t\tdestination {\n\t\t\t\t\tserver    = \"{{server}}\"\n\t\t\t\t\tnamespace = \"{{path.basename}}\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}`\n}\n\nfunc testAccArgoCDApplicationSet_matrixInsufficientGenerators() string {\n\treturn `\nresource \"argocd_application_set\" \"matrix_insufficient_generators\" {\n\tmetadata {\n\t\tname = \"matrix-insufficient-generators\"\n\t}\n\n\tspec {\n\t\tgenerator {\n\t\t\tmatrix {\n\t\t\t\tgenerator {\n\t\t\t\t\tgit {\n\t\t\t\t\t\trepo_url = \"https://github.com/argoproj/argo-cd.git\"\n\t\t\t\t\t\trevision = \"HEAD\"\n\n\t\t\t\t\t\tdirectory {\n\t\t\t\t\t\t\tpath = \"applicationset/examples/matrix/cluster-addons/*\"\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ttemplate {\n\t\t\tmetadata {\n\t\t\t\tname = \"{{path.basename}}-{{name}}\"\n\t\t\t}\n\n\t\t\tspec {\n\t\t\t\tproject = \"default\"\n\n\t\t\t\tsource {\n\t\t\t\t\trepo_url        = \"https://github.com/argoproj/argo-cd.git\"\n\t\t\t\t\ttarget_revision = \"HEAD\"\n\t\t\t\t\tpath            = \"{{path}}\"\n\t\t\t\t}\n\n\t\t\t\tdestination {\n\t\t\t\t\tserver    = \"{{server}}\"\n\t\t\t\t\tnamespace = \"{{path.basename}}\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}`\n}\n\nfunc testAccArgoCDApplicationSet_matrixTooManyGenerators() string {\n\treturn `\nresource \"argocd_application_set\" \"matrix_too_many_generators\" {\n\tmetadata {\n\t\tname = \"matrix-too-many-generators\"\n\t}\n\n\tspec {\n\t\tgenerator {\n\t\t\tmatrix {\n\t\t\t\tgenerator {\n\t\t\t\t\tgit {\n\t\t\t\t\t\trepo_url = \"https://github.com/argoproj/argo-cd.git\"\n\t\t\t\t\t\trevision = \"HEAD\"\n\n\t\t\t\t\t\tdirectory {\n\t\t\t\t\t\t\tpath = \"applicationset/examples/matrix/cluster-addons/*\"\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tgenerator {\n\t\t\t\t\tgit {\n\t\t\t\t\t\trepo_url = \"https://github.com/argoproj/argo-cd.git\"\n\t\t\t\t\t\trevision = \"HEAD\"\n\n\t\t\t\t\t\tdirectory {\n\t\t\t\t\t\t\tpath = \"applicationset/examples/matrix/cluster-addons/*\"\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tgenerator {\n\t\t\t\t\tgit {\n\t\t\t\t\t\trepo_url = \"https://github.com/argoproj/argo-cd.git\"\n\t\t\t\t\t\trevision = \"HEAD\"\n\n\t\t\t\t\t\tdirectory {\n\t\t\t\t\t\t\tpath = \"applicationset/examples/matrix/cluster-addons/*\"\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ttemplate {\n\t\t\tmetadata {\n\t\t\t\tname = \"{{path.basename}}-{{name}}\"\n\t\t\t}\n\n\t\t\tspec {\n\t\t\t\tproject = \"default\"\n\n\t\t\t\tsource {\n\t\t\t\t\trepo_url        = \"https://github.com/argoproj/argo-cd.git\"\n\t\t\t\t\ttarget_revision = \"HEAD\"\n\t\t\t\t\tpath            = \"{{path}}\"\n\t\t\t\t}\n\n\t\t\t\tdestination {\n\t\t\t\t\tserver    = \"{{server}}\"\n\t\t\t\t\tnamespace = \"{{path.basename}}\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}`\n}\n\nfunc testAccArgoCDApplicationSet_matrixNestedInsufficientGenerators() string {\n\treturn `\nresource \"argocd_application_set\" \"matrix_nested_insufficient_generators\" {\n\tmetadata {\n\t\tname = \"matrix-nested-insufficient-generators\"\n\t}\n\n\tspec {\n\t\tgenerator {\n\t\t\tmatrix {\n\t\t\t\tgenerator {\n\t\t\t\t\tclusters{\n\t\t\t\t\t\tselector{\n\t\t\t\t\t\t\tmatch_labels = {\n\t\t\t\t\t\t\t\t\"argocd.argoproj.io/secret-type\" = \"cluster\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tgenerator {\n\t\t\t\t\tmatrix {\n\t\t\t\t\t\tgenerator {\n\t\t\t\t\t\t\tgit {\n\t\t\t\t\t\t\t\trepo_url = \"https://github.com/argoproj/argo-cd.git\"\n\t\t\t\t\t\t\t\trevision = \"HEAD\"\n\n\t\t\t\t\t\t\t\tdirectory {\n\t\t\t\t\t\t\t\t\tpath = \"applicationset/examples/matrix/cluster-addons/*\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ttemplate {\n\t\t\tmetadata {\n\t\t\t\tname = \"nested-{{path.basename}}-{{name}}\"\n\t\t\t}\n\n\t\t\tspec {\n\t\t\t\tproject = \"default\"\n\n\t\t\t\tsource {\n\t\t\t\t\trepo_url        = \"https://github.com/argoproj/argo-cd.git\"\n\t\t\t\t\ttarget_revision = \"HEAD\"\n\t\t\t\t\tpath            = \"{{path}}\"\n\t\t\t\t}\n\n\t\t\t\tdestination {\n\t\t\t\t\tserver    = \"{{server}}\"\n\t\t\t\t\tnamespace = \"{{path.basename}}\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}`\n}\n\nfunc testAccArgoCDApplicationSet_matrixOnly1LevelOfNesting() string {\n\treturn `\nresource \"argocd_application_set\" \"matrix_nested_invalid\" {\n\tmetadata {\n\t\tname = \"matrix-nested-invalid\"\n\t}\n\n\tspec {\n\t\tgenerator {\n\t\t\tmatrix {\n\t\t\t\tgenerator {\n\t\t\t\t\tclusters{\n\t\t\t\t\t\tselector{\n\t\t\t\t\t\t\tmatch_labels = {\n\t\t\t\t\t\t\t\t\"argocd.argoproj.io/secret-type\" = \"cluster\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tgenerator {\n\t\t\t\t\tmatrix {\n\t\t\t\t\t\tgenerator {\n\t\t\t\t\t\t\tgit {\n\t\t\t\t\t\t\t\trepo_url = \"https://github.com/argoproj/argo-cd.git\"\n\t\t\t\t\t\t\t\trevision = \"HEAD\"\n\n\t\t\t\t\t\t\t\tdirectory {\n\t\t\t\t\t\t\t\t\tpath = \"applicationset/examples/matrix/cluster-addons/*\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tgenerator {\n\t\t\t\t\t\t\tmatrix {\n\t\t\t\t\t\t\t\tgenerator {\n\t\t\t\t\t\t\t\t\tgit {\n\t\t\t\t\t\t\t\t\t\trepo_url = \"https://github.com/argoproj/argo-cd.git\"\n\t\t\t\t\t\t\t\t\t\trevision = \"HEAD\"\n\n\t\t\t\t\t\t\t\t\t\tdirectory {\n\t\t\t\t\t\t\t\t\t\t\tpath = \"applicationset/examples/matrix/cluster-addons/*\"\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tgenerator {\n\t\t\t\t\t\t\t\t\tlist {\n\t\t\t\t\t\t\t\t\t\telements = [\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tcluster = \"engineering-dev\"\n\t\t\t\t\t\t\t\t\t\t\t\turl     = \"https://kubernetes.default.svc\"\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ttemplate {\n\t\t\tmetadata {\n\t\t\t\tname = \"nested-{{path.basename}}-{{name}}\"\n\t\t\t}\n\n\t\t\tspec {\n\t\t\t\tproject = \"default\"\n\n\t\t\t\tsource {\n\t\t\t\t\trepo_url        = \"https://github.com/argoproj/argo-cd.git\"\n\t\t\t\t\ttarget_revision = \"HEAD\"\n\t\t\t\t\tpath            = \"{{path}}\"\n\t\t\t\t}\n\n\t\t\t\tdestination {\n\t\t\t\t\tserver    = \"{{server}}\"\n\t\t\t\t\tnamespace = \"{{path.basename}}\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}`\n}\n\nfunc testAccArgoCDApplicationSet_merge() string {\n\treturn `\nresource \"argocd_application_set\" \"merge\" {\n\tmetadata {\n\t\tname = \"merge\"\n\t}\n\n\tspec {\n\t\tgenerator {\n\t\t\tmerge {\n\t\t\t\tmerge_keys = [\n\t\t\t\t\t\"server\"\n\t\t\t\t]\n\n\t\t\t\tgenerator {\n\t\t\t\t\tclusters {\n\t\t\t\t\t\tvalues = {\n\t\t\t\t\t\t\tkafka = true\n\t\t\t\t\t\t\tredis = false\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tgenerator {\n\t\t\t\t\tclusters {\n\t\t\t\t\t\tselector {\n\t\t\t\t\t\t\tmatch_labels = {\n\t\t\t\t\t\t\t\tuse-kafka = \"false\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvalues = {\n\t\t\t\t\t\t\tkafka = \"false\"\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tgenerator {\n\t\t\t\t\tlist {\n\t\t\t\t\t\telements = [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tserver         = \"https://2.4.6.8\"\n\t\t\t\t\t\t\t\t\"values.redis\" = \"true\"\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t]\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ttemplate {\n\t\t\tmetadata {\n\t\t\t\tname = \"{{name}}\"\n\t\t\t}\n\n\t\t\tspec {\n\t\t\t  \tproject = \"default\"\n\n\t\t\t  \tsource {\n\t\t\t\t\trepo_url        = \"https://github.com/argoproj/argo-cd.git\"\n\t\t\t\t\tpath            = \"app\"\n\t\t\t\t\ttarget_revision = \"HEAD\"\n\n\t\t\t\t\thelm {\n\t\t\t\t\t\tparameter {\n\t\t\t\t\t\t\tname  = \"kafka\"\n\t\t\t\t\t\t\tvalue = \"{{values.kafka}}\"\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tparameter {\n\t\t\t\t\t\t\tname  = \"redis\"\n\t\t\t\t\t\t\tvalue = \"{{values.redis}}\"\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t  \t}\n\n\t\t\t\tdestination {\n\t\t\t\t\tserver    = \"{{server}}\"\n\t\t\t\t\tnamespace = \"default\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}`\n}\n\nfunc testAccArgoCDApplicationSet_mergeNested() string {\n\treturn `\nresource \"argocd_application_set\" \"merge_nested\" {\n\tmetadata {\n\t\tname = \"merge-nested\"\n\t}\n\n\tspec {\n\t\tgenerator {\n\t\t\tmerge {\n\t\t\t\tmerge_keys = [\n\t\t\t\t\t\"server\"\n\t\t\t\t]\n\n\t\t\t\tgenerator {\n\t\t\t\t\tlist {\n\t\t\t\t\t\telements = [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tserver         = \"https://2.4.6.8\"\n\t\t\t\t\t\t\t\t\"values.redis\" = \"true\"\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t]\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tgenerator {\n\t\t\t\t\tmerge {\n\t\t\t\t\t\tmerge_keys = [\n\t\t\t\t\t\t\t\"server\"\n\t\t\t\t\t\t]\n\n\t\t\t\t\t\tgenerator {\n\t\t\t\t\t\t\tclusters {\n\t\t\t\t\t\t\t\tvalues = {\n\t\t\t\t\t\t\t\t\tkafka = true\n\t\t\t\t\t\t\t\t\tredis = false\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tgenerator {\n\t\t\t\t\t\t\tclusters {\n\t\t\t\t\t\t\t\tselector {\n\t\t\t\t\t\t\t\t\tmatch_labels = {\n\t\t\t\t\t\t\t\t\t\tuse-kafka = \"false\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tvalues = {\n\t\t\t\t\t\t\t\t\tkafka = \"false\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ttemplate {\n\t\t\tmetadata {\n\t\t\t\tname = \"{{name}}\"\n\t\t\t}\n\n\t\t\tspec {\n\t\t\t  \tproject = \"default\"\n\n\t\t\t  \tsource {\n\t\t\t\t\trepo_url        = \"https://github.com/argoproj/argo-cd.git\"\n\t\t\t\t\tpath            = \"app\"\n\t\t\t\t\ttarget_revision = \"HEAD\"\n\n\t\t\t\t\thelm {\n\t\t\t\t\t\tparameter {\n\t\t\t\t\t\t\tname  = \"kafka\"\n\t\t\t\t\t\t\tvalue = \"{{values.kafka}}\"\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tparameter {\n\t\t\t\t\t\t\tname  = \"redis\"\n\t\t\t\t\t\t\tvalue = \"{{values.redis}}\"\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t  \t}\n\n\t\t\t\tdestination {\n\t\t\t\t\tserver    = \"{{server}}\"\n\t\t\t\t\tnamespace = \"default\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}`\n}\n\nfunc testAccArgoCDApplicationSet_mergeInsufficientGenerators() string {\n\treturn `\nresource \"argocd_application_set\" \"merge_insufficient_generators\" {\n\tmetadata {\n\t\tname = \"merge-insufficient-generators\"\n\t}\n\n\tspec {\n\t\tgenerator {\n\t\t\tmerge {\n\t\t\t\tmerge_keys = [\n\t\t\t\t\t\"server\"\n\t\t\t\t]\n\n\t\t\t\tgenerator {\n\t\t\t\t\tclusters {\n\t\t\t\t\t\tvalues = {\n\t\t\t\t\t\t\tkafka = true\n\t\t\t\t\t\t\tredis = false\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ttemplate {\n\t\t\tmetadata {\n\t\t\t\tname = \"{{name}}\"\n\t\t\t}\n\n\t\t\tspec {\n\t\t\t\t\tproject = \"default\"\n\n\t\t\t\t\tsource {\n\t\t\t\t\trepo_url        = \"https://github.com/argoproj/argo-cd.git\"\n\t\t\t\t\tpath            = \"app\"\n\t\t\t\t\ttarget_revision = \"HEAD\"\n\n\t\t\t\t\thelm {\n\t\t\t\t\t\tparameter {\n\t\t\t\t\t\t\tname  = \"kafka\"\n\t\t\t\t\t\t\tvalue = \"{{values.kafka}}\"\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tparameter {\n\t\t\t\t\t\t\tname  = \"redis\"\n\t\t\t\t\t\t\tvalue = \"{{values.redis}}\"\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\tdestination {\n\t\t\t\t\tserver    = \"{{server}}\"\n\t\t\t\t\tnamespace = \"default\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}`\n}\n\nfunc testAccArgoCDApplicationSet_mergeNestedInsufficientGenerators() string {\n\treturn `\nresource \"argocd_application_set\" \"merge_nested_insufficient_generators\" {\n\tmetadata {\n\t\tname = \"merge-nested-insufficient-generators\"\n\t}\n\n\tspec {\n\t\tgenerator {\n\t\t\tmerge {\n\t\t\t\tmerge_keys = [\n\t\t\t\t\t\"server\"\n\t\t\t\t]\n\n\t\t\t\tgenerator {\n\t\t\t\t\tlist {\n\t\t\t\t\t\telements = [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tserver         = \"https://2.4.6.8\"\n\t\t\t\t\t\t\t\t\"values.redis\" = \"true\"\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t]\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tgenerator {\n\t\t\t\t\tmerge {\n\t\t\t\t\t\tmerge_keys = [\n\t\t\t\t\t\t\t\"server\"\n\t\t\t\t\t\t]\n\n\t\t\t\t\t\tgenerator {\n\t\t\t\t\t\t\tclusters {\n\t\t\t\t\t\t\t\tvalues = {\n\t\t\t\t\t\t\t\t\tkafka = true\n\t\t\t\t\t\t\t\t\tredis = false\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ttemplate {\n\t\t\tmetadata {\n\t\t\t\tname = \"{{name}}\"\n\t\t\t}\n\n\t\t\tspec {\n\t\t\t\t\tproject = \"default\"\n\n\t\t\t\t\tsource {\n\t\t\t\t\trepo_url        = \"https://github.com/argoproj/argo-cd.git\"\n\t\t\t\t\tpath            = \"app\"\n\t\t\t\t\ttarget_revision = \"HEAD\"\n\n\t\t\t\t\thelm {\n\t\t\t\t\t\tparameter {\n\t\t\t\t\t\t\tname  = \"kafka\"\n\t\t\t\t\t\t\tvalue = \"{{values.kafka}}\"\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tparameter {\n\t\t\t\t\t\t\tname  = \"redis\"\n\t\t\t\t\t\t\tvalue = \"{{values.redis}}\"\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\tdestination {\n\t\t\t\t\tserver    = \"{{server}}\"\n\t\t\t\t\tnamespace = \"default\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}`\n}\n\nfunc testAccArgoCDApplicationSet_mergeOnly1LevelOfNesting() string {\n\treturn `\nresource \"argocd_application_set\" \"merge_nested_invalid\" {\n\tmetadata {\n\t\tname = \"merge-nested-invalid\"\n\t}\n\n\tspec {\n\t\tgenerator {\n\t\t\tmerge {\n\t\t\t\tmerge_keys = [\n\t\t\t\t\t\"server\"\n\t\t\t\t]\n\n\t\t\t\tgenerator {\n\t\t\t\t\tlist {\n\t\t\t\t\t\telements = [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tserver         = \"https://2.4.6.8\"\n\t\t\t\t\t\t\t\t\"values.redis\" = \"true\"\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t]\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tgenerator {\n\t\t\t\t\tmerge {\n\t\t\t\t\t\tmerge_keys = [\n\t\t\t\t\t\t\t\"server\"\n\t\t\t\t\t\t]\n\n\t\t\t\t\t\tgenerator {\n\t\t\t\t\t\t\tclusters {\n\t\t\t\t\t\t\t\tvalues = {\n\t\t\t\t\t\t\t\t\tkafka = true\n\t\t\t\t\t\t\t\t\tredis = false\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tgenerator {\n\t\t\t\t\t\t\tmerge {\n\t\t\t\t\t\t\t\tmerge_keys = [\n\t\t\t\t\t\t\t\t\t\"server\"\n\t\t\t\t\t\t\t\t]\n\n\t\t\t\t\t\t\t\tgenerator {\n\t\t\t\t\t\t\t\t\tclusters {\n\t\t\t\t\t\t\t\t\t\tvalues = {\n\t\t\t\t\t\t\t\t\t\t\tkafka = true\n\t\t\t\t\t\t\t\t\t\t\tredis = false\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tgenerator {\n\t\t\t\t\t\t\t\t\tclusters {\n\t\t\t\t\t\t\t\t\t\tselector {\n\t\t\t\t\t\t\t\t\t\t\tmatch_labels = {\n\t\t\t\t\t\t\t\t\t\t\t\tuse-kafka = \"false\"\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tvalues = {\n\t\t\t\t\t\t\t\t\t\t\tkafka = \"false\"\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ttemplate {\n\t\t\tmetadata {\n\t\t\t\tname = \"{{name}}\"\n\t\t\t}\n\n\t\t\tspec {\n\t\t\t\tproject = \"default\"\n\n\t\t\t\tsource {\n\t\t\t\t\trepo_url        = \"https://github.com/argoproj/argo-cd.git\"\n\t\t\t\t\tpath            = \"app\"\n\t\t\t\t\ttarget_revision = \"HEAD\"\n\n\t\t\t\t\thelm {\n\t\t\t\t\t\tparameter {\n\t\t\t\t\t\t\tname  = \"kafka\"\n\t\t\t\t\t\t\tvalue = \"{{values.kafka}}\"\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tparameter {\n\t\t\t\t\t\t\tname  = \"redis\"\n\t\t\t\t\t\t\tvalue = \"{{values.redis}}\"\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tdestination {\n\t\t\t\t\tserver    = \"{{server}}\"\n\t\t\t\t\tnamespace = \"default\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}`\n}\n\nfunc testAccArgoCDApplicationSet_scmProviderAzureDevOps() string {\n\treturn `\nresource \"argocd_application_set\" \"scm_ado\" {\n\tmetadata {\n\t\tname = \"scm-ado\"\n\t}\n\n\tspec {\n\t\tgenerator {\n\t\t\tscm_provider {\n\t\t\t\tazure_devops {\n\t\t\t\t\tall_branches = true\n\t\t\t\t\tapi          = \"https://dev.azure.com\"\n\t\t\t\t\torganization = \"myorg\"\n\t\t\t\t\tteam_project = \"myProject\"\n\n\t\t\t\t\taccess_token_ref {\n\t\t\t\t\t\tsecret_name = \"azure-devops-scm\"\n\t\t\t\t\t\tkey         =  \"accesstoken\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ttemplate {\n\t\t\tmetadata {\n\t\t\t\tname = \"{{repository}}\"\n\t\t\t}\n\n\t\t\tspec {\n\t\t\t  \tproject = \"default\"\n\n\t\t\t  \tsource {\n\t\t\t\t\trepo_url        = \"{{url}}\"\n\t\t\t\t\tpath            = \"kubernetes/\"\n\t\t\t\t\ttarget_revision = \"{{branch}}\"\n\t\t\t  \t}\n\n\t\t\t\tdestination {\n\t\t\t\t\tserver    = \"https://kubernetes.default.svc\"\n\t\t\t\t\tnamespace = \"default\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}`\n}\n\nfunc testAccArgoCDApplicationSet_scmProviderBitbucketCloud() string {\n\treturn `\nresource \"argocd_application_set\" \"scm_bitbucket_cloud\" {\n\tmetadata {\n\t\tname = \"scm-bitbucket-cloud\"\n\t}\n\n\tspec {\n\t\tgenerator {\n\t\t\tscm_provider {\n\t\t\t\tbitbucket_cloud {\n\t\t\t\t\tall_branches = true\n\t\t\t\t\towner        = \"example-owner\"\n\t\t\t\t\tuser         = \"example-user\"\n\n\t\t\t\t\tapp_password_ref {\n\t\t\t\t\t\tsecret_name = \"appPassword\"\n\t\t\t\t\t\tkey         = \"password\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ttemplate {\n\t\t\tmetadata {\n\t\t\t\tname = \"{{repository}}\"\n\t\t\t}\n\n\t\t\tspec {\n\t\t\t\tproject = \"default\"\n\n\t\t\t\tsource {\n\t\t\t\t\trepo_url        = \"{{url}}\"\n\t\t\t\t\tpath            = \"kubernetes/\"\n\t\t\t\t\ttarget_revision = \"{{branch}}\"\n\t\t\t\t}\n\n\t\t\t\tdestination {\n\t\t\t\t\tserver    = \"https://kubernetes.default.svc\"\n\t\t\t\t\tnamespace = \"default\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}`\n}\n\nfunc testAccArgoCDApplicationSet_scmProviderBitbucketServer() string {\n\treturn `\nresource \"argocd_application_set\" \"scm_bitbucket_server\" {\n\tmetadata {\n\t\tname = \"scm-bitbucket-server\"\n\t}\n\n\tspec {\n\t\tgenerator {\n\t\t\tscm_provider {\n\t\t\t\tbitbucket_server {\n\t\t\t\t\tall_branches = true\n\t\t\t\t\tapi          = \"https://bitbucket.org/rest\"\n\t\t\t\t\tproject      = \"myproject\"\n\n\t\t\t\t\tbasic_auth {\n\t\t\t\t\t\tusername = \"myuser\"\n\t\t\t\t\t\tpassword_ref {\n\t\t\t\t\t\t\tsecret_name = \"mypassword\"\n\t\t\t\t\t\t\tkey         = \"password\"\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ttemplate {\n\t\t\tmetadata {\n\t\t\t\tname = \"{{repository}}\"\n\t\t\t}\n\n\t\t\tspec {\n\t\t\t\tproject = \"default\"\n\n\t\t\t\tsource {\n\t\t\t\t\trepo_url        = \"{{url}}\"\n\t\t\t\t\tpath            = \"kubernetes/\"\n\t\t\t\t\ttarget_revision = \"{{branch}}\"\n\t\t\t\t}\n\n\t\t\t\tdestination {\n\t\t\t\t\tserver    = \"https://kubernetes.default.svc\"\n\t\t\t\t\tnamespace = \"default\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}`\n}\n\nfunc testAccArgoCDApplicationSet_scmProviderGitea() string {\n\treturn `\nresource \"argocd_application_set\" \"scm_gitea\" {\n\tmetadata {\n\t\tname = \"scm-gitea\"\n\t}\n\n\tspec {\n\t\tgenerator {\n\t\t\tscm_provider {\n\t\t\t\tgitea {\n\t\t\t\t\tall_branches = true\n\t\t\t\t\towner        = \"myorg\"\n\t\t\t\t\tapi          = \"https://gitea.mydomain.com/\"\n\n\t\t\t\t\ttoken_ref {\n\t\t\t\t\tsecret_name = \"gitea-token\"\n\t\t\t\t\tkey         = \"token\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ttemplate {\n\t\t\tmetadata {\n\t\t\t\tname = \"{{repository}}\"\n\t\t\t}\n\n\t\t\tspec {\n\t\t\t\tproject = \"default\"\n\n\t\t\t\tsource {\n\t\t\t\t\trepo_url        = \"{{url}}\"\n\t\t\t\t\tpath            = \"kubernetes/\"\n\t\t\t\t\ttarget_revision = \"{{branch}}\"\n\t\t\t\t}\n\n\t\t\t\tdestination {\n\t\t\t\t\tserver    = \"https://kubernetes.default.svc\"\n\t\t\t\t\tnamespace = \"default\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}`\n}\n\nfunc testAccArgoCDApplicationSet_scmProviderGithub() string {\n\treturn `\nresource \"argocd_application_set\" \"scm_github\" {\n\tmetadata {\n\t\tname = \"scm-github\"\n\t}\n\n\tspec {\n\t\tgenerator {\n\t\t\tscm_provider {\n\t\t\t\tgithub {\n\t\t\t\t\tall_branches    = true\n\t\t\t\t\tapi             = \"https://git.example.com/\"\n\t\t\t\t\tapp_secret_name = \"gh-app-repo-creds\"\n\t\t\t\t\torganization    = \"myorg\"\n\n\t\t\t\t\ttoken_ref {\n\t\t\t\t\t\tsecret_name = \"github-token\"\n\t\t\t\t\t\tkey         = \"token\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ttemplate {\n\t\t\tmetadata {\n\t\t\t\tname = \"{{repository}}\"\n\t\t\t}\n\n\t\t\tspec {\n\t\t\t\tproject = \"default\"\n\n\t\t\t\tsource {\n\t\t\t\t\trepo_url        = \"{{url}}\"\n\t\t\t\t\tpath            = \"kubernetes/\"\n\t\t\t\t\ttarget_revision = \"{{branch}}\"\n\t\t\t\t}\n\n\t\t\t\tdestination {\n\t\t\t\t\tserver    = \"https://kubernetes.default.svc\"\n\t\t\t\t\tnamespace = \"default\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}`\n}\n\nfunc testAccArgoCDApplicationSet_scmProviderGitlab() string {\n\treturn `\nresource \"argocd_application_set\" \"scm_gitlab\" {\n\tmetadata {\n\t\tname = \"scm-gitlab\"\n\t}\n\n\tspec {\n\t\tgenerator {\n\t\t\tscm_provider {\n\t\t\t\tgitlab {\n\t\t\t\t\tall_branches      = true\n\t\t\t\t\tapi               = \"https://gitlab.example.com/\"\n\t\t\t\t\tgroup             = \"8675309\"\n\t\t\t\t\tinclude_subgroups = false\n\n\t\t\t\t\ttoken_ref {\n\t\t\t\t\t\tsecret_name = \"gitlab-token\"\n\t\t\t\t\t\tkey         = \"token\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ttemplate {\n\t\t\tmetadata {\n\t\t\t  \tname = \"{{repository}}\"\n\t\t\t}\n\n\t\t\tspec {\n\t\t\t  \tproject = \"default\"\n\n\t\t\t\tsource {\n\t\t\t\t\trepo_url        = \"{{url}}\"\n\t\t\t\t\tpath            = \"kubernetes/\"\n\t\t\t\t\ttarget_revision = \"{{branch}}\"\n\t\t\t\t}\n\n\t\t\t\tdestination {\n\t\t\t\t\tserver    = \"https://kubernetes.default.svc\"\n\t\t\t\t\tnamespace = \"default\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}`\n}\n\nfunc testAccArgoCDApplicationSet_scmProviderWithFilters() string {\n\treturn `\nresource \"argocd_application_set\" \"scm_filters\" {\n\tmetadata {\n\t\tname = \"scm-filters\"\n\t}\n\n\tspec {\n\t\tgenerator {\n\t\t\tscm_provider {\n\t\t\t\tgithub {\n\t\t\t\t\tall_branches    = true\n\t\t\t\t\tapi             = \"https://git.example.com/\"\n\t\t\t\t\tapp_secret_name = \"gh-app-repo-creds\"\n\t\t\t\t\torganization    = \"myorg\"\n\n\t\t\t\t\ttoken_ref {\n\t\t\t\t\t\tsecret_name = \"github-token\"\n\t\t\t\t\t\tkey         = \"token\"\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfilter {\n\t\t\t\t\trepository_match = \"^myapp\"\n\t\t\t\t\tpaths_exist = [\n\t\t\t\t\t\t\"kubernetes/kustomization.yaml\"\n\t\t\t\t\t]\n\t\t\t\t\tlabel_match = \"deploy-ok\"\n\t\t\t\t}\n\n\t\t\t\tfilter {\n\t\t\t\t\trepository_match = \"^otherapp\"\n\t\t\t\t\tpaths_exist = [\n\t\t\t\t\t\t\"helm\"\n\t\t\t\t\t]\n\t\t\t\t\tpaths_do_not_exist = [\n\t\t\t\t\t\t\"disabledrepo.txt\"\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ttemplate {\n\t\t\tmetadata {\n\t\t\t\tname = \"{{repository}}\"\n\t\t\t}\n\n\t\t\tspec {\n\t\t\t\tproject = \"default\"\n\n\t\t\t\tsource {\n\t\t\t\t\trepo_url        = \"{{url}}\"\n\t\t\t\t\tpath            = \"kubernetes/\"\n\t\t\t\t\ttarget_revision = \"{{branch}}\"\n\t\t\t\t}\n\n\t\t\t\tdestination {\n\t\t\t\t\tserver    = \"https://kubernetes.default.svc\"\n\t\t\t\t\tnamespace = \"default\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}`\n}\n\nfunc testAccArgoCDApplicationSet_pullRequestBitbucketServer() string {\n\treturn `\nresource \"argocd_application_set\" \"pr_bitbucket_server\" {\n\tmetadata {\n\t\tname = \"pr-bitbucket-server\"\n\t}\n\n\tspec {\n\t\tgenerator {\n\t\t\tpull_request {\n\t\t\t\tbitbucket_server {\n\t\t\t\t\tapi     = \"https://bitbucket.org/rest\"\n\t\t\t\t\tproject = \"myproject\"\n\t\t\t\t\trepo    = \"myrepository\"\n\n\t\t\t\t\tbasic_auth {\n\t\t\t\t\t\tusername = \"myuser\"\n\t\t\t\t\t\tpassword_ref {\n\t\t\t\t\t\t\tsecret_name = \"mypassword\"\n\t\t\t\t\t\t\tkey         = \"password\"\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ttemplate {\n\t\t\tmetadata {\n\t\t\t\tname = \"myapp-{{branch}}-{{number}}\"\n\t\t\t}\n\n\t\t\tspec {\n\t\t\t\tproject = \"default\"\n\n\t\t\t\tsource {\n\t\t\t\t\trepo_url        = \"https://github.com/myorg/myrepo.git\"\n\t\t\t\t\tpath            = \"kubernetes/\"\n\t\t\t\t\ttarget_revision = \"{{head_sha}}\"\n\n\t\t\t\t\thelm {\n\t\t\t\t\t\tparameter {\n\t\t\t\t\t\t\tname  = \"image.tag\"\n\t\t\t\t\t\t\tvalue = \"pull-{{head_sha}}\"\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tdestination {\n\t\t\t\t\tserver    = \"https://kubernetes.default.svc\"\n\t\t\t\t\tnamespace = \"default\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}`\n}\n\nfunc testAccArgoCDApplicationSet_pullRequestGitea() string {\n\treturn `\nresource \"argocd_application_set\" \"pr_gitea\" {\n\tmetadata {\n\t\tname = \"pr-gitea\"\n\t}\n\n\tspec {\n\t\tgenerator {\n\t\t\tpull_request {\n\t\t\t\tgitea {\n\t\t\t\t\tapi      = \"https://gitea.mydomain.com/\"\n\t\t\t\t\tinsecure = true\n\t\t\t\t\towner    = \"myorg\"\n\t\t\t\t\trepo     = \"myrepository\"\n\n\t\t\t\t\ttoken_ref {\n\t\t\t\t\t\tsecret_name = \"gitea-token\"\n\t\t\t\t\t\tkey         = \"token\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ttemplate {\n\t\t\tmetadata {\n\t\t\t\tname = \"myapp-{{branch}}-{{number}}\"\n\t\t\t}\n\n\t\t\tspec {\n\t\t\t\tproject = \"default\"\n\n\t\t\t\tsource {\n\t\t\t\t\trepo_url        = \"https://github.com/myorg/myrepo.git\"\n\t\t\t\t\tpath            = \"kubernetes/\"\n\t\t\t\t\ttarget_revision = \"{{head_sha}}\"\n\n\t\t\t\t\thelm {\n\t\t\t\t\t\tparameter {\n\t\t\t\t\t\t\tname  = \"image.tag\"\n\t\t\t\t\t\t\tvalue = \"pull-{{head_sha}}\"\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tdestination {\n\t\t\t\t\tserver    = \"https://kubernetes.default.svc\"\n\t\t\t\t\tnamespace = \"default\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}`\n}\n\nfunc testAccArgoCDApplicationSet_pullRequestGithub() string {\n\treturn `\nresource \"argocd_application_set\" \"pr_github\" {\n\tmetadata {\n\t\tname = \"pr-github\"\n\t}\n\n\tspec {\n\t\tgenerator {\n\t\t\tpull_request {\n\t\t\t\tgithub {\n\t\t\t\t\tapi             = \"https://git.example.com/\"\n\t\t\t\t\towner           = \"myorg\"\n\t\t\t\t\trepo            = \"myrepository\"\n\t\t\t\t\tapp_secret_name = \"github-app-repo-creds\"\n\n\t\t\t\t\ttoken_ref {\n\t\t\t\t\t\tsecret_name = \"github-token\"\n\t\t\t\t\t\tkey         = \"token\"\n\t\t\t\t\t}\n\n\t\t\t\t\tlabels = [\n\t\t\t\t\t\t\"preview\"\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ttemplate {\n\t\t\tmetadata {\n\t\t\t\tname = \"myapp-{{branch}}-{{number}}\"\n\t\t\t}\n\n\t\t\tspec {\n\t\t\t\tproject = \"default\"\n\n\t\t\t\tsource {\n\t\t\t\t\trepo_url        = \"https://github.com/myorg/myrepo.git\"\n\t\t\t\t\tpath            = \"kubernetes/\"\n\t\t\t\t\ttarget_revision = \"{{head_sha}}\"\n\n\t\t\t\t\thelm {\n\t\t\t\t\t\tparameter {\n\t\t\t\t\t\t\tname  = \"image.tag\"\n\t\t\t\t\t\t\tvalue = \"pull-{{head_sha}}\"\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tdestination {\n\t\t\t\t\tserver    = \"https://kubernetes.default.svc\"\n\t\t\t\t\tnamespace = \"default\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}`\n}\n\nfunc testAccArgoCDApplicationSet_pullRequestGitlab() string {\n\treturn `\nresource \"argocd_application_set\" \"pr_gitlab\" {\n\tmetadata {\n\t\tname = \"pr-gitlab\"\n\t}\n\n\tspec {\n\t\tgenerator {\n\t\t\tpull_request {\n\t\t\t\tgitlab {\n\t\t\t\t\tapi                = \"https://git.example.com/\"\n\t\t\t\t\tproject            = \"myproject\"\n\t\t\t\t\tpull_request_state = \"opened\"\n\n\t\t\t\t\ttoken_ref {\n\t\t\t\t\t\tsecret_name = \"gitlab-token\"\n\t\t\t\t\t\tkey         = \"token\"\n\t\t\t\t\t}\n\n\t\t\t\t\tlabels = [\n\t\t\t\t\t\t\"preview\"\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ttemplate {\n\t\t\tmetadata {\n\t\t\t\tname = \"myapp-{{branch}}-{{number}}\"\n\t\t\t}\n\n\t\t\tspec {\n\t\t\t\tproject = \"default\"\n\n\t\t\t\tsource {\n\t\t\t\t\trepo_url        = \"https://github.com/myorg/myrepo.git\"\n\t\t\t\t\tpath            = \"kubernetes/\"\n\t\t\t\t\ttarget_revision = \"{{head_sha}}\"\n\n\t\t\t\t\thelm {\n\t\t\t\t\t\tparameter {\n\t\t\t\t\t\t\tname  = \"image.tag\"\n\t\t\t\t\t\t\tvalue = \"pull-{{head_sha}}\"\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tdestination {\n\t\t\t\t\tserver    = \"https://kubernetes.default.svc\"\n\t\t\t\t\tnamespace = \"default\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}`\n}\n\nfunc testAccArgoCDApplicationSet_pullRequestGitlabInsecureAndCARef() string {\n\treturn `\nresource \"argocd_application_set\" \"pr_gitlab_insecure\" {\n\tmetadata {\n\t\tname = \"pr-gitlab-insecure\"\n\t}\n\n\tspec {\n\t\tgenerator {\n\t\t\tpull_request {\n\t\t\t\tgitlab {\n\t\t\t\t\tapi                = \"https://git.example.com/\"\n\t\t\t\t\tproject            = \"myproject\"\n\t\t\t\t\tpull_request_state = \"opened\"\n\t\t\t\t\tinsecure           = true\n\n\t\t\t\t\ttoken_ref {\n\t\t\t\t\t\tsecret_name = \"gitlab-token\"\n\t\t\t\t\t\tkey         = \"token\"\n\t\t\t\t\t}\n\n\t\t\t\t\tca_ref {\n\t\t\t\t\t\tconfig_map_name = \"gitlab-ca-cert\"\n\t\t\t\t\t\tkey             = \"ca.crt\"\n\t\t\t\t\t}\n\n\t\t\t\t\tlabels = [\n\t\t\t\t\t\t\"preview\"\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ttemplate {\n\t\t\tmetadata {\n\t\t\t\tname = \"myapp-{{branch}}-{{number}}\"\n\t\t\t}\n\n\t\t\tspec {\n\t\t\t\tproject = \"default\"\n\n\t\t\t\tsource {\n\t\t\t\t\trepo_url        = \"https://github.com/myorg/myrepo.git\"\n\t\t\t\t\tpath            = \"kubernetes/\"\n\t\t\t\t\ttarget_revision = \"{{head_sha}}\"\n\n\t\t\t\t\thelm {\n\t\t\t\t\t\tparameter {\n\t\t\t\t\t\t\tname  = \"image.tag\"\n\t\t\t\t\t\t\tvalue = \"pull-{{head_sha}}\"\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tdestination {\n\t\t\t\t\tserver    = \"https://kubernetes.default.svc\"\n\t\t\t\t\tnamespace = \"default\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}`\n}\n\nfunc testAccArgoCDApplicationSet_pullRequestAzureDevOps() string {\n\treturn `\nresource \"argocd_application_set\" \"pr_azure_devops\" {\n\tmetadata {\n\t\tname = \"pr-azure-devops\"\n\t}\n\n\tspec {\n\t\tgenerator {\n\t\t\tpull_request {\n\t\t\t\tazure_devops {\n\t\t\t\t\tapi          = \"https://dev.azure.com\"\n\t\t\t\t\torganization = \"myorg\"\n\t\t\t\t\tproject      = \"myproject\"\n\t\t\t\t\trepo         = \"myrepository\"\n\t\t\t\t\tlabels       = [\"preview\"]\n\n\t\t\t\t\ttoken_ref {\n\t\t\t\t\t\tsecret_name = \"azure-devops-token\"\n\t\t\t\t\t\tkey         = \"token\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ttemplate {\n\t\t\tmetadata {\n\t\t\t\tname = \"myapp-{{branch}}-{{number}}\"\n\t\t\t}\n\n\t\t\tspec {\n\t\t\t\tproject = \"default\"\n\n\t\t\t\tsource {\n\t\t\t\t\trepo_url        = \"https://github.com/myorg/myrepo.git\"\n\t\t\t\t\tpath            = \"kubernetes/\"\n\t\t\t\t\ttarget_revision = \"{{head_sha}}\"\n\n\t\t\t\t\thelm {\n\t\t\t\t\t\tparameter {\n\t\t\t\t\t\t\tname  = \"image.tag\"\n\t\t\t\t\t\t\tvalue = \"pull-{{head_sha}}\"\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tdestination {\n\t\t\t\t\tserver    = \"https://kubernetes.default.svc\"\n\t\t\t\t\tnamespace = \"default\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}`\n}\n\nfunc testAccArgoCDApplicationSet_generatorTemplate() string {\n\treturn `\nresource \"argocd_application_set\" \"generator_template\" {\n\tmetadata {\n\t\tname = \"generator-template\"\n\t}\n\n\tspec {\n\t\tgenerator {\n\t\t\tlist {\n\t\t\t\telements = [\n\t\t\t\t\t{\n\t\t\t\t\t\tcluster = \"engineering-dev\"\n\t\t\t\t\t\turl     = \"https://kubernetes.default.svc\"\n\t\t\t\t\t}\n\t\t\t\t]\n\n\t\t\t\ttemplate {\n\t\t\t\t\tmetadata {}\n\t\t\t\t\tspec {\n\t\t\t\t\t\tproject = \"default\"\n\t\t\t\t\t\tsource {\n\t\t\t\t\t\t\trepo_url        = \"https://github.com/argoproj/argo-cd.git\"\n\t\t\t\t\t\t\ttarget_revision = \"HEAD\"\n\t\t\t\t\t\t\tpath            = \"applicationset/examples/template-override/{{.cluster}}-override\"\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdestination {}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tgo_template = true\n\n\t\ttemplate {\n\t\t\tmetadata {\n\t\t\t\tname = \"appset-generator-template-{{.cluster}}\"\n\t\t\t}\n\n\t\t\tspec {\n\t\t\t\tproject = \"default\"\n\n\t\t\t\tsource {\n\t\t\t\t\trepo_url        = \"https://github.com/argoproj/argo-cd.git\"\n\t\t\t\t\ttarget_revision = \"HEAD\"\n\t\t\t\t\tpath            = \"applicationset/examples/template-override/default\"\n\t\t\t\t}\n\n\t\t\t\tdestination {\n\t\t\t\t\tserver    = \"{{.url}}\"\n\t\t\t\t\tnamespace = \"guestbook\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}`\n}\n\nfunc testAccArgoCDApplicationSet_goTemplate() string {\n\treturn `\nresource \"argocd_application_set\" \"go_template\" {\n\tmetadata {\n\t\tname = \"go-template\"\n\t}\n\n\tspec {\n\t\tgenerator {\n\t\t\tclusters {} # Automatically use all clusters defined within Argo CD\n\t\t}\n\n\t\tgo_template = true\n\t\tgo_template_options = [\n\t\t\t\"missingkey=error\"\n\t\t]\n\n\t\ttemplate {\n\t\t\tmetadata {\n\t\t\t\tname = \"appset-go-template-{{.name}}\"\n\t\t\t}\n\n\t\t\tspec {\n\t\t\t\tsource {\n\t\t\t\t\trepo_url        = \"https://github.com/argoproj/argo-cd/\"\n\t\t\t\t\ttarget_revision = \"HEAD\"\n\t\t\t\t\tpath            = \"test/e2e/testdata/guestbook\"\n\t\t\t\t}\n\n\t\t\t\tdestination {\n\t\t\t\t\tserver    = \"{{.server}}\"\n\t\t\t\t\tnamespace = \"default\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}`\n}\n\nfunc testAccArgoCDApplicationSet_syncPolicy() string {\n\treturn `\nresource \"argocd_application_set\" \"sync_policy\" {\n\tmetadata {\n\t\tname = \"sync-policy\"\n\t}\n\n\tspec {\n\t\tgenerator {\n\t\t\tclusters {} # Automatically use all clusters defined within Argo CD\n\t\t}\n\n\t\tsync_policy {\n\t\t\tpreserve_resources_on_deletion = true\n\t\t}\n\n\t\ttemplate {\n\t\t\tmetadata {\n\t\t\t\tname = \"appset-sync-policy-{{name}}\"\n\t\t\t}\n\n\t\t\tspec {\n\t\t\t\tsource {\n\t\t\t\t\trepo_url        = \"https://github.com/argoproj/argo-cd/\"\n\t\t\t\t\ttarget_revision = \"HEAD\"\n\t\t\t\t\tpath            = \"test/e2e/testdata/guestbook\"\n\t\t\t\t}\n\n\t\t\t\tdestination {\n\t\t\t\t\tserver    = \"{{server}}\"\n\t\t\t\t\tnamespace = \"default\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}`\n}\n\nfunc testAccArgoCDApplicationSet_syncPolicyWithApplicationsSync() string {\n\treturn `\nresource \"argocd_application_set\" \"applications_sync_policy\" {\n\tmetadata {\n\t\tname = \"applications-sync-policy\"\n\t}\n\n\tspec {\n\t\tgenerator {\n\t\t\tclusters {} # Automatically use all clusters defined within Argo CD\n\t\t}\n\n\t\tsync_policy {\n\t\t\tpreserve_resources_on_deletion = true\n\t\t\tapplications_sync              = \"create-update\"\n\t\t}\n\n\t\ttemplate {\n\t\t\tmetadata {\n\t\t\t\tname = \"appset-sync-policy-{{name}}\"\n\t\t\t}\n\n\t\t\tspec {\n\t\t\t\tsource {\n\t\t\t\t\trepo_url        = \"https://github.com/argoproj/argo-cd/\"\n\t\t\t\t\ttarget_revision = \"HEAD\"\n\t\t\t\t\tpath            = \"test/e2e/testdata/guestbook\"\n\t\t\t\t}\n\n\t\t\t\tdestination {\n\t\t\t\t\tserver    = \"{{server}}\"\n\t\t\t\t\tnamespace = \"default\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}`\n}\n\nfunc testAccArgoCDApplicationSet_progressiveSync() string {\n\treturn `\nresource \"argocd_application_set\" \"progressive_sync\" {\n\tmetadata {\n\t\tname = \"progressive-sync\"\n\t}\n\n\tspec {\n\t\tgenerator {\n\t\t\tlist {\n\t\t\t\telements = [\n\t\t\t\t\t{\n\t\t\t\t\t\tcluster = \"engineering-dev\"\n\t\t\t\t\t\turl     = \"https://1.2.3.4\"\n\t\t\t\t\t\tenv     = \"env-dev\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tcluster = \"engineering-qa\"\n\t\t\t\t\t\turl     = \"https://2.4.6.8\"\n\t\t\t\t\t\tenv     = \"env-qa\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tcluster = \"engineering-prod\"\n\t\t\t\t\t\turl     = \"https://9.8.7.6/\"\n\t\t\t\t\t\tenv     = \"env-prod\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t}\n\n\t\tstrategy {\n\t\t\ttype = \"RollingSync\"\n\t\t\trolling_sync {\n\t\t\t\tstep {\n\t\t\t\t\tmatch_expressions {\n\t\t\t\t\t\tkey      = \"envLabel\"\n\t\t\t\t\t\toperator = \"In\"\n\t\t\t\t\t\tvalues = [\n\t\t\t\t\t\t\t\"env-dev\"\n\t\t\t\t\t\t]\n\t\t\t\t\t}\n\n\t\t\t\t\t# max_update = \"100%\"  # if undefined, all applications matched are updated together (default is 100%)\n\t\t\t\t}\n\n\t\t\t\tstep {\n\t\t\t\t\tmatch_expressions {\n\t\t\t\t\t\tkey      = \"envLabel\"\n\t\t\t\t\t\toperator = \"In\"\n\t\t\t\t\t\tvalues = [\n\t\t\t\t\t\t\t\"env-qa\"\n\t\t\t\t\t\t]\n\t\t\t\t\t}\n\n\t\t\t\t\tmax_update = \"0\"\n\t\t\t\t}\n\n\t\t\t\tstep {\n\t\t\t\t\tmatch_expressions {\n\t\t\t\t\t\tkey      = \"envLabel\"\n\t\t\t\t\t\toperator = \"In\"\n\t\t\t\t\t\tvalues = [\n\t\t\t\t\t\t\t\"env-prod\"\n\t\t\t\t\t\t]\n\t\t\t\t\t}\n\n\t\t\t\t\tmax_update = \"10%\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tgo_template = true\n\n\t\ttemplate {\n\t\t\tmetadata {\n\t\t\t\tname = \"appset-progressive-sync-{{.cluster}}\"\n\t\t\t\tlabels = {\n\t\t\t\t\tenvLabel = \"{{.env}}\"\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tspec {\n\t\t\t  \tproject = \"default\"\n\n\t\t\t\tsource {\n\t\t\t\t\trepo_url        = \"https://github.com/infra-team/cluster-deployments.git\"\n\t\t\t\t\tpath            = \"guestbook/{{.cluster}}\"\n\t\t\t\t\ttarget_revision = \"HEAD\"\n\t\t\t\t}\n\n\t\t\t\tdestination {\n\t\t\t\t\tserver    = \"{{.url}}\"\n\t\t\t\t\tnamespace = \"guestbook\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}`\n}\n\nfunc testAccArgoCDApplicationSet_templatePatch() string {\n\treturn `\nlocals {\n  mytemplate = <<EOT\n    spec:\n      source:\n        helm:\n          valueFiles:\n          {{- range $valueFile := .valueFiles }}\n            - {{ $valueFile }}\n          {{- end }}\n    {{- if .autoSync }}\n      syncPolicy:\n        automated:\n          prune: {{ .prune }}\n    {{- end }}\n    EOT\n}\n\nresource \"argocd_application_set\" \"template_patch\" {\n  metadata {\n    name      = \"my-applicationset\"\n  }\n\n  spec {\n    generator {\n      clusters {\n        selector {\n          match_labels = {\n            \"env\" = \"qa\"\n          }\n        }\n      }\n    }\n    go_template = true\n    template_patch = local.mytemplate\n    template {\n      metadata {\n        name = \"test-{{ .name }}\"\n      }\n      spec {\n        destination {\n          namespace = \"my-ns\"\n          server    = \"{{ .server }}\"\n        }\n        source {\n          repo_url        = \"{{ .url  }}\"\n          path            = \"{{ .chart  }}\"\n          target_revision = \"{{ .branch  }}\"\n        }\n      }\n    }\n  }\n}`\n}\n\nfunc testAccArgoCDApplicationSetCustomNamespace(name string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_project\" \"custom_namespace\" {\n  metadata {\n    name      = \"%[1]s\"\n    namespace = \"argocd\"\n  }\n\n  spec {\n    description  = \"project with source namespace\"\n    source_repos = [\"*\"]\n    source_namespaces = [\"mynamespace-1\"]\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n  }\n}\n\nresource \"argocd_application_set\" \"custom_namespace\" {\n  metadata {\n    name      = \"%[1]s\"\n    namespace = \"mynamespace-1\"\n  }\n\n  spec {\n    generator {\n      list {\n        elements = [\n          {\n            cluster = \"in-cluster\"\n          }\n        ]\n      }\n    }\n\n    template {\n      metadata {\n        name = \"test\"\n      }\n      spec {\n\t\tproject = argocd_project.custom_namespace.metadata[0].name\n\t\tsource {\n\t\t  repo_url        = \"https://kubernetes-sigs.github.io/descheduler\"\n\t\t  chart           = \"descheduler\"\n\t\t  target_revision = \"0.33.0\"\n\t\t  helm {\n\t\t    parameter {\n\t\t      name  = \"image.tag\"\n\t\t\t  value = \"6.2.5\"\n\t\t\t}\n\t\t\tparameter {\n\t\t\t  name  = \"architecture\"\n\t\t\t  value = \"standalone\"\n\t\t\t}\n\t\t\trelease_name = \"testing\"\n\t\t  }\n\t\t}\n\n\t\tdestination {\n\t\t  server    = \"https://kubernetes.default.svc\"\n\t\t  namespace = \"mynamespace-1\"\n\t    }\n\t  }\n    }\n  }\n}\n`, name)\n}\n"
  },
  {
    "path": "argocd/resource_argocd_application_test.go",
    "content": "package argocd\n\nimport (\n\t\"fmt\"\n\t\"regexp\"\n\t\"strconv\"\n\t\"testing\"\n\n\t\"github.com/argoproj-labs/terraform-provider-argocd/internal/features\"\n\t\"github.com/hashicorp/terraform-plugin-testing/helper/acctest\"\n\t\"github.com/hashicorp/terraform-plugin-testing/helper/resource\"\n)\n\nfunc TestAccArgoCDApplication(t *testing.T) {\n\tname := acctest.RandomWithPrefix(\"test-acc\")\n\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationSimple(name, \"0.31.0\", false),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application.\"+name,\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.\"+name,\n\t\t\t\t\t\t\"spec.0.source.0.target_revision\",\n\t\t\t\t\t\t\"0.31.0\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application.\"+name,\n\t\t\t\t\t\t\"status.0.%\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application.\" + name,\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"wait\", \"cascade\", \"metadata.0.generation\", \"metadata.0.resource_version\", \"status\", \"validate\", \"spec.0.source.0.helm.0.parameter.0.force_string\"},\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Update\n\t\t\t\tConfig: testAccArgoCDApplicationSimple(name, \"0.32.0\", false),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application.\"+name,\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.\"+name,\n\t\t\t\t\t\t\"spec.0.source.0.target_revision\",\n\t\t\t\t\t\t\"0.32.0\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Update with wait = true\n\t\t\t\tConfig: testAccArgoCDApplicationSimple(name, \"0.33.0\", true),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.\"+name,\n\t\t\t\t\t\t\"wait\",\n\t\t\t\t\t\t\"true\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.\"+name,\n\t\t\t\t\t\t\"spec.0.source.0.target_revision\",\n\t\t\t\t\t\t\"0.33.0\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.\"+name,\n\t\t\t\t\t\t\"status.0.health.0.status\",\n\t\t\t\t\t\t\"Healthy\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.\"+name,\n\t\t\t\t\t\t\"status.0.sync.0.status\",\n\t\t\t\t\t\t\"Synced\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application.\" + name,\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"wait\", \"cascade\", \"metadata.0.generation\", \"metadata.0.resource_version\", \"status\", \"validate\"},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplication_Helm(t *testing.T) {\n\thelmValues := `\ningress:\n  enabled: true\n  path: /\n  hosts:\n    - mydomain.example.com\n  annotations:\n    kubernetes.io/ingress.class: nginx\n    kubernetes.io/tls-acme: \"true\"\n  labels: {}\n  tls:\n    - secretName: mydomain-tls\n      hosts:\n        - mydomain.example.com\n`\n\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationHelm(\n\t\t\t\t\tacctest.RandomWithPrefix(\"test-acc\"),\n\t\t\t\t\thelmValues),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application.helm\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.helm\",\n\t\t\t\t\t\t\"spec.0.source.0.helm.0.values\",\n\t\t\t\t\t\thelmValues+\"\\n\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.helm\",\n\t\t\t\t\t\t\"spec.0.source.0.helm.0.value_files.0\",\n\t\t\t\t\t\t\"values.yaml\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.helm\",\n\t\t\t\t\t\t\"spec.0.source.0.helm.0.pass_credentials\",\n\t\t\t\t\t\t\"true\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.helm\",\n\t\t\t\t\t\t\"spec.0.source.0.helm.0.ignore_missing_value_files\",\n\t\t\t\t\t\t\"true\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.helm\",\n\t\t\t\t\t\t\"spec.0.source.0.helm.0.version\",\n\t\t\t\t\t\t\"v3\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application.helm\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"wait\", \"cascade\", \"metadata.0.generation\", \"metadata.0.resource_version\", \"status\", \"validate\", \"spec.0.source.0.helm.0.parameter.0.force_string\", \"spec.0.source.0.helm.0.parameter.1.force_string\"},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplication_Helm_FileParameters(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationHelm_FileParameters(acctest.RandomWithPrefix(\"test-acc\")),\n\t\t\t\t// Setting up tests for this is non-trivial so it is easier to test for an expected failure (since file does not exist) than to test for success\n\t\t\t\tExpectError: regexp.MustCompile(`(?s)Error:\\s+failed\\s+parsing.*--set-file data`),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplication_Kustomize(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationKustomize(\n\t\t\t\t\tacctest.RandomWithPrefix(\"test-acc\"),\n\t\t\t\t\t\"examples/helloWorld\",\n\t\t\t\t\ttrue,\n\t\t\t\t),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application.kustomize\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.kustomize\",\n\t\t\t\t\t\t\"spec.0.source.0.target_revision\",\n\t\t\t\t\t\t\"release-kustomize-v3.7\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.kustomize\",\n\t\t\t\t\t\t\"spec.0.source.0.kustomize.0.name_suffix\",\n\t\t\t\t\t\t\"-bar\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application.kustomize\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"wait\", \"cascade\", \"metadata.0.generation\", \"metadata.0.resource_version\", \"status\", \"validate\"},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplication_KustomizePatches(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t); testAccPreCheckFeatureSupported(t, features.ApplicationKustomizePatches) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationKustomizePatches(\n\t\t\t\t\tacctest.RandomWithPrefix(\"test-acc\")),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application.kustomize_patches\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.kustomize_patches\",\n\t\t\t\t\t\t\"spec.0.source.0.target_revision\",\n\t\t\t\t\t\t\"release-kustomize-v3.7\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.kustomize_patches\",\n\t\t\t\t\t\t\"spec.0.source.0.kustomize.0.name_suffix\",\n\t\t\t\t\t\t\"-bar\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application.kustomize_patches\",\n\t\t\t\t\t\t\"spec.0.source.0.kustomize.0.patches.0.patch\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.kustomize_patches\",\n\t\t\t\t\t\t\"spec.0.source.0.kustomize.0.patches.0.target.0.group\",\n\t\t\t\t\t\t\"apps\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.kustomize_patches\",\n\t\t\t\t\t\t\"spec.0.source.0.kustomize.0.patches.0.target.0.version\",\n\t\t\t\t\t\t\"v1\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.kustomize_patches\",\n\t\t\t\t\t\t\"spec.0.source.0.kustomize.0.patches.0.target.0.kind\",\n\t\t\t\t\t\t\"Deployment\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application.kustomize_patches\",\n\t\t\t\t\t\t\"spec.0.source.0.kustomize.0.patches.1.patch\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.kustomize_patches\",\n\t\t\t\t\t\t\"spec.0.source.0.kustomize.0.patches.1.target.0.label_selector\",\n\t\t\t\t\t\t\"app=hello\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application.kustomize_patches\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"wait\", \"cascade\", \"metadata.0.generation\", \"metadata.0.resource_version\", \"status\", \"validate\"},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplication_IgnoreDifferences(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationIgnoreDifferences(\n\t\t\t\t\tacctest.RandomWithPrefix(\"test-acc\")),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application.ignore_differences\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.ignore_differences\",\n\t\t\t\t\t\t\"spec.0.ignore_difference.0.kind\",\n\t\t\t\t\t\t\"Deployment\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.ignore_differences\",\n\t\t\t\t\t\t\"spec.0.ignore_difference.1.group\",\n\t\t\t\t\t\t\"apps\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application.ignore_differences\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"wait\", \"cascade\", \"status\", \"validate\", \"metadata.0.generation\", \"metadata.0.resource_version\"},\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationIgnoreDiffJQPathExpressions(\n\t\t\t\t\tacctest.RandomWithPrefix(\"test-acc\")),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application.ignore_differences_jqpe\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.ignore_differences_jqpe\",\n\t\t\t\t\t\t\"spec.0.ignore_difference.0.jq_path_expressions.0\",\n\t\t\t\t\t\t\".spec.replicas\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.ignore_differences_jqpe\",\n\t\t\t\t\t\t\"spec.0.ignore_difference.1.jq_path_expressions.1\",\n\t\t\t\t\t\t\".spec.template.spec.metadata.labels.somelabel\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application.ignore_differences_jqpe\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"wait\", \"cascade\", \"status\", \"validate\", \"metadata.0.generation\", \"metadata.0.resource_version\"},\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationIgnoreDiffManagedFieldsManagers(\n\t\t\t\t\tacctest.RandomWithPrefix(\"test-acc\")),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application.ignore_differences_managed_fields_managers\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.ignore_differences_managed_fields_managers\",\n\t\t\t\t\t\t\"spec.0.ignore_difference.0.managed_fields_managers.0\",\n\t\t\t\t\t\t\"some-controller-owner\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.ignore_differences_managed_fields_managers\",\n\t\t\t\t\t\t\"spec.0.ignore_difference.1.managed_fields_managers.1\",\n\t\t\t\t\t\t\"some-other-controller-owner\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application.ignore_differences_managed_fields_managers\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"wait\", \"cascade\", \"status\", \"validate\", \"metadata.0.generation\", \"metadata.0.resource_version\"},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplication_RevisionHistoryLimit(t *testing.T) {\n\trevisionHistoryLimit := acctest.RandIntRange(0, 9)\n\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationRevisionHistory(\n\t\t\t\t\tacctest.RandomWithPrefix(\"test-acc\"),\n\t\t\t\t\trevisionHistoryLimit,\n\t\t\t\t),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application.revision_history_limit\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.revision_history_limit\",\n\t\t\t\t\t\t\"spec.0.revision_history_limit\",\n\t\t\t\t\t\tfmt.Sprint(revisionHistoryLimit),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application.revision_history_limit\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"wait\", \"cascade\", \"status\", \"validate\", \"metadata.0.generation\", \"metadata.0.resource_version\", \"spec.0.source.0.helm.0.parameter.0.force_string\", \"spec.0.source.0.helm.0.parameter.1.force_string\"},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplication_OptionalDestinationNamespace(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplication_OptionalDestinationNamespace(acctest.RandomWithPrefix(\"test-acc\")),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application.no_namespace\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.no_namespace\",\n\t\t\t\t\t\t\"spec.0.destination.0.namespace\",\n\t\t\t\t\t\t\"\", // optional strings are maintained in state as blank strings\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application.no_namespace\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"wait\", \"cascade\", \"status\", \"validate\", \"metadata.0.generation\", \"metadata.0.resource_version\"},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplication_DirectoryJsonnet(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplication_DirectoryJsonnet(\n\t\t\t\t\tacctest.RandomWithPrefix(\"test-acc\")),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application.directory\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.directory\",\n\t\t\t\t\t\t\"spec.0.source.0.directory.0.recurse\",\n\t\t\t\t\t\t\"false\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.directory\",\n\t\t\t\t\t\t\"spec.0.source.0.directory.0.jsonnet.0.ext_var.0.name\",\n\t\t\t\t\t\t\"somename\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.directory\",\n\t\t\t\t\t\t\"spec.0.source.0.directory.0.jsonnet.0.ext_var.0.value\",\n\t\t\t\t\t\t\"somevalue\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.directory\",\n\t\t\t\t\t\t\"spec.0.source.0.directory.0.jsonnet.0.ext_var.0.code\",\n\t\t\t\t\t\t\"false\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.directory\",\n\t\t\t\t\t\t\"spec.0.source.0.directory.0.jsonnet.0.ext_var.1.name\",\n\t\t\t\t\t\t\"anothername\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.directory\",\n\t\t\t\t\t\t\"spec.0.source.0.directory.0.jsonnet.0.ext_var.1.value\",\n\t\t\t\t\t\t\"anothervalue\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.directory\",\n\t\t\t\t\t\t\"spec.0.source.0.directory.0.jsonnet.0.ext_var.1.code\",\n\t\t\t\t\t\t\"true\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.directory\",\n\t\t\t\t\t\t\"spec.0.source.0.directory.0.jsonnet.0.tla.0.name\",\n\t\t\t\t\t\t\"yetanothername\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.directory\",\n\t\t\t\t\t\t\"spec.0.source.0.directory.0.jsonnet.0.tla.0.value\",\n\t\t\t\t\t\t\"yetanothervalue\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.directory\",\n\t\t\t\t\t\t\"spec.0.source.0.directory.0.jsonnet.0.tla.0.code\",\n\t\t\t\t\t\t\"true\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.directory\",\n\t\t\t\t\t\t\"spec.0.source.0.directory.0.jsonnet.0.libs.0\",\n\t\t\t\t\t\t\"vendor\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.directory\",\n\t\t\t\t\t\t\"spec.0.source.0.directory.0.jsonnet.0.libs.1\",\n\t\t\t\t\t\t\"foo\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application.directory\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"wait\", \"cascade\", \"metadata.0.generation\", \"metadata.0.resource_version\", \"status\", \"validate\"},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplication_Recurse(t *testing.T) {\n\tname := acctest.RandomWithPrefix(\"test-acc\")\n\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationRecurseDirectory(name, true),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.directory\",\n\t\t\t\t\t\t\"spec.0.source.0.directory.0.recurse\",\n\t\t\t\t\t\t\"true\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckNoResourceAttr(\n\t\t\t\t\t\t\"argocd_application.directory\",\n\t\t\t\t\t\t\"spec.0.source.0.directory.0.jsonnet.0\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationDirectoryImplicitNonRecurse(acctest.RandomWithPrefix(\"test-acc\")),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.directory\",\n\t\t\t\t\t\t\"spec.0.source.0.directory.0.recurse\",\n\t\t\t\t\t\t\"false\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.directory\",\n\t\t\t\t\t\t\"spec.0.source.0.directory.0.jsonnet.0.ext_var.0.name\",\n\t\t\t\t\t\t\"somename\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationRecurseDirectory(name, false),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckNoResourceAttr(\n\t\t\t\t\t\t\"argocd_application.directory\",\n\t\t\t\t\t\t\"spec.0.source.0.directory.0.recurse\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckNoResourceAttr(\n\t\t\t\t\t\t\"argocd_application.directory\",\n\t\t\t\t\t\t\"spec.0.source.0.directory.0.jsonnet.0\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationRecurseDirectory(name, true),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.directory\",\n\t\t\t\t\t\t\"spec.0.source.0.directory.0.recurse\",\n\t\t\t\t\t\t\"true\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckNoResourceAttr(\n\t\t\t\t\t\t\"argocd_application.directory\",\n\t\t\t\t\t\t\"spec.0.source.0.directory.0.jsonnet.0\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationRecurseDirectory(name, false),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckNoResourceAttr(\n\t\t\t\t\t\t\"argocd_application.directory\",\n\t\t\t\t\t\t\"spec.0.source.0.directory.0.recurse\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckNoResourceAttr(\n\t\t\t\t\t\t\"argocd_application.directory\",\n\t\t\t\t\t\t\"spec.0.source.0.directory.0.jsonnet.0\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplication_EmptyDirectory(t *testing.T) {\n\tname := acctest.RandomWithPrefix(\"test-acc\")\n\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplication_EmptyDirectory(name),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckNoResourceAttr(\n\t\t\t\t\t\t\"argocd_application.directory\",\n\t\t\t\t\t\t\"spec.0.source.0.directory.0.recurse\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application.directory\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"wait\", \"cascade\", \"metadata.0.generation\", \"metadata.0.resource_version\", \"status\", \"validate\"},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplication_DirectoryIncludeExclude(t *testing.T) {\n\tname := acctest.RandomWithPrefix(\"test-acc\")\n\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplication_DirectoryIncludeExclude(name),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.directory\",\n\t\t\t\t\t\t\"spec.0.source.0.directory.0.include\",\n\t\t\t\t\t\t\"*.yaml\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.directory\",\n\t\t\t\t\t\t\"spec.0.source.0.directory.0.exclude\",\n\t\t\t\t\t\t\"config.yaml\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application.directory\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"wait\", \"cascade\", \"metadata.0.generation\", \"metadata.0.resource_version\", \"status\", \"validate\"},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplication_SyncPolicy(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationSyncPolicy(\n\t\t\t\t\tacctest.RandomWithPrefix(\"test-acc\")),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application.sync_policy\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.sync_policy\",\n\t\t\t\t\t\t\"spec.0.sync_policy.0.automated.0.prune\",\n\t\t\t\t\t\t\"true\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.sync_policy\",\n\t\t\t\t\t\t\"spec.0.sync_policy.0.automated.0.self_heal\",\n\t\t\t\t\t\t\"true\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.sync_policy\",\n\t\t\t\t\t\t\"spec.0.sync_policy.0.automated.0.allow_empty\",\n\t\t\t\t\t\t\"true\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.sync_policy\",\n\t\t\t\t\t\t\"spec.0.sync_policy.0.retry.0.backoff.0.duration\",\n\t\t\t\t\t\t\"30s\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.sync_policy\",\n\t\t\t\t\t\t\"spec.0.sync_policy.0.retry.0.backoff.0.max_duration\",\n\t\t\t\t\t\t\"2m\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.sync_policy\",\n\t\t\t\t\t\t\"spec.0.sync_policy.0.retry.0.backoff.0.factor\",\n\t\t\t\t\t\t\"2\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.sync_policy\",\n\t\t\t\t\t\t\"spec.0.sync_policy.0.retry.0.limit\",\n\t\t\t\t\t\t\"5\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application.sync_policy\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"wait\", \"cascade\", \"metadata.0.generation\", \"metadata.0.resource_version\", \"status\", \"validate\"},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplication_NoSyncPolicyBlock(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationNoSyncPolicy(acctest.RandomWithPrefix(\"test-acc\")),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application.no_sync_policy\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckNoResourceAttr(\n\t\t\t\t\t\t\"argocd_application.no_sync_policy\",\n\t\t\t\t\t\t\"spec.0.sync_policy.0.retry.0.backoff.0.duration\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckNoResourceAttr(\n\t\t\t\t\t\t\"argocd_application.no_sync_policy\",\n\t\t\t\t\t\t\"spec.0.sync_policy.0.automated.0.prune\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplication_EmptySyncPolicyBlock(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationEmptySyncPolicy(acctest.RandomWithPrefix(\"test-acc\")),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application.empty_sync_policy\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckNoResourceAttr(\n\t\t\t\t\t\t\"argocd_application.empty_sync_policy\",\n\t\t\t\t\t\t\"spec.0.sync_policy.0.retry.0.backoff.0.duration\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckNoResourceAttr(\n\t\t\t\t\t\t\"argocd_application.empty_sync_policy\",\n\t\t\t\t\t\t\"spec.0.sync_policy.0.automated.0.prune\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplication_NoAutomatedBlock(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationNoAutomated(acctest.RandomWithPrefix(\"test-acc\")),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application.no_automated\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application.no_automated\",\n\t\t\t\t\t\t\"spec.0.sync_policy.0.retry.0.backoff.0.duration\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckNoResourceAttr(\n\t\t\t\t\t\t\"argocd_application.no_automated\",\n\t\t\t\t\t\t\"spec.0.sync_policy.0.automated.0.prune\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplication_EmptyAutomatedBlock(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationEmptyAutomated(acctest.RandomWithPrefix(\"test-acc\")),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application.empty_automated\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application.empty_automated\",\n\t\t\t\t\t\t\"spec.0.sync_policy.0.automated.#\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckNoResourceAttr(\n\t\t\t\t\t\t\"argocd_application.empty_automated\",\n\t\t\t\t\t\t\"spec.0.sync_policy.0.automated.0.prune\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplication_OptionalPath(t *testing.T) {\n\tapp := acctest.RandomWithPrefix(\"test-acc\")\n\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationDirectoryNoPath(app),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application.directory\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.directory\",\n\t\t\t\t\t\t\"spec.0.source.0.path\",\n\t\t\t\t\t\t\".\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationDirectoryPath(app, \".\"),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application.directory\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.directory\",\n\t\t\t\t\t\t\"spec.0.source.0.path\",\n\t\t\t\t\t\t\".\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationDirectoryNoPath(app),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application.directory\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.directory\",\n\t\t\t\t\t\t\"spec.0.source.0.path\",\n\t\t\t\t\t\t\".\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplication_Info(t *testing.T) {\n\tname := acctest.RandomWithPrefix(\"test-acc-info\")\n\tinfo := acctest.RandString(8)\n\tvalue := acctest.RandString(8)\n\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationInfo(name, info, value),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application.info\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.info\",\n\t\t\t\t\t\t\"spec.0.info.0.name\",\n\t\t\t\t\t\tinfo,\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.info\",\n\t\t\t\t\t\t\"spec.0.info.0.value\",\n\t\t\t\t\t\tvalue,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationInfoNoName(name, value),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application.info\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.info\",\n\t\t\t\t\t\t\"spec.0.info.0.name\",\n\t\t\t\t\t\t\"\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.info\",\n\t\t\t\t\t\t\"spec.0.info.0.value\",\n\t\t\t\t\t\tvalue,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationInfoNoValue(name, info),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application.info\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.info\",\n\t\t\t\t\t\t\"spec.0.info.0.name\",\n\t\t\t\t\t\tinfo,\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.info\",\n\t\t\t\t\t\t\"spec.0.info.0.value\",\n\t\t\t\t\t\t\"\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationInfo(name, info, value),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application.info\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.info\",\n\t\t\t\t\t\t\"spec.0.info.0.name\",\n\t\t\t\t\t\tinfo,\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.info\",\n\t\t\t\t\t\t\"spec.0.info.0.value\",\n\t\t\t\t\t\tvalue,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationNoInfo(name),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application.info\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckNoResourceAttr(\n\t\t\t\t\t\t\"argocd_application.info\",\n\t\t\t\t\t\t\"spec.0.info.0\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig:      testAccArgoCDApplicationInfoEmpty(name),\n\t\t\t\tExpectError: regexp.MustCompile(\"info: cannot be empty.\"),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application.info\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckNoResourceAttr(\n\t\t\t\t\t\t\"argocd_application.info\",\n\t\t\t\t\t\t\"spec.0.info.0\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplication_SkipCrds(t *testing.T) {\n\tname := acctest.RandomWithPrefix(\"test-acc-crds\")\n\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationSkipCrds_NoSkip(name),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application.crds\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.crds\",\n\t\t\t\t\t\t\"spec.0.source.0.helm.0.skip_crds\",\n\t\t\t\t\t\t\"false\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationSkipCrds(name, true),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application.crds\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.crds\",\n\t\t\t\t\t\t\"spec.0.source.0.helm.0.skip_crds\",\n\t\t\t\t\t\t\"true\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationSkipCrds(name, false),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application.crds\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.crds\",\n\t\t\t\t\t\t\"spec.0.source.0.helm.0.skip_crds\",\n\t\t\t\t\t\t\"false\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplication_SkipSchemaValidation(t *testing.T) {\n\tname := acctest.RandomWithPrefix(\"test-acc-schema-validation\")\n\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationSkipSchemaValidation_NoSkip(name),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application.schema_validation\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.schema_validation\",\n\t\t\t\t\t\t\"spec.0.source.0.helm.0.skip_schema_validation\",\n\t\t\t\t\t\t\"false\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationSkipSchemaValidation(name, true),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application.schema_validation\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.schema_validation\",\n\t\t\t\t\t\t\"spec.0.source.0.helm.0.skip_schema_validation\",\n\t\t\t\t\t\t\"true\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationSkipSchemaValidation(name, false),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application.schema_validation\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.schema_validation\",\n\t\t\t\t\t\t\"spec.0.source.0.helm.0.skip_schema_validation\",\n\t\t\t\t\t\t\"false\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplication_CustomNamespace(t *testing.T) {\n\tname := acctest.RandomWithPrefix(\"test-acc\")\n\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t); testAccPreCheckFeatureSupported(t, features.ProjectSourceNamespaces) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationCustomNamespace(name),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application.custom_namespace\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application.custom_namespace\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"wait\", \"cascade\", \"status\", \"validate\", \"metadata.0.generation\", \"metadata.0.resource_version\", \"spec.0.source.0.helm.0.parameter.0.force_string\", \"spec.0.source.0.helm.0.parameter.1.force_string\"},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplication_MultipleSources(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck: func() {\n\t\t\ttestAccPreCheck(t)\n\t\t\ttestAccPreCheckFeatureSupported(t, features.MultipleApplicationSources)\n\t\t\ttestAccPreCheckFeatureSupported(t, features.ApplicationSourceName)\n\t\t},\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationMultipleSources(),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application.multiple_sources\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.multiple_sources\",\n\t\t\t\t\t\t\"spec.0.source.0.chart\",\n\t\t\t\t\t\t\"opensearch\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.multiple_sources\",\n\t\t\t\t\t\t\"spec.0.source.0.name\",\n\t\t\t\t\t\t\"\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.multiple_sources\",\n\t\t\t\t\t\t\"spec.0.source.1.path\",\n\t\t\t\t\t\t\"test/e2e/testdata/guestbook\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.multiple_sources\",\n\t\t\t\t\t\t\"spec.0.source.1.name\",\n\t\t\t\t\t\t\"guestbook\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:      \"argocd_application.multiple_sources\",\n\t\t\t\tImportState:       true,\n\t\t\t\tImportStateVerify: true,\n\t\t\t\tImportStateVerifyIgnore: []string{\n\t\t\t\t\t\"wait\", \"cascade\", \"metadata.0.generation\", \"metadata.0.resource_version\", \"status\", \"validate\",\n\t\t\t\t\t\"spec.0.source.0.helm.0.parameter.0.force_string\",\n\t\t\t\t\t\"spec.0.source.0.helm.0.parameter.1.force_string\",\n\t\t\t\t\t\"spec.0.source.0.helm.0.parameter.2.force_string\",\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplication_HelmValuesFromExternalGitRepo(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck: func() {\n\t\t\ttestAccPreCheck(t)\n\t\t\ttestAccPreCheckFeatureSupported(t, features.MultipleApplicationSources)\n\t\t\ttestAccPreCheckFeatureSupported(t, features.ApplicationSourceName)\n\t\t},\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationHelmValuesFromExternalGitRepo(),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application.helm_values_external\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.helm_values_external\",\n\t\t\t\t\t\t\"spec.0.source.0.chart\",\n\t\t\t\t\t\t\"wordpress\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.helm_values_external\",\n\t\t\t\t\t\t\"spec.0.source.0.name\",\n\t\t\t\t\t\t\"wordpress-helm\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application.helm_values_external\",\n\t\t\t\t\t\t\"spec.0.source.0.helm.0.value_files.#\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.helm_values_external\",\n\t\t\t\t\t\t\"spec.0.source.1.ref\",\n\t\t\t\t\t\t\"values\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.helm_values_external\",\n\t\t\t\t\t\t\"spec.0.source.1.name\",\n\t\t\t\t\t\t\"wordpress-values\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application.helm_values_external\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"wait\", \"cascade\", \"metadata.0.generation\", \"metadata.0.resource_version\", \"status\", \"validate\"},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplication_ManagedNamespaceMetadata(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t); testAccPreCheckFeatureSupported(t, features.ManagedNamespaceMetadata) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplication_ManagedNamespaceMetadata(),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\"argocd_application.namespace_metadata\", \"metadata.0.uid\"),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\"argocd_application.namespace_metadata\", \"spec.0.sync_policy.0.managed_namespace_metadata.0.annotations.%\"),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\"argocd_application.namespace_metadata\", \"spec.0.sync_policy.0.managed_namespace_metadata.0.labels.%\"),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_application.namespace_metadata\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"wait\", \"cascade\", \"metadata.0.generation\", \"metadata.0.resource_version\", \"validate\", \"status\"},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplication_Wait(t *testing.T) {\n\tchartRevision := \"0.33.0\"\n\tname := acctest.RandomWithPrefix(\"test-acc\")\n\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationSimple(name, chartRevision, true),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.\"+name,\n\t\t\t\t\t\t\"wait\",\n\t\t\t\t\t\t\"true\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.\"+name,\n\t\t\t\t\t\t\"spec.0.source.0.target_revision\",\n\t\t\t\t\t\tchartRevision,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplication_Validate(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationKustomize(\n\t\t\t\t\tacctest.RandomWithPrefix(\"test-acc\"),\n\t\t\t\t\t\"path-does-not-exist\",\n\t\t\t\t\ttrue,\n\t\t\t\t),\n\t\t\t\tExpectError: regexp.MustCompile(\"app path does not exist\"),\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationKustomize(\n\t\t\t\t\tacctest.RandomWithPrefix(\"test-acc\"),\n\t\t\t\t\t\"path-does-not-exist\",\n\t\t\t\t\tfalse,\n\t\t\t\t),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.kustomize\",\n\t\t\t\t\t\t\"validate\",\n\t\t\t\t\t\t\"false\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.kustomize\",\n\t\t\t\t\t\t\"spec.0.source.0.path\",\n\t\t\t\t\t\t\"path-does-not-exist\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplication_Sync(t *testing.T) {\n\tname := acctest.RandomWithPrefix(\"test-acc\")\n\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationSync(\n\t\t\t\t\tname, true),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.sync\",\n\t\t\t\t\t\t\"sync\",\n\t\t\t\t\t\t\"true\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDApplicationSync(\n\t\t\t\t\tname, true),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_application.sync\",\n\t\t\t\t\t\t\"sync\",\n\t\t\t\t\t\t\"true\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc testAccArgoCDApplicationSync(name string, sync bool) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_application\" \"sync\" {\n  metadata {\n    name      = \"%[1]s\"\n    namespace = \"argocd\"\n    labels = {\n      acceptance = \"true\"\n    }\n  }\n\t\n\tsync = %[2]t\n\n  spec {\n    source {\n      repo_url        = \"https://github.com/argoproj/argo-cd\"\n      path            = \"test/e2e/testdata/guestbook\"\n      target_revision = \"HEAD\"\n    }\n\n    sync_policy {\n      sync_options = [\"CreateNamespace=true\"]\n    }\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"%[1]s\"\n    }\n  }\n}\n\t`, name, sync)\n}\n\nfunc testAccArgoCDApplicationSimple(name, targetRevision string, wait bool) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_application\" \"%[1]s\" {\n  metadata {\n    name      = \"%[1]s\"\n    namespace = \"argocd\"\n    labels = {\n      acceptance = \"true\"\n    }\n    annotations = {\n      \"this.is.a.really.long.nested.key\" = \"yes, really!\"\n    }\n  }\n\n  spec {\n    source {\n      repo_url        = \"https://kubernetes-sigs.github.io/descheduler\"\n      chart           = \"descheduler\"\n      target_revision = \"%[2]s\"\n      helm {\n        parameter {\n          name  = \"service.type\"\n          value = \"NodePort\"\n        }\n        release_name = \"testing\"\n      }\n    }\n\n    sync_policy {\n      automated {\n        prune       = true\n        self_heal   = true\n        allow_empty = false\n      }\n      sync_options = [\"CreateNamespace=true\"]\n    }\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"%[1]s\"\n    }\n  }\n  wait = %[3]t\n}\n    `, name, targetRevision, wait)\n}\n\nfunc testAccArgoCDApplicationHelm(name, helmValues string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_application\" \"helm\" {\n  metadata {\n    name      = \"%[1]s\"\n    namespace = \"argocd\"\n    labels = {\n      acceptance = \"true\"\n    }\n  }\n\n  spec {\n    source {\n      repo_url        = \"https://kubernetes-sigs.github.io/descheduler\"\n      chart           = \"descheduler\"\n      target_revision = \"0.33.0\"\n      helm {\n        release_name = \"testing\"\n        \n        parameter {\n          name  = \"image.tag\"\n          value = \"6.2.5\"\n        }\n        parameter {\n          name  = \"architecture\"\n          value = \"standalone\"\n        }\n\n        pass_credentials = true\n        ignore_missing_value_files = true\n\t\tversion = \"v3\"\n\n        value_files = [\"values.yaml\"]\n\n        values = <<EOT\n%[2]s\nEOT\n      }\n    }\n\n    sync_policy {\n      sync_options = [\"CreateNamespace=true\"]\n    }\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"%[1]s\"\n    }\n  }\n}\n\t`, name, helmValues)\n}\n\nfunc testAccArgoCDApplicationHelm_FileParameters(name string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_application\" \"helm_file_parameters\" {\n\tmetadata {\n\t\tname      = \"%[1]s\"\n\t\tnamespace = \"argocd\"\n\t}\n\n\tspec {\n\t\tsource {\n\t\t\trepo_url        = \"https://kubernetes-sigs.github.io/descheduler\"\n\t\t\tchart           = \"descheduler\"\n\t\t\ttarget_revision = \"0.33.0\"\n\n\t\t\thelm {\n\t\t\t\trelease_name = \"testing\"\n\t\t\t\tfile_parameter {\n\t\t\t\t\tname = \"foo\"\n\t\t\t\t\tpath = \"does-not-exist.txt\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tsync_policy {\n\t\t\tsync_options = [\"CreateNamespace=true\"]\n\t\t}\n\n\t\tdestination {\n\t\t\tserver    = \"https://kubernetes.default.svc\"\n\t\t\tnamespace = \"%[1]s\"\n\t\t}\n\t}\n}`, name)\n}\n\nfunc testAccArgoCDApplicationKustomize(name string, path string, validate bool) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_application\" \"kustomize\" {\n\tmetadata {\n\t\tname      = \"%s\"\n\t\tnamespace = \"argocd\"\n\t\tlabels = {\n\t\t\tacceptance = \"true\"\n\t\t}\n\t}\n\n  spec {\n    source {\n      repo_url        = \"https://github.com/kubernetes-sigs/kustomize\"\n      path            = \"%s\"\n      target_revision = \"release-kustomize-v3.7\"\n      kustomize {\n  \t    name_prefix  = \"foo-\"\n\t  \tname_suffix = \"-bar\"\n\t  \timages = [\n          \"hashicorp/terraform:light\",\n\t    ]\n\t  \tcommon_labels = {\n\t\t  \"this.is.a.common\" = \"la-bel\"\n\t\t  \"another.io/one\"   = \"true\" \n\t    }\n        common_annotations = {\n\t\t  \"this.is.a.common\" = \"anno-tation\"\n\t\t  \"another.io/one\"   = \"false\"\n\t    }\n      }\n    }\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n  }\n\n  validate = %t\n}\n  `, name, path, validate)\n}\n\nfunc testAccArgoCDApplicationKustomizePatches(name string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_application\" \"kustomize_patches\" {\n  metadata {\n    name      = \"%s\"\n    namespace = \"argocd\"\n    labels = {\n      acceptance = \"true\"\n    }\n  }\n\n  spec {\n    source {\n      repo_url        = \"https://github.com/kubernetes-sigs/kustomize\"\n      path            = \"examples/helloWorld\"\n      target_revision = \"release-kustomize-v3.7\"\n      kustomize {\n        name_prefix = \"foo-\"\n        name_suffix = \"-bar\"\n        images = [\n          \"foo=hashicorp/terraform:light\",\n        ]\n        common_labels = {\n          \"this.is.a.common\" = \"la-bel\"\n          \"another.io/one\"   = \"true\"\n        }\n        common_annotations = {\n          \"this.is.a.common\" = \"anno-tation\"\n          \"another.io/one\"   = \"false\"\n        }\n\n        patches {\n          target {\n            group   = \"apps\"\n            version = \"v1\"\n            kind    = \"Deployment\"\n          }\n\n          patch = <<-EOT\n- op: add\n  path: /spec/template/metadata/labels/app.kubernetes.io~1version\n  value: 1.21.0\nEOT\n        }\n        patches {\n          target {\n            label_selector = \"app=hello\"\n          }\n\n          patch = <<-EOT\n- op: add\n  path: /spec/template/spec/containers/0/image\n  value: nginx:1.21.0\nEOT\n        }\n      }\n    }\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n  }\n}\n\t`, name)\n}\n\nfunc testAccArgoCDApplicationDirectoryNoPath(name string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_application\" \"directory\" {\n  metadata {\n    name      = \"%s\"\n    namespace = \"argocd\"\n    labels = {\n      acceptance = \"true\"\n    }\n  }\n\n  spec {\n    source {\n      repo_url        = \"https://github.com/MrLuje/argocd-example\"\n      target_revision = \"yaml-at-root\"\n    }\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n  }\n}\n\t`, name)\n}\n\nfunc testAccArgoCDApplicationDirectoryPath(name string, path string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_application\" \"directory\" {\n  metadata {\n    name      = \"%s\"\n    namespace = \"argocd\"\n    labels = {\n      acceptance = \"true\"\n    }\n  }\n\n  spec {\n    source {\n      repo_url        = \"https://github.com/MrLuje/argocd-example\"\n      path            = \"%s\"\n      target_revision = \"yaml-at-root\"\n    }\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n  }\n}\n\t`, name, path)\n}\n\nfunc testAccArgoCDApplication_DirectoryJsonnet(name string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_application\" \"directory\" {\n  metadata {\n    name      = \"%s\"\n    namespace = \"argocd\"\n    labels = {\n      acceptance = \"true\"\n    }\n  }\n\n  spec {\n    source {\n      repo_url        = \"https://github.com/solo-io/gloo\"\n      path            = \"install/helm/gloo\"\n      target_revision = \"v1.4.2\"\n      directory {\n        recurse = false\n        jsonnet {\n          ext_var {\n            name  = \"somename\"\n            value = \"somevalue\"\n            code  = false\n          }\n          ext_var {\n            name  = \"anothername\"\n            value = \"anothervalue\"\n            code  = true\n          }\n          tla {\n            name  = \"yetanothername\"\n            value = \"yetanothervalue\"\n            code  = true\n          }\n          libs = [\n            \"vendor\",\n            \"foo\"\n          ]\n        }\n      }\n    }\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n  }\n}\n\t`, name)\n}\n\nfunc testAccArgoCDApplicationDirectoryImplicitNonRecurse(name string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_application\" \"directory\" {\n  metadata {\n    name      = \"%s\"\n    namespace = \"argocd\"\n    labels = {\n      acceptance = \"true\"\n    }\n  }\n\n  spec {\n    source {\n      repo_url        = \"https://github.com/solo-io/gloo\"\n      path            = \"install/helm/gloo\"\n      target_revision = \"v1.4.2\"\n      directory {\n        jsonnet {\n          ext_var {\n            name  = \"somename\"\n            value = \"somevalue\"\n            code  = false\n          }\n          ext_var {\n            name  = \"anothername\"\n            value = \"anothervalue\"\n            code  = true\n          }\n          tla {\n            name  = \"yetanothername\"\n            value = \"yetanothervalue\"\n            code  = true\n          }\n        }\n      }\n    }\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n  }\n}\n\t`, name)\n}\n\nfunc testAccArgoCDApplicationRecurseDirectory(name string, recurse bool) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_application\" \"directory\" {\n  metadata {\n    name      = \"%s\"\n    namespace = \"argocd\"\n    labels = {\n      acceptance = \"true\"\n    }\n  }\n\n  spec {\n    source {\n      repo_url        = \"https://github.com/argoproj/argo-cd\"\n      path            = \"test/e2e/testdata/guestbook\"\n      target_revision = \"HEAD\"\n      directory {\n        recurse = %s\n      }\n    }\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n  }\n}\n\t`, name, strconv.FormatBool(recurse))\n}\n\nfunc testAccArgoCDApplication_EmptyDirectory(name string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_application\" \"directory\" {\n  metadata {\n    name      = \"%s\"\n    namespace = \"argocd\"\n    labels = {\n      acceptance = \"true\"\n    }\n  }\n\n  spec {\n    source {\n      repo_url        = \"https://github.com/argoproj/argo-cd\"\n      path            = \"test/e2e/testdata/guestbook\"\n      target_revision = \"HEAD\"\n      directory {}\n    }\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n  }\n}\n    `, name)\n}\n\nfunc testAccArgoCDApplication_DirectoryIncludeExclude(name string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_application\" \"directory\" {\n  metadata {\n    name      = \"%s\"\n    namespace = \"argocd\"\n    labels = {\n      acceptance = \"true\"\n    }\n  }\n\n  spec {\n    source {\n      repo_url        = \"https://github.com/argoproj/argo-cd\"\n      path            = \"test/e2e/testdata/guestbook\"\n      target_revision = \"HEAD\"\n      directory {\n        recurse = true\n\t\texclude = \"config.yaml\"\n\t\tinclude = \"*.yaml\"\n      }\n    }\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n  }\n}\n\t`, name)\n}\n\nfunc testAccArgoCDApplicationSyncPolicy(name string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_application\" \"sync_policy\" {\n  metadata {\n    name      = \"%s\"\n    namespace = \"argocd\"\n    labels = {\n      acceptance = \"true\"\n    }\n  }\n\n  spec {\n    source {\n      repo_url        = \"https://kubernetes-sigs.github.io/descheduler\"\n      chart           = \"descheduler\"\n      target_revision = \"0.33.0\"\n    }\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n    \n    sync_policy {\n      automated {\n        prune       = true\n        self_heal   = true\n        allow_empty = true\n      }\n      retry {\n        limit   = \"5\"\n        backoff {\n          duration     = \"30s\"\n          max_duration = \"2m\"\n          factor       = \"2\"\n        }\n      }\n    }\n  }\n}\n\t`, name)\n}\n\nfunc testAccArgoCDApplicationIgnoreDifferences(name string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_application\" \"ignore_differences\" {\n  metadata {\n    name      = \"%s\"\n    namespace = \"argocd\"\n    labels = {\n      acceptance = \"true\"\n    }\n  }\n\n  spec {\n    source {\n      repo_url        = \"https://kubernetes-sigs.github.io/descheduler\"\n      chart           = \"descheduler\"\n      target_revision = \"0.33.0\"\n    }\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n    \n    ignore_difference {\n      group               = \"apps\"\n      kind                = \"Deployment\"\n      json_pointers       = [\"/spec/replicas\"]\n    }\n\n    ignore_difference {\n      group         = \"apps\"\n      kind          = \"StatefulSet\"\n      name          = \"someStatefulSet\"\n      json_pointers = [\n        \"/spec/replicas\",\n        \"/spec/template/spec/metadata/labels/somelabel\",\n      ]\n    }\n  }\n}\n\t`, name)\n}\n\nfunc testAccArgoCDApplicationIgnoreDiffJQPathExpressions(name string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_application\" \"ignore_differences_jqpe\" {\n  metadata {\n    name      = \"%s\"\n    namespace = \"argocd\"\n    labels = {\n      acceptance = \"true\"\n    }\n  }\n\n  spec {\n    source {\n      repo_url        = \"https://kubernetes-sigs.github.io/descheduler\"\n      chart           = \"descheduler\"\n      target_revision = \"0.33.0\"\n    }\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n    \n    ignore_difference {\n      group               = \"apps\"\n      kind                = \"Deployment\"\n      jq_path_expressions = [\".spec.replicas\"]\n    }\n\n    ignore_difference {\n      group         = \"apps\"\n      kind          = \"StatefulSet\"\n      name          = \"someStatefulSet\"\n      jq_path_expressions = [\n        \".spec.replicas\",\n        \".spec.template.spec.metadata.labels.somelabel\",\n      ]\n    }\n  }\n}\n\t`, name)\n}\n\nfunc testAccArgoCDApplicationIgnoreDiffManagedFieldsManagers(name string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_application\" \"ignore_differences_managed_fields_managers\" {\n  metadata {\n    name      = \"%s\"\n    namespace = \"argocd\"\n    labels = {\n      acceptance = \"true\"\n    }\n  }\n\n  spec {\n    source {\n      repo_url        = \"https://kubernetes-sigs.github.io/descheduler\"\n      chart           = \"descheduler\"\n      target_revision = \"0.33.0\"\n    }\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n    \n    ignore_difference {\n      group                   = \"apps\"\n      kind                    = \"Deployment\"\n      json_pointers           = [\"/spec/replicas\"]\n      managed_fields_managers = [\"some-controller-owner\"]\n    }\n\n    ignore_difference {\n      group         = \"apps\"\n      kind          = \"StatefulSet\"\n      name          = \"someStatefulSet\"\n\n      managed_fields_managers = [\n        \"some-controller-owner\",\n        \"some-other-controller-owner\",\n      ]\n    }\n  }\n}\n\t`, name)\n}\n\nfunc testAccArgoCDApplication_OptionalDestinationNamespace(name string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_application\" \"no_namespace\" {\n  metadata {\n    name      = \"%s\"\n    namespace = \"argocd\"\n  }\n  spec {\n    source {\n      repo_url        = \"https://kubernetes-sigs.github.io/descheduler\"\n      chart           = \"descheduler\"\n      target_revision = \"0.33.0\"\n      helm {\n        release_name = \"testing\"\n      }\n    }\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n    }\n  }\n}\n`, name)\n}\n\nfunc testAccArgoCDApplicationNoSyncPolicy(name string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_application\" \"no_sync_policy\" {\n  metadata {\n    name      = \"%s\"\n    namespace = \"argocd\"\n  }\n  spec {\n    source {\n      repo_url        = \"https://kubernetes-sigs.github.io/descheduler\"\n      chart           = \"descheduler\"\n      target_revision = \"0.33.0\"\n      helm {\n        release_name = \"testing\"\n      }\n    }\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n  }\n}\n\t`, name)\n}\n\nfunc testAccArgoCDApplicationEmptySyncPolicy(name string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_application\" \"empty_sync_policy\" {\n  metadata {\n    name      = \"%s\"\n    namespace = \"argocd\"\n  }\n  spec {\n    source {\n      repo_url        = \"https://kubernetes-sigs.github.io/descheduler\"\n      chart           = \"descheduler\"\n      target_revision = \"0.33.0\"\n      helm {\n        release_name = \"testing\"\n      }\n    }\n    sync_policy {\n    }\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n  }\n}\n\t`, name)\n}\n\nfunc testAccArgoCDApplicationNoAutomated(name string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_application\" \"no_automated\" {\n  metadata {\n    name      = \"%s\"\n    namespace = \"argocd\"\n  }\n  spec {\n    source {\n      repo_url        = \"https://kubernetes-sigs.github.io/descheduler\"\n      chart           = \"descheduler\"\n      target_revision = \"0.33.0\"\n      helm {\n        release_name = \"testing\"\n      }\n    }\n    sync_policy {\n      retry {\n        limit   = \"5\"\n        backoff {\n          duration     = \"30s\"\n          max_duration = \"2m\"\n          factor       = \"2\"\n        }\n      }\n    }\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n  }\n}\n\t`, name)\n}\n\nfunc testAccArgoCDApplicationEmptyAutomated(name string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_application\" \"empty_automated\" {\n  metadata {\n    name      = \"%s\"\n    namespace = \"argocd\"\n  }\n  spec {\n    source {\n      repo_url        = \"https://kubernetes-sigs.github.io/descheduler\"\n      chart           = \"descheduler\"\n      target_revision = \"0.33.0\"\n      helm {\n        release_name = \"testing\"\n      }\n    }\n    sync_policy {\n      automated {}\n    }\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n  }\n}\n\t`, name)\n}\n\nfunc testAccArgoCDApplicationRevisionHistory(name string, revision_history_limit int) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_application\" \"revision_history_limit\" {\n  metadata {\n    name      = \"%s\"\n    namespace = \"argocd\"\n    labels = {\n      acceptance = \"true\"\n    }\n    annotations = {\n      \"this.is.a.really.long.nested.key\" = \"yes, really!\"\n    }\n  }\n\n  spec {\n    revision_history_limit = %d\n    source {\n      repo_url        = \"https://kubernetes-sigs.github.io/descheduler\"\n      chart           = \"descheduler\"\n      target_revision = \"0.33.0\"\n      helm {\n        parameter {\n          name  = \"image.tag\"\n          value = \"6.2.5\"\n        }\n        parameter {\n          name  = \"architecture\"\n          value = \"standalone\"\n        }\n        release_name = \"testing\"\n      }\n    }\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n  }\n}\n\t`, name, revision_history_limit)\n}\n\nfunc testAccArgoCDApplicationInfo(name, info, value string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_application\" \"info\" {\n  metadata {\n    name      = \"%s\"\n    namespace = \"argocd\"\n    labels = {\n      acceptance = \"true\"\n    }\n  }\n\n  spec {\n    info {\n      name = \"%s\"\n      value = \"%s\"\n    }\n    source {\n      repo_url        = \"https://github.com/argoproj/argo-cd\"\n      path            = \"test/e2e/testdata/guestbook\"\n      target_revision = \"HEAD\"\n    }\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n  }\n}\n    `, name, info, value)\n}\n\nfunc testAccArgoCDApplicationInfoNoName(name, value string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_application\" \"info\" {\n  metadata {\n    name      = \"%s\"\n    namespace = \"argocd\"\n    labels = {\n      acceptance = \"true\"\n    }\n  }\n\n  spec {\n    info {\n      value = \"%s\"\n    }\n    source {\n      repo_url        = \"https://github.com/argoproj/argo-cd\"\n      path            = \"test/e2e/testdata/guestbook\"\n      target_revision = \"HEAD\"\n    }\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n  }\n}\n    `, name, value)\n}\n\nfunc testAccArgoCDApplicationInfoNoValue(name, info string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_application\" \"info\" {\n  metadata {\n    name      = \"%s\"\n    namespace = \"argocd\"\n    labels = {\n      acceptance = \"true\"\n    }\n  }\n\n  spec {\n    info {\n      name = \"%s\"\n    }\n    source {\n      repo_url        = \"https://github.com/argoproj/argo-cd\"\n      path            = \"test/e2e/testdata/guestbook\"\n      target_revision = \"HEAD\"\n    }\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n  }\n}\n    `, name, info)\n}\n\nfunc testAccArgoCDApplicationInfoEmpty(name string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_application\" \"info\" {\n  metadata {\n    name      = \"%s\"\n    namespace = \"argocd\"\n    labels = {\n      acceptance = \"true\"\n    }\n  }\n\n  spec {\n    info {\n    }\n    source {\n      repo_url        = \"https://github.com/argoproj/argo-cd\"\n      path            = \"test/e2e/testdata/guestbook\"\n      target_revision = \"HEAD\"\n    }\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n  }\n}\n    `, name)\n}\n\nfunc testAccArgoCDApplicationNoInfo(name string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_application\" \"info\" {\n  metadata {\n    name      = \"%s\"\n    namespace = \"argocd\"\n    labels = {\n      acceptance = \"true\"\n    }\n  }\n\n  spec {\n    source {\n      repo_url        = \"https://github.com/argoproj/argo-cd\"\n      path            = \"test/e2e/testdata/guestbook\"\n      target_revision = \"HEAD\"\n    }\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n  }\n}\n    `, name)\n}\n\nfunc testAccArgoCDApplicationSkipCrds(name string, SkipCrds bool) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_application\" \"crds\" {\n  metadata {\n    name      = \"%s\"\n    namespace = \"argocd\"\n    labels = {\n      acceptance = \"true\"\n    }\n  }\n\n  spec {\n    source {\n\t\trepo_url        = \"https://kubernetes-sigs.github.io/descheduler\"\n\t\tchart           = \"descheduler\"\n\t\ttarget_revision = \"0.33.0\"\n\t\thelm {\n\t\t  parameter {\n\t\t\tname  = \"image.tag\"\n\t\t\tvalue = \"6.2.5\"\n\t\t  }\n\t\t  parameter {\n\t\t\tname  = \"architecture\"\n\t\t\tvalue = \"standalone\"\n\t\t  }\n\t\t  release_name = \"testing\"\n\t\t  skip_crds = %t\n\t\t}\n\t}\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n  }\n}\n\t`, name, SkipCrds)\n}\n\nfunc testAccArgoCDApplicationSkipCrds_NoSkip(name string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_application\" \"crds\" {\n  metadata {\n    name      = \"%s\"\n    namespace = \"argocd\"\n    labels = {\n      acceptance = \"true\"\n    }\n  }\n\n  spec {\n    source {\n\t\trepo_url        = \"https://kubernetes-sigs.github.io/descheduler\"\n\t\tchart           = \"descheduler\"\n\t\ttarget_revision = \"0.33.0\"\n\t\thelm {\n\t\t  parameter {\n\t\t\tname  = \"image.tag\"\n\t\t\tvalue = \"6.2.5\"\n\t\t  }\n\t\t  parameter {\n\t\t\tname  = \"architecture\"\n\t\t\tvalue = \"standalone\"\n\t\t  }\n\t\t  release_name = \"testing\"\n\t\t}\n\t}\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n  }\n}\n\t`, name)\n}\n\nfunc testAccArgoCDApplicationSkipSchemaValidation(name string, skipSchemaValidation bool) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_application\" \"schema_validation\" {\n  metadata {\n    name      = \"%s\"\n    namespace = \"argocd\"\n    labels = {\n      acceptance = \"true\"\n    }\n  }\n\n  spec {\n    source {\n\t\trepo_url        = \"https://kubernetes-sigs.github.io/descheduler\"\n\t\tchart           = \"descheduler\"\n\t\ttarget_revision = \"0.33.0\"\n\t\thelm {\n\t\t  parameter {\n\t\t\tname  = \"image.tag\"\n\t\t\tvalue = \"6.2.5\"\n\t\t  }\n\t\t  parameter {\n\t\t\tname  = \"architecture\"\n\t\t\tvalue = \"standalone\"\n\t\t  }\n\t\t  release_name = \"testing\"\n\t\t  skip_schema_validation = %t\n\t\t}\n\t}\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n  }\n}\n\t`, name, skipSchemaValidation)\n}\n\nfunc testAccArgoCDApplicationSkipSchemaValidation_NoSkip(name string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_application\" \"schema_validation\" {\n  metadata {\n    name      = \"%s\"\n    namespace = \"argocd\"\n    labels = {\n      acceptance = \"true\"\n    }\n  }\n\n  spec {\n    source {\n\t\trepo_url        = \"https://kubernetes-sigs.github.io/descheduler\"\n\t\tchart           = \"descheduler\"\n\t\ttarget_revision = \"0.33.0\"\n\t\thelm {\n\t\t  parameter {\n\t\t\tname  = \"image.tag\"\n\t\t\tvalue = \"6.2.5\"\n\t\t  }\n\t\t  parameter {\n\t\t\tname  = \"architecture\"\n\t\t\tvalue = \"standalone\"\n\t\t  }\n\t\t  release_name = \"testing\"\n\t\t}\n\t}\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n  }\n}\n\t`, name)\n}\n\nfunc testAccArgoCDApplicationCustomNamespace(name string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_project\" \"custom_namespace\" {\n  metadata {\n    name      = \"%[1]s\"\n    namespace = \"argocd\"\n  }\n\n  spec {\n    description  = \"project with source namespace\"\n    source_repos = [\"*\"]\n    source_namespaces = [\"mynamespace-1\"]\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n  }\n}\n\nresource \"argocd_application\" \"custom_namespace\" {\n  metadata {\n    name      = \"%[1]s\"\n    namespace = \"mynamespace-1\"\n  }\n\n  spec {\n    project = argocd_project.custom_namespace.metadata[0].name\n    source {\n      repo_url        = \"https://kubernetes-sigs.github.io/descheduler\"\n      chart           = \"descheduler\"\n      target_revision = \"0.33.0\"\n      helm {\n        parameter {\n          name  = \"image.tag\"\n          value = \"6.2.5\"\n        }\n        parameter {\n          name  = \"architecture\"\n          value = \"standalone\"\n        }\n        release_name = \"testing\"\n      }\n    }\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n  }\n}\n\t`, name)\n}\n\nfunc testAccArgoCDApplicationMultipleSources() string {\n\treturn `\nresource \"argocd_application\" \"multiple_sources\" {\n  metadata {\n    name      = \"multiple-sources\"\n    namespace = \"argocd\"\n  }\n\n  spec {\n    project = \"default\" \n\t\n\tsource {\n\t\trepo_url        = \"https://opensearch-project.github.io/helm-charts\"\n\t\tchart           = \"opensearch\"\n\t\ttarget_revision = \"3.0.0\"\n\t\thelm {\n\t\t\tparameter {\n\t\t\t\tname  = \"replicas\"\n\t\t\t\tvalue = \"1\"\n\t\t\t}\n\n\t\t\tparameter {\n\t\t\t\tname = \"singleNode\"\n\t\t\t\tvalue = \"true\"\n\t\t\t}\n\n\t\t\tparameter {\n\t\t\t\tname = \"persistence.enabled\"\n\t\t\t\tvalue = \"false\"\n\t\t\t}\n\n\t\t\tvalues = <<-EOT\n\t\t\t  extraEnvs:\n\t\t\t    - name: \"DISABLE_SECURITY_PLUGIN\"\n\t\t\t      value: \"true\"\n\t\t\tEOT\n\t\t}\n\t}\n\n\tsource {\n\t\trepo_url        = \"https://github.com/argoproj/argo-cd.git\"\n\t\tpath            = \"test/e2e/testdata/guestbook\"\n\t\ttarget_revision = \"HEAD\"\n\t\tname            = \"guestbook\"\n\t}\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n  }\n}`\n}\n\nfunc testAccArgoCDApplication_ManagedNamespaceMetadata() string {\n\treturn `\nresource \"argocd_application\" \"namespace_metadata\" {\n\tmetadata {\n\t\tname      = \"namespace-metadata\"\n\t\tnamespace = \"argocd\"\n\t}\n\n\tspec {\n\t\tproject = \"default\" \n\n\t\tsource {\n\t\t\trepo_url        = \"https://kubernetes-sigs.github.io/descheduler\"\n\t\t\tchart           = \"descheduler\"\n\t\t\ttarget_revision = \"0.33.0\"\n\t\t}\n\n\t\tdestination {\n\t\t\tserver    = \"https://kubernetes.default.svc\"\n\t\t\tnamespace = \"managed-namespace\"\n\t\t}\n\n\t\tsync_policy {\n\t\t\tmanaged_namespace_metadata {\n\t\t\t\tannotations = {\n\t\t\t\t\t\"this.is.a.really.long.nested.key\" = \"yes, really!\"\n\t\t\t\t}\n\t\t\t\tlabels = {\n\t\t\t\t\tfoo = \"bar\"\n\t\t\t\t}\n\t\t\t}\n\t\t\tsync_options = [\"CreateNamespace=true\"]\n\t\t}\n\t}\n}`\n}\n\nfunc testAccArgoCDApplicationHelmValuesFromExternalGitRepo() string {\n\treturn `\nresource \"argocd_application\" \"helm_values_external\" {\n  metadata {\n    name      = \"helm-values-external\"\n    namespace = \"argocd\"\n  }\n\n  spec {\n    project = \"default\" \n  \n    source {\n      name            = \"wordpress-helm\"   \n      repo_url        = \"https://charts.helm.sh/stable\"\n      chart           = \"wordpress\"\n      target_revision = \"9.0.3\"\n      helm {\n        value_files = [\"$values/helm-dependency/values.yaml\"]\n      }\n    }\n\n    source {\n      name            = \"wordpress-values\"\n      ref             = \"values\"\n      repo_url        = \"https://github.com/argoproj/argocd-example-apps.git\"\n      target_revision = \"HEAD\"\n    }\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n  }\n}`\n}\n"
  },
  {
    "path": "argocd/resource_argocd_cluster.go",
    "content": "package argocd\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"strings\"\n\n\tclusterClient \"github.com/argoproj/argo-cd/v3/pkg/apiclient/cluster\"\n\t\"github.com/hashicorp/terraform-plugin-sdk/v2/diag\"\n\t\"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema\"\n)\n\nfunc resourceArgoCDCluster() *schema.Resource {\n\treturn &schema.Resource{\n\t\tDescription:   \"Manages [clusters](https://argo-cd.readthedocs.io/en/stable/operator-manual/declarative-setup/#clusters) within ArgoCD.\",\n\t\tCreateContext: resourceArgoCDClusterCreate,\n\t\tReadContext:   resourceArgoCDClusterRead,\n\t\tUpdateContext: resourceArgoCDClusterUpdate,\n\t\tDeleteContext: resourceArgoCDClusterDelete,\n\t\tImporter: &schema.ResourceImporter{\n\t\t\tStateContext: schema.ImportStatePassthroughContext,\n\t\t},\n\t\tSchema: clusterSchema(),\n\t}\n}\n\nfunc resourceArgoCDClusterCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {\n\tsi := meta.(*ServerInterface)\n\tif diags := si.InitClients(ctx); diags != nil {\n\t\treturn pluginSDKDiags(diags)\n\t}\n\n\tcluster, err := expandCluster(d)\n\tif err != nil {\n\t\treturn errorToDiagnostics(\"failed to expand cluster\", err)\n\t}\n\n\t// Need a full lock here to avoid race conditions between List existing clusters and creating a new one\n\ttokenMutexClusters.Lock()\n\n\trtrimmedServer := strings.TrimRight(cluster.Server, \"/\")\n\n\t// Cluster are unique by \"server address\" so we should check there is no existing cluster with this address before\n\texistingClusters, err := si.ClusterClient.List(ctx, &clusterClient.ClusterQuery{\n\t\t// Starting argo-cd server v2.8.0 filtering on list api endpoint is fixed, else it is ignored, see:\n\t\t// - https://github.com/oboukili/terraform-provider-argocd/issues/266#issuecomment-1739122022\n\t\t// - https://github.com/argoproj/argo-cd/pull/13363\n\t\tId: &clusterClient.ClusterID{\n\t\t\tType:  \"server\",\n\t\t\tValue: rtrimmedServer,\n\t\t},\n\t})\n\tif err != nil {\n\t\ttokenMutexClusters.Unlock()\n\t\treturn errorToDiagnostics(fmt.Sprintf(\"failed to list existing clusters when creating cluster %s\", cluster.Server), err)\n\t}\n\n\t// Here we will filter ourselves on the list so that we are backward compatible for argo-cd server with version < v2.8.0 (see coment above)\n\tif len(existingClusters.Items) > 0 {\n\t\tfor _, existingCluster := range existingClusters.Items {\n\t\t\tif rtrimmedServer == strings.TrimRight(existingCluster.Server, \"/\") {\n\t\t\t\ttokenMutexClusters.Unlock()\n\n\t\t\t\treturn []diag.Diagnostic{\n\t\t\t\t\t{\n\t\t\t\t\t\tSeverity: diag.Error,\n\t\t\t\t\t\tSummary:  fmt.Sprintf(\"cluster with server address %s already exists\", cluster.Server),\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tc, err := si.ClusterClient.Create(ctx, &clusterClient.ClusterCreateRequest{\n\t\tCluster: cluster, Upsert: false,\n\t})\n\ttokenMutexClusters.Unlock()\n\n\tif err != nil {\n\t\treturn argoCDAPIError(\"create\", \"cluster\", cluster.Server, err)\n\t}\n\n\t// Check if the name has been defaulted to server (when omitted)\n\tif c.Name != \"\" && c.Name != c.Server {\n\t\td.SetId(fmt.Sprintf(\"%s/%s\", c.Server, c.Name))\n\t} else {\n\t\td.SetId(c.Server)\n\t}\n\n\treturn resourceArgoCDClusterRead(ctx, d, meta)\n}\n\nfunc resourceArgoCDClusterRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {\n\tsi := meta.(*ServerInterface)\n\tif diags := si.InitClients(ctx); diags != nil {\n\t\treturn pluginSDKDiags(diags)\n\t}\n\n\ttokenMutexClusters.RLock()\n\tc, err := si.ClusterClient.Get(ctx, getClusterQueryFromID(d))\n\ttokenMutexClusters.RUnlock()\n\n\tif err != nil {\n\t\tif strings.Contains(err.Error(), \"NotFound\") {\n\t\t\td.SetId(\"\")\n\t\t\treturn nil\n\t\t}\n\n\t\t// Fix for https://github.com/oboukili/terraform-provider-argocd/issues/266\n\t\t// This fix is added here as a workaround to ensure backward compatibility, as\n\t\t//   it is triggered only on the specific usecase where the issue happens.\n\t\t// Additional remarks about this code:\n\t\t// * it is a copy/paste of the code used by resourceArgoCDClusterCreate to check if\n\t\t//     the cluster already exists (with some obvious changes to return value and mutex type)\n\t\t// * it should at term replace the `si.ClusterClient.Get` code for this method\n\t\tif strings.Contains(err.Error(), \"PermissionDenied\") {\n\t\t\tcluster, err := expandCluster(d)\n\t\t\tif err != nil {\n\t\t\t\treturn errorToDiagnostics(\"failed to expand cluster\", err)\n\t\t\t}\n\n\t\t\ttokenMutexClusters.RLock()\n\n\t\t\trtrimmedServer := strings.TrimRight(cluster.Server, \"/\")\n\n\t\t\t// Cluster are unique by \"server address\" so we should check there is no existing cluster with this address before\n\t\t\texistingClusters, err := si.ClusterClient.List(ctx, &clusterClient.ClusterQuery{\n\t\t\t\t// Starting argo-cd server v2.8.0 filtering on list api endpoint is fixed, else it is ignored, see:\n\t\t\t\t// - https://github.com/oboukili/terraform-provider-argocd/issues/266#issuecomment-1739122022\n\t\t\t\t// - https://github.com/argoproj/argo-cd/pull/13363\n\t\t\t\tId: &clusterClient.ClusterID{\n\t\t\t\t\tType:  \"server\",\n\t\t\t\t\tValue: rtrimmedServer,\n\t\t\t\t},\n\t\t\t})\n\n\t\t\ttokenMutexClusters.RUnlock()\n\n\t\t\tif err != nil {\n\t\t\t\treturn errorToDiagnostics(fmt.Sprintf(\"failed to list existing clusters when reading cluster %s\", cluster.Server), err)\n\t\t\t}\n\n\t\t\t// Here we will filter ourselves on the list so that we are backward compatible for argo-cd server with version < v2.8.0 (see coment above)\n\t\t\tif len(existingClusters.Items) > 0 {\n\t\t\t\tfor _, existingCluster := range existingClusters.Items {\n\t\t\t\t\tif rtrimmedServer == strings.TrimRight(existingCluster.Server, \"/\") {\n\t\t\t\t\t\t// Cluster was found, return\n\t\t\t\t\t\treturn nil\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Cluster was not found, return with empty Id\n\t\t\td.SetId(\"\")\n\n\t\t\treturn nil\n\t\t} else {\n\t\t\treturn argoCDAPIError(\"read\", \"cluster\", d.Id(), err)\n\t\t}\n\t}\n\n\tif err = flattenCluster(c, d); err != nil {\n\t\treturn errorToDiagnostics(fmt.Sprintf(\"failed to flatten cluster %s\", d.Id()), err)\n\t}\n\n\treturn nil\n}\n\nfunc resourceArgoCDClusterUpdate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {\n\tsi := meta.(*ServerInterface)\n\tif diags := si.InitClients(ctx); diags != nil {\n\t\treturn pluginSDKDiags(diags)\n\t}\n\n\tcluster, err := expandCluster(d)\n\tif err != nil {\n\t\treturn errorToDiagnostics(fmt.Sprintf(\"failed to expand cluster %s\", d.Id()), err)\n\t}\n\n\ttokenMutexClusters.Lock()\n\t_, err = si.ClusterClient.Update(ctx, &clusterClient.ClusterUpdateRequest{Cluster: cluster})\n\ttokenMutexClusters.Unlock()\n\n\tif err != nil {\n\t\treturn argoCDAPIError(\"update\", \"cluster\", cluster.Server, err)\n\t}\n\n\treturn resourceArgoCDClusterRead(ctx, d, meta)\n}\n\nfunc resourceArgoCDClusterDelete(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {\n\tsi := meta.(*ServerInterface)\n\tif diags := si.InitClients(ctx); diags != nil {\n\t\treturn pluginSDKDiags(diags)\n\t}\n\n\ttokenMutexClusters.Lock()\n\t_, err := si.ClusterClient.Delete(ctx, getClusterQueryFromID(d))\n\ttokenMutexClusters.Unlock()\n\n\tif err != nil {\n\t\tif strings.Contains(err.Error(), \"NotFound\") {\n\t\t\td.SetId(\"\")\n\t\t\treturn nil\n\t\t}\n\n\t\treturn argoCDAPIError(\"delete\", \"cluster\", d.Id(), err)\n\t}\n\n\td.SetId(\"\")\n\n\treturn nil\n}\n\nfunc getClusterQueryFromID(d *schema.ResourceData) *clusterClient.ClusterQuery {\n\tcq := &clusterClient.ClusterQuery{}\n\n\tid := strings.Split(strings.TrimPrefix(d.Id(), \"https://\"), \"/\")\n\tif len(id) > 1 {\n\t\tcq.Name = id[len(id)-1]\n\t\tcq.Server = fmt.Sprintf(\"https://%s\", strings.Join(id[:len(id)-1], \"/\"))\n\t} else {\n\t\tcq.Server = d.Id()\n\t}\n\n\treturn cq\n}\n"
  },
  {
    "path": "argocd/resource_argocd_cluster_test.go",
    "content": "package argocd\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"os\"\n\t\"regexp\"\n\t\"runtime\"\n\t\"strconv\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/argoproj-labs/terraform-provider-argocd/internal/provider\"\n\t\"github.com/argoproj-labs/terraform-provider-argocd/internal/testhelpers\"\n\t\"github.com/argoproj/argo-cd/v3/pkg/apiclient/cluster\"\n\t\"github.com/hashicorp/terraform-plugin-framework/types\"\n\t\"github.com/hashicorp/terraform-plugin-testing/helper/acctest\"\n\t\"github.com/hashicorp/terraform-plugin-testing/helper/resource\"\n\t\"github.com/hashicorp/terraform-plugin-testing/plancheck\"\n\t\"k8s.io/client-go/rest\"\n\t\"k8s.io/client-go/tools/clientcmd\"\n\t\"k8s.io/client-go/util/homedir\"\n)\n\nfunc TestAccArgoCDCluster(t *testing.T) {\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDClusterBearerToken(acctest.RandString(10)),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_cluster.simple\",\n\t\t\t\t\t\t\"info.0.connection_state.0.status\",\n\t\t\t\t\t\t\"Successful\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_cluster.simple\",\n\t\t\t\t\t\t\"shard\",\n\t\t\t\t\t\t\"1\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_cluster.simple\",\n\t\t\t\t\t\t\"info.0.server_version\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_cluster.simple\",\n\t\t\t\t\t\t\"info.0.applications_count\",\n\t\t\t\t\t\t\"0\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_cluster.simple\",\n\t\t\t\t\t\t\"config.0.tls_client_config.0.insecure\",\n\t\t\t\t\t\tstrconv.FormatBool(isInsecure()),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_cluster.simple\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"config.0.bearer_token\", \"info\", \"config.0.tls_client_config.0.key_data\"},\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDClusterTLSCertificate(t, acctest.RandString(10)),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_cluster.tls\",\n\t\t\t\t\t\t\"info.0.connection_state.0.status\",\n\t\t\t\t\t\t\"Successful\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_cluster.tls\",\n\t\t\t\t\t\t\"info.0.server_version\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_cluster.tls\",\n\t\t\t\t\t\t\"config.0.tls_client_config.0.insecure\",\n\t\t\t\t\t\t\"false\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDCluster_projectScope(t *testing.T) {\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDClusterProjectScope(acctest.RandString(10), \"myproject1\"),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_cluster.project_scope\",\n\t\t\t\t\t\t\"info.0.connection_state.0.status\",\n\t\t\t\t\t\t\"Successful\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_cluster.project_scope\",\n\t\t\t\t\t\t\"config.0.tls_client_config.0.insecure\",\n\t\t\t\t\t\tstrconv.FormatBool(isInsecure()),\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_cluster.project_scope\",\n\t\t\t\t\t\t\"project\",\n\t\t\t\t\t\t\"myproject1\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_cluster.project_scope\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"config.0.bearer_token\", \"info\", \"config.0.tls_client_config.0.key_data\"},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDCluster_optionalName(t *testing.T) {\n\tname := acctest.RandString(10)\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDClusterMetadataNoName(),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_cluster.cluster_metadata\",\n\t\t\t\t\t\t\"info.0.connection_state.0.status\",\n\t\t\t\t\t\t\"Successful\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_cluster.cluster_metadata\",\n\t\t\t\t\t\t\"config.0.tls_client_config.0.insecure\",\n\t\t\t\t\t\tstrconv.FormatBool(isInsecure()),\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_cluster.cluster_metadata\",\n\t\t\t\t\t\t\"name\",\n\t\t\t\t\t\t\"https://kubernetes.default.svc.cluster.local\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDClusterMetadata(name),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_cluster.cluster_metadata\",\n\t\t\t\t\t\t\"info.0.connection_state.0.status\",\n\t\t\t\t\t\t\"Successful\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_cluster.cluster_metadata\",\n\t\t\t\t\t\t\"config.0.tls_client_config.0.insecure\",\n\t\t\t\t\t\tstrconv.FormatBool(isInsecure()),\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_cluster.cluster_metadata\",\n\t\t\t\t\t\t\"name\",\n\t\t\t\t\t\tname,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDClusterMetadataNoName(),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_cluster.cluster_metadata\",\n\t\t\t\t\t\t\"info.0.connection_state.0.status\",\n\t\t\t\t\t\t\"Successful\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_cluster.cluster_metadata\",\n\t\t\t\t\t\t\"config.0.tls_client_config.0.insecure\",\n\t\t\t\t\t\tstrconv.FormatBool(isInsecure()),\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_cluster.cluster_metadata\",\n\t\t\t\t\t\t\"name\",\n\t\t\t\t\t\t\"https://kubernetes.default.svc.cluster.local\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDCluster_metadata(t *testing.T) {\n\tclusterName := acctest.RandString(10)\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDClusterMetadata(clusterName),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckNoResourceAttr(\n\t\t\t\t\t\t\"argocd_cluster.cluster_metadata\",\n\t\t\t\t\t\t\"metadata.0\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_cluster.cluster_metadata\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"config.0.bearer_token\", \"info\", \"config.0.tls_client_config.0.key_data\"},\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDClusterMetadata_addLabels(clusterName),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_cluster.cluster_metadata\",\n\t\t\t\t\t\t\"metadata.0.labels.test\",\n\t\t\t\t\t\t\"label\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckNoResourceAttr(\n\t\t\t\t\t\t\"argocd_cluster.cluster_metadata\",\n\t\t\t\t\t\t\"metadata.0.annotations\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_cluster.cluster_metadata\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"config.0.bearer_token\", \"info\", \"config.0.tls_client_config.0.key_data\"},\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDClusterMetadata_addAnnotations(clusterName),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_cluster.cluster_metadata\",\n\t\t\t\t\t\t\"metadata.0.labels.test\",\n\t\t\t\t\t\t\"label\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_cluster.cluster_metadata\",\n\t\t\t\t\t\t\"metadata.0.annotations.test\",\n\t\t\t\t\t\t\"annotation\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_cluster.cluster_metadata\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"config.0.bearer_token\", \"info\", \"config.0.tls_client_config.0.key_data\"},\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDClusterMetadata_removeLabels(clusterName),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckNoResourceAttr(\n\t\t\t\t\t\t\"argocd_cluster.cluster_metadata\",\n\t\t\t\t\t\t\"metadata.0.labels.test\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_cluster.cluster_metadata\",\n\t\t\t\t\t\t\"metadata.0.annotations.test\",\n\t\t\t\t\t\t\"annotation\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_cluster.cluster_metadata\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"config.0.bearer_token\", \"info\", \"config.0.tls_client_config.0.key_data\"},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDCluster_invalidSameServer(t *testing.T) {\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig:      testAccArgoCDClusterTwiceWithSameServer(),\n\t\t\t\tExpectError: regexp.MustCompile(\"cluster with server address .* already exists\"),\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig:      testAccArgoCDClusterTwiceWithSameServerNoNames(),\n\t\t\t\tExpectError: regexp.MustCompile(\"cluster with server address .* already exists\"),\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig:      testAccArgoCDClusterTwiceWithSameLogicalServer(),\n\t\t\t\tExpectError: regexp.MustCompile(\"cluster with server address .* already exists\"),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDCluster_outsideDeletion(t *testing.T) {\n\tclusterName := acctest.RandString(10)\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDClusterMetadata(clusterName),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_cluster.cluster_metadata\",\n\t\t\t\t\t\t\"info.0.connection_state.0.status\",\n\t\t\t\t\t\t\"Successful\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_cluster.cluster_metadata\",\n\t\t\t\t\t\t\"config.0.tls_client_config.0.insecure\",\n\t\t\t\t\t\tstrconv.FormatBool(isInsecure()),\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_cluster.cluster_metadata\",\n\t\t\t\t\t\t\"name\",\n\t\t\t\t\t\tclusterName,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tPreConfig: func() {\n\t\t\t\t\t// delete cluster and validate refresh generates a plan\n\t\t\t\t\t// (non-regression test for https://github.com/oboukili/terraform-provider-argocd/issues/266)\n\t\t\t\t\tsi, err := getServerInterface()\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\tt.Error(fmt.Errorf(\"failed to get server interface: %s\", err.Error()))\n\t\t\t\t\t}\n\t\t\t\t\tctx, cancel := context.WithTimeout(t.Context(), 120*time.Second)\n\t\t\t\t\tdefer cancel()\n\t\t\t\t\t_, err = si.ClusterClient.Delete(ctx, &cluster.ClusterQuery{Name: clusterName})\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\tt.Error(fmt.Errorf(\"failed to delete cluster '%s': %s\", clusterName, err.Error()))\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tRefreshState:       true,\n\t\t\t\tExpectNonEmptyPlan: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDClusterMetadata(clusterName),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_cluster.cluster_metadata\",\n\t\t\t\t\t\t\"info.0.connection_state.0.status\",\n\t\t\t\t\t\t\"Successful\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_cluster.cluster_metadata\",\n\t\t\t\t\t\t\"config.0.tls_client_config.0.insecure\",\n\t\t\t\t\t\tstrconv.FormatBool(isInsecure()),\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_cluster.cluster_metadata\",\n\t\t\t\t\t\t\"name\",\n\t\t\t\t\t\tclusterName,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDCluster_urlUpdate(t *testing.T) {\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDClusterBearerToken_urlChange(\"https://kubernetes.default.svc.cluster.local\"),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_cluster.check_url_change\",\n\t\t\t\t\t\t\"info.0.connection_state.0.status\",\n\t\t\t\t\t\t\"Successful\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_cluster.check_url_change\",\n\t\t\t\t\t\t\"info.0.server_version\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_cluster.check_url_change\",\n\t\t\t\t\t\t\"config.0.tls_client_config.0.insecure\",\n\t\t\t\t\t\tstrconv.FormatBool(isInsecure()),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDClusterBearerToken_urlChange(\"https://kubernetes.default\"),\n\t\t\t\tConfigPlanChecks: resource.ConfigPlanChecks{\n\t\t\t\t\tPreApply: []plancheck.PlanCheck{\n\t\t\t\t\t\tplancheck.ExpectResourceAction(\"argocd_cluster.check_url_change\", plancheck.ResourceActionReplace),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_cluster.check_url_change\",\n\t\t\t\t\t\t\"info.0.connection_state.0.status\",\n\t\t\t\t\t\t\"Successful\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_cluster.check_url_change\",\n\t\t\t\t\t\t\"info.0.server_version\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_cluster.check_url_change\",\n\t\t\t\t\t\t\"config.0.tls_client_config.0.insecure\",\n\t\t\t\t\t\tstrconv.FormatBool(isInsecure()),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDCluster_namespacesErrorWhenEmpty(t *testing.T) {\n\tname := acctest.RandString(10)\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:          func() { testAccPreCheck(t) },\n\t\tProviderFactories: testAccProviders,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig:      testAccArgoCDClusterNamespacesContainsEmptyString(name),\n\t\t\t\tExpectError: regexp.MustCompile(\"namespaces: must contain non-empty strings\"),\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig:      testAccArgoCDClusterNamespacesContainsEmptyString_MultipleItems(name),\n\t\t\t\tExpectError: regexp.MustCompile(\"namespaces: must contain non-empty strings\"),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc testAccArgoCDClusterBearerToken(clusterName string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_cluster\" \"simple\" {\n  server = \"https://kubernetes.default.svc.cluster.local\"\n  name   = \"%s\"\n  shard  = \"1\"\n  namespaces = [\"default\", \"foo\"]\n  config {\n%s\n  }\n}\n`, clusterName, getConfig())\n}\n\nfunc testAccArgoCDClusterTLSCertificate(t *testing.T, clusterName string) string {\n\t// Skip if we're not in an acceptance test environment\n\tif os.Getenv(\"TF_ACC\") == \"\" {\n\t\tt.Skip(\"Acceptance tests skipped unless env 'TF_ACC' set\")\n\t}\n\n\trc, err := getInternalRestConfig()\n\tif err != nil {\n\t\tt.Error(err)\n\t}\n\n\treturn fmt.Sprintf(`\nresource \"argocd_cluster\" \"tls\" {\n  server = \"https://kubernetes.default.svc.cluster.local\"\n  name   = \"%s\"\n  namespaces = [\"bar\", \"baz\"]\n  config {\n    tls_client_config {\n      key_data    = <<EOT\n%s\nEOT\n      cert_data   = <<EOT\n%s\nEOT\n      ca_data     = <<EOT\n%s\nEOT\n      server_name = \"%s\"\n      insecure    = false\n    }\n  }\n}\n`, clusterName, rc.KeyData, rc.CertData, rc.CAData, rc.ServerName)\n}\n\nfunc testAccArgoCDClusterProjectScope(clusterName, projectName string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_cluster\" \"project_scope\" {\n  server = \"https://kubernetes.default.svc.cluster.local\"\n  name   = \"%s\"\n  project = \"%s\"\n  config {\n%s\n  }\n}\n`, clusterName, projectName, getConfig())\n}\n\nfunc testAccArgoCDClusterMetadata(clusterName string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_cluster\" \"cluster_metadata\" {\n  server = \"https://kubernetes.default.svc.cluster.local\"\n  name   = \"%s\"\n  config {\n%s\n  }\n}\n`, clusterName, getConfig())\n}\n\nfunc testAccArgoCDClusterMetadataNoName() string {\n\treturn fmt.Sprintf(`\nresource \"argocd_cluster\" \"cluster_metadata\" {\n  server = \"https://kubernetes.default.svc.cluster.local\"\n  config {\n%s\n  }\n}\n`, getConfig())\n}\n\nfunc testAccArgoCDClusterTwiceWithSameServer() string {\n\treturn fmt.Sprintf(`\nresource \"argocd_cluster\" \"cluster_one_same_server\" {\n  server = \"https://kubernetes.default.svc.cluster.local\"\n  name   = \"foo\"\n  config {\n%s\n  }\n}\nresource \"argocd_cluster\" \"cluster_two_same_server\" {\n  server = \"https://kubernetes.default.svc.cluster.local\"\n  name   = \"bar\"\n  config {\n%s\n  }\n}`, getConfig(), getConfig())\n}\n\nfunc testAccArgoCDClusterTwiceWithSameServerNoNames() string {\n\treturn fmt.Sprintf(`\nresource \"argocd_cluster\" \"cluster_one_no_name\" {\n  server = \"https://kubernetes.default.svc.cluster.local\"\n  config {\n%s\n  }\n}\nresource \"argocd_cluster\" \"cluster_two_no_name\" {\n  server = \"https://kubernetes.default.svc.cluster.local\"\n  config {\n%s\n  }\n}\n`, getConfig(), getConfig())\n}\n\nfunc testAccArgoCDClusterTwiceWithSameLogicalServer() string {\n\treturn fmt.Sprintf(`\nresource \"argocd_cluster\" \"cluster_with_trailing_slash\" {\n  name = \"server\"\n  server = \"https://kubernetes.default.svc.cluster.local/\"\n  config {\n%s\n  }\n}\nresource \"argocd_cluster\" \"cluster_with_no_trailing_slash\" {\n  name = \"server\"\n  server = \"https://kubernetes.default.svc.cluster.local\"\n  config {\n%s\n  }\n}`, getConfig(), getConfig())\n}\n\nfunc testAccArgoCDClusterBearerToken_urlChange(url string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_cluster\" \"check_url_change\" {\n  server = \"%s\"\n  config {\n%s\n  }\n}\n`, url, getConfig())\n}\n\nfunc testAccArgoCDClusterMetadata_addLabels(clusterName string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_cluster\" \"cluster_metadata\" {\n  server = \"https://kubernetes.default.svc.cluster.local\"\n  name   = \"%s\"\n  metadata {\n    labels = {\n      test = \"label\"\n    }\n  }\n  config {\n%s\n  }\n}\n`, clusterName, getConfig())\n}\n\nfunc testAccArgoCDClusterMetadata_addAnnotations(clusterName string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_cluster\" \"cluster_metadata\" {\n  server = \"https://kubernetes.default.svc.cluster.local\"\n  name   = \"%s\"\n  metadata {\n    labels = {\n      test = \"label\"\n    }\n    annotations = {\n      test = \"annotation\"\n    }\n  }\n  config {\n%s\n  }\n}\n`, clusterName, getConfig())\n}\n\nfunc testAccArgoCDClusterMetadata_removeLabels(clusterName string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_cluster\" \"cluster_metadata\" {\n  server = \"https://kubernetes.default.svc.cluster.local\"\n  name   = \"%s\"\n  metadata {\n    annotations = {\n      test = \"annotation\"\n    }\n  }\n  config {\n%s\n  }\n}\n`, clusterName, getConfig())\n}\n\nfunc testAccArgoCDClusterNamespacesContainsEmptyString(clusterName string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_cluster\" \"simple\" {\n  server = \"https://kubernetes.default.svc.cluster.local\"\n  name   = \"%s\"\n  shard  = \"1\"\n  namespaces = [\"\"]\n  config {\n%s\n  }\n}\n`, clusterName, getConfig())\n}\n\nfunc testAccArgoCDClusterNamespacesContainsEmptyString_MultipleItems(clusterName string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_cluster\" \"simple\" {\n  server = \"https://kubernetes.default.svc.cluster.local\"\n  name   = \"%s\"\n  shard  = \"1\"\n  namespaces = [\"default\", \"\"]\n  config {\n%s\n  }\n}\n`, clusterName, getConfig())\n}\n\n// getInternalRestConfig returns the internal Kubernetes cluster REST config.\nfunc getInternalRestConfig() (*rest.Config, error) {\n\tif testhelpers.GlobalTestEnv != nil {\n\t\treturn testhelpers.GlobalTestEnv.RESTConfig, nil\n\t}\n\n\tvar kubeConfigFilePath string\n\n\tswitch runtime.GOOS {\n\tcase \"windows\":\n\t\tkubeConfigFilePath = fmt.Sprintf(\"%s\\\\.kube\\\\config\", homedir.HomeDir())\n\tdefault:\n\t\tkubeConfigFilePath = fmt.Sprintf(\"%s/.kube/config\", homedir.HomeDir())\n\t}\n\n\tcfg, err := clientcmd.LoadFromFile(kubeConfigFilePath)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\trc := &rest.Config{}\n\n\tfor key, cluster := range cfg.Clusters {\n\t\tif key == \"kind-argocd\" {\n\t\t\tauthInfo := cfg.AuthInfos[key]\n\t\t\trc.Host = cluster.Server\n\t\t\trc.ServerName = cluster.TLSServerName\n\t\t\trc.CAData = cluster.CertificateAuthorityData\n\t\t\trc.CertData = authInfo.ClientCertificateData\n\t\t\trc.KeyData = authInfo.ClientKeyData\n\n\t\t\treturn rc, nil\n\t\t}\n\t}\n\n\treturn nil, fmt.Errorf(\"could not find a kind-argocd cluster from the current ~/.kube/config file\")\n}\n\n// build & init ArgoCD server interface\nfunc getServerInterface() (*provider.ServerInterface, error) {\n\tctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)\n\tdefer cancel()\n\n\tinsecure, err := strconv.ParseBool(os.Getenv(\"ARGOCD_INSECURE\"))\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to parse 'ARGOCD_INSECURE' env var to bool: %s\", err.Error())\n\t}\n\n\tsi := provider.NewServerInterface(provider.ArgoCDProviderConfig{\n\t\tServerAddr: types.StringValue(os.Getenv(\"ARGOCD_SERVER\")),\n\t\tInsecure:   types.BoolValue(insecure),\n\t\tUsername:   types.StringValue(os.Getenv(\"ARGOCD_AUTH_USERNAME\")),\n\t\tPassword:   types.StringValue(os.Getenv(\"ARGOCD_AUTH_PASSWORD\")),\n\t})\n\n\tdiag := si.InitClients(ctx)\n\tif diag.HasError() {\n\t\treturn nil, fmt.Errorf(\"failed to init clients: %v\", diag.Errors())\n\t}\n\n\treturn si, nil\n}\n\nfunc getConfig() string {\n\tif testhelpers.GlobalTestEnv != nil {\n\t\tr := testhelpers.GlobalTestEnv.RESTConfig\n\n\t\treturn fmt.Sprintf(`\n    tls_client_config {\n      insecure = false\n      ca_data = <<CA_DATA\n%sCA_DATA\n      cert_data = <<CERT_DATA\n%sCERT_DATA\n      key_data = <<KEY_DATA\n%sKEY_DATA\n    }`, string(r.CAData), string(r.CertData), string(r.KeyData))\n\t}\n\n\treturn `\n    # Uses Kind's bootstrap token whose ttl is 24 hours after cluster bootstrap.\n    bearer_token = \"abcdef.0123456789abcdef\"\n    tls_client_config {\n      insecure = true\n    }\n`\n}\n\nfunc isInsecure() bool {\n\treturn testhelpers.GlobalTestEnv == nil\n}\n"
  },
  {
    "path": "argocd/schema_application.go",
    "content": "package argocd\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema\"\n)\n\nfunc applicationSpecSchemaV0() *schema.Schema {\n\treturn &schema.Schema{\n\t\tType:        schema.TypeList,\n\t\tMinItems:    1,\n\t\tMaxItems:    1,\n\t\tDescription: \"ArgoCD App application resource specs. Required attributes: destination, source.\",\n\t\tRequired:    true,\n\t\tElem: &schema.Resource{\n\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\"destination\": {\n\t\t\t\t\tType:     schema.TypeSet,\n\t\t\t\t\tRequired: true,\n\t\t\t\t\tMinItems: 1,\n\t\t\t\t\tMaxItems: 1,\n\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\"server\": {\n\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"namespace\": {\n\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\tRequired: true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"name\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\tDescription: \"Name of the destination cluster which can be used instead of server.\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"source\": {\n\t\t\t\t\tType:     schema.TypeList,\n\t\t\t\t\tRequired: true,\n\t\t\t\t\tMinItems: 1,\n\t\t\t\t\tMaxItems: 1,\n\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\"repo_url\": {\n\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\tRequired: true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"path\": {\n\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t// TODO: add validator to test path is not absolute\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"target_revision\": {\n\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"chart\": {\n\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"helm\": {\n\t\t\t\t\t\t\t\tType:     schema.TypeList,\n\t\t\t\t\t\t\t\tMaxItems: 1,\n\t\t\t\t\t\t\t\tMinItems: 1,\n\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\"value_files\": {\n\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeList,\n\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t\tElem: &schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\t\tType: schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"values\": {\n\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"parameter\": {\n\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeSet,\n\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"name\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"value\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"force_string\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeBool,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDescription: \"force_string determines whether to tell Helm to interpret booleans and numbers as strings\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"release_name\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"The Helm release name. If omitted it will use the application name\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"kustomize\": {\n\t\t\t\t\t\t\t\tType:     schema.TypeList,\n\t\t\t\t\t\t\t\tMaxItems: 1,\n\t\t\t\t\t\t\t\tMinItems: 1,\n\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\"name_prefix\": {\n\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"name_suffix\": {\n\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"version\": {\n\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"images\": {\n\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeSet,\n\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t\tElem: &schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\t\tType: schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"common_labels\": {\n\t\t\t\t\t\t\t\t\t\t\tType:         schema.TypeMap,\n\t\t\t\t\t\t\t\t\t\t\tOptional:     true,\n\t\t\t\t\t\t\t\t\t\t\tElem:         &schema.Schema{Type: schema.TypeString},\n\t\t\t\t\t\t\t\t\t\t\tValidateFunc: validateMetadataLabels(false),\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"common_annotations\": {\n\t\t\t\t\t\t\t\t\t\t\tType:         schema.TypeMap,\n\t\t\t\t\t\t\t\t\t\t\tOptional:     true,\n\t\t\t\t\t\t\t\t\t\t\tElem:         &schema.Schema{Type: schema.TypeString},\n\t\t\t\t\t\t\t\t\t\t\tValidateFunc: validateMetadataAnnotations,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"directory\": {\n\t\t\t\t\t\t\t\tType: schema.TypeList,\n\t\t\t\t\t\t\t\tDiffSuppressFunc: func(k, oldValue, newValue string, d *schema.ResourceData) bool {\n\t\t\t\t\t\t\t\t\t// TODO: This can be removed once v2.6.7 is the oldest supported version\n\t\t\t\t\t\t\t\t\t// as the API returns `Zero` Directory objects now.\n\n\t\t\t\t\t\t\t\t\t// Avoid drift when recurse is explicitly set to false\n\t\t\t\t\t\t\t\t\t// Also ignore the directory node if both recurse & jsonnet are not set or ignored\n\t\t\t\t\t\t\t\t\tif k == \"spec.0.source.0.directory.0.recurse\" && oldValue == \"\" && newValue == \"false\" {\n\t\t\t\t\t\t\t\t\t\treturn true\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif k == \"spec.0.source.0.directory.#\" {\n\t\t\t\t\t\t\t\t\t\t_, hasRecurse := d.GetOk(\"spec.0.source.0.directory.0.recurse\")\n\t\t\t\t\t\t\t\t\t\t_, hasJsonnet := d.GetOk(\"spec.0.source.0.directory.0.jsonnet\")\n\n\t\t\t\t\t\t\t\t\t\tif !hasJsonnet && !hasRecurse {\n\t\t\t\t\t\t\t\t\t\t\treturn true\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn false\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tMaxItems: 1,\n\t\t\t\t\t\t\t\tMinItems: 1,\n\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\"recurse\": {\n\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeBool,\n\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"jsonnet\": {\n\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeList,\n\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t\tMaxItems: 1,\n\t\t\t\t\t\t\t\t\t\t\tMinItems: 1,\n\t\t\t\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"ext_var\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeList,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"name\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"value\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"code\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeBool,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"tla\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeSet,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"name\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"value\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"code\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeBool,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"plugin\": {\n\t\t\t\t\t\t\t\tType:     schema.TypeList,\n\t\t\t\t\t\t\t\tMaxItems: 1,\n\t\t\t\t\t\t\t\tMinItems: 1,\n\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\"name\": {\n\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"env\": {\n\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeSet,\n\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"name\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"value\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"project\": {\n\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\tOptional:    true,\n\t\t\t\t\tDescription: \"The application project, defaults to 'default'\",\n\t\t\t\t\tDefault:     \"default\",\n\t\t\t\t},\n\t\t\t\t\"sync_policy\": {\n\t\t\t\t\tType:     schema.TypeList,\n\t\t\t\t\tOptional: true,\n\t\t\t\t\tMaxItems: 1,\n\t\t\t\t\tMinItems: 1,\n\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\"automated\": {\n\t\t\t\t\t\t\t\tType:     schema.TypeMap,\n\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\tElem:     &schema.Schema{Type: schema.TypeBool},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"sync_options\": {\n\t\t\t\t\t\t\t\tType:     schema.TypeList,\n\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\tElem: &schema.Schema{\n\t\t\t\t\t\t\t\t\tType: schema.TypeString,\n\t\t\t\t\t\t\t\t\t// TODO: add a validator\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"retry\": {\n\t\t\t\t\t\t\t\tType:     schema.TypeList,\n\t\t\t\t\t\t\t\tMaxItems: 1,\n\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\"limit\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"Max number of allowed sync retries, as a string\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"backoff\": {\n\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeMap,\n\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t\tElem:     &schema.Schema{Type: schema.TypeString},\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"ignore_difference\": {\n\t\t\t\t\tType:     schema.TypeList,\n\t\t\t\t\tOptional: true,\n\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\"group\": {\n\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"kind\": {\n\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"name\": {\n\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"namespace\": {\n\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"json_pointers\": {\n\t\t\t\t\t\t\t\tType:     schema.TypeSet,\n\t\t\t\t\t\t\t\tSet:      schema.HashString,\n\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\tElem: &schema.Schema{\n\t\t\t\t\t\t\t\t\tType: schema.TypeString,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"jq_path_expressions\": {\n\t\t\t\t\t\t\t\tType:     schema.TypeSet,\n\t\t\t\t\t\t\t\tSet:      schema.HashString,\n\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\tElem: &schema.Schema{\n\t\t\t\t\t\t\t\t\tType: schema.TypeString,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"info\": {\n\t\t\t\t\tType:     schema.TypeSet,\n\t\t\t\t\tOptional: true,\n\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\"name\": {\n\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"value\": {\n\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"revision_history_limit\": {\n\t\t\t\t\tType:     schema.TypeInt,\n\t\t\t\t\tOptional: true,\n\t\t\t\t\tDefault:  10,\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc applicationSpecSchemaV1() *schema.Schema {\n\treturn &schema.Schema{\n\t\tType:        schema.TypeList,\n\t\tMinItems:    1,\n\t\tMaxItems:    1,\n\t\tDescription: \"ArgoCD App application resource specs. Required attributes: destination, source.\",\n\t\tRequired:    true,\n\t\tElem: &schema.Resource{\n\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\"destination\": {\n\t\t\t\t\tType:     schema.TypeSet,\n\t\t\t\t\tRequired: true,\n\t\t\t\t\tMinItems: 1,\n\t\t\t\t\tMaxItems: 1,\n\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\"server\": {\n\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"namespace\": {\n\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\tRequired: true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"name\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\tDescription: \"Name of the destination cluster which can be used instead of server.\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"source\": {\n\t\t\t\t\tType:     schema.TypeList,\n\t\t\t\t\tRequired: true,\n\t\t\t\t\tMinItems: 1,\n\t\t\t\t\tMaxItems: 1,\n\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\"repo_url\": {\n\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\tRequired: true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"path\": {\n\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t// TODO: add validator to test path is not absolute\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"target_revision\": {\n\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"chart\": {\n\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"helm\": {\n\t\t\t\t\t\t\t\tType:     schema.TypeList,\n\t\t\t\t\t\t\t\tMaxItems: 1,\n\t\t\t\t\t\t\t\tMinItems: 1,\n\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\"value_files\": {\n\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeList,\n\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t\tElem: &schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\t\tType: schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"values\": {\n\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"parameter\": {\n\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeSet,\n\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"name\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"value\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"force_string\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeBool,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDescription: \"force_string determines whether to tell Helm to interpret booleans and numbers as strings\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"release_name\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"The Helm release name. If omitted it will use the application name\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"skip_crds\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeBool,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"Helm installs custom resource definitions in the crds folder by default if they are not existing. If needed, it is possible to skip the CRD installation step with this flag\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"kustomize\": {\n\t\t\t\t\t\t\t\tType:     schema.TypeList,\n\t\t\t\t\t\t\t\tMaxItems: 1,\n\t\t\t\t\t\t\t\tMinItems: 1,\n\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\"name_prefix\": {\n\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"name_suffix\": {\n\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"version\": {\n\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"images\": {\n\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeSet,\n\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t\tElem: &schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\t\tType: schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"common_labels\": {\n\t\t\t\t\t\t\t\t\t\t\tType:         schema.TypeMap,\n\t\t\t\t\t\t\t\t\t\t\tOptional:     true,\n\t\t\t\t\t\t\t\t\t\t\tElem:         &schema.Schema{Type: schema.TypeString},\n\t\t\t\t\t\t\t\t\t\t\tValidateFunc: validateMetadataLabels(false),\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"common_annotations\": {\n\t\t\t\t\t\t\t\t\t\t\tType:         schema.TypeMap,\n\t\t\t\t\t\t\t\t\t\t\tOptional:     true,\n\t\t\t\t\t\t\t\t\t\t\tElem:         &schema.Schema{Type: schema.TypeString},\n\t\t\t\t\t\t\t\t\t\t\tValidateFunc: validateMetadataAnnotations,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"ksonnet\": {\n\t\t\t\t\t\t\t\tType:     schema.TypeList,\n\t\t\t\t\t\t\t\tMaxItems: 1,\n\t\t\t\t\t\t\t\tMinItems: 1,\n\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\"environment\": {\n\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"parameters\": {\n\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeSet,\n\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"component\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"name\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"value\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"directory\": {\n\t\t\t\t\t\t\t\tType: schema.TypeList,\n\t\t\t\t\t\t\t\tDiffSuppressFunc: func(k, oldValue, newValue string, d *schema.ResourceData) bool {\n\t\t\t\t\t\t\t\t\t// Avoid drift when recurse is explicitly set to false\n\t\t\t\t\t\t\t\t\t// Also ignore the directory node if both recurse & jsonnet are not set or ignored\n\t\t\t\t\t\t\t\t\tif k == \"spec.0.source.0.directory.0.recurse\" && oldValue == \"\" && newValue == \"false\" {\n\t\t\t\t\t\t\t\t\t\treturn true\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif k == \"spec.0.source.0.directory.#\" {\n\t\t\t\t\t\t\t\t\t\t_, hasRecurse := d.GetOk(\"spec.0.source.0.directory.0.recurse\")\n\t\t\t\t\t\t\t\t\t\t_, hasJsonnet := d.GetOk(\"spec.0.source.0.directory.0.jsonnet\")\n\n\t\t\t\t\t\t\t\t\t\tif !hasJsonnet && !hasRecurse {\n\t\t\t\t\t\t\t\t\t\t\treturn true\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn false\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tMaxItems: 1,\n\t\t\t\t\t\t\t\tMinItems: 1,\n\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\"recurse\": {\n\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeBool,\n\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"jsonnet\": {\n\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeList,\n\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t\tMaxItems: 1,\n\t\t\t\t\t\t\t\t\t\t\tMinItems: 1,\n\t\t\t\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"ext_var\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeList,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"name\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"value\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"code\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeBool,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"tla\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeSet,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"name\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"value\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"code\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeBool,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"plugin\": {\n\t\t\t\t\t\t\t\tType:     schema.TypeList,\n\t\t\t\t\t\t\t\tMaxItems: 1,\n\t\t\t\t\t\t\t\tMinItems: 1,\n\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\"name\": {\n\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"env\": {\n\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeSet,\n\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"name\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"value\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"project\": {\n\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\tOptional:    true,\n\t\t\t\t\tDescription: \"The application project, defaults to 'default'\",\n\t\t\t\t\tDefault:     \"default\",\n\t\t\t\t},\n\t\t\t\t\"sync_policy\": {\n\t\t\t\t\tType:     schema.TypeList,\n\t\t\t\t\tOptional: true,\n\t\t\t\t\tMaxItems: 1,\n\t\t\t\t\tMinItems: 1,\n\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\"automated\": {\n\t\t\t\t\t\t\t\tType:     schema.TypeMap,\n\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\tElem:     &schema.Schema{Type: schema.TypeBool},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"sync_options\": {\n\t\t\t\t\t\t\t\tType:     schema.TypeList,\n\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\tElem: &schema.Schema{\n\t\t\t\t\t\t\t\t\tType: schema.TypeString,\n\t\t\t\t\t\t\t\t\t// TODO: add a validator\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"retry\": {\n\t\t\t\t\t\t\t\tType:     schema.TypeList,\n\t\t\t\t\t\t\t\tMaxItems: 1,\n\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\"limit\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"Max number of allowed sync retries, as a string\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"backoff\": {\n\t\t\t\t\t\t\t\t\t\t\tType:     schema.TypeMap,\n\t\t\t\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\t\t\t\tElem:     &schema.Schema{Type: schema.TypeString},\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"ignore_difference\": {\n\t\t\t\t\tType:     schema.TypeList,\n\t\t\t\t\tOptional: true,\n\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\"group\": {\n\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"kind\": {\n\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"name\": {\n\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"namespace\": {\n\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"json_pointers\": {\n\t\t\t\t\t\t\t\tType:     schema.TypeSet,\n\t\t\t\t\t\t\t\tSet:      schema.HashString,\n\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\tElem: &schema.Schema{\n\t\t\t\t\t\t\t\t\tType: schema.TypeString,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"jq_path_expressions\": {\n\t\t\t\t\t\t\t\tType:     schema.TypeSet,\n\t\t\t\t\t\t\t\tSet:      schema.HashString,\n\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\tElem: &schema.Schema{\n\t\t\t\t\t\t\t\t\tType: schema.TypeString,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"info\": {\n\t\t\t\t\tType:     schema.TypeSet,\n\t\t\t\t\tOptional: true,\n\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\"name\": {\n\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"value\": {\n\t\t\t\t\t\t\t\tType:     schema.TypeString,\n\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"revision_history_limit\": {\n\t\t\t\t\tType:     schema.TypeInt,\n\t\t\t\t\tOptional: true,\n\t\t\t\t\tDefault:  10,\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc applicationSpecSchemaV2() *schema.Schema {\n\treturn &schema.Schema{\n\t\tType:        schema.TypeList,\n\t\tMinItems:    1,\n\t\tMaxItems:    1,\n\t\tDescription: \"The application specification.\",\n\t\tRequired:    true,\n\t\tElem: &schema.Resource{\n\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\"destination\": {\n\t\t\t\t\tType:        schema.TypeSet,\n\t\t\t\t\tDescription: \"Reference to the Kubernetes server and namespace in which the application will be deployed.\",\n\t\t\t\t\tRequired:    true,\n\t\t\t\t\tMinItems:    1,\n\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\"server\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"URL of the target cluster and must be set to the Kubernetes control plane API.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"namespace\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\",\n\t\t\t\t\t\t\t\tRequired:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"name\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"Name of the target cluster. Can be used instead of `server`.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"source\": {\n\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\tDescription: \"Location of the application's manifests or chart.\",\n\t\t\t\t\tRequired:    true,\n\t\t\t\t\tMinItems:    1,\n\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\"repo_url\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"URL to the repository (Git or Helm) that contains the application manifests.\",\n\t\t\t\t\t\t\t\tRequired:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"path\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"Directory path within the repository. Only valid for applications sourced from Git.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t// TODO: add validator to test path is not absolute\n\t\t\t\t\t\t\t\tDefault: \".\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"target_revision\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"chart\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"Helm chart name. Must be specified for applications sourced from a Helm repo.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"helm\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\t\t\tDescription: \"Helm specific options.\",\n\t\t\t\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\t\t\t\tMinItems:    1,\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\"value_files\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"List of Helm value files to use when generating a template.\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\tElem: &schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\t\tType: schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"values\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"Helm values to be passed to helm template, typically defined as a block.\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"parameter\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeSet,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"Helm parameters which are passed to the helm template command upon manifest generation.\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"name\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDescription: \"Name of the Helm parameter.\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"value\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDescription: \"Value of the Helm parameter.\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"force_string\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeBool,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDescription: \"Determines whether to tell Helm to interpret booleans and numbers as strings.\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"release_name\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"Helm release name. If omitted it will use the application name.\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"skip_crds\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeBool,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"kustomize\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\t\t\tDescription: \"Kustomize specific options.\",\n\t\t\t\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\t\t\t\tMinItems:    1,\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\"name_prefix\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"Prefix appended to resources for Kustomize apps.\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"name_suffix\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"Suffix appended to resources for Kustomize apps.\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"version\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"Version of Kustomize to use for rendering manifests.\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"images\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeSet,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"List of Kustomize image override specifications.\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\tElem: &schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\t\tType: schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"common_labels\": {\n\t\t\t\t\t\t\t\t\t\t\tType:         schema.TypeMap,\n\t\t\t\t\t\t\t\t\t\t\tDescription:  \"List of additional labels to add to rendered manifests.\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:     true,\n\t\t\t\t\t\t\t\t\t\t\tElem:         &schema.Schema{Type: schema.TypeString},\n\t\t\t\t\t\t\t\t\t\t\tValidateFunc: validateMetadataLabels(false),\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"common_annotations\": {\n\t\t\t\t\t\t\t\t\t\t\tType:         schema.TypeMap,\n\t\t\t\t\t\t\t\t\t\t\tDescription:  \"List of additional annotations to add to rendered manifests.\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:     true,\n\t\t\t\t\t\t\t\t\t\t\tElem:         &schema.Schema{Type: schema.TypeString},\n\t\t\t\t\t\t\t\t\t\t\tValidateFunc: validateMetadataAnnotations,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"directory\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\t\t\tDescription: \"Path/directory specific options.\",\n\t\t\t\t\t\t\t\tDiffSuppressFunc: func(k, oldValue, newValue string, d *schema.ResourceData) bool {\n\t\t\t\t\t\t\t\t\t// Avoid drift when recurse is explicitly set to false\n\t\t\t\t\t\t\t\t\t// Also ignore the directory node if both recurse & jsonnet are not set or ignored\n\t\t\t\t\t\t\t\t\tif k == \"spec.0.source.0.directory.0.recurse\" && oldValue == \"\" && newValue == \"false\" {\n\t\t\t\t\t\t\t\t\t\treturn true\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif k == \"spec.0.source.0.directory.#\" {\n\t\t\t\t\t\t\t\t\t\t_, hasRecurse := d.GetOk(\"spec.0.source.0.directory.0.recurse\")\n\t\t\t\t\t\t\t\t\t\t_, hasJsonnet := d.GetOk(\"spec.0.source.0.directory.0.jsonnet\")\n\n\t\t\t\t\t\t\t\t\t\tif !hasJsonnet && !hasRecurse {\n\t\t\t\t\t\t\t\t\t\t\treturn true\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn false\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tMaxItems: 1,\n\t\t\t\t\t\t\t\tMinItems: 1,\n\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\"recurse\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeBool,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"Whether to scan a directory recursively for manifests.\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"jsonnet\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"Jsonnet specific options.\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\t\t\t\t\t\t\tMinItems:    1,\n\t\t\t\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"ext_var\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDescription: \"List of Jsonnet External Variables.\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"name\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDescription: \"Name of Jsonnet variable.\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"value\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDescription: \"Value of Jsonnet variable.\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"code\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeBool,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDescription: \"Determines whether the variable should be evaluated as jsonnet code or treated as string.\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"tla\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeSet,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDescription: \"List of Jsonnet Top-level Arguments\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"name\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDescription: \"Name of Jsonnet variable.\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"value\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDescription: \"Value of Jsonnet variable.\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"code\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeBool,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDescription: \"Determines whether the variable should be evaluated as jsonnet code or treated as string.\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"plugin\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\t\t\tDescription: \"Config management plugin specific options.\",\n\t\t\t\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\t\t\t\tMinItems:    1,\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\"name\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"env\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeSet,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"Environment variables passed to the plugin.\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"name\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDescription: \"Name of the environment variable.\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"value\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDescription: \"Value of the environment variable.\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"project\": {\n\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\tOptional:    true,\n\t\t\t\t\tDescription: \"The project the application belongs to. Defaults to `default`.\",\n\t\t\t\t\tDefault:     \"default\",\n\t\t\t\t},\n\t\t\t\t\"sync_policy\": {\n\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\tDescription: \"Controls when and how a sync will be performed.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\tMinItems:    1,\n\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\"automated\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeMap,\n\t\t\t\t\t\t\t\tDescription: \"Whether to automatically keep an application synced to the target revision.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\tElem:        &schema.Schema{Type: schema.TypeBool},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"sync_options\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\t\t\tDescription: \"List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\tElem: &schema.Schema{\n\t\t\t\t\t\t\t\t\tType: schema.TypeString,\n\t\t\t\t\t\t\t\t\t// TODO: add a validator\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"retry\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\t\t\tDescription: \"Controls failed sync retry behavior.\",\n\t\t\t\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\"limit\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"backoff\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeMap,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"Controls how to backoff on subsequent retries of failed syncs.\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\tElem:        &schema.Schema{Type: schema.TypeString},\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"ignore_difference\": {\n\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\tDescription: \"Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\"group\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"The Kubernetes resource Group to match for.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"kind\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"The Kubernetes resource Kind to match for.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"name\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"The Kubernetes resource Name to match for.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"namespace\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"The Kubernetes resource Namespace to match for.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"json_pointers\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeSet,\n\t\t\t\t\t\t\t\tDescription: \"List of JSONPaths strings targeting the field(s) to ignore.\",\n\t\t\t\t\t\t\t\tSet:         schema.HashString,\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\tElem: &schema.Schema{\n\t\t\t\t\t\t\t\t\tType: schema.TypeString,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"jq_path_expressions\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeSet,\n\t\t\t\t\t\t\t\tDescription: \"List of JQ path expression strings targeting the field(s) to ignore.\",\n\t\t\t\t\t\t\t\tSet:         schema.HashString,\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\tElem: &schema.Schema{\n\t\t\t\t\t\t\t\t\tType: schema.TypeString,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"info\": {\n\t\t\t\t\tType:        schema.TypeSet,\n\t\t\t\t\tDescription: \"List of information (URLs, email addresses, and plain text) that relates to the application.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\"name\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"Name of the information.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"value\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"Value of the information.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"revision_history_limit\": {\n\t\t\t\t\tType:        schema.TypeInt,\n\t\t\t\t\tDescription: \"Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t\tDefault:     10,\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc applicationSpecSchemaV3() *schema.Schema {\n\t// To support deploying applications to non-default namespaces (aka project\n\t// source namespaces), we need to do a state migration to ensure that the Id\n\t// on existing resources is updated to include the namespace.\n\t// For this to happen, we need to trigger a schema version upgrade on the\n\t// application resource however, the schema of the application `spec` has\n\t// changed from `v2`.\n\treturn applicationSpecSchemaV2()\n}\n\nfunc applicationSpecSchemaV4(allOptional, isAppSet bool) *schema.Schema {\n\treturn &schema.Schema{\n\t\tType:        schema.TypeList,\n\t\tMinItems:    1,\n\t\tMaxItems:    1,\n\t\tDescription: \"The application specification.\",\n\t\tOptional:    allOptional,\n\t\tRequired:    !allOptional,\n\t\tElem: &schema.Resource{\n\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\"destination\": {\n\t\t\t\t\tType:        schema.TypeSet,\n\t\t\t\t\tDescription: \"Reference to the Kubernetes server and namespace in which the application will be deployed.\",\n\t\t\t\t\tOptional:    allOptional,\n\t\t\t\t\tRequired:    !allOptional,\n\t\t\t\t\tMinItems:    1,\n\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\"server\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"URL of the target cluster and must be set to the Kubernetes control plane API.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"namespace\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"name\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"Name of the target cluster. Can be used instead of `server`.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"source\": {\n\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\tDescription: \"Location of the application's manifests or chart.\",\n\t\t\t\t\tOptional:    allOptional,\n\t\t\t\t\tRequired:    !allOptional,\n\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\"repo_url\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"URL to the repository (Git or Helm) that contains the application manifests.\",\n\t\t\t\t\t\t\t\tOptional:    allOptional,\n\t\t\t\t\t\t\t\tRequired:    !allOptional,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"path\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"Directory path within the repository. Only valid for applications sourced from Git.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t// TODO: add validator to test path is not absolute\n\t\t\t\t\t\t\t\tDefault: \".\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"target_revision\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"ref\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"name\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"chart\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"Helm chart name. Must be specified for applications sourced from a Helm repo.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"helm\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\t\t\tDescription: \"Helm specific options.\",\n\t\t\t\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\t\t\t\tMinItems:    1,\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\"value_files\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"List of Helm value files to use when generating a template.\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\tElem: &schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\t\tType: schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"values\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"Helm values to be passed to 'helm template', typically defined as a block.\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"ignore_missing_value_files\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeBool,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"parameter\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeSet,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"Helm parameters which are passed to the helm template command upon manifest generation.\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"name\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDescription: \"Name of the Helm parameter.\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"value\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDescription: \"Value of the Helm parameter.\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"force_string\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeBool,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDescription: \"Determines whether to tell Helm to interpret booleans and numbers as strings.\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"file_parameter\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeSet,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"File parameters for the helm template.\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"name\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDescription: \"Name of the Helm parameter.\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tRequired:    true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"path\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDescription: \"Path to the file containing the values for the Helm parameter.\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tRequired:    true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"release_name\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"Helm release name. If omitted it will use the application name.\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"skip_crds\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeBool,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"skip_schema_validation\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeBool,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"pass_credentials\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeBool,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"version\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"The Helm version to use for templating. Accepts either `v2` or `v3`\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"kustomize\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\t\t\tDescription: \"Kustomize specific options.\",\n\t\t\t\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\t\t\t\tMinItems:    1,\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\"name_prefix\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"Prefix appended to resources for Kustomize apps.\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"name_suffix\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"Suffix appended to resources for Kustomize apps.\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"version\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"Version of Kustomize to use for rendering manifests.\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"images\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeSet,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"List of Kustomize image override specifications.\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\tElem: &schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\t\tType: schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"common_labels\": {\n\t\t\t\t\t\t\t\t\t\t\tType:         schema.TypeMap,\n\t\t\t\t\t\t\t\t\t\t\tDescription:  \"List of additional labels to add to rendered manifests.\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:     true,\n\t\t\t\t\t\t\t\t\t\t\tElem:         &schema.Schema{Type: schema.TypeString},\n\t\t\t\t\t\t\t\t\t\t\tValidateFunc: validateMetadataLabels(false),\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"common_annotations\": {\n\t\t\t\t\t\t\t\t\t\t\tType:         schema.TypeMap,\n\t\t\t\t\t\t\t\t\t\t\tDescription:  \"List of additional annotations to add to rendered manifests.\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:     true,\n\t\t\t\t\t\t\t\t\t\t\tElem:         &schema.Schema{Type: schema.TypeString},\n\t\t\t\t\t\t\t\t\t\t\tValidateFunc: validateMetadataAnnotations,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"patches\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply.\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"target\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDescription: \"Target(s) to patch\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tRequired:    true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"group\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDescription: \"The Kubernetes resource Group to match for.\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"kind\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDescription: \"The Kubernetes resource Kind to match for.\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"name\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDescription: \"The Kubernetes resource Name to match for.\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"namespace\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDescription: \"The Kubernetes resource Namespace to match for.\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"label_selector\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDescription: \"Label selector to use when matching the Kubernetes resource.\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"annotation_selector\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDescription: \"Annotation selector to use when matching the Kubernetes resource.\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"version\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDescription: \"The Kubernetes resource Version to match for.\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"patch\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDescription: \"Inline Kustomize patch to apply.\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tElem:        &schema.Schema{Type: schema.TypeString},\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"path\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDescription: \"Path to a file containing the patch to apply.\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tElem:        &schema.Schema{Type: schema.TypeString},\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"options\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeMap,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDescription: \"Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tElem:        &schema.Schema{Type: schema.TypeBool},\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"directory\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\t\t\tDescription: \"Path/directory specific options.\",\n\t\t\t\t\t\t\t\tDiffSuppressFunc: func(k, oldValue, newValue string, d *schema.ResourceData) bool {\n\t\t\t\t\t\t\t\t\t// Avoid drift when recurse is explicitly set to false\n\t\t\t\t\t\t\t\t\t// Also ignore the directory node if both recurse & jsonnet are not set or ignored\n\t\t\t\t\t\t\t\t\tif k == \"spec.0.source.0.directory.0.recurse\" && oldValue == \"\" && newValue == \"false\" {\n\t\t\t\t\t\t\t\t\t\treturn true\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif k == \"spec.0.source.0.directory.#\" {\n\t\t\t\t\t\t\t\t\t\t_, hasRecurse := d.GetOk(\"spec.0.source.0.directory.0.recurse\")\n\t\t\t\t\t\t\t\t\t\t_, hasJsonnet := d.GetOk(\"spec.0.source.0.directory.0.jsonnet\")\n\n\t\t\t\t\t\t\t\t\t\tif !hasJsonnet && !hasRecurse {\n\t\t\t\t\t\t\t\t\t\t\treturn true\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn false\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tMaxItems: 1,\n\t\t\t\t\t\t\t\tMinItems: 1,\n\t\t\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\"recurse\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeBool,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"Whether to scan a directory recursively for manifests.\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"jsonnet\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"Jsonnet specific options.\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\t\t\t\t\t\t\tMinItems:    1,\n\t\t\t\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"ext_var\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDescription: \"List of Jsonnet External Variables.\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"name\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDescription: \"Name of Jsonnet variable.\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"value\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDescription: \"Value of Jsonnet variable.\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"code\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeBool,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDescription: \"Determines whether the variable should be evaluated as jsonnet code or treated as string.\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"tla\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeSet,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDescription: \"List of Jsonnet Top-level Arguments\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"name\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDescription: \"Name of Jsonnet variable.\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"value\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDescription: \"Value of Jsonnet variable.\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"code\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeBool,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDescription: \"Determines whether the variable should be evaluated as jsonnet code or treated as string.\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"libs\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDescription: \"Additional library search dirs.\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tElem: &schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tType: schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"exclude\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"include\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"plugin\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\t\t\tDescription: \"Config management plugin specific options.\",\n\t\t\t\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\t\t\t\tMinItems:    1,\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\"name\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"env\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeSet,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"Environment variables passed to the plugin.\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"name\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDescription: \"Name of the environment variable.\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"value\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDescription: \"Value of the environment variable.\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"project\": {\n\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\tOptional:    true,\n\t\t\t\t\tDescription: \"The project the application belongs to. Defaults to `default`.\",\n\t\t\t\t\tDefault:     \"default\",\n\t\t\t\t},\n\t\t\t\t\"sync_policy\": {\n\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\tDescription: \"Controls when and how a sync will be performed.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\tMinItems:    1,\n\t\t\t\t\tDiffSuppressFunc: func(k, oldValue, newValue string, d *schema.ResourceData) bool {\n\t\t\t\t\t\t// Avoid drift when sync_policy is empty\n\t\t\t\t\t\tif k == \"spec.0.sync_policy.#\" {\n\t\t\t\t\t\t\t_, hasAutomated := d.GetOk(\"spec.0.sync_policy.0.automated\")\n\t\t\t\t\t\t\t_, hasSyncOptions := d.GetOk(\"spec.0.sync_policy.0.sync_options\")\n\t\t\t\t\t\t\t_, hasRetry := d.GetOk(\"spec.0.sync_policy.0.retry\")\n\t\t\t\t\t\t\t_, hasManagedNamespaceMetadata := d.GetOk(\"spec.0.sync_policy.0.managed_namespace_metadata\")\n\n\t\t\t\t\t\t\tif !hasAutomated && !hasSyncOptions && !hasRetry && !hasManagedNamespaceMetadata {\n\t\t\t\t\t\t\t\treturn true\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn false\n\t\t\t\t\t},\n\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\"automated\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeSet,\n\t\t\t\t\t\t\t\tDescription: \"Whether to automatically keep an application synced to the target revision.\",\n\t\t\t\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\"prune\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeBool,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"self_heal\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeBool,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"Whether to revert resources back to their desired state upon modification in the cluster.\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"allow_empty\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeBool,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"Allows apps have zero live resources.\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"sync_options\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\t\t\tDescription: \"List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\tElem: &schema.Schema{\n\t\t\t\t\t\t\t\t\tType: schema.TypeString,\n\t\t\t\t\t\t\t\t\t// TODO: add a validator\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"retry\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\t\t\tDescription: \"Controls failed sync retry behavior.\",\n\t\t\t\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\"limit\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"backoff\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeSet,\n\t\t\t\t\t\t\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"Controls how to backoff on subsequent retries of failed syncs.\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"duration\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDescription: \"Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"factor\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDescription: \"Factor to multiply the base duration after each failed retry.\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"max_duration\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDescription: \"Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"managed_namespace_metadata\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\t\t\t\tDescription: \"Controls metadata in the given namespace (if `CreateNamespace=true`).\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\"annotations\": {\n\t\t\t\t\t\t\t\t\t\t\tType:         schema.TypeMap,\n\t\t\t\t\t\t\t\t\t\t\tDescription:  \"Annotations to apply to the namespace.\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:     true,\n\t\t\t\t\t\t\t\t\t\t\tElem:         &schema.Schema{Type: schema.TypeString},\n\t\t\t\t\t\t\t\t\t\t\tValidateFunc: validateMetadataAnnotations,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"labels\": {\n\t\t\t\t\t\t\t\t\t\t\tType:         schema.TypeMap,\n\t\t\t\t\t\t\t\t\t\t\tDescription:  \"Labels to apply to the namespace.\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:     true,\n\t\t\t\t\t\t\t\t\t\t\tElem:         &schema.Schema{Type: schema.TypeString},\n\t\t\t\t\t\t\t\t\t\t\tValidateFunc: validateMetadataLabels(isAppSet),\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"ignore_difference\": {\n\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\tDescription: \"Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\"group\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"The Kubernetes resource Group to match for.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"kind\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"The Kubernetes resource Kind to match for.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"name\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"The Kubernetes resource Name to match for.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"namespace\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"The Kubernetes resource Namespace to match for.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"json_pointers\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeSet,\n\t\t\t\t\t\t\t\tDescription: \"List of JSONPaths strings targeting the field(s) to ignore.\",\n\t\t\t\t\t\t\t\tSet:         schema.HashString,\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\tElem: &schema.Schema{\n\t\t\t\t\t\t\t\t\tType: schema.TypeString,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"jq_path_expressions\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeSet,\n\t\t\t\t\t\t\t\tDescription: \"List of JQ path expression strings targeting the field(s) to ignore.\",\n\t\t\t\t\t\t\t\tSet:         schema.HashString,\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\tElem: &schema.Schema{\n\t\t\t\t\t\t\t\t\tType: schema.TypeString,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"managed_fields_managers\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeSet,\n\t\t\t\t\t\t\t\tDescription: \"List of external controller manager names whose changes to fields should be ignored.\",\n\t\t\t\t\t\t\t\tSet:         schema.HashString,\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\tElem: &schema.Schema{\n\t\t\t\t\t\t\t\t\tType: schema.TypeString,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"info\": {\n\t\t\t\t\tType:        schema.TypeSet,\n\t\t\t\t\tDescription: \"List of information (URLs, email addresses, and plain text) that relates to the application.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\"name\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"Name of the information.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"value\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"Value of the information.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"revision_history_limit\": {\n\t\t\t\t\tType:        schema.TypeInt,\n\t\t\t\t\tDescription: \"Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t\tDefault:     10,\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc resourceArgoCDApplicationV0() *schema.Resource {\n\treturn &schema.Resource{\n\t\tSchema: map[string]*schema.Schema{\n\t\t\t\"metadata\": metadataSchema(\"appprojects.argoproj.io\"),\n\t\t\t\"spec\":     applicationSpecSchemaV0(),\n\t\t},\n\t}\n}\n\nfunc resourceArgoCDApplicationV1() *schema.Resource {\n\treturn &schema.Resource{\n\t\tSchema: map[string]*schema.Schema{\n\t\t\t\"metadata\": metadataSchema(\"appprojects.argoproj.io\"),\n\t\t\t\"spec\":     applicationSpecSchemaV1(),\n\t\t},\n\t}\n}\n\nfunc resourceArgoCDApplicationV2() *schema.Resource {\n\treturn &schema.Resource{\n\t\tSchema: map[string]*schema.Schema{\n\t\t\t\"metadata\": metadataSchema(\"appprojects.argoproj.io\"),\n\t\t\t\"spec\":     applicationSpecSchemaV2(),\n\t\t},\n\t}\n}\n\nfunc resourceArgoCDApplicationV3() *schema.Resource {\n\treturn &schema.Resource{\n\t\tSchema: map[string]*schema.Schema{\n\t\t\t\"metadata\": metadataSchema(\"appprojects.argoproj.io\"),\n\t\t\t\"spec\":     applicationSpecSchemaV3(),\n\t\t},\n\t}\n}\n\nfunc applicationStatusSchema() *schema.Schema {\n\treturn &schema.Schema{\n\t\tType:        schema.TypeList,\n\t\tDescription: \"Status information for the application. **Note**: this is not guaranteed to be up to date immediately after creating/updating an application unless `wait=true`.\",\n\t\tComputed:    true,\n\t\tElem: &schema.Resource{\n\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\"conditions\": {\n\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\tDescription: \"List of currently observed application conditions.\",\n\t\t\t\t\tComputed:    true,\n\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\"message\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"Human-readable message indicating details about condition.\",\n\t\t\t\t\t\t\t\tComputed:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"last_transition_time\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"The time the condition was last observed.\",\n\t\t\t\t\t\t\t\tComputed:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"type\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"Application condition type.\",\n\t\t\t\t\t\t\t\tComputed:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"health\": {\n\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\tDescription: \"Application's current health status.\",\n\t\t\t\t\tComputed:    true,\n\t\t\t\t\tElem:        resourceApplicationHealthStatus(),\n\t\t\t\t},\n\t\t\t\t\"operation_state\": {\n\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\tDescription: \"Information about any ongoing operations, such as a sync.\",\n\t\t\t\t\tComputed:    true,\n\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\"finished_at\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"Time of operation completion.\",\n\t\t\t\t\t\t\t\tComputed:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"message\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"Any pertinent messages when attempting to perform operation (typically errors).\",\n\t\t\t\t\t\t\t\tComputed:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"phase\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"The current phase of the operation.\",\n\t\t\t\t\t\t\t\tComputed:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"retry_count\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"Count of operation retries.\",\n\t\t\t\t\t\t\t\tComputed:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"started_at\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"Time of operation start.\",\n\t\t\t\t\t\t\t\tComputed:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"reconciled_at\": {\n\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\tDescription: \"When the application state was reconciled using the latest git version.\",\n\t\t\t\t\tComputed:    true,\n\t\t\t\t},\n\t\t\t\t\"resources\": {\n\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\tDescription: \"List of Kubernetes resources managed by this application.\",\n\t\t\t\t\tComputed:    true,\n\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\"group\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"The Kubernetes resource Group.\",\n\t\t\t\t\t\t\t\tComputed:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"health\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\t\t\tDescription: \"Resource health status.\",\n\t\t\t\t\t\t\t\tComputed:    true,\n\t\t\t\t\t\t\t\tElem:        resourceApplicationHealthStatus(),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"kind\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"The Kubernetes resource Kind.\",\n\t\t\t\t\t\t\t\tComputed:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"hook\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeBool,\n\t\t\t\t\t\t\t\tDescription: \"Indicates whether or not this resource has a hook annotation.\",\n\t\t\t\t\t\t\t\tComputed:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"name\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"The Kubernetes resource Name.\",\n\t\t\t\t\t\t\t\tComputed:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"namespace\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"The Kubernetes resource Namespace.\",\n\t\t\t\t\t\t\t\tComputed:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"requires_pruning\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeBool,\n\t\t\t\t\t\t\t\tDescription: \"Indicates if the resources requires pruning or not.\",\n\t\t\t\t\t\t\t\tComputed:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"status\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"Resource sync status.\",\n\t\t\t\t\t\t\t\tComputed:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"sync_wave\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"Sync wave.\",\n\t\t\t\t\t\t\t\tComputed:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"version\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"The Kubernetes resource Version.\",\n\t\t\t\t\t\t\t\tComputed:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"summary\": {\n\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\tDescription: \"List of URLs and container images used by this application.\",\n\t\t\t\t\tComputed:    true,\n\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\"external_urls\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\t\t\tDescription: \"All external URLs of application child resources.\",\n\t\t\t\t\t\t\t\tComputed:    true,\n\t\t\t\t\t\t\t\tElem:        schema.TypeString,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"images\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\t\t\tDescription: \"All images of application child resources.\",\n\t\t\t\t\t\t\t\tComputed:    true,\n\t\t\t\t\t\t\t\tElem:        schema.TypeString,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"sync\": {\n\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\tDescription: \"Application's current sync status\",\n\t\t\t\t\tComputed:    true,\n\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\"revision\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"Information about the revision the comparison has been performed to.\",\n\t\t\t\t\t\t\t\tComputed:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"revisions\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\t\t\tDescription: \"Information about the revision(s) the comparison has been performed to.\",\n\t\t\t\t\t\t\t\tComputed:    true,\n\t\t\t\t\t\t\t\tElem:        schema.TypeString,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"status\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"Sync state of the comparison.\",\n\t\t\t\t\t\t\t\tComputed:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc resourceApplicationHealthStatus() *schema.Resource {\n\treturn &schema.Resource{\n\t\tSchema: map[string]*schema.Schema{\n\t\t\t\"message\": {\n\t\t\t\tType:        schema.TypeString,\n\t\t\t\tDescription: \"Human-readable informational message describing the health status.\",\n\t\t\t\tComputed:    true,\n\t\t\t},\n\t\t\t\"status\": {\n\t\t\t\tType:        schema.TypeString,\n\t\t\t\tDescription: \"Status code of the application or resource.\",\n\t\t\t\tComputed:    true,\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc resourceArgoCDApplicationStateUpgradeV0(_ context.Context, rawState map[string]interface{}, _ interface{}) (map[string]interface{}, error) {\n\t_spec, ok := rawState[\"spec\"].([]interface{})\n\tif !ok || len(_spec) == 0 {\n\t\treturn rawState, nil\n\t}\n\n\tspec := _spec[0].(map[string]interface{})\n\n\t_source, ok := spec[\"source\"].([]interface{})\n\tif !ok || len(_source) == 0 {\n\t\treturn rawState, nil\n\t}\n\n\tsource := _source[0].(map[string]interface{})\n\n\t_helm, ok := source[\"helm\"].([]interface{})\n\tif !ok || len(_helm) == 0 {\n\t\treturn rawState, nil\n\t}\n\n\thelm := _helm[0].(map[string]interface{})\n\thelm[\"skip_crds\"] = false\n\n\treturn rawState, nil\n}\n\nfunc resourceArgoCDApplicationStateUpgradeV1(_ context.Context, rawState map[string]interface{}, _ interface{}) (map[string]interface{}, error) {\n\t_spec, ok := rawState[\"spec\"].([]interface{})\n\tif !ok || len(_spec) == 0 {\n\t\treturn rawState, nil\n\t}\n\n\tspec := _spec[0].(map[string]interface{})\n\n\t_source, ok := spec[\"source\"].([]interface{})\n\tif !ok || len(_source) == 0 {\n\t\treturn rawState, nil\n\t}\n\n\tsource := _source[0].(map[string]interface{})\n\n\t_ksonnet, ok := source[\"ksonnet\"].([]interface{})\n\tif !ok || len(_ksonnet) == 0 {\n\t\treturn rawState, nil\n\t}\n\n\treturn nil, fmt.Errorf(\"error during state migration v1 to v2, 'ksonnet' support has been removed\")\n}\n\nfunc resourceArgoCDApplicationStateUpgradeV2(_ context.Context, rawState map[string]interface{}, _ interface{}) (map[string]interface{}, error) {\n\t_metadata, ok := rawState[\"metadata\"].([]interface{})\n\tif !ok || len(_metadata) == 0 {\n\t\treturn nil, fmt.Errorf(\"failed to read metadata during state migration v2 to v3\")\n\t}\n\n\tmetadata := _metadata[0].(map[string]interface{})\n\trawState[\"id\"] = fmt.Sprintf(\"%s:%s\", metadata[\"name\"].(string), metadata[\"namespace\"].(string))\n\n\treturn rawState, nil\n}\n\nfunc resourceArgoCDApplicationStateUpgradeV3(_ context.Context, rawState map[string]interface{}, _ interface{}) (map[string]interface{}, error) {\n\t_spec, ok := rawState[\"spec\"].([]interface{})\n\tif !ok || len(_spec) == 0 {\n\t\treturn rawState, nil\n\t}\n\n\tspec := _spec[0].(map[string]interface{})\n\n\t_syncPolicy, ok := spec[\"sync_policy\"].([]interface{})\n\tif !ok || len(_syncPolicy) == 0 {\n\t\treturn rawState, nil\n\t}\n\n\tsyncPolicy := _syncPolicy[0].(map[string]interface{})\n\n\tautomated, ok := syncPolicy[\"automated\"].(map[string]interface{})\n\tif ok {\n\t\tupdated := make(map[string]interface{}, 0)\n\t\tfor k, v := range automated {\n\t\t\tupdated[k] = v\n\t\t}\n\n\t\tsyncPolicy[\"automated\"] = []map[string]interface{}{updated}\n\t}\n\n\t_retry, ok := syncPolicy[\"retry\"].([]interface{})\n\tif !ok || len(_retry) == 0 {\n\t\treturn rawState, nil\n\t}\n\n\tretry := _retry[0].(map[string]interface{})\n\n\tif backoff, ok := retry[\"backoff\"].(map[string]interface{}); ok {\n\t\tupdated := make(map[string]interface{}, 0)\n\t\tfor k, v := range backoff {\n\t\t\tupdated[k] = v\n\t\t}\n\n\t\tretry[\"backoff\"] = []map[string]interface{}{updated}\n\t}\n\n\treturn rawState, nil\n}\n"
  },
  {
    "path": "argocd/schema_application_set.go",
    "content": "package argocd\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema\"\n)\n\nconst generatorSchemaLevel = 3\n\nfunc applicationSetSpecSchemaV0() *schema.Schema {\n\treturn &schema.Schema{\n\t\tType:        schema.TypeList,\n\t\tMinItems:    1,\n\t\tMaxItems:    1,\n\t\tDescription: \"ArgoCD application set resource spec.\",\n\t\tRequired:    true,\n\t\tElem: &schema.Resource{\n\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\"ignore_application_differences\": {\n\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\tDescription: \"Application Set [ignoreApplicationDifferences](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Controlling-Resource-Modification/#ignore-certain-changes-to-applications).\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\"json_pointers\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeSet,\n\t\t\t\t\t\t\t\tDescription: \"Json pointers to ignore differences\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\tElem: &schema.Schema{\n\t\t\t\t\t\t\t\t\tType: schema.TypeString,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"jq_path_expressions\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeSet,\n\t\t\t\t\t\t\t\tDescription: \"jq path to ignore differences\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\tElem: &schema.Schema{\n\t\t\t\t\t\t\t\t\tType: schema.TypeString,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"name\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"name\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"generator\": applicationSetGeneratorSchemaV0(),\n\t\t\t\t\"go_template\": {\n\t\t\t\t\tType:        schema.TypeBool,\n\t\t\t\t\tDescription: \"Enable use of [Go Text Template](https://pkg.go.dev/text/template).\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t},\n\t\t\t\t\"go_template_options\": {\n\t\t\t\t\tType:        schema.TypeSet,\n\t\t\t\t\tDescription: \"Optional list of [Go Templating Options](https://pkg.go.dev/text/template#Template.Option). Only relevant if `go_template` is true.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t\tElem:        &schema.Schema{Type: schema.TypeString},\n\t\t\t\t},\n\t\t\t\t\"strategy\": {\n\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\tDescription: \"[Progressive Sync](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Progressive-Syncs/) strategy\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\"type\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"Type of progressive sync.\",\n\t\t\t\t\t\t\t\tRequired:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"rolling_sync\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\t\t\tDescription: \"Update strategy allowing you to group Applications by labels present on the generated Application resources. When the ApplicationSet changes, the changes will be applied to each group of Application resources sequentially.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\"step\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"Configuration used to define which applications to include in each stage of the rolling sync. All Applications in each group must become Healthy before the ApplicationSet controller will proceed to update the next group of Applications.\",\n\t\t\t\t\t\t\t\t\t\t\tMinItems:    1,\n\t\t\t\t\t\t\t\t\t\t\tRequired:    true,\n\t\t\t\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"match_expressions\": matchExpressionsSchema(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"max_update\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tType:         schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDescription:  \"Maximum number of simultaneous Application updates in a group. Supports both integer and percentage string values (rounds down, but floored at 1 Application for >0%). Default is 100%, unbounded.\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tValidateFunc: validateIntOrStringPercentage,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional:     true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"sync_policy\": {\n\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\tDescription: \"Application Set [sync policy](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Controlling-Resource-Modification/).\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\"preserve_resources_on_deletion\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeBool,\n\t\t\t\t\t\t\t\tDescription: \"Label selector used to narrow the scope of targeted clusters.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"applications_sync\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"Represents the policy applied on the generated applications. Possible values are create-only, create-update, create-delete, and sync.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"template\": {\n\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\tDescription: \"Application set template. The template fields of the ApplicationSet spec are used to generate Argo CD Application resources.\",\n\t\t\t\t\tRequired:    true,\n\t\t\t\t\tMinItems:    1,\n\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\tElem:        applicationSetTemplateResource(false),\n\t\t\t\t},\n\t\t\t\t\"template_patch\": {\n\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\tDescription: \"Application set template patch, as in the [Argo CD ApplicationSet spec](https://argocd-applicationset.readthedocs.io/en/stable/fields/#templatepatch).\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc applicationSetSpecSchemaV1() *schema.Schema {\n\t// To support deploying applicationsets to non-default namespaces we need to\n\t// do a state migration to ensure that the Id on existing resources is\n\t// updated to include the namespace. For this to happen, we need to trigger\n\t// a schema version upgrade on the applicationset resource however, the\n\t// schema of the applicationset `spec` has not changed from `v0`.\n\treturn applicationSetSpecSchemaV0()\n}\n\nfunc applicationSetGeneratorSchemaV0() *schema.Schema {\n\treturn &schema.Schema{\n\t\tType:        schema.TypeList,\n\t\tDescription: \"Application set generators. Generators are responsible for generating parameters, which are then rendered into the template: fields of the ApplicationSet resource.\",\n\t\tRequired:    true,\n\t\tMinItems:    1,\n\t\tElem:        generatorResourceV0(generatorSchemaLevel),\n\t}\n}\n\nfunc resourceArgoCDApplicationSetStateUpgradeV0(_ context.Context, rawState map[string]interface{}, _ interface{}) (map[string]interface{}, error) {\n\t_metadata, ok := rawState[\"metadata\"].([]interface{})\n\tif !ok || len(_metadata) == 0 {\n\t\treturn nil, fmt.Errorf(\"failed to read metadata during state migration v0 to v1\")\n\t}\n\n\tmetadata := _metadata[0].(map[string]interface{})\n\trawState[\"id\"] = fmt.Sprintf(\"%s:%s\", metadata[\"name\"].(string), metadata[\"namespace\"].(string))\n\n\treturn rawState, nil\n}\n\nfunc generatorResourceV0(level int) *schema.Resource {\n\tif level > 1 {\n\t\treturn &schema.Resource{\n\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\"cluster_decision_resource\": applicationSetClusterDecisionResourceGeneratorSchemaV0(),\n\t\t\t\t\"clusters\":                  applicationSetClustersGeneratorSchemaV0(),\n\t\t\t\t\"git\":                       applicationSetGitGeneratorSchemaV0(),\n\t\t\t\t\"list\":                      applicationSetListGeneratorSchemaV0(),\n\t\t\t\t\"matrix\":                    applicationSetMatrixGeneratorSchemaV0(level),\n\t\t\t\t\"merge\":                     applicationSetMergeGeneratorSchemaV0(level),\n\t\t\t\t\"plugin\":                    applicationSetPluginGeneratorSchemaV0(),\n\t\t\t\t\"pull_request\":              applicationSetPullRequestGeneratorSchemaV0(),\n\t\t\t\t\"scm_provider\":              applicationSetSCMProviderGeneratorSchemaV0(),\n\t\t\t\t\"selector\": {\n\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\tDescription: \"The Selector allows to post-filter based on generated values using the kubernetes common labelSelector format.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\tSchema: labelSelectorSchema(),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}\n\t}\n\n\treturn &schema.Resource{\n\t\tSchema: map[string]*schema.Schema{\n\t\t\t\"plugin\":                    applicationSetPluginGeneratorSchemaV0(),\n\t\t\t\"cluster_decision_resource\": applicationSetClusterDecisionResourceGeneratorSchemaV0(),\n\t\t\t\"clusters\":                  applicationSetClustersGeneratorSchemaV0(),\n\t\t\t\"git\":                       applicationSetGitGeneratorSchemaV0(),\n\t\t\t\"list\":                      applicationSetListGeneratorSchemaV0(),\n\t\t\t\"pull_request\":              applicationSetPullRequestGeneratorSchemaV0(),\n\t\t\t\"scm_provider\":              applicationSetSCMProviderGeneratorSchemaV0(),\n\t\t\t\"selector\": {\n\t\t\t\tType:        schema.TypeList,\n\t\t\t\tDescription: \"The Selector allows to post-filter based on generated values using the kubernetes common labelSelector format.\",\n\t\t\t\tOptional:    true,\n\t\t\t\tMaxItems:    1,\n\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\tSchema: labelSelectorSchema(),\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc applicationSetClustersGeneratorSchemaV0() *schema.Schema {\n\treturn &schema.Schema{\n\t\tType:        schema.TypeList,\n\t\tDescription: \"The [cluster generator](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Cluster/) produces parameters based on the list of items found within the cluster secret.\",\n\t\tOptional:    true,\n\t\tElem: &schema.Resource{\n\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\"selector\": {\n\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\tDescription: \"Label selector used to narrow the scope of targeted clusters.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\tSchema: labelSelectorSchema(),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"template\": {\n\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\tDescription: \"Generator template. Used to override the values of the spec-level template.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\tElem:        applicationSetTemplateResource(true),\n\t\t\t\t},\n\t\t\t\t\"values\": {\n\t\t\t\t\tType:        schema.TypeMap,\n\t\t\t\t\tDescription: \"Arbitrary string key-value pairs to pass to the template via the values field of the cluster generator.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t\tElem:        &schema.Schema{Type: schema.TypeString},\n\t\t\t\t},\n\t\t\t\t\"enabled\": {\n\t\t\t\t\tType:        schema.TypeBool,\n\t\t\t\t\tDescription: \"Boolean value defaulting to `true` to indicate that this block has been added thereby allowing all other attributes to be optional.\",\n\t\t\t\t\tRequired:    true,\n\t\t\t\t\tDefaultFunc: func() (interface{}, error) { return true, nil },\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc applicationSetClusterDecisionResourceGeneratorSchemaV0() *schema.Schema {\n\treturn &schema.Schema{\n\t\tType:        schema.TypeList,\n\t\tDescription: \"The [cluster decision resource](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Cluster-Decision-Resource/) generates a list of Argo CD clusters.\",\n\t\tOptional:    true,\n\t\tElem: &schema.Resource{\n\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\"config_map_ref\": {\n\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\tDescription: \"ConfigMap with the duck type definitions needed to retrieve the data this includes apiVersion(group/version), kind, matchKey and validation settings.\",\n\t\t\t\t\tRequired:    true,\n\t\t\t\t},\n\t\t\t\t\"name\": {\n\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\tDescription: \"Resource name of the kind, group and version, defined in the `config_map_ref`.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t},\n\t\t\t\t\"label_selector\": {\n\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\tDescription: \"Label selector used to find the resource defined in the `config_map_ref`. Alternative to `name`.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\tSchema: labelSelectorSchema(),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"requeue_after_seconds\": {\n\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\tDescription: \"How often to check for changes (in seconds). Default: 3min.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t},\n\t\t\t\t\"template\": {\n\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\tDescription: \"Generator template. Used to override the values of the spec-level template.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\tElem:        applicationSetTemplateResource(true),\n\t\t\t\t},\n\t\t\t\t\"values\": {\n\t\t\t\t\tType:        schema.TypeMap,\n\t\t\t\t\tDescription: \"Arbitrary string key-value pairs which are passed directly as parameters to the template.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t\tElem:        &schema.Schema{Type: schema.TypeString},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc applicationSetPluginGeneratorSchemaV0() *schema.Schema {\n\treturn &schema.Schema{\n\t\tType:        schema.TypeList,\n\t\tDescription: \"[Plugin generators](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Plugin/) generates parameters using a custom plugin.\",\n\t\tOptional:    true,\n\t\tElem: &schema.Resource{\n\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\"config_map_ref\": {\n\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\tDescription: \"ConfigMap with the plugin configuration needed to retrieve the data.\",\n\t\t\t\t\tRequired:    true,\n\t\t\t\t},\n\t\t\t\t\"requeue_after_seconds\": {\n\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\tDescription: \"How often to check for changes (in seconds). Default: 3min.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t},\n\t\t\t\t\"input\": {\n\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\tDescription: \"The input parameters used for calling the plugin.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\"parameters\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeMap,\n\t\t\t\t\t\t\t\tDescription: \"Arbitrary key-value pairs which are passed directly as parameters to the plugin. A current limitation is that this cannot fully express the parameters that can be accepted by the plugin generator.\",\n\t\t\t\t\t\t\t\tRequired:    true,\n\t\t\t\t\t\t\t\tElem:        &schema.Schema{Type: schema.TypeString},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"template\": {\n\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\tDescription: \"Generator template. Used to override the values of the spec-level template.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\tElem:        applicationSetTemplateResource(true),\n\t\t\t\t},\n\t\t\t\t\"values\": {\n\t\t\t\t\tType:        schema.TypeMap,\n\t\t\t\t\tDescription: \"Arbitrary string key-value pairs to pass to the template via the values field of the git generator.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t\tElem:        &schema.Schema{Type: schema.TypeString},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc applicationSetGitGeneratorSchemaV0() *schema.Schema {\n\treturn &schema.Schema{\n\t\tType:        schema.TypeList,\n\t\tDescription: \"[Git generators](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Git/) generates parameters using either the directory structure of a specified Git repository (directory generator), or, using the contents of JSON/YAML files found within a specified repository (file generator). \",\n\t\tOptional:    true,\n\t\tElem: &schema.Resource{\n\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\"directory\": {\n\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\tDescription: \"List of directories in the source repository to use when template the Application..\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\"path\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"Path in the repository.\",\n\t\t\t\t\t\t\t\tRequired:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"exclude\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeBool,\n\t\t\t\t\t\t\t\tDescription: \"Flag indicating whether or not the directory should be excluded when templating.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\tDefault:     false,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"file\": {\n\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\tDescription: \"List of files in the source repository to use when template the Application.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\"path\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"Path to the file in the repository.\",\n\t\t\t\t\t\t\t\tRequired:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"repo_url\": {\n\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\tDescription: \"URL to the repository to use.\",\n\t\t\t\t\tRequired:    true,\n\t\t\t\t},\n\t\t\t\t\"revision\": {\n\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\tDescription: \"Revision of the source repository to use.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t},\n\t\t\t\t\"path_param_prefix\": {\n\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\tDescription: \"Prefix for all path-related parameter names.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t},\n\t\t\t\t\"requeue_after_seconds\": {\n\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\tDescription: \"How often to check for changes (in seconds). Default: 3min.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t},\n\t\t\t\t\"template\": {\n\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\tDescription: \"Generator template. Used to override the values of the spec-level template.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\tElem:        applicationSetTemplateResource(true),\n\t\t\t\t},\n\t\t\t\t\"values\": {\n\t\t\t\t\tType:        schema.TypeMap,\n\t\t\t\t\tDescription: \"Arbitrary string key-value pairs to pass to the template via the values field of the git generator.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t\tElem:        &schema.Schema{Type: schema.TypeString},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc applicationSetListGeneratorSchemaV0() *schema.Schema {\n\treturn &schema.Schema{\n\t\tType:        schema.TypeList,\n\t\tDescription: \"[List generators](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-List/) generate parameters based on an arbitrary list of key/value pairs (as long as the values are string values).\",\n\t\tOptional:    true,\n\t\tElem: &schema.Resource{\n\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\"elements\": {\n\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\tDescription: \"List of key/value pairs to pass as parameters into the template\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t\tElem: &schema.Schema{\n\t\t\t\t\t\tType: schema.TypeMap,\n\t\t\t\t\t\tElem: &schema.Schema{Type: schema.TypeString},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"elements_yaml\": {\n\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\tDescription: \"YAML string containing list of key/value pairs to pass as parameters into the template\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t},\n\t\t\t\t\"template\": {\n\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\tDescription: \"Generator template. Used to override the values of the spec-level template.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\tElem:        applicationSetTemplateResource(true),\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc applicationSetMatrixGeneratorSchemaV0(level int) *schema.Schema {\n\treturn &schema.Schema{\n\t\tType:        schema.TypeList,\n\t\tDescription: \"[Matrix generators](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Matrix/) combine the parameters generated by two child generators, iterating through every combination of each generator's generated parameters. Take note of the [restrictions](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Matrix/#restrictions) regarding their usage - particularly regarding nesting matrix generators.\",\n\t\tOptional:    true,\n\t\tElem: &schema.Resource{\n\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\"generator\": {\n\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\tDescription: \"Child generator. Generators are responsible for generating parameters, which are then combined by the parent matrix generator into the template fields of the ApplicationSet resource.\",\n\t\t\t\t\tRequired:    true,\n\t\t\t\t\tMinItems:    2,\n\t\t\t\t\tMaxItems:    2,\n\t\t\t\t\tElem:        generatorResourceV0(level - 1),\n\t\t\t\t},\n\t\t\t\t\"template\": {\n\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\tDescription: \"Generator template. Used to override the values of the spec-level template.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\tElem:        applicationSetTemplateResource(true),\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc applicationSetMergeGeneratorSchemaV0(level int) *schema.Schema {\n\treturn &schema.Schema{\n\t\tType:        schema.TypeList,\n\t\tDescription: \"[Merge generators](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Merge/) combine parameters produced by the base (first) generator with matching parameter sets produced by subsequent generators. Take note of the [restrictions](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Merge/#restrictions) regarding their usage - particularly regarding nesting merge generators.\",\n\t\tOptional:    true,\n\t\tElem: &schema.Resource{\n\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\"merge_keys\": {\n\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\tDescription: \"Keys to merge into resulting parameter set.\",\n\t\t\t\t\tRequired:    true,\n\t\t\t\t\tElem:        &schema.Schema{Type: schema.TypeString},\n\t\t\t\t},\n\t\t\t\t\"generator\": {\n\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\tDescription: \"Child generator. Generators are responsible for generating parameters, which are then combined by the parent merge generator.\",\n\t\t\t\t\tRequired:    true,\n\t\t\t\t\tMinItems:    2,\n\t\t\t\t\tElem:        generatorResourceV0(level - 1),\n\t\t\t\t},\n\t\t\t\t\"template\": {\n\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\tDescription: \"Generator template. Used to override the values of the spec-level template.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\tElem:        applicationSetTemplateResource(true),\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc applicationSetSCMProviderGeneratorSchemaV0() *schema.Schema {\n\treturn &schema.Schema{\n\t\tType:        schema.TypeList,\n\t\tDescription: \"[SCM Provider generators](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-SCM-Provider/) uses the API of an SCMaaS provider to automatically discover repositories within an organization.\",\n\t\tOptional:    true,\n\t\tElem: &schema.Resource{\n\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\"azure_devops\": {\n\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\tDescription: \"Uses the Azure DevOps API to look up eligible repositories based on a team project within an Azure DevOps organization.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\"all_branches\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeBool,\n\t\t\t\t\t\t\t\tDescription: \"Scan all branches instead of just the default branch.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"access_token_ref\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\t\t\tDescription: \"The Personal Access Token (PAT) to use when connecting.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\t\t\t\tElem:        secretRefResource(),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"api\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"The URL to Azure DevOps. Defaults to https://dev.azure.com.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"organization\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"Azure Devops organization. E.g. \\\"my-organization\\\".\",\n\t\t\t\t\t\t\t\tRequired:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"team_project\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"Azure Devops team project. E.g. \\\"my-team\\\".\",\n\t\t\t\t\t\t\t\tRequired:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"bitbucket_cloud\": {\n\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\tDescription: \"Uses the Bitbucket API V2 to scan a workspace in bitbucket.org.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\"all_branches\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeBool,\n\t\t\t\t\t\t\t\tDescription: \"Scan all branches instead of just the default branch.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"app_password_ref\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\t\t\tDescription: \"The app password to use for the user. See: https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\t\t\t\tElem:        secretRefResource(),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"owner\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"Bitbucket workspace to scan.\",\n\t\t\t\t\t\t\t\tRequired:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"user\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"Bitbucket user to use when authenticating. Should have a \\\"member\\\" role to be able to read all repositories and branches.\",\n\t\t\t\t\t\t\t\tRequired:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"bitbucket_server\": {\n\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\tDescription: \"Use the Bitbucket Server API (1.0) to scan repos in a project.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\"all_branches\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeBool,\n\t\t\t\t\t\t\t\tDescription: \"Scan all branches instead of just the default branch.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"api\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"The Bitbucket REST API URL to talk to e.g. https://bitbucket.org/rest.\",\n\t\t\t\t\t\t\t\tRequired:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"basic_auth\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\t\t\tDescription: \"Credentials for Basic auth.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\"username\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"Username for Basic auth.\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"password_ref\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"Password (or personal access token) reference.\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\t\t\t\t\t\t\tElem:        secretRefResource(),\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"project\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"Project to scan.\",\n\t\t\t\t\t\t\t\tRequired:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"clone_protocol\": {\n\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\tDescription: \"Which protocol to use for the SCM URL. Default is provider-specific but ssh if possible. Not all providers necessarily support all protocols.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t},\n\t\t\t\t\"filter\": {\n\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\tDescription: \"Filters for which repos should be considered.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\"branch_match\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"A regex which must match the branch name.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"label_match\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"A regex which must match at least one label.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"paths_do_not_exist\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\t\t\tDescription: \"An array of paths, all of which must not exist.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\tElem:        &schema.Schema{Type: schema.TypeString},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"paths_exist\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\t\t\tDescription: \"An array of paths, all of which must exist.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\tElem:        &schema.Schema{Type: schema.TypeString},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"repository_match\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"A regex for repo names.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"gitea\": {\n\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\tDescription: \"Gitea mode uses the Gitea API to scan organizations in your instance.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\"all_branches\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeBool,\n\t\t\t\t\t\t\t\tDescription: \"Scan all branches instead of just the default branch.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"api\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"The Gitea URL to talk to. For example https://gitea.mydomain.com/.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"insecure\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeBool,\n\t\t\t\t\t\t\t\tDescription: \"Allow self-signed TLS / Certificates.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"owner\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"Gitea organization or user to scan.\",\n\t\t\t\t\t\t\t\tRequired:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"token_ref\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\t\t\tDescription: \"Authentication token reference.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\t\t\t\tElem:        secretRefResource(),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"github\": {\n\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\tDescription: \"Uses the GitHub API to scan an organization in either github.com or GitHub Enterprise.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\"all_branches\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeBool,\n\t\t\t\t\t\t\t\tDescription: \"If true, scan every branch of every repository. If false, scan only the default branch.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"api\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"The GitHub API URL to talk to. Default https://api.github.com/.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"app_secret_name\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"Reference to a GitHub App repo-creds secret. Uses a GitHub App to access the API instead of a PAT.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"organization\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"GitHub org to scan.\",\n\t\t\t\t\t\t\t\tRequired:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"token_ref\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\t\t\tDescription: \"Authentication token reference.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\t\t\t\tElem:        secretRefResource(),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"gitlab\": {\n\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\tDescription: \"Uses the GitLab API to scan and organization in either gitlab.com or self-hosted GitLab.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\"all_branches\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeBool,\n\t\t\t\t\t\t\t\tDescription: \"If true, scan every branch of every repository. If false, scan only the default branch.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"api\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"The Gitlab API URL to talk to.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"group\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"Gitlab group to scan. You can use either the project id (recommended) or the full namespaced path.\",\n\t\t\t\t\t\t\t\tRequired:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"include_subgroups\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeBool,\n\t\t\t\t\t\t\t\tDescription: \"Recurse through subgroups (true) or scan only the base group (false). Defaults to `false`.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"token_ref\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\t\t\tDescription: \"Authentication token reference.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\t\t\t\tElem:        secretRefResource(),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"requeue_after_seconds\": {\n\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\tDescription: \"How often to check for changes (in seconds). Default: 3min.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t},\n\t\t\t\t\"template\": {\n\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\tDescription: \"Generator template. Used to override the values of the spec-level template.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\tElem:        applicationSetTemplateResource(true),\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc applicationSetPullRequestGeneratorSchemaV0() *schema.Schema {\n\treturn &schema.Schema{\n\t\tType:        schema.TypeList,\n\t\tDescription: \"[Pull Request generators](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Pull-Request/) uses the API of an SCMaaS provider to automatically discover open pull requests within a repository.\",\n\t\tOptional:    true,\n\t\tElem: &schema.Resource{\n\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\"bitbucket_server\": {\n\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\tDescription: \"Fetch pull requests from a repo hosted on a Bitbucket Server.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\"api\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"The Bitbucket REST API URL to talk to e.g. https://bitbucket.org/rest.\",\n\t\t\t\t\t\t\t\tRequired:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"basic_auth\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\t\t\tDescription: \"Credentials for Basic auth.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\t\t\"username\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"Username for Basic auth.\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"password_ref\": {\n\t\t\t\t\t\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\t\t\t\t\t\tDescription: \"Password (or personal access token) reference.\",\n\t\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\t\t\t\t\t\t\tElem:        secretRefResource(),\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"project\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"Project to scan.\",\n\t\t\t\t\t\t\t\tRequired:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"repo\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"Repo name to scan.\",\n\t\t\t\t\t\t\t\tRequired:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"azure_devops\": {\n\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\tDescription: \"Fetch pull requests from an Azure DevOps repository.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\"api\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"The Azure DevOps API URL to talk to. If blank, uses https://dev.azure.com/.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"labels\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\t\t\tDescription: \"Labels is used to filter the PRs that you want to target.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\tElem:        &schema.Schema{Type: schema.TypeString},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"organization\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"Azure DevOps org to scan. Required.\",\n\t\t\t\t\t\t\t\tRequired:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"project\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"Azure DevOps project name to scan. Required.\",\n\t\t\t\t\t\t\t\tRequired:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"repo\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"Azure DevOps repo name to scan. Required.\",\n\t\t\t\t\t\t\t\tRequired:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"token_ref\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\t\t\tDescription: \"Authentication token reference.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\t\t\t\tElem:        secretRefResource(),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"filter\": {\n\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\tDescription: \"Filters allow selecting which pull requests to generate for.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\"branch_match\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"A regex which must match the branch name.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"gitea\": {\n\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\tDescription: \"Specify the repository from which to fetch the Gitea Pull requests.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\"api\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"The Gitea API URL to talk to.\",\n\t\t\t\t\t\t\t\tRequired:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"insecure\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeBool,\n\t\t\t\t\t\t\t\tDescription: \"Allow insecure tls, for self-signed certificates; default: false.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"owner\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"Gitea org or user to scan.\",\n\t\t\t\t\t\t\t\tRequired:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"repo\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"Gitea repo name to scan.\",\n\t\t\t\t\t\t\t\tRequired:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"token_ref\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\t\t\tDescription: \"Authentication token reference.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\t\t\t\tElem:        secretRefResource(),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"github\": {\n\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\tDescription: \"Specify the repository from which to fetch the GitHub Pull requests.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\"api\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"The GitHub API URL to talk to. Default https://api.github.com/.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"app_secret_name\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"Reference to a GitHub App repo-creds secret with permission to access pull requests.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"labels\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\t\t\tDescription: \"Labels is used to filter the PRs that you want to target.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\tElem:        &schema.Schema{Type: schema.TypeString},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"owner\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"GitHub org or user to scan.\",\n\t\t\t\t\t\t\t\tRequired:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"repo\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"GitHub repo name to scan.\",\n\t\t\t\t\t\t\t\tRequired:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"token_ref\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\t\t\tDescription: \"Authentication token reference.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\t\t\t\tElem:        secretRefResource(),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"gitlab\": {\n\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\tDescription: \"Specify the project from which to fetch the GitLab merge requests.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\"api\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"The GitLab API URL to talk to. If blank, uses https://gitlab.com/.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"labels\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\t\t\tDescription: \"Labels is used to filter the PRs that you want to target.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\tElem:        &schema.Schema{Type: schema.TypeString},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"project\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"GitLab project to scan.\",\n\t\t\t\t\t\t\t\tRequired:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"pull_request_state\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\tDescription: \"additional MRs filter to get only those with a certain state. Default:  \\\"\\\" (all states).\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"token_ref\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\t\t\tDescription: \"Authentication token reference.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\t\t\t\tElem:        secretRefResource(),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"insecure\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeBool,\n\t\t\t\t\t\t\t\tDescription: \"A flag for checking the validity of the SCM's certificates.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"ca_ref\": {\n\t\t\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\t\t\tDescription: \"Reference to a ConfigMap key containing trusted CA certificates for verifying the SCM server's TLS certificate.\",\n\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\t\t\t\tElem:        configMapRefResource(),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"requeue_after_seconds\": {\n\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\tDescription: \"How often to check for changes (in seconds). Default: 30min.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t},\n\t\t\t\t\"template\": {\n\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\tDescription: \"Generator template. Used to override the values of the spec-level template.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\tElem:        applicationSetTemplateResource(true),\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc applicationSetTemplateResource(allOptional bool) *schema.Resource {\n\treturn &schema.Resource{\n\t\tSchema: map[string]*schema.Schema{\n\t\t\t\"metadata\": {\n\t\t\t\tType:        schema.TypeList,\n\t\t\t\tDescription: \"Kubernetes object metadata for templated Application.\",\n\t\t\t\tOptional:    allOptional,\n\t\t\t\tRequired:    !allOptional,\n\t\t\t\tMaxItems:    1,\n\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\"annotations\": {\n\t\t\t\t\t\t\tType:        schema.TypeMap,\n\t\t\t\t\t\t\tDescription: \"An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\",\n\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\tElem:        &schema.Schema{Type: schema.TypeString},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"labels\": {\n\t\t\t\t\t\t\tType:        schema.TypeMap,\n\t\t\t\t\t\t\tDescription: \"Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\",\n\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\tElem:        &schema.Schema{Type: schema.TypeString},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"name\": {\n\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\tDescription: \"Name of the resulting Application\",\n\t\t\t\t\t\t\tOptional:    allOptional,\n\t\t\t\t\t\t\tRequired:    !allOptional,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"namespace\": {\n\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\tDescription: \"Namespace of the resulting Application\",\n\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"finalizers\": {\n\t\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\t\tDescription: \"List of finalizers to apply to the resulting Application.\",\n\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\tElem:        &schema.Schema{Type: schema.TypeString},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t\"spec\": applicationSpecSchemaV4(allOptional, true),\n\t\t},\n\t}\n}\n\nfunc secretRefResource() *schema.Resource {\n\treturn &schema.Resource{\n\t\tSchema: map[string]*schema.Schema{\n\t\t\t\"key\": {\n\t\t\t\tType:        schema.TypeString,\n\t\t\t\tDescription: \"Key containing information in Kubernetes `Secret`.\",\n\t\t\t\tRequired:    true,\n\t\t\t},\n\t\t\t\"secret_name\": {\n\t\t\t\tType:        schema.TypeString,\n\t\t\t\tDescription: \"Name of Kubernetes `Secret`.\",\n\t\t\t\tRequired:    true,\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc configMapRefResource() *schema.Resource {\n\treturn &schema.Resource{\n\t\tSchema: map[string]*schema.Schema{\n\t\t\t\"key\": {\n\t\t\t\tType:        schema.TypeString,\n\t\t\t\tDescription: \"Key containing information in trusted CA certs.\",\n\t\t\t\tRequired:    true,\n\t\t\t},\n\t\t\t\"config_map_name\": {\n\t\t\t\tType:        schema.TypeString,\n\t\t\t\tDescription: \"Name of the ConfigMap.\",\n\t\t\t\tRequired:    true,\n\t\t\t},\n\t\t},\n\t}\n}\n"
  },
  {
    "path": "argocd/schema_application_test.go",
    "content": "package argocd\n\nimport (\n\t\"reflect\"\n\t\"strings\"\n\t\"testing\"\n)\n\nfunc TestUpgradeSchemaApplication_V0V1_Default_SkipCrds(t *testing.T) {\n\tt.Parallel()\n\n\tv0 := map[string]interface{}{\n\t\t\"spec\": []interface{}{\n\t\t\tmap[string]interface{}{\n\t\t\t\t\"source\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\"repo_url\":        \"https://kubernetes-sigs.github.io/descheduler\",\n\t\t\t\t\t\"chart\":           \"descheduler\",\n\t\t\t\t\t\"target_revision\": \"0.33.0\",\n\n\t\t\t\t\t\"helm\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\t\"release_name\": \"testing\",\n\t\t\t\t\t}},\n\t\t\t\t}},\n\t\t\t\t\"destination\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\"server\":    \"https://kubernetes.default.svc\",\n\t\t\t\t\t\"namespace\": \"default\",\n\t\t\t\t}},\n\t\t\t},\n\t\t},\n\t}\n\n\tv1 := map[string]interface{}{\n\t\t\"spec\": []interface{}{\n\t\t\tmap[string]interface{}{\n\t\t\t\t\"source\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\"repo_url\":        \"https://kubernetes-sigs.github.io/descheduler\",\n\t\t\t\t\t\"chart\":           \"descheduler\",\n\t\t\t\t\t\"target_revision\": \"0.33.0\",\n\n\t\t\t\t\t\"helm\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\t\"release_name\": \"testing\",\n\t\t\t\t\t\t\"skip_crds\":    false,\n\t\t\t\t\t}},\n\t\t\t\t}},\n\t\t\t\t\"destination\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\"server\":    \"https://kubernetes.default.svc\",\n\t\t\t\t\t\"namespace\": \"default\",\n\t\t\t\t}},\n\t\t\t},\n\t\t},\n\t}\n\n\tactual, _ := resourceArgoCDApplicationStateUpgradeV0(t.Context(), v0, nil)\n\n\tif !reflect.DeepEqual(v1, actual) {\n\t\tt.Fatalf(\"\\n\\nexpected:\\n\\n%#v\\n\\ngot:\\n\\n%#v\\n\\n\", v1, actual)\n\t}\n}\n\nfunc TestUpgradeSchemaApplication_V0V1_Default_SkipCrds_NoChange(t *testing.T) {\n\tt.Parallel()\n\n\tv0 := map[string]interface{}{\n\t\t\"spec\": []interface{}{\n\t\t\tmap[string]interface{}{\n\t\t\t\t\"source\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\"repo_url\":        \"https://kubernetes-sigs.github.io/descheduler\",\n\t\t\t\t\t\"chart\":           \"descheduler\",\n\t\t\t\t\t\"target_revision\": \"0.33.0\",\n\t\t\t\t}},\n\t\t\t\t\"destination\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\"server\":    \"https://kubernetes.default.svc\",\n\t\t\t\t\t\"namespace\": \"default\",\n\t\t\t\t}},\n\t\t\t},\n\t\t},\n\t}\n\n\tactual, _ := resourceArgoCDApplicationStateUpgradeV0(t.Context(), v0, nil)\n\n\tif !reflect.DeepEqual(v0, actual) {\n\t\tt.Fatalf(\"\\n\\nexpected:\\n\\n%#v\\n\\ngot:\\n\\n%#v\\n\\n\", v0, actual)\n\t}\n}\n\nfunc TestUpgradeSchemaApplication_V1V2_Default_NoChange(t *testing.T) {\n\tt.Parallel()\n\n\tv1 := map[string]interface{}{\n\t\t\"spec\": []interface{}{\n\t\t\tmap[string]interface{}{\n\t\t\t\t\"source\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\"repo_url\":        \"https://kubernetes-sigs.github.io/descheduler\",\n\t\t\t\t\t\"chart\":           \"descheduler\",\n\t\t\t\t\t\"target_revision\": \"0.33.0\",\n\n\t\t\t\t\t\"helm\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\t\"release_name\": \"testing\",\n\t\t\t\t\t\t\"skip_crds\":    false,\n\t\t\t\t\t}},\n\t\t\t\t}},\n\t\t\t\t\"destination\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\"server\":    \"https://kubernetes.default.svc\",\n\t\t\t\t\t\"namespace\": \"default\",\n\t\t\t\t}},\n\t\t\t},\n\t\t},\n\t}\n\n\tactual, _ := resourceArgoCDApplicationStateUpgradeV1(t.Context(), v1, nil)\n\n\tif !reflect.DeepEqual(v1, actual) {\n\t\tt.Fatalf(\"\\n\\nexpected:\\n\\n%#v\\n\\ngot:\\n\\n%#v\\n\\n\", v1, actual)\n\t}\n}\n\nfunc TestUpgradeSchemaApplication_V1V2_WithKsonnet(t *testing.T) {\n\tt.Parallel()\n\n\tv1 := map[string]interface{}{\n\t\t\"spec\": []interface{}{\n\t\t\tmap[string]interface{}{\n\t\t\t\t\"source\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\"repo_url\":        \"https://kubernetes-sigs.github.io/descheduler\",\n\t\t\t\t\t\"chart\":           \"descheduler\",\n\t\t\t\t\t\"target_revision\": \"0.33.0\",\n\n\t\t\t\t\t\"ksonnet\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\t\"destination\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\t\t\"namespace\": \"foo\",\n\t\t\t\t\t\t}},\n\t\t\t\t\t}},\n\t\t\t\t}},\n\t\t\t\t\"destination\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\"server\":    \"https://kubernetes.default.svc\",\n\t\t\t\t\t\"namespace\": \"default\",\n\t\t\t\t}},\n\t\t\t},\n\t\t},\n\t}\n\n\t_, err := resourceArgoCDApplicationStateUpgradeV1(t.Context(), v1, nil)\n\n\tif err == nil || !strings.Contains(err.Error(), \"'ksonnet' support has been removed\") {\n\t\tt.Fatalf(\"\\n\\nexpected error during state migration was not found - err returned was: %v\", err)\n\t}\n}\n\nfunc TestUpgradeSchemaApplication_V2V3_Default_NoChange(t *testing.T) {\n\tt.Parallel()\n\n\tv2 := map[string]interface{}{\n\t\t\"metadata\": []interface{}{\n\t\t\tmap[string]interface{}{\n\t\t\t\t\"name\":      \"test\",\n\t\t\t\t\"namespace\": \"argocd\",\n\t\t\t},\n\t\t},\n\t\t\"spec\": []interface{}{\n\t\t\tmap[string]interface{}{\n\t\t\t\t\"source\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\"repo_url\":        \"https://kubernetes-sigs.github.io/descheduler\",\n\t\t\t\t\t\"chart\":           \"descheduler\",\n\t\t\t\t\t\"target_revision\": \"0.33.0\",\n\n\t\t\t\t\t\"helm\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\t\"release_name\": \"testing\",\n\t\t\t\t\t\t\"skip_crds\":    false,\n\t\t\t\t\t}},\n\t\t\t\t}},\n\t\t\t\t\"destination\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\"server\":    \"https://kubernetes.default.svc\",\n\t\t\t\t\t\"namespace\": \"default\",\n\t\t\t\t}},\n\t\t\t},\n\t\t},\n\t}\n\n\tactual, _ := resourceArgoCDApplicationStateUpgradeV2(t.Context(), v2, nil)\n\n\tif !reflect.DeepEqual(v2, actual) {\n\t\tt.Fatalf(\"\\n\\nexpected:\\n\\n%#v\\n\\ngot:\\n\\n%#v\\n\\n\", v2, actual)\n\t}\n}\nfunc TestUpgradeSchemaApplication_V3V4(t *testing.T) {\n\tt.Parallel()\n\n\ttype stateUpgradeTestCases []struct {\n\t\tname          string\n\t\tsourceState   map[string]interface{}\n\t\texpectedState map[string]interface{}\n\t}\n\n\tcases := stateUpgradeTestCases{\n\t\t{\n\t\t\tname: \"no sync policy\",\n\t\t\tsourceState: map[string]interface{}{\n\t\t\t\t\"metadata\": []interface{}{\n\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\"name\":      \"test\",\n\t\t\t\t\t\t\"namespace\": \"argocd\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"spec\": []interface{}{\n\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\"source\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\t\t\"repo_url\":        \"https://kubernetes-sigs.github.io/descheduler\",\n\t\t\t\t\t\t\t\"chart\":           \"descheduler\",\n\t\t\t\t\t\t\t\"target_revision\": \"0.33.0\",\n\t\t\t\t\t\t}},\n\t\t\t\t\t\t\"destination\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\t\t\"server\":    \"https://kubernetes.default.svc\",\n\t\t\t\t\t\t\t\"namespace\": \"default\",\n\t\t\t\t\t\t}},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\texpectedState: map[string]interface{}{\n\t\t\t\t\"metadata\": []interface{}{\n\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\"name\":      \"test\",\n\t\t\t\t\t\t\"namespace\": \"argocd\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"spec\": []interface{}{\n\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\"source\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\t\t\"repo_url\":        \"https://kubernetes-sigs.github.io/descheduler\",\n\t\t\t\t\t\t\t\"chart\":           \"descheduler\",\n\t\t\t\t\t\t\t\"target_revision\": \"0.33.0\",\n\t\t\t\t\t\t}},\n\t\t\t\t\t\t\"destination\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\t\t\"server\":    \"https://kubernetes.default.svc\",\n\t\t\t\t\t\t\t\"namespace\": \"default\",\n\t\t\t\t\t\t}},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname: \"full sync policy\",\n\t\t\tsourceState: map[string]interface{}{\n\t\t\t\t\"metadata\": []interface{}{\n\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\"name\":      \"test\",\n\t\t\t\t\t\t\"namespace\": \"argocd\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"spec\": []interface{}{\n\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\"source\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\t\t\"repo_url\":        \"https://kubernetes-sigs.github.io/descheduler\",\n\t\t\t\t\t\t\t\"chart\":           \"descheduler\",\n\t\t\t\t\t\t\t\"target_revision\": \"0.33.0\",\n\t\t\t\t\t\t}},\n\t\t\t\t\t\t\"destination\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\t\t\"server\":    \"https://kubernetes.default.svc\",\n\t\t\t\t\t\t\t\"namespace\": \"default\",\n\t\t\t\t\t\t}},\n\t\t\t\t\t\t\"sync_policy\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\t\t\"automated\": map[string]interface{}{\n\t\t\t\t\t\t\t\t\"prune\":       true,\n\t\t\t\t\t\t\t\t\"self_heal\":   true,\n\t\t\t\t\t\t\t\t\"allow_empty\": true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"sync_options\": []string{\n\t\t\t\t\t\t\t\t\"Validate=false\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"retry\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\t\t\t\"limit\": \"5\",\n\t\t\t\t\t\t\t\t\"backoff\": map[string]interface{}{\n\t\t\t\t\t\t\t\t\t\"duration\":     \"30s\",\n\t\t\t\t\t\t\t\t\t\"max_duration\": \"2m\",\n\t\t\t\t\t\t\t\t\t\"factor\":       \"2\",\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t}},\n\t\t\t\t\t\t}},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\texpectedState: map[string]interface{}{\n\t\t\t\t\"metadata\": []interface{}{\n\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\"name\":      \"test\",\n\t\t\t\t\t\t\"namespace\": \"argocd\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"spec\": []interface{}{\n\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\"source\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\t\t\"repo_url\":        \"https://kubernetes-sigs.github.io/descheduler\",\n\t\t\t\t\t\t\t\"chart\":           \"descheduler\",\n\t\t\t\t\t\t\t\"target_revision\": \"0.33.0\",\n\t\t\t\t\t\t}},\n\t\t\t\t\t\t\"destination\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\t\t\"server\":    \"https://kubernetes.default.svc\",\n\t\t\t\t\t\t\t\"namespace\": \"default\",\n\t\t\t\t\t\t}},\n\t\t\t\t\t\t\"sync_policy\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\t\t\"automated\": []map[string]interface{}{\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\"prune\":       true,\n\t\t\t\t\t\t\t\t\t\"self_heal\":   true,\n\t\t\t\t\t\t\t\t\t\"allow_empty\": true,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"sync_options\": []string{\n\t\t\t\t\t\t\t\t\"Validate=false\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"retry\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\t\t\t\"limit\": \"5\",\n\t\t\t\t\t\t\t\t\"backoff\": []map[string]interface{}{\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\"duration\":     \"30s\",\n\t\t\t\t\t\t\t\t\t\t\"max_duration\": \"2m\",\n\t\t\t\t\t\t\t\t\t\t\"factor\":       \"2\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t}},\n\t\t\t\t\t\t}},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname: \"no automated block\",\n\t\t\tsourceState: map[string]interface{}{\n\t\t\t\t\"metadata\": []interface{}{\n\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\"name\":      \"test\",\n\t\t\t\t\t\t\"namespace\": \"argocd\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"spec\": []interface{}{\n\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\"source\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\t\t\"repo_url\":        \"https://kubernetes-sigs.github.io/descheduler\",\n\t\t\t\t\t\t\t\"chart\":           \"descheduler\",\n\t\t\t\t\t\t\t\"target_revision\": \"0.33.0\",\n\t\t\t\t\t\t}},\n\t\t\t\t\t\t\"destination\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\t\t\"server\":    \"https://kubernetes.default.svc\",\n\t\t\t\t\t\t\t\"namespace\": \"default\",\n\t\t\t\t\t\t}},\n\t\t\t\t\t\t\"sync_policy\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\t\t\"sync_options\": []string{\n\t\t\t\t\t\t\t\t\"Validate=false\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"retry\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\t\t\t\"limit\": \"5\",\n\t\t\t\t\t\t\t\t\"backoff\": map[string]interface{}{\n\t\t\t\t\t\t\t\t\t\"duration\":     \"30s\",\n\t\t\t\t\t\t\t\t\t\"max_duration\": \"2m\",\n\t\t\t\t\t\t\t\t\t\"factor\":       \"2\",\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t}},\n\t\t\t\t\t\t}},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\texpectedState: map[string]interface{}{\n\t\t\t\t\"metadata\": []interface{}{\n\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\"name\":      \"test\",\n\t\t\t\t\t\t\"namespace\": \"argocd\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"spec\": []interface{}{\n\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\"source\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\t\t\"repo_url\":        \"https://kubernetes-sigs.github.io/descheduler\",\n\t\t\t\t\t\t\t\"chart\":           \"descheduler\",\n\t\t\t\t\t\t\t\"target_revision\": \"0.33.0\",\n\t\t\t\t\t\t}},\n\t\t\t\t\t\t\"destination\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\t\t\"server\":    \"https://kubernetes.default.svc\",\n\t\t\t\t\t\t\t\"namespace\": \"default\",\n\t\t\t\t\t\t}},\n\t\t\t\t\t\t\"sync_policy\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\t\t\"sync_options\": []string{\n\t\t\t\t\t\t\t\t\"Validate=false\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"retry\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\t\t\t\"limit\": \"5\",\n\t\t\t\t\t\t\t\t\"backoff\": []map[string]interface{}{\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\"duration\":     \"30s\",\n\t\t\t\t\t\t\t\t\t\t\"max_duration\": \"2m\",\n\t\t\t\t\t\t\t\t\t\t\"factor\":       \"2\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t}},\n\t\t\t\t\t\t}},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname: \"blank automated block\",\n\t\t\tsourceState: map[string]interface{}{\n\t\t\t\t\"metadata\": []interface{}{\n\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\"name\":      \"test\",\n\t\t\t\t\t\t\"namespace\": \"argocd\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"spec\": []interface{}{\n\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\"source\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\t\t\"repo_url\":        \"https://kubernetes-sigs.github.io/descheduler\",\n\t\t\t\t\t\t\t\"chart\":           \"descheduler\",\n\t\t\t\t\t\t\t\"target_revision\": \"0.33.0\",\n\t\t\t\t\t\t}},\n\t\t\t\t\t\t\"destination\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\t\t\"server\":    \"https://kubernetes.default.svc\",\n\t\t\t\t\t\t\t\"namespace\": \"default\",\n\t\t\t\t\t\t}},\n\t\t\t\t\t\t\"sync_policy\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\t\t\"automated\": map[string]interface{}{},\n\t\t\t\t\t\t\t\"sync_options\": []string{\n\t\t\t\t\t\t\t\t\"Validate=false\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"retry\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\t\t\t\"limit\": \"5\",\n\t\t\t\t\t\t\t\t\"backoff\": map[string]interface{}{\n\t\t\t\t\t\t\t\t\t\"duration\":     \"30s\",\n\t\t\t\t\t\t\t\t\t\"max_duration\": \"2m\",\n\t\t\t\t\t\t\t\t\t\"factor\":       \"2\",\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t}},\n\t\t\t\t\t\t}},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\texpectedState: map[string]interface{}{\n\t\t\t\t\"metadata\": []interface{}{\n\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\"name\":      \"test\",\n\t\t\t\t\t\t\"namespace\": \"argocd\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"spec\": []interface{}{\n\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\"source\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\t\t\"repo_url\":        \"https://kubernetes-sigs.github.io/descheduler\",\n\t\t\t\t\t\t\t\"chart\":           \"descheduler\",\n\t\t\t\t\t\t\t\"target_revision\": \"0.33.0\",\n\t\t\t\t\t\t}},\n\t\t\t\t\t\t\"destination\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\t\t\"server\":    \"https://kubernetes.default.svc\",\n\t\t\t\t\t\t\t\"namespace\": \"default\",\n\t\t\t\t\t\t}},\n\t\t\t\t\t\t\"sync_policy\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\t\t\"automated\": []map[string]interface{}{{}},\n\t\t\t\t\t\t\t\"sync_options\": []string{\n\t\t\t\t\t\t\t\t\"Validate=false\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"retry\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\t\t\t\"limit\": \"5\",\n\t\t\t\t\t\t\t\t\"backoff\": []map[string]interface{}{\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\"duration\":     \"30s\",\n\t\t\t\t\t\t\t\t\t\t\"max_duration\": \"2m\",\n\t\t\t\t\t\t\t\t\t\t\"factor\":       \"2\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t}},\n\t\t\t\t\t\t}},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname: \"no backoff\",\n\t\t\tsourceState: map[string]interface{}{\n\t\t\t\t\"metadata\": []interface{}{\n\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\"name\":      \"test\",\n\t\t\t\t\t\t\"namespace\": \"argocd\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"spec\": []interface{}{\n\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\"source\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\t\t\"repo_url\":        \"https://kubernetes-sigs.github.io/descheduler\",\n\t\t\t\t\t\t\t\"chart\":           \"descheduler\",\n\t\t\t\t\t\t\t\"target_revision\": \"0.33.0\",\n\t\t\t\t\t\t}},\n\t\t\t\t\t\t\"destination\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\t\t\"server\":    \"https://kubernetes.default.svc\",\n\t\t\t\t\t\t\t\"namespace\": \"default\",\n\t\t\t\t\t\t}},\n\t\t\t\t\t\t\"sync_policy\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\t\t\"automated\": map[string]interface{}{\n\t\t\t\t\t\t\t\t\"prune\":       true,\n\t\t\t\t\t\t\t\t\"self_heal\":   true,\n\t\t\t\t\t\t\t\t\"allow_empty\": true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"sync_options\": []string{\n\t\t\t\t\t\t\t\t\"Validate=false\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"retry\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\t\t\t\"limit\": \"5\",\n\t\t\t\t\t\t\t}},\n\t\t\t\t\t\t}},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\texpectedState: map[string]interface{}{\n\t\t\t\t\"metadata\": []interface{}{\n\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\"name\":      \"test\",\n\t\t\t\t\t\t\"namespace\": \"argocd\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"spec\": []interface{}{\n\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\"source\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\t\t\"repo_url\":        \"https://kubernetes-sigs.github.io/descheduler\",\n\t\t\t\t\t\t\t\"chart\":           \"descheduler\",\n\t\t\t\t\t\t\t\"target_revision\": \"0.33.0\",\n\t\t\t\t\t\t}},\n\t\t\t\t\t\t\"destination\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\t\t\"server\":    \"https://kubernetes.default.svc\",\n\t\t\t\t\t\t\t\"namespace\": \"default\",\n\t\t\t\t\t\t}},\n\t\t\t\t\t\t\"sync_policy\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\t\t\"automated\": []map[string]interface{}{\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\"prune\":       true,\n\t\t\t\t\t\t\t\t\t\"self_heal\":   true,\n\t\t\t\t\t\t\t\t\t\"allow_empty\": true,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"sync_options\": []string{\n\t\t\t\t\t\t\t\t\"Validate=false\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"retry\": []interface{}{map[string]interface{}{\n\t\t\t\t\t\t\t\t\"limit\": \"5\",\n\t\t\t\t\t\t\t}},\n\t\t\t\t\t\t}},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}\n\n\tfor _, tc := range cases {\n\t\tt.Run(tc.name, func(t *testing.T) {\n\t\t\tt.Parallel()\n\n\t\t\tactualState, err := resourceArgoCDApplicationStateUpgradeV3(t.Context(), tc.sourceState, nil)\n\t\t\tif err != nil {\n\t\t\t\tt.Fatalf(\"error migrating state: %s\", err)\n\t\t\t}\n\n\t\t\tif !reflect.DeepEqual(actualState, tc.expectedState) {\n\t\t\t\tt.Fatalf(\"\\n\\nexpected:\\n\\n%#v\\n\\ngot:\\n\\n%#v\\n\\n\", tc.expectedState, actualState)\n\t\t\t}\n\t\t})\n\t}\n}\n"
  },
  {
    "path": "argocd/schema_cluster.go",
    "content": "package argocd\n\nimport (\n\t\"strings\"\n\n\t\"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema\"\n)\n\nfunc clusterSchema() map[string]*schema.Schema {\n\treturn map[string]*schema.Schema{\n\t\t\"name\": {\n\t\t\tType:        schema.TypeString,\n\t\t\tDescription: \"Name of the cluster. If omitted, will use the server address.\",\n\t\t\tOptional:    true,\n\t\t\tDiffSuppressFunc: func(k, oldValue, newValue string, d *schema.ResourceData) bool {\n\t\t\t\tif k == \"name\" {\n\t\t\t\t\tname, nameOk := d.GetOk(\"name\")\n\t\t\t\t\tserver, serverOk := d.GetOk(\"server\")\n\t\t\t\t\t// Actual value is same as 'server' but not explicitly set\n\t\t\t\t\tif nameOk && serverOk && name == server && oldValue == server && newValue == \"\" {\n\t\t\t\t\t\treturn true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn false\n\t\t\t},\n\t\t},\n\t\t\"server\": {\n\t\t\tType:        schema.TypeString,\n\t\t\tDescription: \"Server is the API server URL of the Kubernetes cluster.\",\n\t\t\tOptional:    true,\n\t\t\tForceNew:    true,\n\t\t\tDiffSuppressFunc: func(k, oldValue, newValue string, d *schema.ResourceData) bool {\n\t\t\t\treturn oldValue == strings.TrimRight(newValue, \"/\")\n\t\t\t},\n\t\t},\n\t\t\"shard\": {\n\t\t\tType:        schema.TypeString,\n\t\t\tDescription: \"Optional shard number. Calculated on the fly by the application controller if not specified.\",\n\t\t\tOptional:    true,\n\t\t},\n\t\t\"namespaces\": {\n\t\t\tType:        schema.TypeList,\n\t\t\tDescription: \"List of namespaces which are accessible in that cluster. Cluster level resources would be ignored if namespace list is not empty.\",\n\t\t\tOptional:    true,\n\t\t\tElem: &schema.Schema{\n\t\t\t\tType: schema.TypeString,\n\t\t\t},\n\t\t},\n\t\t\"config\": {\n\t\t\tType:        schema.TypeList,\n\t\t\tDescription: \"Cluster information for connecting to a cluster.\",\n\t\t\tRequired:    true,\n\t\t\tMinItems:    1,\n\t\t\tMaxItems:    1,\n\t\t\tElem: &schema.Resource{\n\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\"aws_auth_config\": {\n\t\t\t\t\t\tType:     schema.TypeList,\n\t\t\t\t\t\tOptional: true,\n\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\"cluster_name\": {\n\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\tDescription: \"AWS cluster name.\",\n\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"role_arn\": {\n\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\tDescription: \"IAM role ARN. If set then AWS IAM Authenticator assume a role to perform cluster operations instead of the default AWS credential provider chain.\",\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t\"bearer_token\": {\n\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\tDescription: \"Server requires Bearer authentication. The client will not attempt to use refresh tokens for an OAuth2 flow.\",\n\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\tSensitive:   true,\n\t\t\t\t\t},\n\t\t\t\t\t\"exec_provider_config\": {\n\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\t\tDescription: \"Configuration for an exec provider used to call an external command to perform cluster authentication See: https://godoc.org/k8s.io/client-go/tools/clientcmd/api#ExecConfig.\",\n\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\"api_version\": {\n\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\tDescription: \"Preferred input version of the ExecInfo\",\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"args\": {\n\t\t\t\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\tDescription: \"Arguments to pass to the command when executing it\",\n\t\t\t\t\t\t\t\t\tSensitive:   true,\n\t\t\t\t\t\t\t\t\tElem: &schema.Schema{\n\t\t\t\t\t\t\t\t\t\tType: schema.TypeString,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"command\": {\n\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\tDescription: \"Command to execute\",\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"env\": {\n\t\t\t\t\t\t\t\t\tType:        schema.TypeMap,\n\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\tDescription: \"Env defines additional environment variables to expose to the process. Passed as a map of strings\",\n\t\t\t\t\t\t\t\t\tSensitive:   true,\n\t\t\t\t\t\t\t\t\tElem: &schema.Schema{\n\t\t\t\t\t\t\t\t\t\tType: schema.TypeString,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"install_hint\": {\n\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\tDescription: \"This text is shown to the user when the executable doesn't seem to be present\",\n\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t\"tls_client_config\": {\n\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\tDescription: \"Settings to enable transport layer security when connecting to the cluster.\",\n\t\t\t\t\t\tMaxItems:    1,\n\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\"ca_data\": {\n\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\tDescription: \"PEM-encoded bytes (typically read from a root certificates bundle).\",\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"cert_data\": {\n\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\tDescription: \"PEM-encoded bytes (typically read from a client certificate file).\",\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"insecure\": {\n\t\t\t\t\t\t\t\t\tType:        schema.TypeBool,\n\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\tDescription: \"Whether server should be accessed without verifying the TLS certificate.\",\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"key_data\": {\n\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\tSensitive:   true,\n\t\t\t\t\t\t\t\t\tDescription: \"PEM-encoded bytes (typically read from a client certificate key file).\",\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"server_name\": {\n\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\tDescription: \"Name to pass to the server for SNI and used in the client to check server certificates against. If empty, the hostname used to contact the server is used.\",\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t\"username\": {\n\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\tDescription: \"Username for servers that require Basic authentication.\",\n\t\t\t\t\t},\n\t\t\t\t\t\"password\": {\n\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\tDescription: \"Password for servers that require Basic authentication.\",\n\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\tSensitive:   true,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t\"info\": {\n\t\t\tType:        schema.TypeList,\n\t\t\tDescription: \"Information about cluster cache and state.\",\n\t\t\tComputed:    true,\n\t\t\tElem: &schema.Resource{\n\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\"server_version\": {\n\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\tDescription: \"Kubernetes version of the cluster.\",\n\t\t\t\t\t\tComputed:    true,\n\t\t\t\t\t},\n\t\t\t\t\t\"applications_count\": {\n\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\tDescription: \"Number of applications managed by Argo CD on the cluster.\",\n\t\t\t\t\t\tComputed:    true,\n\t\t\t\t\t},\n\t\t\t\t\t\"connection_state\": {\n\t\t\t\t\t\tType:        schema.TypeList,\n\t\t\t\t\t\tDescription: \"Information about the connection to the cluster.\",\n\t\t\t\t\t\tComputed:    true,\n\t\t\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\t\t\"message\": {\n\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\tDescription: \"Human readable information about the connection status.\",\n\t\t\t\t\t\t\t\t\tComputed:    true,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"status\": {\n\t\t\t\t\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\t\t\t\t\tDescription: \"Current status indicator for the connection.\",\n\t\t\t\t\t\t\t\t\tComputed:    true,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t\"metadata\": {\n\t\t\tType:        schema.TypeList,\n\t\t\tDescription: \"Standard cluster secret's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata\",\n\t\t\tOptional:    true,\n\t\t\tMaxItems:    2,\n\t\t\tElem: &schema.Resource{\n\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\"annotations\": {\n\t\t\t\t\t\tType:         schema.TypeMap,\n\t\t\t\t\t\tDescription:  \"An unstructured key value map stored with the cluster secret that may be used to store arbitrary metadata. More info: http://kubernetes.io/docs/user-guide/annotations\",\n\t\t\t\t\t\tOptional:     true,\n\t\t\t\t\t\tElem:         &schema.Schema{Type: schema.TypeString},\n\t\t\t\t\t\tValidateFunc: validateMetadataAnnotations,\n\t\t\t\t\t},\n\t\t\t\t\t\"labels\": {\n\t\t\t\t\t\tType:         schema.TypeMap,\n\t\t\t\t\t\tDescription:  \"Map of string keys and values that can be used to organize and categorize (scope and select) the cluster secret. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels\",\n\t\t\t\t\t\tOptional:     true,\n\t\t\t\t\t\tElem:         &schema.Schema{Type: schema.TypeString},\n\t\t\t\t\t\tValidateFunc: validateMetadataLabels(false),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t\"project\": {\n\t\t\tType:        schema.TypeString,\n\t\t\tDescription: \"Reference between project and cluster that allow you automatically to be added as item inside Destinations project entity. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/projects/#project-scoped-repositories-and-clusters.\",\n\t\t\tOptional:    true,\n\t\t},\n\t}\n}\n"
  },
  {
    "path": "argocd/schema_label_selector.go",
    "content": "package argocd\n\nimport \"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema\"\n\nfunc labelSelectorSchema() map[string]*schema.Schema {\n\treturn map[string]*schema.Schema{\n\t\t\"match_expressions\": matchExpressionsSchema(),\n\t\t\"match_labels\": {\n\t\t\tType:        schema.TypeMap,\n\t\t\tDescription: \"A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is \\\"key\\\", the operator is \\\"In\\\", and the values array contains only \\\"value\\\". The requirements are ANDed.\",\n\t\t\tOptional:    true,\n\t\t},\n\t}\n}\n\nfunc matchExpressionsSchema() *schema.Schema {\n\treturn &schema.Schema{\n\t\tType:        schema.TypeList,\n\t\tDescription: \"A list of label selector requirements. The requirements are ANDed.\",\n\t\tOptional:    true,\n\t\tElem: &schema.Resource{\n\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\"key\": {\n\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\tDescription: \"The label key that the selector applies to.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t},\n\t\t\t\t\"operator\": {\n\t\t\t\t\tType:        schema.TypeString,\n\t\t\t\t\tDescription: \"A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t},\n\t\t\t\t\"values\": {\n\t\t\t\t\tType:        schema.TypeSet,\n\t\t\t\t\tDescription: \"An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch.\",\n\t\t\t\t\tOptional:    true,\n\t\t\t\t\tElem:        &schema.Schema{Type: schema.TypeString},\n\t\t\t\t\tSet:         schema.HashString,\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}\n}\n"
  },
  {
    "path": "argocd/schema_metadata.go",
    "content": "package argocd\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema\"\n)\n\nfunc metadataSchema(name string) *schema.Schema {\n\treturn &schema.Schema{\n\t\tType:        schema.TypeList,\n\t\tDescription: \"Standard Kubernetes object metadata. For more info see the [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata).\",\n\t\tRequired:    true,\n\t\tMaxItems:    1,\n\t\tElem: &schema.Resource{\n\t\t\tSchema: metadataFields(name),\n\t\t},\n\t}\n}\n\nfunc metadataFields(objectName string) map[string]*schema.Schema {\n\treturn map[string]*schema.Schema{\n\t\t\"annotations\": {\n\t\t\tType:         schema.TypeMap,\n\t\t\tDescription:  fmt.Sprintf(\"An unstructured key value map stored with the %s that may be used to store arbitrary metadata. More info: http://kubernetes.io/docs/user-guide/annotations\", objectName),\n\t\t\tOptional:     true,\n\t\t\tElem:         &schema.Schema{Type: schema.TypeString},\n\t\t\tValidateFunc: validateMetadataAnnotations,\n\t\t},\n\t\t\"generation\": {\n\t\t\tType:        schema.TypeInt,\n\t\t\tDescription: \"A sequence number representing a specific generation of the desired state.\",\n\t\t\tComputed:    true,\n\t\t},\n\t\t\"labels\": {\n\t\t\tType:         schema.TypeMap,\n\t\t\tDescription:  fmt.Sprintf(\"Map of string keys and values that can be used to organize and categorize (scope and select) the %s. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels\", objectName),\n\t\t\tOptional:     true,\n\t\t\tElem:         &schema.Schema{Type: schema.TypeString},\n\t\t\tValidateFunc: validateMetadataLabels(false),\n\t\t},\n\t\t\"name\": {\n\t\t\tType:         schema.TypeString,\n\t\t\tDescription:  fmt.Sprintf(\"Name of the %s, must be unique. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names\", objectName),\n\t\t\tOptional:     true,\n\t\t\tForceNew:     true,\n\t\t\tComputed:     true,\n\t\t\tValidateFunc: validateMetadataName,\n\t\t},\n\t\t\"namespace\": {\n\t\t\tType:         schema.TypeString,\n\t\t\tDescription:  fmt.Sprintf(\"Namespace of the %s, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/\", objectName),\n\t\t\tOptional:     true,\n\t\t\tForceNew:     true,\n\t\t\tComputed:     true,\n\t\t\tValidateFunc: validateMetadataName,\n\t\t},\n\t\t\"resource_version\": {\n\t\t\tType:        schema.TypeString,\n\t\t\tDescription: fmt.Sprintf(\"An opaque value that represents the internal version of this %s that can be used by clients to determine when %s has changed. Read more: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency\", objectName, objectName),\n\t\t\tComputed:    true,\n\t\t},\n\t\t\"uid\": {\n\t\t\tType:        schema.TypeString,\n\t\t\tDescription: fmt.Sprintf(\"The unique in time and space value for this %s. More info: http://kubernetes.io/docs/user-guide/identifiers#uids\", objectName),\n\t\t\tComputed:    true,\n\t\t},\n\t}\n}\n"
  },
  {
    "path": "argocd/server_interface.go",
    "content": "package argocd\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"os\"\n\t\"strconv\"\n\t\"sync\"\n\n\t\"github.com/Masterminds/semver/v3\"\n\t\"github.com/argoproj-labs/terraform-provider-argocd/internal/diagnostics\"\n\t\"github.com/argoproj-labs/terraform-provider-argocd/internal/features\"\n\t\"github.com/argoproj/argo-cd/v3/pkg/apiclient\"\n\t\"github.com/argoproj/argo-cd/v3/pkg/apiclient/account\"\n\t\"github.com/argoproj/argo-cd/v3/pkg/apiclient/application\"\n\t\"github.com/argoproj/argo-cd/v3/pkg/apiclient/applicationset\"\n\t\"github.com/argoproj/argo-cd/v3/pkg/apiclient/certificate\"\n\t\"github.com/argoproj/argo-cd/v3/pkg/apiclient/cluster\"\n\t\"github.com/argoproj/argo-cd/v3/pkg/apiclient/gpgkey\"\n\t\"github.com/argoproj/argo-cd/v3/pkg/apiclient/project\"\n\t\"github.com/argoproj/argo-cd/v3/pkg/apiclient/repocreds\"\n\t\"github.com/argoproj/argo-cd/v3/pkg/apiclient/repository\"\n\t\"github.com/argoproj/argo-cd/v3/pkg/apiclient/session\"\n\t\"github.com/argoproj/argo-cd/v3/pkg/apiclient/version\"\n\t\"github.com/argoproj/argo-cd/v3/util/io\"\n\t\"github.com/hashicorp/terraform-plugin-framework/diag\"\n\t\"github.com/hashicorp/terraform-plugin-framework/types\"\n\t\"github.com/hashicorp/terraform-plugin-log/tflog\"\n\t\"google.golang.org/protobuf/types/known/emptypb\"\n\t\"k8s.io/apimachinery/pkg/util/runtime\"\n)\n\nvar runtimeErrorHandlers []runtime.ErrorHandler\n\ntype ServerInterface struct {\n\tAccountClient        account.AccountServiceClient\n\tApiClient            apiclient.Client\n\tApplicationClient    application.ApplicationServiceClient\n\tApplicationSetClient applicationset.ApplicationSetServiceClient\n\tCertificateClient    certificate.CertificateServiceClient\n\tClusterClient        cluster.ClusterServiceClient\n\tGPGKeysClient        gpgkey.GPGKeyServiceClient\n\tProjectClient        project.ProjectServiceClient\n\tRepoCredsClient      repocreds.RepoCredsServiceClient\n\tRepositoryClient     repository.RepositoryServiceClient\n\tSessionClient        session.SessionServiceClient\n\n\tServerVersion        *semver.Version\n\tServerVersionMessage *version.VersionMessage\n\n\tconfig      ArgoCDProviderConfig\n\tinitialized bool\n\tsync.RWMutex\n}\n\nfunc NewServerInterface(c ArgoCDProviderConfig) *ServerInterface {\n\treturn &ServerInterface{\n\t\tconfig: c,\n\t}\n}\n\nfunc (si *ServerInterface) InitClients(ctx context.Context) diag.Diagnostics {\n\tsi.Lock()\n\tdefer si.Unlock()\n\n\tif si.initialized {\n\t\treturn nil\n\t}\n\n\topts, d := si.config.getApiClientOptions(ctx)\n\tif d.HasError() {\n\t\treturn d\n\t}\n\n\tac, err := apiclient.NewClient(opts)\n\tif err != nil {\n\t\treturn diagnostics.Error(\"failed to create new API client\", err)\n\t}\n\n\tvar diags diag.Diagnostics\n\n\t_, si.AccountClient, err = ac.NewAccountClient()\n\tif err != nil {\n\t\tdiags.Append(diagnostics.Error(\"failed to initialize account client\", err)...)\n\t}\n\n\t_, si.ApplicationClient, err = ac.NewApplicationClient()\n\tif err != nil {\n\t\tdiags.Append(diagnostics.Error(\"failed to initialize application client\", err)...)\n\t}\n\n\t_, si.ApplicationSetClient, err = ac.NewApplicationSetClient()\n\tif err != nil {\n\t\tdiags.Append(diagnostics.Error(\"failed to initialize application set client\", err)...)\n\t}\n\n\t_, si.CertificateClient, err = ac.NewCertClient()\n\tif err != nil {\n\t\tdiags.Append(diagnostics.Error(\"failed to initialize certificate client\", err)...)\n\t}\n\n\t_, si.ClusterClient, err = ac.NewClusterClient()\n\tif err != nil {\n\t\tdiags.Append(diagnostics.Error(\"failed to initialize cluster client\", err)...)\n\t}\n\n\t_, si.GPGKeysClient, err = ac.NewGPGKeyClient()\n\tif err != nil {\n\t\tdiags.Append(diagnostics.Error(\"failed to initialize GPG keys client\", err)...)\n\t}\n\n\t_, si.ProjectClient, err = ac.NewProjectClient()\n\tif err != nil {\n\t\tdiags.Append(diagnostics.Error(\"failed to initialize project client\", err)...)\n\t}\n\n\t_, si.RepositoryClient, err = ac.NewRepoClient()\n\tif err != nil {\n\t\tdiags.Append(diagnostics.Error(\"failed to initialize repository client\", err)...)\n\t}\n\n\t_, si.RepoCredsClient, err = ac.NewRepoCredsClient()\n\tif err != nil {\n\t\tdiags.Append(diagnostics.Error(\"failed to initialize repository credentials client\", err)...)\n\t}\n\n\t_, si.SessionClient, err = ac.NewSessionClient()\n\tif err != nil {\n\t\tdiags.Append(diagnostics.Error(\"failed to initialize session client\", err)...)\n\t}\n\n\tacCloser, versionClient, err := ac.NewVersionClient()\n\tif err != nil {\n\t\tdiags.Append(diagnostics.Error(\"failed to initialize version client\", err)...)\n\t} else {\n\t\tdefer io.Close(acCloser)\n\n\t\tserverVersionMessage, err := versionClient.Version(ctx, &emptypb.Empty{})\n\t\tif err != nil {\n\t\t\treturn diagnostics.Error(\"failed to read server version\", err)\n\t\t}\n\n\t\tif serverVersionMessage == nil {\n\t\t\treturn diagnostics.Error(\"could not get server version information\", nil)\n\t\t}\n\n\t\tsi.ServerVersionMessage = serverVersionMessage\n\n\t\tserverVersion, err := semver.NewVersion(serverVersionMessage.Version)\n\t\tif err != nil {\n\t\t\tdiags.Append(diagnostics.Error(fmt.Sprintf(\"could not parse server semantic version: %s\", serverVersionMessage.Version), nil)...)\n\t\t}\n\n\t\tsi.ServerVersion = serverVersion\n\t}\n\n\tsi.initialized = !diags.HasError()\n\n\treturn diags\n}\n\n// Checks that a specific feature is available for the current ArgoCD server version.\n// 'feature' argument must match one of the predefined feature* constants.\nfunc (si *ServerInterface) IsFeatureSupported(feature features.Feature) bool {\n\tfc, ok := features.ConstraintsMap[feature]\n\n\tif fc.MinVersion == nil {\n\t\treturn true\n\t}\n\n\treturn ok && fc.MinVersion.Compare(si.ServerVersion) != 1\n}\n\nfunc getDefaultString(s types.String, envKey string) string {\n\tif !s.IsNull() && !s.IsUnknown() {\n\t\treturn s.ValueString()\n\t}\n\n\treturn os.Getenv(envKey)\n}\n\nfunc getDefaultBool(ctx context.Context, b types.Bool, envKey string) bool {\n\tif !b.IsNull() && !b.IsUnknown() {\n\t\treturn b.ValueBool()\n\t}\n\n\tenv, ok := os.LookupEnv(envKey)\n\tif !ok {\n\t\treturn false\n\t}\n\n\tpb, err := strconv.ParseBool(env)\n\tif err == nil {\n\t\treturn pb\n\t}\n\n\ttflog.Warn(ctx, fmt.Sprintf(\"failed to parse env var %s with value %s as bool. Will default to `false`.\", envKey, env))\n\n\treturn false\n}\n"
  },
  {
    "path": "argocd/server_interface_test.go",
    "content": "package argocd\n\nimport (\n\t\"fmt\"\n\t\"testing\"\n\n\t\"github.com/Masterminds/semver/v3\"\n\t\"github.com/argoproj-labs/terraform-provider-argocd/internal/features\"\n\t\"github.com/argoproj/argo-cd/v3/pkg/apiclient/version\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nconst (\n\tsemverEquals = iota\n\tsemverGreater\n\tsemverLess\n)\n\nfunc serverInterfaceTestData(t *testing.T, argocdVersion string, semverOperator int) *ServerInterface {\n\tv, err := semver.NewVersion(argocdVersion)\n\trequire.NoError(t, err)\n\trequire.True(t, v.Major() >= 1)\n\n\tswitch semverOperator {\n\tcase semverEquals:\n\tcase semverGreater:\n\t\tinc := v.IncMajor()\n\t\tv = &inc\n\n\t\tassert.NoError(t, err)\n\tcase semverLess:\n\t\tv, err = semver.NewVersion(\n\t\t\tfmt.Sprintf(\"%d.%d.%d\",\n\t\t\t\tv.Major()-1,\n\t\t\t\tv.Minor(),\n\t\t\t\tv.Patch(),\n\t\t\t))\n\t\tassert.NoError(t, err)\n\tdefault:\n\t\tt.Error(\"unsupported semver test semverOperator\")\n\t}\n\n\tvm := &version.VersionMessage{\n\t\tVersion: v.String(),\n\t}\n\n\treturn &ServerInterface{\n\t\tServerVersion:        v,\n\t\tServerVersionMessage: vm,\n\t}\n}\n\nfunc TestServerInterface_isFeatureSupported(t *testing.T) {\n\tt.Parallel()\n\n\ttype args struct {\n\t\tfeature features.Feature\n\t}\n\n\ttests := []struct {\n\t\tname string\n\t\tsi   *ServerInterface\n\t\targs args\n\t\twant bool\n\t}{\n\t\t{\n\t\t\tname: \"featureExecLogsPolicy-2.7.2\",\n\t\t\tsi:   serverInterfaceTestData(t, \"2.7.2\", semverEquals),\n\t\t\targs: args{feature: features.ExecLogsPolicy},\n\t\t\twant: true,\n\t\t},\n\t\t{\n\t\t\tname: \"featureExecLogsPolicy-2.7.2+\",\n\t\t\tsi:   serverInterfaceTestData(t, \"2.7.2\", semverGreater),\n\t\t\targs: args{feature: features.ExecLogsPolicy},\n\t\t\twant: true,\n\t\t},\n\t\t{\n\t\t\tname: \"featureExecLogsPolicy-2.7.2-\",\n\t\t\tsi:   serverInterfaceTestData(t, \"2.7.2\", semverLess),\n\t\t\targs: args{feature: features.ExecLogsPolicy},\n\t\t\twant: false,\n\t\t},\n\t}\n\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\tt.Parallel()\n\n\t\t\tgot := tt.si.IsFeatureSupported(tt.args.feature)\n\n\t\t\tif got != tt.want {\n\t\t\t\tt.Errorf(\"isFeatureSupported() got = %v, want %v, version %s\",\n\t\t\t\t\tgot,\n\t\t\t\t\ttt.want,\n\t\t\t\t\ttt.si.ServerVersion.String(),\n\t\t\t\t)\n\t\t\t}\n\t\t})\n\t}\n}\n"
  },
  {
    "path": "argocd/structure_application.go",
    "content": "package argocd\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/argoproj-labs/terraform-provider-argocd/internal/features\"\n\tapplication \"github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1\"\n\t\"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema\"\n\tmeta \"k8s.io/apimachinery/pkg/apis/meta/v1\"\n)\n\n// Expand\n\nfunc expandApplication(d *schema.ResourceData, featureApplicationSourceNameSupported bool) (metadata meta.ObjectMeta, spec application.ApplicationSpec, err error) {\n\tmetadata = expandMetadata(d)\n\tspec, err = expandApplicationSpec(d.Get(\"spec.0\").(map[string]interface{}), featureApplicationSourceNameSupported)\n\n\treturn\n}\n\nfunc expandApplicationSpec(s map[string]interface{}, featureApplicationSourceNameSupported bool) (spec application.ApplicationSpec, err error) {\n\tif v, ok := s[\"project\"]; ok {\n\t\tspec.Project = v.(string)\n\t}\n\n\tif v, ok := s[\"revision_history_limit\"]; ok {\n\t\tpv := int64(v.(int))\n\t\tspec.RevisionHistoryLimit = &pv\n\t}\n\n\tif v, ok := s[\"info\"]; ok {\n\t\tspec.Info, err = expandApplicationInfo(v.(*schema.Set))\n\t\tif err != nil {\n\t\t\treturn spec, err\n\t\t}\n\t}\n\n\tif v, ok := s[\"ignore_difference\"]; ok {\n\t\tspec.IgnoreDifferences = expandApplicationIgnoreDifferences(v.([]interface{}))\n\t}\n\n\tif v, ok := s[\"sync_policy\"].([]interface{}); ok && len(v) > 0 {\n\t\tspec.SyncPolicy, err = expandApplicationSyncPolicy(v[0])\n\t\tif err != nil {\n\t\t\treturn spec, err\n\t\t}\n\t}\n\n\tif v, ok := s[\"destination\"]; ok {\n\t\tspec.Destination = expandApplicationDestination(v.(*schema.Set).List()[0])\n\t}\n\n\tif v, ok := s[\"source\"].([]interface{}); ok && len(v) > 0 {\n\t\tspec.Sources, err = expandApplicationSource(v, featureApplicationSourceNameSupported)\n\t\tif err != nil {\n\t\t\treturn spec, err\n\t\t}\n\t}\n\n\treturn spec, nil\n}\n\nfunc expandApplicationSource(_ass []interface{}, featureApplicationSourceNameSupported bool) (ass []application.ApplicationSource, err error) {\n\tass = make([]application.ApplicationSource, len(_ass))\n\n\tfor i, v := range _ass {\n\t\tas := v.(map[string]interface{})\n\t\ts := application.ApplicationSource{}\n\n\t\tif v, ok := as[\"repo_url\"]; ok {\n\t\t\ts.RepoURL = v.(string)\n\t\t}\n\n\t\tif v, ok := as[\"path\"]; ok {\n\t\t\ts.Path = v.(string)\n\t\t}\n\n\t\tif v, ok := as[\"ref\"]; ok {\n\t\t\ts.Ref = v.(string)\n\t\t}\n\n\t\tif v, ok := as[\"name\"]; ok && v.(string) != \"\" {\n\t\t\tif !featureApplicationSourceNameSupported {\n\t\t\t\tf := features.ConstraintsMap[features.ApplicationSourceName]\n\t\t\t\terr = fmt.Errorf(\"%s is only supported from ArgoCD %s onwards\", f.Name, f.MinVersion.String())\n\n\t\t\t\treturn ass, err\n\t\t\t}\n\n\t\t\ts.Name = v.(string)\n\t\t}\n\n\t\tif v, ok := as[\"target_revision\"]; ok {\n\t\t\ts.TargetRevision = v.(string)\n\t\t}\n\n\t\tif v, ok := as[\"chart\"]; ok {\n\t\t\ts.Chart = v.(string)\n\t\t}\n\n\t\tif v, ok := as[\"helm\"]; ok {\n\t\t\ts.Helm = expandApplicationSourceHelm(v.([]interface{}))\n\t\t}\n\n\t\tif v, ok := as[\"kustomize\"]; ok {\n\t\t\ts.Kustomize = expandApplicationSourceKustomize(v.([]interface{}))\n\t\t}\n\n\t\tif v, ok := as[\"directory\"].([]interface{}); ok && len(v) > 0 {\n\t\t\ts.Directory = expandApplicationSourceDirectory(v[0])\n\t\t}\n\n\t\tif v, ok := as[\"plugin\"]; ok {\n\t\t\ts.Plugin = expandApplicationSourcePlugin(v.([]interface{}))\n\t\t}\n\n\t\tass[i] = s\n\t}\n\n\treturn ass, err\n}\n\nfunc expandApplicationSourcePlugin(in []interface{}) *application.ApplicationSourcePlugin {\n\tif len(in) == 0 {\n\t\treturn nil\n\t}\n\n\tresult := &application.ApplicationSourcePlugin{}\n\n\ta := in[0].(map[string]interface{})\n\tif v, ok := a[\"name\"]; ok {\n\t\tresult.Name = v.(string)\n\t}\n\n\tif env, ok := a[\"env\"]; ok {\n\t\tfor _, v := range env.(*schema.Set).List() {\n\t\t\tresult.Env = append(result.Env, &application.EnvEntry{\n\t\t\t\tName:  v.(map[string]interface{})[\"name\"].(string),\n\t\t\t\tValue: v.(map[string]interface{})[\"value\"].(string),\n\t\t\t})\n\t\t}\n\t}\n\n\treturn result\n}\n\nfunc expandApplicationSourceDirectory(in interface{}) *application.ApplicationSourceDirectory {\n\tresult := &application.ApplicationSourceDirectory{}\n\n\tif in == nil {\n\t\treturn result\n\t}\n\n\ta := in.(map[string]interface{})\n\tif v, ok := a[\"recurse\"]; ok {\n\t\tresult.Recurse = v.(bool)\n\t}\n\n\tif v, ok := a[\"exclude\"]; ok {\n\t\tresult.Exclude = v.(string)\n\t}\n\n\tif v, ok := a[\"include\"]; ok {\n\t\tresult.Include = v.(string)\n\t}\n\n\tif aj, ok := a[\"jsonnet\"].([]interface{}); ok {\n\t\tjsonnet := application.ApplicationSourceJsonnet{}\n\n\t\tif len(aj) > 0 && aj[0] != nil {\n\t\t\tj := aj[0].(map[string]interface{})\n\t\t\tif evs, ok := j[\"ext_var\"].([]interface{}); ok && len(evs) > 0 {\n\t\t\t\tfor _, v := range evs {\n\t\t\t\t\tif vv, ok := v.(map[string]interface{}); ok {\n\t\t\t\t\t\tjsonnet.ExtVars = append(jsonnet.ExtVars, application.JsonnetVar{\n\t\t\t\t\t\t\tName:  vv[\"name\"].(string),\n\t\t\t\t\t\t\tValue: vv[\"value\"].(string),\n\t\t\t\t\t\t\tCode:  vv[\"code\"].(bool),\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif tlas, ok := j[\"tla\"].(*schema.Set); ok && len(tlas.List()) > 0 {\n\t\t\t\tfor _, v := range tlas.List() {\n\t\t\t\t\tif vv, ok := v.(map[string]interface{}); ok {\n\t\t\t\t\t\tjsonnet.TLAs = append(jsonnet.TLAs, application.JsonnetVar{\n\t\t\t\t\t\t\tName:  vv[\"name\"].(string),\n\t\t\t\t\t\t\tValue: vv[\"value\"].(string),\n\t\t\t\t\t\t\tCode:  vv[\"code\"].(bool),\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif libs, ok := j[\"libs\"].([]interface{}); ok && len(libs) > 0 {\n\t\t\t\tfor _, lib := range libs {\n\t\t\t\t\tjsonnet.Libs = append(jsonnet.Libs, lib.(string))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tresult.Jsonnet = jsonnet\n\t}\n\n\treturn result\n}\n\nfunc expandApplicationSourceKustomize(in []interface{}) *application.ApplicationSourceKustomize {\n\tif len(in) == 0 {\n\t\treturn nil\n\t}\n\n\tresult := &application.ApplicationSourceKustomize{}\n\n\tif a, ok := in[0].(map[string]interface{}); ok {\n\t\tif v, ok := a[\"name_prefix\"]; ok {\n\t\t\tresult.NamePrefix = v.(string)\n\t\t}\n\n\t\tif v, ok := a[\"name_suffix\"]; ok {\n\t\t\tresult.NameSuffix = v.(string)\n\t\t}\n\n\t\tif v, ok := a[\"version\"]; ok {\n\t\t\tresult.Version = v.(string)\n\t\t}\n\n\t\tif v, ok := a[\"images\"]; ok {\n\t\t\tfor _, i := range v.(*schema.Set).List() {\n\t\t\t\tresult.Images = append(result.Images, application.KustomizeImage(i.(string)))\n\t\t\t}\n\t\t}\n\n\t\tif cls, ok := a[\"common_labels\"]; ok {\n\t\t\tresult.CommonLabels = make(map[string]string, 0)\n\n\t\t\tfor k, v := range cls.(map[string]interface{}) {\n\t\t\t\tresult.CommonLabels[k] = v.(string)\n\t\t\t}\n\t\t}\n\n\t\tif cas, ok := a[\"common_annotations\"]; ok {\n\t\t\tresult.CommonAnnotations = make(map[string]string, 0)\n\n\t\t\tfor k, v := range cas.(map[string]interface{}) {\n\t\t\t\tresult.CommonAnnotations[k] = v.(string)\n\t\t\t}\n\t\t}\n\n\t\tif patches, ok := a[\"patches\"]; ok {\n\t\t\tfor _, v := range patches.([]interface{}) {\n\t\t\t\tpatchMap := v.(map[string]interface{})\n\t\t\t\tkustomizePatch := application.KustomizePatch{}\n\n\t\t\t\tif patch, ok := patchMap[\"patch\"]; ok {\n\t\t\t\t\tkustomizePatch.Patch = patch.(string)\n\t\t\t\t}\n\n\t\t\t\tif target, ok := patchMap[\"target\"]; ok {\n\t\t\t\t\tkustomizePatch.Target = expandApplicationSourceKustomizePatchTarget(target.([]interface{}))\n\t\t\t\t}\n\n\t\t\t\tif options, ok := patchMap[\"options\"]; ok {\n\t\t\t\t\tkustomizePatch.Options = expandBoolMap(options.(map[string]interface{}))\n\t\t\t\t}\n\n\t\t\t\tresult.Patches = append(result.Patches, kustomizePatch)\n\t\t\t}\n\t\t}\n\t}\n\n\treturn result\n}\n\nfunc expandApplicationSourceKustomizePatchTarget(in []interface{}) *application.KustomizeSelector {\n\tif len(in) == 0 {\n\t\treturn nil\n\t}\n\n\tresult := &application.KustomizeSelector{\n\t\tKustomizeResId: application.KustomizeResId{\n\t\t\tKustomizeGvk: application.KustomizeGvk{},\n\t\t},\n\t}\n\n\tt := in[0].(map[string]interface{})\n\n\tif group, ok := t[\"group\"]; ok {\n\t\tresult.Group = group.(string)\n\t}\n\n\tif version, ok := t[\"version\"]; ok {\n\t\tresult.Version = version.(string)\n\t}\n\n\tif kind, ok := t[\"kind\"]; ok {\n\t\tresult.Kind = kind.(string)\n\t}\n\n\tif name, ok := t[\"name\"]; ok {\n\t\tresult.Name = name.(string)\n\t}\n\n\tif namespace, ok := t[\"namespace\"]; ok {\n\t\tresult.Namespace = namespace.(string)\n\t}\n\n\tif label_selector, ok := t[\"label_selector\"]; ok {\n\t\tresult.LabelSelector = label_selector.(string)\n\t}\n\n\tif annotation_selector, ok := t[\"annotation_selector\"]; ok {\n\t\tresult.AnnotationSelector = annotation_selector.(string)\n\t}\n\n\treturn result\n}\n\nfunc expandApplicationSourceHelm(in []interface{}) *application.ApplicationSourceHelm {\n\tif len(in) == 0 {\n\t\treturn nil\n\t}\n\n\tresult := &application.ApplicationSourceHelm{}\n\n\tif a, ok := in[0].(map[string]interface{}); ok {\n\t\tif v, ok := a[\"value_files\"]; ok {\n\t\t\tfor _, vf := range v.([]interface{}) {\n\t\t\t\tresult.ValueFiles = append(result.ValueFiles, vf.(string))\n\t\t\t}\n\t\t}\n\n\t\tif v, ok := a[\"values\"]; ok {\n\t\t\tresult.Values = v.(string)\n\t\t}\n\n\t\tif v, ok := a[\"release_name\"]; ok {\n\t\t\tresult.ReleaseName = v.(string)\n\t\t}\n\n\t\tif v, ok := a[\"pass_credentials\"]; ok {\n\t\t\tresult.PassCredentials = v.(bool)\n\t\t}\n\n\t\tif v, ok := a[\"ignore_missing_value_files\"]; ok {\n\t\t\tresult.IgnoreMissingValueFiles = v.(bool)\n\t\t}\n\n\t\tif parameters, ok := a[\"parameter\"]; ok {\n\t\t\tfor _, _p := range parameters.(*schema.Set).List() {\n\t\t\t\tp := _p.(map[string]interface{})\n\n\t\t\t\tparameter := application.HelmParameter{}\n\n\t\t\t\tif v, ok := p[\"force_string\"]; ok {\n\t\t\t\t\tparameter.ForceString = v.(bool)\n\t\t\t\t}\n\n\t\t\t\tif v, ok := p[\"name\"]; ok {\n\t\t\t\t\tparameter.Name = v.(string)\n\t\t\t\t}\n\n\t\t\t\tif v, ok := p[\"value\"]; ok {\n\t\t\t\t\tparameter.Value = v.(string)\n\t\t\t\t}\n\n\t\t\t\tresult.Parameters = append(result.Parameters, parameter)\n\t\t\t}\n\t\t}\n\n\t\tif fileParameters, ok := a[\"file_parameter\"]; ok {\n\t\t\tfor _, _p := range fileParameters.(*schema.Set).List() {\n\t\t\t\tp := _p.(map[string]interface{})\n\n\t\t\t\tparameter := application.HelmFileParameter{}\n\n\t\t\t\tif v, ok := p[\"name\"]; ok {\n\t\t\t\t\tparameter.Name = v.(string)\n\t\t\t\t}\n\n\t\t\t\tif v, ok := p[\"path\"]; ok {\n\t\t\t\t\tparameter.Path = v.(string)\n\t\t\t\t}\n\n\t\t\t\tresult.FileParameters = append(result.FileParameters, parameter)\n\t\t\t}\n\t\t}\n\n\t\tif v, ok := a[\"skip_crds\"]; ok {\n\t\t\tresult.SkipCrds = v.(bool)\n\t\t}\n\n\t\tif v, ok := a[\"skip_schema_validation\"]; ok {\n\t\t\tresult.SkipSchemaValidation = v.(bool)\n\t\t}\n\n\t\tif v, ok := a[\"version\"]; ok {\n\t\t\tresult.Version = v.(string)\n\t\t}\n\t}\n\n\treturn result\n}\n\nfunc expandApplicationSyncPolicy(sp interface{}) (*application.SyncPolicy, error) {\n\tsyncPolicy := &application.SyncPolicy{}\n\n\tif sp == nil {\n\t\treturn syncPolicy, nil\n\t}\n\n\tp := sp.(map[string]interface{})\n\n\tif _a, ok := p[\"automated\"].(*schema.Set); ok {\n\t\tautomated := &application.SyncPolicyAutomated{}\n\n\t\tlist := _a.List()\n\n\t\tif len(list) > 0 {\n\t\t\ta := list[0].(map[string]interface{})\n\t\t\tif v, ok := a[\"prune\"]; ok {\n\t\t\t\tautomated.Prune = v.(bool)\n\t\t\t}\n\n\t\t\tif v, ok := a[\"self_heal\"]; ok {\n\t\t\t\tautomated.SelfHeal = v.(bool)\n\t\t\t}\n\n\t\t\tif v, ok := a[\"allow_empty\"]; ok {\n\t\t\t\tautomated.AllowEmpty = v.(bool)\n\t\t\t}\n\n\t\t\tsyncPolicy.Automated = automated\n\t\t}\n\t}\n\n\tif _sOpts, ok := p[\"sync_options\"].([]interface{}); ok && len(_sOpts) > 0 {\n\t\tvar syncOptions application.SyncOptions\n\n\t\tfor _, so := range _sOpts {\n\t\t\tsyncOptions = append(syncOptions, so.(string))\n\t\t}\n\n\t\tsyncPolicy.SyncOptions = syncOptions\n\t}\n\n\tif _retry, ok := p[\"retry\"].([]interface{}); ok && len(_retry) > 0 {\n\t\tretry := &application.RetryStrategy{}\n\n\t\tr := (_retry[0]).(map[string]interface{})\n\n\t\tif v, ok := r[\"limit\"]; ok {\n\t\t\tvar err error\n\n\t\t\tretry.Limit, err = convertStringToInt64(v.(string))\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"failed to convert retry limit to integer: %w\", err)\n\t\t\t}\n\t\t}\n\n\t\tif _b, ok := r[\"backoff\"].(*schema.Set); ok {\n\t\t\tretry.Backoff = &application.Backoff{}\n\n\t\t\tlist := _b.List()\n\t\t\tif len(list) > 0 {\n\t\t\t\tb := list[0].(map[string]interface{})\n\n\t\t\t\tif v, ok := b[\"duration\"]; ok {\n\t\t\t\t\tretry.Backoff.Duration = v.(string)\n\t\t\t\t}\n\n\t\t\t\tif v, ok := b[\"max_duration\"]; ok {\n\t\t\t\t\tretry.Backoff.MaxDuration = v.(string)\n\t\t\t\t}\n\n\t\t\t\tif v, ok := b[\"factor\"]; ok {\n\t\t\t\t\tfactor, err := convertStringToInt64Pointer(v.(string))\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn nil, fmt.Errorf(\"failed to convert backoff factor to integer: %w\", err)\n\t\t\t\t\t}\n\n\t\t\t\t\tretry.Backoff.Factor = factor\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tsyncPolicy.Retry = retry\n\t}\n\n\tif _mnm, ok := p[\"managed_namespace_metadata\"].([]interface{}); ok && len(_mnm) > 0 {\n\t\tif mnm, ok := _mnm[0].(map[string]interface{}); ok {\n\t\t\tsyncPolicy.ManagedNamespaceMetadata = &application.ManagedNamespaceMetadata{}\n\n\t\t\tif a, ok := mnm[\"annotations\"]; ok {\n\t\t\t\tsyncPolicy.ManagedNamespaceMetadata.Annotations = expandStringMap(a.(map[string]interface{}))\n\t\t\t}\n\n\t\t\tif l, ok := mnm[\"labels\"]; ok {\n\t\t\t\tsyncPolicy.ManagedNamespaceMetadata.Labels = expandStringMap(l.(map[string]interface{}))\n\t\t\t}\n\t\t}\n\t}\n\n\treturn syncPolicy, nil\n}\n\nfunc expandApplicationIgnoreDifferences(ids []interface{}) (result []application.ResourceIgnoreDifferences) {\n\tfor _, _id := range ids {\n\t\tid := _id.(map[string]interface{})\n\n\t\telem := application.ResourceIgnoreDifferences{}\n\n\t\tif v, ok := id[\"group\"]; ok {\n\t\t\telem.Group = v.(string)\n\t\t}\n\n\t\tif v, ok := id[\"kind\"]; ok {\n\t\t\telem.Kind = v.(string)\n\t\t}\n\n\t\tif v, ok := id[\"name\"]; ok {\n\t\t\telem.Name = v.(string)\n\t\t}\n\n\t\tif v, ok := id[\"namespace\"]; ok {\n\t\t\telem.Namespace = v.(string)\n\t\t}\n\n\t\tif v, ok := id[\"json_pointers\"]; ok {\n\t\t\tjps := v.(*schema.Set).List()\n\t\t\tfor _, jp := range jps {\n\t\t\t\telem.JSONPointers = append(elem.JSONPointers, jp.(string))\n\t\t\t}\n\t\t}\n\n\t\tif v, ok := id[\"jq_path_expressions\"]; ok {\n\t\t\tjqpes := v.(*schema.Set).List()\n\t\t\tfor _, jqpe := range jqpes {\n\t\t\t\telem.JQPathExpressions = append(elem.JQPathExpressions, jqpe.(string))\n\t\t\t}\n\t\t}\n\n\t\tif v, ok := id[\"managed_fields_managers\"]; ok {\n\t\t\tmanagedFieldsManagers := v.(*schema.Set).List()\n\t\t\tfor _, fieldsManager := range managedFieldsManagers {\n\t\t\t\telem.ManagedFieldsManagers = append(elem.ManagedFieldsManagers, fieldsManager.(string))\n\t\t\t}\n\t\t}\n\n\t\tresult = append(result, elem)\n\t}\n\n\treturn //nolint:nakedret // overriding as function follows pattern in rest of file\n}\n\nfunc expandApplicationInfo(infos *schema.Set) (result []application.Info, err error) {\n\tfor _, i := range infos.List() {\n\t\titem := i.(map[string]interface{})\n\t\tinfo := application.Info{}\n\t\tfieldSet := false\n\n\t\tif name, ok := item[\"name\"].(string); ok && name != \"\" {\n\t\t\tinfo.Name = name\n\t\t\tfieldSet = true\n\t\t}\n\n\t\tif value, ok := item[\"value\"].(string); ok && value != \"\" {\n\t\t\tinfo.Value = value\n\t\t\tfieldSet = true\n\t\t}\n\n\t\tif !fieldSet {\n\t\t\treturn result, fmt.Errorf(\"spec.info: cannot be empty - must only contains 'name' or 'value' fields\")\n\t\t}\n\n\t\tresult = append(result, info)\n\t}\n\n\treturn\n}\n\nfunc expandApplicationDestination(dest interface{}) (result application.ApplicationDestination) {\n\td, ok := dest.(map[string]interface{})\n\tif !ok {\n\t\tpanic(fmt.Errorf(\"could not expand application destination\"))\n\t}\n\n\treturn application.ApplicationDestination{\n\t\tServer:    d[\"server\"].(string),\n\t\tNamespace: d[\"namespace\"].(string),\n\t\tName:      d[\"name\"].(string),\n\t}\n}\n\n// Flatten\n\nfunc flattenApplication(app *application.Application, d *schema.ResourceData) error {\n\tmetadata := flattenMetadata(app.ObjectMeta, d)\n\tif err := d.Set(\"metadata\", metadata); err != nil {\n\t\te, _ := json.MarshalIndent(metadata, \"\", \"\\t\")\n\t\treturn fmt.Errorf(\"error persisting metadata: %s\\n%s\", err, e)\n\t}\n\n\tspec := flattenApplicationSpec(app.Spec)\n\tif err := d.Set(\"spec\", spec); err != nil {\n\t\te, _ := json.MarshalIndent(spec, \"\", \"\\t\")\n\t\treturn fmt.Errorf(\"error persisting spec: %s\\n%s\", err, e)\n\t}\n\n\tstatus := flattenApplicationStatus(app.Status)\n\tif err := d.Set(\"status\", status); err != nil {\n\t\te, _ := json.MarshalIndent(status, \"\", \"\\t\")\n\t\treturn fmt.Errorf(\"error persisting status: %s\\n%s\", err, e)\n\t}\n\n\treturn nil\n}\n\nfunc flattenApplicationSpec(s application.ApplicationSpec) []map[string]interface{} {\n\tspec := map[string]interface{}{\n\t\t\"destination\":       flattenApplicationDestinations([]application.ApplicationDestination{s.Destination}),\n\t\t\"ignore_difference\": flattenApplicationIgnoreDifferences(s.IgnoreDifferences),\n\t\t\"info\":              flattenApplicationInfo(s.Info),\n\t\t\"project\":           s.Project,\n\t\t\"sync_policy\":       flattenApplicationSyncPolicy(s.SyncPolicy),\n\t}\n\n\tif s.Source != nil {\n\t\tspec[\"source\"] = flattenApplicationSource([]application.ApplicationSource{*s.Source})\n\t} else {\n\t\tspec[\"source\"] = flattenApplicationSource(s.Sources)\n\t}\n\n\tif s.RevisionHistoryLimit != nil {\n\t\tspec[\"revision_history_limit\"] = int(*s.RevisionHistoryLimit)\n\t}\n\n\treturn []map[string]interface{}{spec}\n}\n\nfunc flattenApplicationSyncPolicy(sp *application.SyncPolicy) []map[string]interface{} {\n\tif sp == nil {\n\t\treturn nil\n\t}\n\n\tresult := make(map[string]interface{}, 0)\n\n\tif sp.Automated != nil {\n\t\tresult[\"automated\"] = []map[string]interface{}{\n\t\t\t{\n\t\t\t\t\"prune\":       sp.Automated.Prune,\n\t\t\t\t\"self_heal\":   sp.Automated.SelfHeal,\n\t\t\t\t\"allow_empty\": sp.Automated.AllowEmpty,\n\t\t\t},\n\t\t}\n\t}\n\n\tif sp.ManagedNamespaceMetadata != nil {\n\t\tresult[\"managed_namespace_metadata\"] = []map[string]interface{}{\n\t\t\t{\n\t\t\t\t\"annotations\": sp.ManagedNamespaceMetadata.Annotations,\n\t\t\t\t\"labels\":      sp.ManagedNamespaceMetadata.Labels,\n\t\t\t},\n\t\t}\n\t}\n\n\tresult[\"sync_options\"] = []string(sp.SyncOptions)\n\n\tif sp.Retry != nil {\n\t\tlimit := convertInt64ToString(sp.Retry.Limit)\n\n\t\tif sp.Retry.Backoff != nil {\n\t\t\tbackoff := map[string]interface{}{\n\t\t\t\t\"duration\":     sp.Retry.Backoff.Duration,\n\t\t\t\t\"max_duration\": sp.Retry.Backoff.MaxDuration,\n\t\t\t}\n\t\t\tif sp.Retry.Backoff.Factor != nil {\n\t\t\t\tbackoff[\"factor\"] = convertInt64PointerToString(sp.Retry.Backoff.Factor)\n\t\t\t}\n\n\t\t\tresult[\"retry\"] = []map[string]interface{}{\n\t\t\t\t{\n\t\t\t\t\t\"limit\":   limit,\n\t\t\t\t\t\"backoff\": []map[string]interface{}{backoff},\n\t\t\t\t},\n\t\t\t}\n\t\t} else {\n\t\t\tresult[\"retry\"] = []map[string]interface{}{\n\t\t\t\t{\n\t\t\t\t\t\"limit\": limit,\n\t\t\t\t},\n\t\t\t}\n\t\t}\n\t}\n\n\treturn []map[string]interface{}{result}\n}\n\nfunc flattenApplicationInfo(infos []application.Info) (result []map[string]string) {\n\tfor _, i := range infos {\n\t\tinfo := map[string]string{}\n\n\t\tif i.Name != \"\" {\n\t\t\tinfo[\"name\"] = i.Name\n\t\t}\n\n\t\tif i.Value != \"\" {\n\t\t\tinfo[\"value\"] = i.Value\n\t\t}\n\n\t\tif len(info) > 0 {\n\t\t\tresult = append(result, info)\n\t\t}\n\t}\n\n\treturn\n}\n\nfunc flattenApplicationIgnoreDifferences(ids []application.ResourceIgnoreDifferences) (result []map[string]interface{}) {\n\tfor _, id := range ids {\n\t\tresult = append(result, map[string]interface{}{\n\t\t\t\"group\":                   id.Group,\n\t\t\t\"kind\":                    id.Kind,\n\t\t\t\"name\":                    id.Name,\n\t\t\t\"namespace\":               id.Namespace,\n\t\t\t\"json_pointers\":           id.JSONPointers,\n\t\t\t\"jq_path_expressions\":     id.JQPathExpressions,\n\t\t\t\"managed_fields_managers\": id.ManagedFieldsManagers,\n\t\t})\n\t}\n\n\treturn\n}\n\nfunc flattenApplicationSource(source []application.ApplicationSource) (result []map[string]interface{}) {\n\tfor _, s := range source {\n\t\tresult = append(result, map[string]interface{}{\n\t\t\t\"chart\":           s.Chart,\n\t\t\t\"directory\":       flattenApplicationSourceDirectory([]*application.ApplicationSourceDirectory{s.Directory}),\n\t\t\t\"helm\":            flattenApplicationSourceHelm([]*application.ApplicationSourceHelm{s.Helm}),\n\t\t\t\"kustomize\":       flattenApplicationSourceKustomize([]*application.ApplicationSourceKustomize{s.Kustomize}),\n\t\t\t\"name\":            s.Name,\n\t\t\t\"path\":            s.Path,\n\t\t\t\"plugin\":          flattenApplicationSourcePlugin([]*application.ApplicationSourcePlugin{s.Plugin}),\n\t\t\t\"ref\":             s.Ref,\n\t\t\t\"repo_url\":        s.RepoURL,\n\t\t\t\"target_revision\": s.TargetRevision,\n\t\t})\n\t}\n\n\treturn\n}\n\nfunc flattenApplicationSourcePlugin(as []*application.ApplicationSourcePlugin) (result []map[string]interface{}) {\n\tfor _, a := range as {\n\t\tif a != nil {\n\t\t\tvar env []map[string]string\n\t\t\tfor _, e := range a.Env {\n\t\t\t\tenv = append(env, map[string]string{\n\t\t\t\t\t\"name\":  e.Name,\n\t\t\t\t\t\"value\": e.Value,\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tresult = append(result, map[string]interface{}{\n\t\t\t\t\"name\": a.Name,\n\t\t\t\t\"env\":  env,\n\t\t\t})\n\t\t}\n\t}\n\n\treturn\n}\n\nfunc flattenApplicationSourceDirectory(as []*application.ApplicationSourceDirectory) (result []map[string]interface{}) {\n\tfor _, a := range as {\n\t\tif a != nil && !a.IsZero() {\n\t\t\tjsonnet := make(map[string][]interface{}, 0)\n\t\t\tfor _, jev := range a.Jsonnet.ExtVars {\n\t\t\t\tjsonnet[\"ext_var\"] = append(jsonnet[\"ext_var\"], map[string]interface{}{\n\t\t\t\t\t\"code\":  jev.Code,\n\t\t\t\t\t\"name\":  jev.Name,\n\t\t\t\t\t\"value\": jev.Value,\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tfor _, jtla := range a.Jsonnet.TLAs {\n\t\t\t\tjsonnet[\"tla\"] = append(jsonnet[\"tla\"], map[string]interface{}{\n\t\t\t\t\t\"code\":  jtla.Code,\n\t\t\t\t\t\"name\":  jtla.Name,\n\t\t\t\t\t\"value\": jtla.Value,\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tfor _, lib := range a.Jsonnet.Libs {\n\t\t\t\tjsonnet[\"libs\"] = append(jsonnet[\"libs\"], lib)\n\t\t\t}\n\n\t\t\tm := map[string]interface{}{\n\t\t\t\t\"recurse\": a.Recurse,\n\t\t\t\t\"exclude\": a.Exclude,\n\t\t\t\t\"include\": a.Include,\n\t\t\t}\n\n\t\t\tif len(jsonnet) > 0 {\n\t\t\t\tm[\"jsonnet\"] = []map[string][]interface{}{jsonnet}\n\t\t\t}\n\n\t\t\tresult = append(result, m)\n\t\t}\n\t}\n\n\treturn //nolint:nakedret // only just breaching - function follows pattern in rest of file\n}\n\nfunc flattenApplicationSourceKustomize(as []*application.ApplicationSourceKustomize) (result []map[string]interface{}) {\n\tfor _, a := range as {\n\t\tif a != nil {\n\t\t\tvar images []string\n\t\t\tfor _, i := range a.Images {\n\t\t\t\timages = append(images, string(i))\n\t\t\t}\n\n\t\t\tvar patches []map[string]interface{}\n\n\t\t\tfor _, p := range a.Patches {\n\t\t\t\tpatch := map[string]interface{}{\n\t\t\t\t\t\"patch\": p.Patch,\n\t\t\t\t\t\"path\":  p.Path,\n\t\t\t\t}\n\n\t\t\t\tif p.Target != nil {\n\t\t\t\t\tpatch[\"target\"] = []map[string]interface{}{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"group\":               p.Target.Group,\n\t\t\t\t\t\t\t\"version\":             p.Target.Version,\n\t\t\t\t\t\t\t\"kind\":                p.Target.Kind,\n\t\t\t\t\t\t\t\"name\":                p.Target.Name,\n\t\t\t\t\t\t\t\"namespace\":           p.Target.Namespace,\n\t\t\t\t\t\t\t\"label_selector\":      p.Target.LabelSelector,\n\t\t\t\t\t\t\t\"annotation_selector\": p.Target.AnnotationSelector,\n\t\t\t\t\t\t},\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif p.Options != nil {\n\t\t\t\t\tpatch[\"options\"] = p.Options\n\t\t\t\t}\n\n\t\t\t\tpatches = append(patches, patch)\n\t\t\t}\n\n\t\t\tresult = append(result, map[string]interface{}{\n\t\t\t\t\"patches\":            patches,\n\t\t\t\t\"common_annotations\": a.CommonAnnotations,\n\t\t\t\t\"common_labels\":      a.CommonLabels,\n\t\t\t\t\"images\":             images,\n\t\t\t\t\"name_prefix\":        a.NamePrefix,\n\t\t\t\t\"name_suffix\":        a.NameSuffix,\n\t\t\t\t\"version\":            a.Version,\n\t\t\t})\n\t\t}\n\t}\n\n\treturn result\n}\n\nfunc flattenApplicationSourceHelm(as []*application.ApplicationSourceHelm) (result []map[string]interface{}) {\n\tfor _, a := range as {\n\t\tif a != nil {\n\t\t\tvar parameters []map[string]interface{}\n\t\t\tfor _, p := range a.Parameters {\n\t\t\t\tparameters = append(parameters, map[string]interface{}{\n\t\t\t\t\t\"force_string\": p.ForceString,\n\t\t\t\t\t\"name\":         p.Name,\n\t\t\t\t\t\"value\":        p.Value,\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tvar fileParameters []map[string]interface{}\n\t\t\tfor _, p := range a.FileParameters {\n\t\t\t\tfileParameters = append(fileParameters, map[string]interface{}{\n\t\t\t\t\t\"name\": p.Name,\n\t\t\t\t\t\"path\": p.Path,\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tresult = append(result, map[string]interface{}{\n\t\t\t\t\"parameter\":                  parameters,\n\t\t\t\t\"file_parameter\":             fileParameters,\n\t\t\t\t\"release_name\":               a.ReleaseName,\n\t\t\t\t\"skip_crds\":                  a.SkipCrds,\n\t\t\t\t\"skip_schema_validation\":     a.SkipSchemaValidation,\n\t\t\t\t\"value_files\":                a.ValueFiles,\n\t\t\t\t\"values\":                     a.Values,\n\t\t\t\t\"pass_credentials\":           a.PassCredentials,\n\t\t\t\t\"ignore_missing_value_files\": a.IgnoreMissingValueFiles,\n\t\t\t\t\"version\":                    a.Version,\n\t\t\t})\n\t\t}\n\t}\n\n\treturn result\n}\n\nfunc flattenApplicationDestinations(ds []application.ApplicationDestination) (result []map[string]string) {\n\tfor _, d := range ds {\n\t\tresult = append(result, map[string]string{\n\t\t\t\"namespace\": d.Namespace,\n\t\t\t\"server\":    d.Server,\n\t\t\t\"name\":      d.Name,\n\t\t})\n\t}\n\n\treturn\n}\n\nfunc flattenApplicationStatus(s application.ApplicationStatus) []map[string]interface{} {\n\tstatus := map[string]interface{}{\n\t\t\"conditions\": flattenApplicationConditions(s.Conditions),\n\t\t\"health\":     flattenApplicationHealthStatus(s.Health),\n\t\t\"resources\":  flattenApplicationResourceStatuses(s.Resources),\n\t\t\"summary\":    flattenApplicationSummary(s.Summary),\n\t\t\"sync\":       flattenApplicationSyncStatus(s.Sync),\n\t}\n\n\tif s.OperationState != nil {\n\t\tstatus[\"operation_state\"] = flattenApplicationOperationState(*s.OperationState)\n\t}\n\n\tif s.ReconciledAt != nil {\n\t\tstatus[\"reconciled_at\"] = s.ReconciledAt.String()\n\t}\n\n\treturn []map[string]interface{}{status}\n}\n\nfunc flattenApplicationConditions(aacs []application.ApplicationCondition) []map[string]interface{} {\n\tacs := make([]map[string]interface{}, len(aacs))\n\n\tfor i, v := range aacs {\n\t\tacs[i] = map[string]interface{}{\n\t\t\t\"message\": v.Message,\n\t\t\t\"type\":    v.Type,\n\t\t}\n\n\t\tif v.LastTransitionTime != nil {\n\t\t\tacs[i][\"last_transition_time\"] = v.LastTransitionTime.String()\n\t\t}\n\t}\n\n\treturn acs\n}\n\nfunc flattenHealthStatus(hs application.HealthStatus) []map[string]interface{} {\n\th := map[string]interface{}{\n\t\t\"message\": hs.Message,\n\t\t\"status\":  hs.Status,\n\t}\n\n\treturn []map[string]interface{}{h}\n}\n\nfunc flattenApplicationHealthStatus(hs application.AppHealthStatus) []map[string]interface{} {\n\th := map[string]interface{}{\n\t\t\"status\": hs.Status,\n\t}\n\n\treturn []map[string]interface{}{h}\n}\n\nfunc flattenApplicationSyncStatus(ss application.SyncStatus) []map[string]interface{} {\n\ts := map[string]interface{}{\n\t\t\"revision\":  ss.Revision,\n\t\t\"revisions\": ss.Revisions,\n\t\t\"status\":    ss.Status,\n\t}\n\n\treturn []map[string]interface{}{s}\n}\n\nfunc flattenApplicationResourceStatuses(arss []application.ResourceStatus) []map[string]interface{} {\n\trss := make([]map[string]interface{}, len(arss))\n\n\tfor i, v := range arss {\n\t\trss[i] = map[string]interface{}{\n\t\t\t\"group\":            v.Group,\n\t\t\t\"hook\":             v.Hook,\n\t\t\t\"kind\":             v.Kind,\n\t\t\t\"name\":             v.Name,\n\t\t\t\"namespace\":        v.Namespace,\n\t\t\t\"requires_pruning\": v.RequiresPruning,\n\t\t\t\"status\":           v.Status,\n\t\t\t\"sync_wave\":        convertInt64ToString(v.SyncWave),\n\t\t\t\"version\":          v.Version,\n\t\t}\n\n\t\tif v.Health != nil {\n\t\t\trss[i][\"health\"] = flattenHealthStatus(*v.Health)\n\t\t}\n\t}\n\n\treturn rss\n}\n\nfunc flattenApplicationSummary(as application.ApplicationSummary) []map[string]interface{} {\n\ts := map[string]interface{}{\n\t\t\"external_urls\": as.ExternalURLs,\n\t\t\"images\":        as.Images,\n\t}\n\n\treturn []map[string]interface{}{s}\n}\n\nfunc flattenApplicationOperationState(os application.OperationState) []map[string]interface{} {\n\ts := map[string]interface{}{\n\t\t\"message\":     os.Message,\n\t\t\"phase\":       os.Phase,\n\t\t\"retry_count\": convertInt64ToString(os.RetryCount),\n\t\t\"started_at\":  os.StartedAt.String(),\n\t}\n\n\tif os.FinishedAt != nil {\n\t\ts[\"finished_at\"] = os.FinishedAt.String()\n\t}\n\n\treturn []map[string]interface{}{s}\n}\n"
  },
  {
    "path": "argocd/structure_application_set.go",
    "content": "package argocd\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"reflect\"\n\n\t\"github.com/argoproj-labs/terraform-provider-argocd/internal/features\"\n\t\"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema\"\n\tapiextensionsv1 \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1\"\n\tmeta \"k8s.io/apimachinery/pkg/apis/meta/v1\"\n\n\tapplication \"github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1\"\n)\n\nfunc expandApplicationSet(d *schema.ResourceData, featureMultipleApplicationSourcesSupported bool, featureApplicationSetIgnoreApplicationDifferences bool, featureApplicationSetTemplatePatch bool, featureApplicationSourceNameSupported bool) (metadata meta.ObjectMeta, spec application.ApplicationSetSpec, err error) {\n\tmetadata = expandMetadata(d)\n\tspec, err = expandApplicationSetSpec(d, featureMultipleApplicationSourcesSupported, featureApplicationSetIgnoreApplicationDifferences, featureApplicationSetTemplatePatch, featureApplicationSourceNameSupported)\n\n\treturn\n}\n\nfunc expandApplicationSetSpec(d *schema.ResourceData, featureMultipleApplicationSourcesSupported bool, featureApplicationSetIgnoreApplicationDifferences bool, featureApplicationSetTemplatePatch bool, featureApplicationSourceNameSupported bool) (spec application.ApplicationSetSpec, err error) {\n\ts := d.Get(\"spec.0\").(map[string]interface{})\n\n\tif v, ok := s[\"generator\"].([]interface{}); ok && len(v) > 0 {\n\t\tspec.Generators, err = expandApplicationSetGenerators(v, featureMultipleApplicationSourcesSupported, featureApplicationSourceNameSupported)\n\t\tif err != nil {\n\t\t\treturn spec, err\n\t\t}\n\t}\n\n\tspec.GoTemplate = s[\"go_template\"].(bool)\n\n\tif v, ok := s[\"go_template_options\"]; ok {\n\t\topts := v.(*schema.Set).List()\n\t\tfor _, opt := range opts {\n\t\t\tspec.GoTemplateOptions = append(spec.GoTemplateOptions, opt.(string))\n\t\t}\n\t}\n\n\tif featureApplicationSetTemplatePatch {\n\t\tif v, ok := s[\"template_patch\"].(string); ok {\n\t\t\tspec.TemplatePatch = &v\n\t\t}\n\t}\n\n\tif v, ok := s[\"strategy\"].([]interface{}); ok && len(v) > 0 {\n\t\tspec.Strategy, err = expandApplicationSetStrategy(v[0].(map[string]interface{}))\n\t\tif err != nil {\n\t\t\treturn spec, err\n\t\t}\n\t}\n\n\tif v, ok := s[\"sync_policy\"].([]interface{}); ok && len(v) > 0 {\n\t\tspec.SyncPolicy = expandApplicationSetSyncPolicy(v[0].(map[string]interface{}))\n\t}\n\n\tif v, ok := s[\"ignore_application_differences\"].([]interface{}); ok && len(v) > 0 {\n\t\tspec.IgnoreApplicationDifferences = expandApplicationSetIgnoreDifferences(v, featureApplicationSetIgnoreApplicationDifferences)\n\t}\n\n\tif v, ok := s[\"template\"].([]interface{}); ok && len(v) > 0 {\n\t\tspec.Template, err = expandApplicationSetTemplate(v[0], featureMultipleApplicationSourcesSupported, featureApplicationSourceNameSupported)\n\t\tif err != nil {\n\t\t\treturn spec, err\n\t\t}\n\t}\n\n\treturn spec, nil\n}\n\nfunc expandApplicationSetGenerators(g []interface{}, featureMultipleApplicationSourcesSupported bool, featureApplicationSourceNameSupported bool) ([]application.ApplicationSetGenerator, error) {\n\tasgs := make([]application.ApplicationSetGenerator, len(g))\n\n\tfor i, v := range g {\n\t\tv := v.(map[string]interface{})\n\n\t\tvar g *application.ApplicationSetGenerator\n\n\t\tvar err error\n\n\t\tif asg, ok := v[\"clusters\"].([]interface{}); ok && len(asg) > 0 {\n\t\t\tg, err = expandApplicationSetClustersGenerator(asg[0], featureMultipleApplicationSourcesSupported, featureApplicationSourceNameSupported)\n\t\t} else if asg, ok = v[\"cluster_decision_resource\"].([]interface{}); ok && len(asg) > 0 {\n\t\t\tg, err = expandApplicationSetClusterDecisionResourceGenerator(asg[0], featureMultipleApplicationSourcesSupported, featureApplicationSourceNameSupported)\n\t\t} else if asg, ok = v[\"git\"].([]interface{}); ok && len(asg) > 0 {\n\t\t\tg, err = expandApplicationSetGitGenerator(asg[0], featureMultipleApplicationSourcesSupported, featureApplicationSourceNameSupported)\n\t\t} else if asg, ok = v[\"list\"].([]interface{}); ok && len(asg) > 0 {\n\t\t\tg, err = expandApplicationSetListGenerator(asg[0], featureMultipleApplicationSourcesSupported, featureApplicationSourceNameSupported)\n\t\t} else if asg, ok = v[\"matrix\"].([]interface{}); ok && len(asg) > 0 {\n\t\t\tg, err = expandApplicationSetMatrixGenerator(asg[0], featureMultipleApplicationSourcesSupported, featureApplicationSourceNameSupported)\n\t\t} else if asg, ok = v[\"merge\"].([]interface{}); ok && len(asg) > 0 {\n\t\t\tg, err = expandApplicationSetMergeGenerator(asg[0], featureMultipleApplicationSourcesSupported, featureApplicationSourceNameSupported)\n\t\t} else if asg, ok = v[\"scm_provider\"].([]interface{}); ok && len(asg) > 0 {\n\t\t\tg, err = expandApplicationSetSCMProviderGenerator(asg[0], featureMultipleApplicationSourcesSupported, featureApplicationSourceNameSupported)\n\t\t} else if asg, ok = v[\"pull_request\"].([]interface{}); ok && len(asg) > 0 {\n\t\t\tg, err = expandApplicationSetPullRequestGeneratorGenerator(asg[0], featureMultipleApplicationSourcesSupported, featureApplicationSourceNameSupported)\n\t\t} else if asg, ok = v[\"plugin\"].([]interface{}); ok && len(asg) > 0 {\n\t\t\tg, err = expandApplicationSetPluginGenerator(asg[0], featureMultipleApplicationSourcesSupported, featureApplicationSourceNameSupported)\n\t\t}\n\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tif s, ok := v[\"selector\"].([]interface{}); ok && len(s) > 0 {\n\t\t\tls := expandLabelSelector(s)\n\t\t\tg.Selector = &ls\n\t\t}\n\n\t\tasgs[i] = *g\n\t}\n\n\treturn asgs, nil\n}\n\nfunc expandApplicationSetClustersGenerator(cg interface{}, featureMultipleApplicationSourcesSupported bool, featureApplicationSourceNameSupported bool) (*application.ApplicationSetGenerator, error) {\n\tasg := &application.ApplicationSetGenerator{\n\t\tClusters: &application.ClusterGenerator{},\n\t}\n\n\tc := cg.(map[string]interface{})\n\n\tif v, ok := c[\"selector\"]; ok {\n\t\tasg.Clusters.Selector = expandLabelSelector(v.([]interface{}))\n\t}\n\n\tif v, ok := c[\"template\"].([]interface{}); ok && len(v) > 0 {\n\t\ttemp, err := expandApplicationSetTemplate(v[0], featureMultipleApplicationSourcesSupported, featureApplicationSourceNameSupported)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tasg.Clusters.Template = temp\n\t}\n\n\tif v, ok := c[\"values\"]; ok {\n\t\tasg.Clusters.Values = expandStringMap(v.(map[string]interface{}))\n\t}\n\n\treturn asg, nil\n}\n\nfunc expandApplicationSetClusterDecisionResourceGenerator(cdrg interface{}, featureMultipleApplicationSourcesSupported bool, featureApplicationSourceNameSupported bool) (*application.ApplicationSetGenerator, error) {\n\tc := cdrg.(map[string]interface{})\n\n\tasg := &application.ApplicationSetGenerator{\n\t\tClusterDecisionResource: &application.DuckTypeGenerator{\n\t\t\tConfigMapRef: c[\"config_map_ref\"].(string),\n\t\t\tName:         c[\"name\"].(string),\n\t\t},\n\t}\n\n\tif v, ok := c[\"label_selector\"]; ok {\n\t\tasg.ClusterDecisionResource.LabelSelector = expandLabelSelector(v.([]interface{}))\n\t}\n\n\tif v, ok := c[\"requeue_after_seconds\"].(string); ok && len(v) > 0 {\n\t\tras, err := convertStringToInt64Pointer(v)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to convert requeue_after_seconds to *int64: %w\", err)\n\t\t}\n\n\t\tasg.ClusterDecisionResource.RequeueAfterSeconds = ras\n\t}\n\n\tif v, ok := c[\"template\"].([]interface{}); ok && len(v) > 0 {\n\t\ttemp, err := expandApplicationSetTemplate(v[0], featureMultipleApplicationSourcesSupported, featureApplicationSourceNameSupported)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tasg.ClusterDecisionResource.Template = temp\n\t}\n\n\tif v, ok := c[\"values\"]; ok {\n\t\tasg.ClusterDecisionResource.Values = expandStringMap(v.(map[string]interface{}))\n\t}\n\n\treturn asg, nil\n}\n\nfunc expandApplicationSetGitGenerator(gg interface{}, featureMultipleApplicationSourcesSupported bool, featureApplicationSourceNameSupported bool) (*application.ApplicationSetGenerator, error) {\n\tg := gg.(map[string]interface{})\n\n\tasg := &application.ApplicationSetGenerator{\n\t\tGit: &application.GitGenerator{\n\t\t\tPathParamPrefix: g[\"path_param_prefix\"].(string),\n\t\t\tRepoURL:         g[\"repo_url\"].(string),\n\t\t\tRevision:        g[\"revision\"].(string),\n\t\t},\n\t}\n\n\tif v, ok := g[\"directory\"].([]interface{}); ok && len(v) > 0 {\n\t\tfor _, d := range v {\n\t\t\td := d.(map[string]interface{})\n\n\t\t\tdir := application.GitDirectoryGeneratorItem{\n\t\t\t\tPath: d[\"path\"].(string),\n\t\t\t}\n\n\t\t\tif e, ok := d[\"exclude\"].(bool); ok {\n\t\t\t\tdir.Exclude = e\n\t\t\t}\n\n\t\t\tasg.Git.Directories = append(asg.Git.Directories, dir)\n\t\t}\n\t}\n\n\tif v, ok := g[\"file\"].([]interface{}); ok && len(v) > 0 {\n\t\tfor _, f := range v {\n\t\t\tf := f.(map[string]interface{})\n\n\t\t\tfile := application.GitFileGeneratorItem{\n\t\t\t\tPath: f[\"path\"].(string),\n\t\t\t}\n\n\t\t\tasg.Git.Files = append(asg.Git.Files, file)\n\t\t}\n\t}\n\n\tif v, ok := g[\"requeue_after_seconds\"].(string); ok && len(v) > 0 {\n\t\tras, err := convertStringToInt64Pointer(v)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to convert requeue_after_seconds to *int64: %w\", err)\n\t\t}\n\n\t\tasg.Git.RequeueAfterSeconds = ras\n\t}\n\n\tif v, ok := g[\"template\"].([]interface{}); ok && len(v) > 0 {\n\t\ttemp, err := expandApplicationSetTemplate(v[0], featureMultipleApplicationSourcesSupported, featureApplicationSourceNameSupported)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tasg.Git.Template = temp\n\t}\n\n\tif v, ok := g[\"values\"]; ok {\n\t\tasg.Git.Values = expandStringMap(v.(map[string]interface{}))\n\t}\n\n\treturn asg, nil\n}\n\nfunc expandApplicationSetListGenerator(lg interface{}, featureMultipleApplicationSourcesSupported bool, featureApplicationSourceNameSupported bool) (*application.ApplicationSetGenerator, error) {\n\tasg := &application.ApplicationSetGenerator{\n\t\tList: &application.ListGenerator{},\n\t}\n\n\tl := lg.(map[string]interface{})\n\n\t// Handle elements field\n\tif e, ok := l[\"elements\"].([]interface{}); ok && len(e) > 0 {\n\t\tfor _, v := range e {\n\t\t\tdata, err := json.Marshal(v)\n\t\t\tif err != nil {\n\t\t\t\treturn asg, fmt.Errorf(\"failed to marshal list generator value: %w\", err)\n\t\t\t}\n\n\t\t\tasg.List.Elements = append(asg.List.Elements, apiextensionsv1.JSON{\n\t\t\t\tRaw: data,\n\t\t\t})\n\t\t}\n\t}\n\n\t// Handle elements_yaml field\n\tif yamlStr, ok := l[\"elements_yaml\"].(string); ok && yamlStr != \"\" {\n\t\tasg.List.ElementsYaml = yamlStr\n\t}\n\n\tif v, ok := l[\"template\"].([]interface{}); ok && len(v) > 0 {\n\t\ttemp, err := expandApplicationSetTemplate(v[0], featureMultipleApplicationSourcesSupported, featureApplicationSourceNameSupported)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tasg.List.Template = temp\n\t}\n\n\treturn asg, nil\n}\n\nfunc expandApplicationSetMatrixGenerator(mg interface{}, featureMultipleApplicationSourcesSupported bool, featureApplicationSourceNameSupported bool) (*application.ApplicationSetGenerator, error) {\n\tasg := &application.ApplicationSetGenerator{}\n\tm := mg.(map[string]interface{})\n\n\tgs := m[\"generator\"].([]interface{})\n\n\tasgs, err := expandApplicationSetGenerators(gs, featureMultipleApplicationSourcesSupported, featureApplicationSourceNameSupported)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tngs := make([]application.ApplicationSetNestedGenerator, len(asgs))\n\tfor i, g := range asgs {\n\t\tngs[i] = application.ApplicationSetNestedGenerator{\n\t\t\tClusterDecisionResource: g.ClusterDecisionResource,\n\t\t\tClusters:                g.Clusters,\n\t\t\tGit:                     g.Git,\n\t\t\tList:                    g.List,\n\t\t\tPlugin:                  g.Plugin,\n\t\t\tPullRequest:             g.PullRequest,\n\t\t\tSCMProvider:             g.SCMProvider,\n\t\t}\n\n\t\tif g.Matrix != nil {\n\t\t\tjson, err := json.Marshal(g.Matrix)\n\t\t\tif err != nil {\n\t\t\t\treturn asg, fmt.Errorf(\"failed to marshal nested matrix generator to json: %w\", err)\n\t\t\t}\n\n\t\t\tngs[i].Matrix = &apiextensionsv1.JSON{\n\t\t\t\tRaw: json,\n\t\t\t}\n\t\t}\n\n\t\tif g.Merge != nil {\n\t\t\tjson, err := json.Marshal(g.Merge)\n\t\t\tif err != nil {\n\t\t\t\treturn asg, fmt.Errorf(\"failed to marshal nested merge generator to json: %w\", err)\n\t\t\t}\n\n\t\t\tngs[i].Merge = &apiextensionsv1.JSON{\n\t\t\t\tRaw: json,\n\t\t\t}\n\t\t}\n\t}\n\n\tasg.Matrix = &application.MatrixGenerator{\n\t\tGenerators: ngs,\n\t}\n\n\tif v, ok := m[\"template\"].([]interface{}); ok && len(v) > 0 {\n\t\ttemp, err := expandApplicationSetTemplate(v[0], featureMultipleApplicationSourcesSupported, featureApplicationSourceNameSupported)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tasg.Matrix.Template = temp\n\t}\n\n\treturn asg, nil\n}\n\nfunc expandApplicationSetMergeGenerator(mg interface{}, featureMultipleApplicationSourcesSupported bool, featureApplicationSourceNameSupported bool) (*application.ApplicationSetGenerator, error) {\n\tasg := &application.ApplicationSetGenerator{\n\t\tMerge: &application.MergeGenerator{},\n\t}\n\n\tm := mg.(map[string]interface{})\n\n\tmks := m[\"merge_keys\"].([]interface{})\n\tfor _, k := range mks {\n\t\tasg.Merge.MergeKeys = append(asg.Merge.MergeKeys, k.(string))\n\t}\n\n\tgs := m[\"generator\"].([]interface{})\n\n\tasgs, err := expandApplicationSetGenerators(gs, featureMultipleApplicationSourcesSupported, featureApplicationSourceNameSupported)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tngs := make([]application.ApplicationSetNestedGenerator, len(asgs))\n\tfor i, g := range asgs {\n\t\tngs[i] = application.ApplicationSetNestedGenerator{\n\t\t\tClusterDecisionResource: g.ClusterDecisionResource,\n\t\t\tClusters:                g.Clusters,\n\t\t\tGit:                     g.Git,\n\t\t\tList:                    g.List,\n\t\t\tPlugin:                  g.Plugin,\n\t\t\tPullRequest:             g.PullRequest,\n\t\t\tSCMProvider:             g.SCMProvider,\n\t\t}\n\n\t\tif g.Matrix != nil {\n\t\t\tjson, err := json.Marshal(g.Matrix)\n\t\t\tif err != nil {\n\t\t\t\treturn asg, fmt.Errorf(\"failed to marshal nested matrix generator to json: %w\", err)\n\t\t\t}\n\n\t\t\tngs[i].Matrix = &apiextensionsv1.JSON{\n\t\t\t\tRaw: json,\n\t\t\t}\n\t\t}\n\n\t\tif g.Merge != nil {\n\t\t\tjson, err := json.Marshal(g.Merge)\n\t\t\tif err != nil {\n\t\t\t\treturn asg, fmt.Errorf(\"failed to marshal nested merge generator to json: %w\", err)\n\t\t\t}\n\n\t\t\tngs[i].Merge = &apiextensionsv1.JSON{\n\t\t\t\tRaw: json,\n\t\t\t}\n\t\t}\n\t}\n\n\tasg.Merge.Generators = ngs\n\n\tif v, ok := m[\"template\"].([]interface{}); ok && len(v) > 0 {\n\t\ttemp, err := expandApplicationSetTemplate(v[0], featureMultipleApplicationSourcesSupported, featureApplicationSourceNameSupported)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tasg.Merge.Template = temp\n\t}\n\n\treturn asg, nil\n}\n\nfunc expandApplicationSetPluginGenerator(mg interface{}, featureMultipleApplicationSourcesSupported bool, featureApplicationSourceNameSupported bool) (*application.ApplicationSetGenerator, error) {\n\tasg := &application.ApplicationSetGenerator{\n\t\tPlugin: &application.PluginGenerator{},\n\t}\n\n\tm := mg.(map[string]interface{})\n\n\tif v, ok := m[\"input\"].([]interface{}); ok && len(v) > 0 {\n\t\ttmp, err := expandApplicationSetInputParameters(v[0].(map[string]interface{}))\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tasg.Plugin.Input.Parameters = tmp\n\t}\n\n\tif v, ok := m[\"config_map_ref\"].(string); ok && v != \"\" {\n\t\tasg.Plugin.ConfigMapRef.Name = v\n\t}\n\n\tif v, ok := m[\"requeue_after_seconds\"].(string); ok && v != \"\" {\n\t\tras, err := convertStringToInt64Pointer(v)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to convert requeue_after_seconds to *int64: %w\", err)\n\t\t}\n\n\t\tasg.Plugin.RequeueAfterSeconds = ras\n\t}\n\n\tif v, ok := m[\"template\"].([]interface{}); ok && len(v) > 0 {\n\t\ttemp, err := expandApplicationSetTemplate(v[0], featureMultipleApplicationSourcesSupported, featureApplicationSourceNameSupported)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tasg.Plugin.Template = temp\n\t}\n\n\tif v, ok := m[\"values\"]; ok {\n\t\tasg.Plugin.Values = expandStringMap(v.(map[string]interface{}))\n\t}\n\n\treturn asg, nil\n}\n\nfunc expandApplicationSetInputParameters(m map[string]interface{}) (application.PluginParameters, error) {\n\tparams := application.PluginParameters{}\n\n\tif v, ok := m[\"parameters\"].(map[string]interface{}); ok && len(v) > 0 {\n\t\tfor k, v := range v {\n\t\t\tjson, err := json.Marshal(v)\n\t\t\tif err != nil {\n\t\t\t\treturn params, fmt.Errorf(\"failed to marshal plugin param to json: %w\", err)\n\t\t\t}\n\n\t\t\tparams[k] = apiextensionsv1.JSON{\n\t\t\t\tRaw: json,\n\t\t\t}\n\t\t}\n\t}\n\n\treturn params, nil\n}\n\nfunc expandApplicationSetPullRequestGeneratorGenerator(mg interface{}, featureMultipleApplicationSourcesSupported bool, featureApplicationSourceNameSupported bool) (*application.ApplicationSetGenerator, error) {\n\tasg := &application.ApplicationSetGenerator{\n\t\tPullRequest: &application.PullRequestGenerator{},\n\t}\n\n\tm := mg.(map[string]interface{})\n\n\tif v, ok := m[\"azure_devops\"].([]interface{}); ok && len(v) > 0 {\n\t\tasg.PullRequest.AzureDevOps = expandApplicationSetPullRequestGeneratorAzureDevOps(v[0].(map[string]interface{}))\n\t} else if v, ok := m[\"bitbucket_server\"].([]interface{}); ok && len(v) > 0 {\n\t\tasg.PullRequest.BitbucketServer = expandApplicationSetPullRequestGeneratorBitbucketServer(v[0].(map[string]interface{}))\n\t} else if v, ok := m[\"gitea\"].([]interface{}); ok && len(v) > 0 {\n\t\tasg.PullRequest.Gitea = expandApplicationSetPullRequestGeneratorGitea(v[0].(map[string]interface{}))\n\t} else if v, ok := m[\"github\"].([]interface{}); ok && len(v) > 0 {\n\t\tasg.PullRequest.Github = expandApplicationSetPullRequestGeneratorGithub(v[0].(map[string]interface{}))\n\t} else if v, ok := m[\"gitlab\"].([]interface{}); ok && len(v) > 0 {\n\t\tasg.PullRequest.GitLab = expandApplicationSetPullRequestGeneratorGitlab(v[0].(map[string]interface{}))\n\t}\n\n\tif v, ok := m[\"filter\"].([]interface{}); ok && len(v) > 0 {\n\t\tasg.PullRequest.Filters = expandApplicationSetPullRequestGeneratorFilters(v)\n\t}\n\n\tif v, ok := m[\"requeue_after_seconds\"].(string); ok && v != \"\" {\n\t\tras, err := convertStringToInt64Pointer(v)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to convert requeue_after_seconds to *int64: %w\", err)\n\t\t}\n\n\t\tasg.PullRequest.RequeueAfterSeconds = ras\n\t}\n\n\tif v, ok := m[\"template\"].([]interface{}); ok && len(v) > 0 {\n\t\ttemp, err := expandApplicationSetTemplate(v[0], featureMultipleApplicationSourcesSupported, featureApplicationSourceNameSupported)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tasg.PullRequest.Template = temp\n\t}\n\n\treturn asg, nil\n}\n\nfunc expandApplicationSetPullRequestGeneratorBitbucketServer(bs map[string]interface{}) *application.PullRequestGeneratorBitbucketServer {\n\tspgbs := &application.PullRequestGeneratorBitbucketServer{\n\t\tAPI:     bs[\"api\"].(string),\n\t\tProject: bs[\"project\"].(string),\n\t\tRepo:    bs[\"repo\"].(string),\n\t}\n\n\tif v, ok := bs[\"basic_auth\"].([]interface{}); ok && len(v) > 0 {\n\t\tba := v[0].(map[string]interface{})\n\n\t\tspgbs.BasicAuth = &application.BasicAuthBitbucketServer{\n\t\t\tUsername: ba[\"username\"].(string),\n\t\t}\n\n\t\tif pr, ok := ba[\"password_ref\"].([]interface{}); ok && len(pr) > 0 {\n\t\t\tspgbs.BasicAuth.PasswordRef = expandSecretRef(pr[0].(map[string]interface{}))\n\t\t}\n\t}\n\n\treturn spgbs\n}\n\nfunc expandApplicationSetPullRequestGeneratorGitea(g map[string]interface{}) *application.PullRequestGeneratorGitea {\n\tprgg := &application.PullRequestGeneratorGitea{\n\t\tAPI:      g[\"api\"].(string),\n\t\tInsecure: g[\"insecure\"].(bool),\n\t\tOwner:    g[\"owner\"].(string),\n\t\tRepo:     g[\"repo\"].(string),\n\t}\n\n\tif v, ok := g[\"token_ref\"].([]interface{}); ok && len(v) > 0 {\n\t\tprgg.TokenRef = expandSecretRef(v[0].(map[string]interface{}))\n\t}\n\n\treturn prgg\n}\n\nfunc expandApplicationSetPullRequestGeneratorGithub(g map[string]interface{}) *application.PullRequestGeneratorGithub {\n\tspgg := &application.PullRequestGeneratorGithub{\n\t\tAPI:           g[\"api\"].(string),\n\t\tAppSecretName: g[\"app_secret_name\"].(string),\n\t\tOwner:         g[\"owner\"].(string),\n\t\tRepo:          g[\"repo\"].(string),\n\t}\n\n\tif v, ok := g[\"labels\"].([]interface{}); ok && len(v) > 0 {\n\t\tfor _, l := range v {\n\t\t\tspgg.Labels = append(spgg.Labels, l.(string))\n\t\t}\n\t}\n\n\tif v, ok := g[\"token_ref\"].([]interface{}); ok && len(v) > 0 {\n\t\tspgg.TokenRef = expandSecretRef(v[0].(map[string]interface{}))\n\t}\n\n\treturn spgg\n}\n\nfunc expandApplicationSetPullRequestGeneratorAzureDevOps(ado map[string]interface{}) *application.PullRequestGeneratorAzureDevOps {\n\tprgado := &application.PullRequestGeneratorAzureDevOps{\n\t\tAPI:          ado[\"api\"].(string),\n\t\tOrganization: ado[\"organization\"].(string),\n\t\tProject:      ado[\"project\"].(string),\n\t\tRepo:         ado[\"repo\"].(string),\n\t}\n\n\tif v, ok := ado[\"labels\"].([]interface{}); ok && len(v) > 0 {\n\t\tfor _, l := range v {\n\t\t\tprgado.Labels = append(prgado.Labels, l.(string))\n\t\t}\n\t}\n\n\tif v, ok := ado[\"token_ref\"].([]interface{}); ok && len(v) > 0 {\n\t\tprgado.TokenRef = expandSecretRef(v[0].(map[string]interface{}))\n\t}\n\n\treturn prgado\n}\n\nfunc expandApplicationSetPullRequestGeneratorGitlab(g map[string]interface{}) *application.PullRequestGeneratorGitLab {\n\tspgg := &application.PullRequestGeneratorGitLab{\n\t\tAPI:              g[\"api\"].(string),\n\t\tProject:          g[\"project\"].(string),\n\t\tPullRequestState: g[\"pull_request_state\"].(string),\n\t}\n\n\tif v, ok := g[\"labels\"].([]interface{}); ok && len(v) > 0 {\n\t\tfor _, l := range v {\n\t\t\tspgg.Labels = append(spgg.Labels, l.(string))\n\t\t}\n\t}\n\n\tif v, ok := g[\"token_ref\"].([]interface{}); ok && len(v) > 0 {\n\t\tspgg.TokenRef = expandSecretRef(v[0].(map[string]interface{}))\n\t}\n\n\tif v, ok := g[\"insecure\"].(bool); ok {\n\t\tspgg.Insecure = v\n\t}\n\n\tif v, ok := g[\"ca_ref\"].([]interface{}); ok && len(v) > 0 {\n\t\tspgg.CARef = expandConfigMapKeyRef(v[0].(map[string]interface{}))\n\t}\n\n\treturn spgg\n}\n\nfunc expandApplicationSetPullRequestGeneratorFilters(fs []interface{}) []application.PullRequestGeneratorFilter {\n\tprgfs := make([]application.PullRequestGeneratorFilter, len(fs))\n\n\tfor i, v := range fs {\n\t\tf := v.(map[string]interface{})\n\t\tspgf := application.PullRequestGeneratorFilter{}\n\n\t\tif bm, ok := f[\"branch_match\"].(string); ok && bm != \"\" {\n\t\t\tspgf.BranchMatch = &bm\n\t\t}\n\n\t\tprgfs[i] = spgf\n\t}\n\n\treturn prgfs\n}\n\nfunc expandApplicationSetSCMProviderGenerator(mg interface{}, featureMultipleApplicationSourcesSupported bool, featureApplicationSourceNameSupported bool) (*application.ApplicationSetGenerator, error) {\n\tm := mg.(map[string]interface{})\n\n\tasg := &application.ApplicationSetGenerator{\n\t\tSCMProvider: &application.SCMProviderGenerator{\n\t\t\tCloneProtocol: m[\"clone_protocol\"].(string),\n\t\t},\n\t}\n\n\tif v, ok := m[\"azure_devops\"].([]interface{}); ok && len(v) > 0 {\n\t\tasg.SCMProvider.AzureDevOps = expandApplicationSetSCMProviderAzureDevOps(v[0].(map[string]interface{}))\n\t} else if v, ok := m[\"bitbucket_cloud\"].([]interface{}); ok && len(v) > 0 {\n\t\tasg.SCMProvider.Bitbucket = expandApplicationSetSCMProviderBitbucket(v[0].(map[string]interface{}))\n\t} else if v, ok := m[\"bitbucket_server\"].([]interface{}); ok && len(v) > 0 {\n\t\tasg.SCMProvider.BitbucketServer = expandApplicationSetSCMProviderBitbucketServer(v[0].(map[string]interface{}))\n\t} else if v, ok := m[\"gitea\"].([]interface{}); ok && len(v) > 0 {\n\t\tasg.SCMProvider.Gitea = expandApplicationSetSCMProviderGitea(v[0].(map[string]interface{}))\n\t} else if v, ok := m[\"github\"].([]interface{}); ok && len(v) > 0 {\n\t\tasg.SCMProvider.Github = expandApplicationSetSCMProviderGithub(v[0].(map[string]interface{}))\n\t} else if v, ok := m[\"gitlab\"].([]interface{}); ok && len(v) > 0 {\n\t\tasg.SCMProvider.Gitlab = expandApplicationSetSCMProviderGitlab(v[0].(map[string]interface{}))\n\t}\n\n\tif v, ok := m[\"filter\"].([]interface{}); ok && len(v) > 0 {\n\t\tasg.SCMProvider.Filters = expandApplicationSetSCMProviderGeneratorFilters(v)\n\t}\n\n\tif v, ok := m[\"requeue_after_seconds\"].(string); ok && v != \"\" {\n\t\tras, err := convertStringToInt64Pointer(v)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to convert requeue_after_seconds to *int64: %w\", err)\n\t\t}\n\n\t\tasg.SCMProvider.RequeueAfterSeconds = ras\n\t}\n\n\tif v, ok := m[\"template\"].([]interface{}); ok && len(v) > 0 {\n\t\ttemp, err := expandApplicationSetTemplate(v[0], featureMultipleApplicationSourcesSupported, featureApplicationSourceNameSupported)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tasg.SCMProvider.Template = temp\n\t}\n\n\treturn asg, nil\n}\n\nfunc expandApplicationSetSCMProviderAzureDevOps(ado map[string]interface{}) *application.SCMProviderGeneratorAzureDevOps {\n\tspgado := &application.SCMProviderGeneratorAzureDevOps{\n\t\tAllBranches:  ado[\"all_branches\"].(bool),\n\t\tAPI:          ado[\"api\"].(string),\n\t\tOrganization: ado[\"organization\"].(string),\n\t\tTeamProject:  ado[\"team_project\"].(string),\n\t}\n\n\tif v, ok := ado[\"access_token_ref\"].([]interface{}); ok && len(v) > 0 {\n\t\tspgado.AccessTokenRef = expandSecretRef(v[0].(map[string]interface{}))\n\t}\n\n\treturn spgado\n}\n\nfunc expandApplicationSetSCMProviderBitbucket(b map[string]interface{}) *application.SCMProviderGeneratorBitbucket {\n\tspgb := &application.SCMProviderGeneratorBitbucket{\n\t\tAllBranches: b[\"all_branches\"].(bool),\n\t\tOwner:       b[\"owner\"].(string),\n\t\tUser:        b[\"user\"].(string),\n\t}\n\n\tif v, ok := b[\"app_password_ref\"].([]interface{}); ok && len(v) > 0 {\n\t\tspgb.AppPasswordRef = expandSecretRef(v[0].(map[string]interface{}))\n\t}\n\n\treturn spgb\n}\n\nfunc expandApplicationSetSCMProviderBitbucketServer(bs map[string]interface{}) *application.SCMProviderGeneratorBitbucketServer {\n\tspgbs := &application.SCMProviderGeneratorBitbucketServer{\n\t\tAllBranches: bs[\"all_branches\"].(bool),\n\t\tAPI:         bs[\"api\"].(string),\n\t\tProject:     bs[\"project\"].(string),\n\t}\n\n\tif v, ok := bs[\"basic_auth\"].([]interface{}); ok && len(v) > 0 {\n\t\tba := v[0].(map[string]interface{})\n\n\t\tspgbs.BasicAuth = &application.BasicAuthBitbucketServer{\n\t\t\tUsername: ba[\"username\"].(string),\n\t\t}\n\n\t\tif pr, ok := ba[\"password_ref\"].([]interface{}); ok && len(pr) > 0 {\n\t\t\tspgbs.BasicAuth.PasswordRef = expandSecretRef(pr[0].(map[string]interface{}))\n\t\t}\n\t}\n\n\treturn spgbs\n}\n\nfunc expandApplicationSetSCMProviderGitea(g map[string]interface{}) *application.SCMProviderGeneratorGitea {\n\tspgg := &application.SCMProviderGeneratorGitea{\n\t\tAllBranches: g[\"all_branches\"].(bool),\n\t\tAPI:         g[\"api\"].(string),\n\t\tInsecure:    g[\"insecure\"].(bool),\n\t\tOwner:       g[\"owner\"].(string),\n\t}\n\n\tif v, ok := g[\"token_ref\"].([]interface{}); ok && len(v) > 0 {\n\t\tspgg.TokenRef = expandSecretRef(v[0].(map[string]interface{}))\n\t}\n\n\treturn spgg\n}\n\nfunc expandApplicationSetSCMProviderGithub(g map[string]interface{}) *application.SCMProviderGeneratorGithub {\n\tspgg := &application.SCMProviderGeneratorGithub{\n\t\tAllBranches:   g[\"all_branches\"].(bool),\n\t\tAPI:           g[\"api\"].(string),\n\t\tOrganization:  g[\"organization\"].(string),\n\t\tAppSecretName: g[\"app_secret_name\"].(string),\n\t}\n\n\tif v, ok := g[\"token_ref\"].([]interface{}); ok && len(v) > 0 {\n\t\tspgg.TokenRef = expandSecretRef(v[0].(map[string]interface{}))\n\t}\n\n\treturn spgg\n}\n\nfunc expandApplicationSetSCMProviderGitlab(g map[string]interface{}) *application.SCMProviderGeneratorGitlab {\n\tspgg := &application.SCMProviderGeneratorGitlab{\n\t\tAllBranches:      g[\"all_branches\"].(bool),\n\t\tAPI:              g[\"api\"].(string),\n\t\tIncludeSubgroups: g[\"include_subgroups\"].(bool),\n\t\tGroup:            g[\"group\"].(string),\n\t}\n\n\tif v, ok := g[\"token_ref\"].([]interface{}); ok && len(v) > 0 {\n\t\tspgg.TokenRef = expandSecretRef(v[0].(map[string]interface{}))\n\t}\n\n\treturn spgg\n}\n\nfunc expandApplicationSetSCMProviderGeneratorFilters(fs []interface{}) []application.SCMProviderGeneratorFilter {\n\tspgfs := make([]application.SCMProviderGeneratorFilter, len(fs))\n\n\tfor i, v := range fs {\n\t\tf := v.(map[string]interface{})\n\t\tspgf := application.SCMProviderGeneratorFilter{}\n\n\t\tif bm, ok := f[\"branch_match\"].(string); ok && bm != \"\" {\n\t\t\tspgf.BranchMatch = &bm\n\t\t}\n\n\t\tif lm, ok := f[\"label_match\"].(string); ok && lm != \"\" {\n\t\t\tspgf.LabelMatch = &lm\n\t\t}\n\n\t\tif pdne, ok := f[\"paths_do_not_exist\"].([]interface{}); ok && len(pdne) > 0 {\n\t\t\tfor _, p := range pdne {\n\t\t\t\tspgf.PathsDoNotExist = append(spgf.PathsDoNotExist, p.(string))\n\t\t\t}\n\t\t}\n\n\t\tif pe, ok := f[\"paths_exist\"].([]interface{}); ok && len(pe) > 0 {\n\t\t\tfor _, p := range pe {\n\t\t\t\tspgf.PathsExist = append(spgf.PathsExist, p.(string))\n\t\t\t}\n\t\t}\n\n\t\tif rm, ok := f[\"repository_match\"].(string); ok && rm != \"\" {\n\t\t\tspgf.RepositoryMatch = &rm\n\t\t}\n\n\t\tspgfs[i] = spgf\n\t}\n\n\treturn spgfs\n}\n\nfunc expandApplicationSetStrategy(sp map[string]interface{}) (*application.ApplicationSetStrategy, error) {\n\ts := &application.ApplicationSetStrategy{\n\t\tType: sp[\"type\"].(string),\n\t}\n\n\tif v, ok := sp[\"rolling_sync\"].([]interface{}); ok && len(v) > 0 {\n\t\trs, err := expandApplicationSetRolloutStrategy(v[0].(map[string]interface{}))\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\ts.RollingSync = rs\n\t}\n\n\treturn s, nil\n}\n\nfunc expandApplicationSetRolloutStrategy(rs map[string]interface{}) (*application.ApplicationSetRolloutStrategy, error) {\n\tasrs := &application.ApplicationSetRolloutStrategy{}\n\n\tif s, ok := rs[\"step\"].([]interface{}); ok && len(s) > 0 {\n\t\tss, err := expandApplicationSetRolloutSteps(s)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tasrs.Steps = ss\n\t}\n\n\treturn asrs, nil\n}\n\nfunc expandApplicationSetRolloutSteps(rss []interface{}) ([]application.ApplicationSetRolloutStep, error) {\n\tif len(rss) == 0 || rss[0] == nil {\n\t\treturn []application.ApplicationSetRolloutStep{}, nil\n\t}\n\n\tasrss := make([]application.ApplicationSetRolloutStep, len(rss))\n\n\tfor i, rs := range rss {\n\t\trs := rs.(map[string]interface{})\n\n\t\tasrs := application.ApplicationSetRolloutStep{}\n\n\t\tif v, ok := rs[\"match_expressions\"].([]interface{}); ok && len(v) > 0 {\n\t\t\tasrs.MatchExpressions = expandApplicationMatchExpressions(v)\n\t\t}\n\n\t\tif v, ok := rs[\"max_update\"]; ok {\n\t\t\tmu, err := expandIntOrString(v.(string))\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"could not expand max_update: %w\", err)\n\t\t\t}\n\n\t\t\tasrs.MaxUpdate = mu\n\t\t}\n\n\t\tasrss[i] = asrs\n\t}\n\n\treturn asrss, nil\n}\n\nfunc expandApplicationMatchExpressions(mes []interface{}) []application.ApplicationMatchExpression {\n\tasrss := make([]application.ApplicationMatchExpression, len(mes))\n\n\tfor i, me := range mes {\n\t\tme := me.(map[string]interface{})\n\t\tasrss[i] = application.ApplicationMatchExpression{\n\t\t\tKey:      me[\"key\"].(string),\n\t\t\tOperator: me[\"operator\"].(string),\n\t\t\tValues:   sliceOfString(me[\"values\"].(*schema.Set).List()),\n\t\t}\n\t}\n\n\treturn asrss\n}\n\nfunc expandApplicationSetSyncPolicyApplicationsSyncPolicy(p string) (asp application.ApplicationsSyncPolicy) {\n\tswitch p {\n\tcase \"create-only\":\n\t\tasp = application.ApplicationsSyncPolicyCreateOnly\n\tcase \"create-update\":\n\t\tasp = application.ApplicationsSyncPolicyCreateUpdate\n\tcase \"create-delete\":\n\t\tasp = application.ApplicationsSyncPolicyCreateDelete\n\tcase \"sync\":\n\t\tasp = application.ApplicationsSyncPolicySync\n\t}\n\n\treturn asp\n}\n\nfunc expandApplicationSetSyncPolicy(sp map[string]interface{}) (assp *application.ApplicationSetSyncPolicy) {\n\tassp = &application.ApplicationSetSyncPolicy{}\n\n\tif v, ok := sp[\"applications_sync\"].(string); ok && len(v) > 0 {\n\t\tasp := expandApplicationSetSyncPolicyApplicationsSyncPolicy(v)\n\t\tassp.ApplicationsSync = &asp\n\t}\n\n\tif v, ok := sp[\"preserve_resources_on_deletion\"]; ok {\n\t\tassp.PreserveResourcesOnDeletion = v.(bool)\n\t}\n\n\treturn assp\n}\n\nfunc expandApplicationSetTemplate(temp interface{}, featureMultipleApplicationSourcesSupported bool, featureApplicationSourceNameSupported bool) (template application.ApplicationSetTemplate, err error) {\n\tt, ok := temp.(map[string]interface{})\n\tif !ok {\n\t\treturn template, fmt.Errorf(\"could not expand application set template\")\n\t}\n\n\tif v, ok := t[\"metadata\"]; ok {\n\t\ttemplate.ApplicationSetTemplateMeta, err = expandApplicationSetTemplateMeta(v.([]interface{})[0])\n\t\tif err != nil {\n\t\t\treturn template, err\n\t\t}\n\t}\n\n\tif v, ok := t[\"spec\"]; ok {\n\t\ts := v.([]interface{})[0].(map[string]interface{})\n\n\t\ttemplate.Spec, err = expandApplicationSpec(s, featureApplicationSourceNameSupported)\n\t\tif err != nil {\n\t\t\treturn template, err\n\t\t}\n\n\t\tl := len(template.Spec.Sources)\n\n\t\tswitch {\n\t\tcase l == 1:\n\t\t\ttemplate.Spec.Source = &template.Spec.Sources[0]\n\t\t\ttemplate.Spec.Sources = nil\n\t\tcase l > 1 && !featureMultipleApplicationSourcesSupported:\n\t\t\tf := features.ConstraintsMap[features.MultipleApplicationSources]\n\t\t\treturn template, fmt.Errorf(\"%s is only supported from ArgoCD %s onwards\", f.Name, f.MinVersion.String())\n\t\t}\n\t}\n\n\treturn template, nil\n}\n\nfunc expandApplicationSetTemplateMeta(meta interface{}) (metadata application.ApplicationSetTemplateMeta, err error) {\n\tif meta == nil {\n\t\treturn metadata, err\n\t}\n\n\tm, ok := meta.(map[string]interface{})\n\tif !ok {\n\t\treturn metadata, fmt.Errorf(\"could not expand application set template metadata\")\n\t}\n\n\tif v, ok := m[\"annotations\"].(map[string]interface{}); ok && len(v) > 0 {\n\t\tmetadata.Annotations = expandStringMap(v)\n\t}\n\n\tif v, ok := m[\"labels\"].(map[string]interface{}); ok && len(v) > 0 {\n\t\tmetadata.Labels = expandStringMap(v)\n\t}\n\n\tif v, ok := m[\"name\"]; ok {\n\t\tmetadata.Name = v.(string)\n\t}\n\n\tif v, ok := m[\"namespace\"]; ok {\n\t\tmetadata.Namespace = v.(string)\n\t}\n\n\tif v, ok := m[\"finalizers\"].([]interface{}); ok && len(v) > 0 {\n\t\tmetadata.Finalizers = expandStringList(v)\n\t}\n\n\treturn metadata, nil\n}\n\nfunc expandApplicationSetIgnoreDifferences(ids []interface{}, featureApplicationSetIgnoreApplicationDifferences bool) (result []application.ApplicationSetResourceIgnoreDifferences) {\n\tif !featureApplicationSetIgnoreApplicationDifferences {\n\t\treturn result\n\t}\n\n\tfor _, _id := range ids {\n\t\tid := _id.(map[string]interface{})\n\n\t\tvar elem = application.ApplicationSetResourceIgnoreDifferences{}\n\n\t\tif v, ok := id[\"json_pointers\"]; ok {\n\t\t\tjps := v.(*schema.Set).List()\n\t\t\tfor _, jp := range jps {\n\t\t\t\telem.JSONPointers = append(elem.JSONPointers, jp.(string))\n\t\t\t}\n\t\t}\n\n\t\tif v, ok := id[\"jq_path_expressions\"]; ok {\n\t\t\tjqpes := v.(*schema.Set).List()\n\t\t\tfor _, jqpe := range jqpes {\n\t\t\t\telem.JQPathExpressions = append(elem.JQPathExpressions, jqpe.(string))\n\t\t\t}\n\t\t}\n\n\t\tif v, ok := id[\"name\"]; ok {\n\t\t\telem.Name = v.(string)\n\t\t}\n\n\t\tresult = append(result, elem)\n\t}\n\n\treturn result\n}\nfunc flattenApplicationSet(as *application.ApplicationSet, d *schema.ResourceData) error {\n\tfMetadata := flattenMetadata(as.ObjectMeta, d)\n\tif err := d.Set(\"metadata\", fMetadata); err != nil {\n\t\te, _ := json.MarshalIndent(fMetadata, \"\", \"\\t\")\n\t\treturn fmt.Errorf(\"error persisting metadata: %s\\n%s\", err, e)\n\t}\n\n\tfSpec, err := flattenApplicationSetSpec(as.Spec)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif err := d.Set(\"spec\", fSpec); err != nil {\n\t\te, _ := json.MarshalIndent(fSpec, \"\", \"\\t\")\n\t\treturn fmt.Errorf(\"error persisting spec: %s\\n%s\", err, e)\n\t}\n\n\treturn nil\n}\n\nfunc flattenApplicationSetSpec(s application.ApplicationSetSpec) ([]map[string]interface{}, error) {\n\tgenerators := make([]interface{}, len(s.Generators))\n\n\tfor i, g := range s.Generators {\n\t\tgenerator, err := flattenGenerator(g)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tgenerators[i] = generator\n\t}\n\n\tspec := map[string]interface{}{\n\t\t\"generator\":           generators,\n\t\t\"go_template\":         s.GoTemplate,\n\t\t\"go_template_options\": s.GoTemplateOptions,\n\t\t\"template\":            flattenApplicationSetTemplate(s.Template),\n\t\t\"template_patch\":      s.TemplatePatch,\n\t}\n\n\tif s.Strategy != nil {\n\t\tspec[\"strategy\"] = flattenApplicationSetStrategy(*s.Strategy)\n\t}\n\n\tif s.SyncPolicy != nil {\n\t\tspec[\"sync_policy\"] = flattenApplicationSetSyncPolicy(*s.SyncPolicy)\n\t}\n\n\tif s.IgnoreApplicationDifferences != nil {\n\t\tspec[\"ignore_application_differences\"] = flattenApplicationSetIgnoreDifferences(s.IgnoreApplicationDifferences)\n\t}\n\n\treturn []map[string]interface{}{spec}, nil\n}\n\nfunc flattenApplicationSetIgnoreDifferences(ids application.ApplicationSetIgnoreDifferences) (result []map[string]interface{}) {\n\tfor _, id := range ids {\n\t\tresult = append(result, map[string]interface{}{\n\t\t\t\"name\":                id.Name,\n\t\t\t\"json_pointers\":       id.JSONPointers,\n\t\t\t\"jq_path_expressions\": id.JQPathExpressions,\n\t\t})\n\t}\n\n\treturn\n}\nfunc flattenGenerator(g application.ApplicationSetGenerator) (map[string]interface{}, error) {\n\tgenerator := map[string]interface{}{}\n\n\tif g.Clusters != nil {\n\t\tgenerator[\"clusters\"] = flattenApplicationSetClusterGenerator(g.Clusters)\n\t} else if g.ClusterDecisionResource != nil {\n\t\tgenerator[\"cluster_decision_resource\"] = flattenApplicationSetClusterDecisionResourceGenerator(g.ClusterDecisionResource)\n\t} else if g.Git != nil {\n\t\tgenerator[\"git\"] = flattenApplicationSetGitGenerator(g.Git)\n\t} else if g.List != nil {\n\t\tlist, err := flattenApplicationSetListGenerator(g.List)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tgenerator[\"list\"] = list\n\t} else if g.Matrix != nil {\n\t\tmatrix, err := flattenApplicationSetMatrixGenerator(g.Matrix)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tgenerator[\"matrix\"] = matrix\n\t} else if g.Merge != nil {\n\t\tmatrix, err := flattenApplicationSetMergeGenerator(g.Merge)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tgenerator[\"merge\"] = matrix\n\t} else if g.SCMProvider != nil {\n\t\tgenerator[\"scm_provider\"] = flattenApplicationSetSCMProviderGenerator(g.SCMProvider)\n\t} else if g.PullRequest != nil {\n\t\tgenerator[\"pull_request\"] = flattenApplicationSetPullRequestGenerator(g.PullRequest)\n\t} else if g.Plugin != nil {\n\t\tpluginGenerator, err := flattenApplicationSetPluginGenerator(g.Plugin)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tgenerator[\"plugin\"] = pluginGenerator\n\t}\n\n\tif g.Selector != nil {\n\t\tgenerator[\"selector\"] = flattenLabelSelector(g.Selector)\n\t}\n\n\treturn generator, nil\n}\n\nfunc flattenApplicationSetClusterGenerator(c *application.ClusterGenerator) []map[string]interface{} {\n\tg := map[string]interface{}{\n\t\t\"enabled\":  true,\n\t\t\"selector\": flattenLabelSelector(&c.Selector),\n\t\t\"template\": flattenApplicationSetTemplate(c.Template),\n\t\t\"values\":   c.Values,\n\t}\n\n\treturn []map[string]interface{}{g}\n}\n\nfunc flattenApplicationSetClusterDecisionResourceGenerator(c *application.DuckTypeGenerator) []map[string]interface{} {\n\tg := map[string]interface{}{\n\t\t\"config_map_ref\": c.ConfigMapRef,\n\t\t\"label_selector\": flattenLabelSelector(&c.LabelSelector),\n\t\t\"name\":           c.Name,\n\t\t\"template\":       flattenApplicationSetTemplate(c.Template),\n\t\t\"values\":         c.Values,\n\t}\n\n\tif c.RequeueAfterSeconds != nil {\n\t\tg[\"requeue_after_seconds\"] = convertInt64PointerToString(c.RequeueAfterSeconds)\n\t}\n\n\treturn []map[string]interface{}{g}\n}\n\nfunc flattenApplicationSetGitGenerator(gg *application.GitGenerator) []map[string]interface{} {\n\tg := map[string]interface{}{\n\t\t\"repo_url\":          gg.RepoURL,\n\t\t\"revision\":          gg.Revision,\n\t\t\"path_param_prefix\": gg.PathParamPrefix,\n\t\t\"template\":          flattenApplicationSetTemplate(gg.Template),\n\t\t\"values\":            gg.Values,\n\t}\n\n\tif len(gg.Directories) > 0 {\n\t\tdirectories := make([]map[string]interface{}, len(gg.Directories))\n\t\tfor i, d := range gg.Directories {\n\t\t\tdirectories[i] = map[string]interface{}{\n\t\t\t\t\"path\":    d.Path,\n\t\t\t\t\"exclude\": d.Exclude,\n\t\t\t}\n\t\t}\n\n\t\tg[\"directory\"] = directories\n\t}\n\n\tif len(gg.Files) > 0 {\n\t\tfiles := make([]map[string]interface{}, len(gg.Files))\n\t\tfor i, f := range gg.Files {\n\t\t\tfiles[i] = map[string]interface{}{\n\t\t\t\t\"path\": f.Path,\n\t\t\t}\n\t\t}\n\n\t\tg[\"file\"] = files\n\t}\n\n\tif gg.RequeueAfterSeconds != nil {\n\t\tg[\"requeue_after_seconds\"] = convertInt64PointerToString(gg.RequeueAfterSeconds)\n\t}\n\n\treturn []map[string]interface{}{g}\n}\n\nfunc flattenApplicationSetListGenerator(lg *application.ListGenerator) ([]map[string]interface{}, error) {\n\telements := make([]interface{}, len(lg.Elements))\n\n\tfor i, e := range lg.Elements {\n\t\telement := make(map[string]interface{})\n\n\t\terr := json.Unmarshal(e.Raw, &element)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to unmarshal list generator element: %w\", err)\n\t\t}\n\n\t\telements[i] = element\n\t}\n\n\tg := map[string]interface{}{\n\t\t\"elements\": elements,\n\t\t\"template\": flattenApplicationSetTemplate(lg.Template),\n\t}\n\n\t// Add elements_yaml field if it's set\n\tif lg.ElementsYaml != \"\" {\n\t\tg[\"elements_yaml\"] = lg.ElementsYaml\n\t}\n\n\treturn []map[string]interface{}{g}, nil\n}\n\nfunc flattenApplicationSetMatrixGenerator(mg *application.MatrixGenerator) ([]map[string]interface{}, error) {\n\tgenerators := make([]interface{}, len(mg.Generators))\n\n\tfor i, g := range mg.Generators {\n\t\tfg, err := flattenNestedGenerator(g)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tgenerators[i] = fg\n\t}\n\n\tg := map[string]interface{}{\n\t\t\"generator\": generators,\n\t\t\"template\":  flattenApplicationSetTemplate(mg.Template),\n\t}\n\n\treturn []map[string]interface{}{g}, nil\n}\n\nfunc flattenApplicationSetMergeGenerator(mg *application.MergeGenerator) ([]map[string]interface{}, error) {\n\tgenerators := make([]interface{}, len(mg.Generators))\n\n\tfor i, g := range mg.Generators {\n\t\tfg, err := flattenNestedGenerator(g)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tgenerators[i] = fg\n\t}\n\n\tg := map[string]interface{}{\n\t\t\"merge_keys\": mg.MergeKeys,\n\t\t\"generator\":  generators,\n\t\t\"template\":   flattenApplicationSetTemplate(mg.Template),\n\t}\n\n\treturn []map[string]interface{}{g}, nil\n}\n\nfunc flattenApplicationSetPluginGenerator(plg *application.PluginGenerator) ([]map[string]interface{}, error) {\n\tg := map[string]interface{}{}\n\n\tif plg.Input.Parameters != nil {\n\t\tinput := map[string]interface{}{}\n\t\tparameters := map[string]string{}\n\n\t\t// TODO: In reality, the parameters map can potentially contain anything, but\n\t\t// terraform-plugin-sdk doesn't really support the notion of `any`. We need to\n\t\t// improve this once we upgrade to terraform-plugin-framework\n\t\tfor k, v := range plg.Input.Parameters {\n\t\t\tvar str string\n\t\t\terr := json.Unmarshal(v.Raw, &str)\n\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\tparameters[k] = str\n\t\t}\n\n\t\tinput[\"parameters\"] = parameters\n\t\tg[\"input\"] = []map[string]interface{}{input}\n\t}\n\n\tif plg.ConfigMapRef.Name != \"\" {\n\t\tg[\"config_map_ref\"] = plg.ConfigMapRef.Name\n\t}\n\n\tif plg.RequeueAfterSeconds != nil {\n\t\tg[\"requeue_after_seconds\"] = convertInt64PointerToString(plg.RequeueAfterSeconds)\n\t}\n\n\tg[\"template\"] = flattenApplicationSetTemplate(plg.Template)\n\n\treturn []map[string]interface{}{g}, nil\n}\n\nfunc flattenApplicationSetPullRequestGenerator(prg *application.PullRequestGenerator) []map[string]interface{} {\n\tg := map[string]interface{}{}\n\n\tif prg.AzureDevOps != nil {\n\t\tg[\"azure_devops\"] = flattenApplicationSetPullRequestGeneratorAzureDevOps(prg.AzureDevOps)\n\t} else if prg.BitbucketServer != nil {\n\t\tg[\"bitbucket_server\"] = flattenApplicationSetPullRequestGeneratorBitbucketServer(prg.BitbucketServer)\n\t} else if prg.Gitea != nil {\n\t\tg[\"gitea\"] = flattenApplicationSetPullRequestGeneratorGitea(prg.Gitea)\n\t} else if prg.Github != nil {\n\t\tg[\"github\"] = flattenApplicationSetPullRequestGeneratorGithub(prg.Github)\n\t} else if prg.GitLab != nil {\n\t\tg[\"gitlab\"] = flattenApplicationSetPullRequestGeneratorGitlab(prg.GitLab)\n\t}\n\n\tif len(prg.Filters) > 0 {\n\t\tg[\"filter\"] = flattenApplicationSetPullRequestGeneratorFilter(prg.Filters)\n\t}\n\n\tif prg.RequeueAfterSeconds != nil {\n\t\tg[\"requeue_after_seconds\"] = convertInt64PointerToString(prg.RequeueAfterSeconds)\n\t}\n\n\tg[\"template\"] = flattenApplicationSetTemplate(prg.Template)\n\n\treturn []map[string]interface{}{g}\n}\n\nfunc flattenApplicationSetPullRequestGeneratorBitbucketServer(prgbs *application.PullRequestGeneratorBitbucketServer) []map[string]interface{} {\n\tbb := map[string]interface{}{\n\t\t\"api\":     prgbs.API,\n\t\t\"project\": prgbs.Project,\n\t\t\"repo\":    prgbs.Repo,\n\t}\n\n\tif prgbs.BasicAuth != nil {\n\t\tba := map[string]interface{}{\n\t\t\t\"username\": prgbs.BasicAuth.Username,\n\t\t}\n\n\t\tif prgbs.BasicAuth.PasswordRef != nil {\n\t\t\tba[\"password_ref\"] = flattenSecretRef(*prgbs.BasicAuth.PasswordRef)\n\t\t}\n\n\t\tbb[\"basic_auth\"] = []map[string]interface{}{ba}\n\t}\n\n\treturn []map[string]interface{}{bb}\n}\n\nfunc flattenApplicationSetPullRequestGeneratorGitea(prgg *application.PullRequestGeneratorGitea) []map[string]interface{} {\n\tg := map[string]interface{}{\n\t\t\"api\":      prgg.API,\n\t\t\"insecure\": prgg.Insecure,\n\t\t\"owner\":    prgg.Owner,\n\t\t\"repo\":     prgg.Repo,\n\t}\n\n\tif prgg.TokenRef != nil {\n\t\tg[\"token_ref\"] = flattenSecretRef(*prgg.TokenRef)\n\t}\n\n\treturn []map[string]interface{}{g}\n}\n\nfunc flattenApplicationSetPullRequestGeneratorGithub(prgg *application.PullRequestGeneratorGithub) []map[string]interface{} {\n\tg := map[string]interface{}{\n\t\t\"api\":             prgg.API,\n\t\t\"app_secret_name\": prgg.AppSecretName,\n\t\t\"owner\":           prgg.Owner,\n\t\t\"repo\":            prgg.Repo,\n\t}\n\n\tif len(prgg.Labels) > 0 {\n\t\tg[\"labels\"] = prgg.Labels\n\t}\n\n\tif prgg.TokenRef != nil {\n\t\tg[\"token_ref\"] = flattenSecretRef(*prgg.TokenRef)\n\t}\n\n\treturn []map[string]interface{}{g}\n}\n\nfunc flattenApplicationSetPullRequestGeneratorGitlab(prgg *application.PullRequestGeneratorGitLab) []map[string]interface{} {\n\tg := map[string]interface{}{\n\t\t\"api\":                prgg.API,\n\t\t\"project\":            prgg.Project,\n\t\t\"pull_request_state\": prgg.PullRequestState,\n\t\t\"insecure\":           prgg.Insecure,\n\t}\n\n\tif len(prgg.Labels) > 0 {\n\t\tg[\"labels\"] = prgg.Labels\n\t}\n\n\tif prgg.TokenRef != nil {\n\t\tg[\"token_ref\"] = flattenSecretRef(*prgg.TokenRef)\n\t}\n\n\tif prgg.CARef != nil {\n\t\tg[\"ca_ref\"] = flattenConfigMapKeyRef(*prgg.CARef)\n\t}\n\n\treturn []map[string]interface{}{g}\n}\n\nfunc flattenApplicationSetPullRequestGeneratorAzureDevOps(prgado *application.PullRequestGeneratorAzureDevOps) []map[string]interface{} {\n\ta := map[string]interface{}{\n\t\t\"api\":          prgado.API,\n\t\t\"organization\": prgado.Organization,\n\t\t\"project\":      prgado.Project,\n\t\t\"repo\":         prgado.Repo,\n\t}\n\n\tif len(prgado.Labels) > 0 {\n\t\ta[\"labels\"] = prgado.Labels\n\t}\n\n\tif prgado.TokenRef != nil {\n\t\ta[\"token_ref\"] = flattenSecretRef(*prgado.TokenRef)\n\t}\n\n\treturn []map[string]interface{}{a}\n}\n\nfunc flattenApplicationSetPullRequestGeneratorFilter(spgfs []application.PullRequestGeneratorFilter) []map[string]interface{} {\n\tfs := make([]map[string]interface{}, len(spgfs))\n\n\tfor i, v := range spgfs {\n\t\tfs[i] = map[string]interface{}{}\n\n\t\tif v.BranchMatch != nil {\n\t\t\tfs[i][\"branch_match\"] = *v.BranchMatch\n\t\t}\n\t}\n\n\treturn fs\n}\n\nfunc flattenApplicationSetSCMProviderGenerator(spg *application.SCMProviderGenerator) []map[string]interface{} {\n\tg := map[string]interface{}{\n\t\t\"clone_protocol\": spg.CloneProtocol,\n\t}\n\n\tif spg.AzureDevOps != nil {\n\t\tg[\"azure_devops\"] = flattenApplicationSetSCMProviderGeneratorAzureDevOps(spg.AzureDevOps)\n\t} else if spg.Bitbucket != nil {\n\t\tg[\"bitbucket_cloud\"] = flattenApplicationSetSCMProviderGeneratorBitbucket(spg.Bitbucket)\n\t} else if spg.BitbucketServer != nil {\n\t\tg[\"bitbucket_server\"] = flattenApplicationSetSCMProviderGeneratorBitbucketServer(spg.BitbucketServer)\n\t} else if spg.Gitea != nil {\n\t\tg[\"gitea\"] = flattenApplicationSetSCMProviderGeneratorGitea(spg.Gitea)\n\t} else if spg.Github != nil {\n\t\tg[\"github\"] = flattenApplicationSetSCMProviderGeneratorGithub(spg.Github)\n\t} else if spg.Gitlab != nil {\n\t\tg[\"gitlab\"] = flattenApplicationSetSCMProviderGeneratorGitlab(spg.Gitlab)\n\t}\n\n\tif len(spg.Filters) > 0 {\n\t\tg[\"filter\"] = flattenApplicationSetSCMProviderGeneratorFilter(spg.Filters)\n\t}\n\n\tif spg.RequeueAfterSeconds != nil {\n\t\tg[\"requeue_after_seconds\"] = convertInt64PointerToString(spg.RequeueAfterSeconds)\n\t}\n\n\tg[\"template\"] = flattenApplicationSetTemplate(spg.Template)\n\n\treturn []map[string]interface{}{g}\n}\n\nfunc flattenApplicationSetSCMProviderGeneratorAzureDevOps(spgado *application.SCMProviderGeneratorAzureDevOps) []map[string]interface{} {\n\ta := map[string]interface{}{\n\t\t\"all_branches\": spgado.AllBranches,\n\t\t\"api\":          spgado.API,\n\t\t\"organization\": spgado.Organization,\n\t\t\"team_project\": spgado.TeamProject,\n\t}\n\n\tif spgado.AccessTokenRef != nil {\n\t\ta[\"access_token_ref\"] = flattenSecretRef(*spgado.AccessTokenRef)\n\t}\n\n\treturn []map[string]interface{}{a}\n}\n\nfunc flattenApplicationSetSCMProviderGeneratorBitbucket(spgb *application.SCMProviderGeneratorBitbucket) []map[string]interface{} {\n\tbb := map[string]interface{}{\n\t\t\"all_branches\": spgb.AllBranches,\n\t\t\"owner\":        spgb.Owner,\n\t\t\"user\":         spgb.User,\n\t}\n\n\tif spgb.AppPasswordRef != nil {\n\t\tbb[\"app_password_ref\"] = flattenSecretRef(*spgb.AppPasswordRef)\n\t}\n\n\treturn []map[string]interface{}{bb}\n}\n\nfunc flattenApplicationSetSCMProviderGeneratorBitbucketServer(spgbs *application.SCMProviderGeneratorBitbucketServer) []map[string]interface{} {\n\tbb := map[string]interface{}{\n\t\t\"all_branches\": spgbs.AllBranches,\n\t\t\"api\":          spgbs.API,\n\t\t\"project\":      spgbs.Project,\n\t}\n\n\tif spgbs.BasicAuth != nil {\n\t\tba := map[string]interface{}{\n\t\t\t\"username\": spgbs.BasicAuth.Username,\n\t\t}\n\n\t\tif spgbs.BasicAuth.PasswordRef != nil {\n\t\t\tba[\"password_ref\"] = flattenSecretRef(*spgbs.BasicAuth.PasswordRef)\n\t\t}\n\n\t\tbb[\"basic_auth\"] = []map[string]interface{}{ba}\n\t}\n\n\treturn []map[string]interface{}{bb}\n}\n\nfunc flattenApplicationSetSCMProviderGeneratorGitea(spgg *application.SCMProviderGeneratorGitea) []map[string]interface{} {\n\tg := map[string]interface{}{\n\t\t\"all_branches\": spgg.AllBranches,\n\t\t\"api\":          spgg.API,\n\t\t\"insecure\":     spgg.Insecure,\n\t\t\"owner\":        spgg.Owner,\n\t}\n\n\tif spgg.TokenRef != nil {\n\t\tg[\"token_ref\"] = flattenSecretRef(*spgg.TokenRef)\n\t}\n\n\treturn []map[string]interface{}{g}\n}\n\nfunc flattenApplicationSetSCMProviderGeneratorGithub(spgg *application.SCMProviderGeneratorGithub) []map[string]interface{} {\n\tg := map[string]interface{}{\n\t\t\"all_branches\":    spgg.AllBranches,\n\t\t\"api\":             spgg.API,\n\t\t\"app_secret_name\": spgg.AppSecretName,\n\t\t\"organization\":    spgg.Organization,\n\t}\n\n\tif spgg.TokenRef != nil {\n\t\tg[\"token_ref\"] = flattenSecretRef(*spgg.TokenRef)\n\t}\n\n\treturn []map[string]interface{}{g}\n}\n\nfunc flattenApplicationSetSCMProviderGeneratorGitlab(spgg *application.SCMProviderGeneratorGitlab) []map[string]interface{} {\n\tg := map[string]interface{}{\n\t\t\"all_branches\":      spgg.AllBranches,\n\t\t\"api\":               spgg.API,\n\t\t\"group\":             spgg.Group,\n\t\t\"include_subgroups\": spgg.IncludeSubgroups,\n\t}\n\n\tif spgg.TokenRef != nil {\n\t\tg[\"token_ref\"] = flattenSecretRef(*spgg.TokenRef)\n\t}\n\n\treturn []map[string]interface{}{g}\n}\n\nfunc flattenApplicationSetSCMProviderGeneratorFilter(spgfs []application.SCMProviderGeneratorFilter) []map[string]interface{} {\n\tfs := make([]map[string]interface{}, len(spgfs))\n\n\tfor i, v := range spgfs {\n\t\tfs[i] = map[string]interface{}{}\n\n\t\tif v.BranchMatch != nil {\n\t\t\tfs[i][\"branch_match\"] = *v.BranchMatch\n\t\t}\n\n\t\tif v.LabelMatch != nil {\n\t\t\tfs[i][\"label_match\"] = *v.LabelMatch\n\t\t}\n\n\t\tif len(v.PathsDoNotExist) > 0 {\n\t\t\tfs[i][\"paths_do_not_exist\"] = v.PathsDoNotExist\n\t\t}\n\n\t\tif len(v.PathsExist) > 0 {\n\t\t\tfs[i][\"paths_exist\"] = v.PathsExist\n\t\t}\n\n\t\tif v.RepositoryMatch != nil {\n\t\t\tfs[i][\"repository_match\"] = *v.RepositoryMatch\n\t\t}\n\t}\n\n\treturn fs\n}\n\nfunc flattenNestedGenerator(g application.ApplicationSetNestedGenerator) (map[string]interface{}, error) {\n\tgenerator := map[string]interface{}{}\n\n\tif g.Clusters != nil {\n\t\tgenerator[\"clusters\"] = flattenApplicationSetClusterGenerator(g.Clusters)\n\t} else if g.ClusterDecisionResource != nil {\n\t\tgenerator[\"cluster_decision_resource\"] = flattenApplicationSetClusterDecisionResourceGenerator(g.ClusterDecisionResource)\n\t} else if g.Git != nil {\n\t\tgenerator[\"git\"] = flattenApplicationSetGitGenerator(g.Git)\n\t} else if g.List != nil {\n\t\tlist, err := flattenApplicationSetListGenerator(g.List)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tgenerator[\"list\"] = list\n\t} else if g.Matrix != nil {\n\t\tmg, err := application.ToNestedMatrixGenerator(g.Matrix)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to unmarshal nested matrix generator: %w\", err)\n\t\t}\n\n\t\tmatrix, err := flattenApplicationSetMatrixGenerator(mg.ToMatrixGenerator())\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tgenerator[\"matrix\"] = matrix\n\t} else if g.Merge != nil {\n\t\tmg, err := application.ToNestedMergeGenerator(g.Merge)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to unmarshal nested matrix generator: %w\", err)\n\t\t}\n\n\t\tmerge, err := flattenApplicationSetMergeGenerator(mg.ToMergeGenerator())\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tgenerator[\"merge\"] = merge\n\t} else if g.SCMProvider != nil {\n\t\tgenerator[\"scm_provider\"] = flattenApplicationSetSCMProviderGenerator(g.SCMProvider)\n\t} else if g.PullRequest != nil {\n\t\tgenerator[\"pull_request\"] = flattenApplicationSetPullRequestGenerator(g.PullRequest)\n\t} else if g.Plugin != nil {\n\t\tplugin, err := flattenApplicationSetPluginGenerator(g.Plugin)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tgenerator[\"plugin\"] = plugin\n\t}\n\n\tif g.Selector != nil {\n\t\tgenerator[\"selector\"] = flattenLabelSelector(g.Selector)\n\t}\n\n\treturn generator, nil\n}\n\nfunc flattenApplicationSetStrategy(ass application.ApplicationSetStrategy) []map[string]interface{} {\n\tp := map[string]interface{}{\n\t\t\"type\": ass.Type,\n\t}\n\n\tif ass.RollingSync != nil {\n\t\tp[\"rolling_sync\"] = flattenApplicationSetRolloutStrategy(*ass.RollingSync)\n\t}\n\n\treturn []map[string]interface{}{p}\n}\n\nfunc flattenApplicationSetRolloutStrategy(asrs application.ApplicationSetRolloutStrategy) []map[string]interface{} {\n\trs := map[string]interface{}{\n\t\t\"step\": flattenApplicationSetRolloutSteps(asrs.Steps),\n\t}\n\n\treturn []map[string]interface{}{rs}\n}\n\nfunc flattenApplicationSetRolloutSteps(asrss []application.ApplicationSetRolloutStep) []map[string]interface{} {\n\trss := make([]map[string]interface{}, len(asrss))\n\n\tfor i, s := range asrss {\n\t\trss[i] = map[string]interface{}{\n\t\t\t\"match_expressions\": flattenApplicationMatchExpression(s.MatchExpressions),\n\t\t}\n\n\t\tif s.MaxUpdate != nil {\n\t\t\trss[i][\"max_update\"] = flattenIntOrString(s.MaxUpdate)\n\t\t}\n\t}\n\n\treturn rss\n}\n\nfunc flattenApplicationMatchExpression(in []application.ApplicationMatchExpression) []map[string]interface{} {\n\tme := make([]map[string]interface{}, len(in))\n\n\tfor i, n := range in {\n\t\tme[i] = map[string]interface{}{\n\t\t\t\"key\":      n.Key,\n\t\t\t\"operator\": n.Operator,\n\t\t\t\"values\":   newStringSet(schema.HashString, n.Values),\n\t\t}\n\t}\n\n\treturn me\n}\n\nfunc flattenApplicationSetSyncPolicy(assp application.ApplicationSetSyncPolicy) []map[string]interface{} {\n\tp := map[string]interface{}{\n\t\t\"preserve_resources_on_deletion\": assp.PreserveResourcesOnDeletion,\n\t\t\"applications_sync\":              assp.ApplicationsSync,\n\t}\n\n\treturn []map[string]interface{}{p}\n}\n\nfunc flattenApplicationSetTemplate(ast application.ApplicationSetTemplate) []map[string]interface{} {\n\t// Hack: Prior to ArgoCD 2.6.3, `Source` was not a pointer and as such a\n\t// zero value would be returned. However, this \"zero\" value means that the\n\t// `Template` is considered as non-zero in newer versions because the\n\t// pointer contains an object. To support versions of ArgoCD prior to 2.6.3,\n\t// we need to explicitly set the pointer to nil.\n\tif ast.Spec.Source != nil && ast.Spec.Source.IsZero() {\n\t\tast.Spec.Source = nil\n\t}\n\n\tif reflect.ValueOf(ast).IsZero() {\n\t\treturn nil\n\t}\n\n\tt := map[string]interface{}{\n\t\t\"metadata\": flattenApplicationSetTemplateMetadata(ast.ApplicationSetTemplateMeta),\n\t\t\"spec\":     flattenApplicationSpec(ast.Spec),\n\t}\n\n\treturn []map[string]interface{}{t}\n}\n\nfunc flattenApplicationSetTemplateMetadata(tm application.ApplicationSetTemplateMeta) []map[string]interface{} {\n\tm := map[string]interface{}{\n\t\t\"annotations\": tm.Annotations,\n\t\t\"finalizers\":  tm.Finalizers,\n\t\t\"labels\":      tm.Labels,\n\t\t\"name\":        tm.Name,\n\t\t\"namespace\":   tm.Namespace,\n\t}\n\n\treturn []map[string]interface{}{m}\n}\n"
  },
  {
    "path": "argocd/structure_cluster.go",
    "content": "package argocd\n\nimport (\n\t\"fmt\"\n\n\tapplication \"github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1\"\n\t\"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema\"\n)\n\nfunc expandCluster(d *schema.ResourceData) (*application.Cluster, error) {\n\tcluster := &application.Cluster{}\n\n\tif v, ok := d.GetOk(\"name\"); ok {\n\t\tcluster.Name = v.(string)\n\t}\n\n\tif v, ok := d.GetOk(\"server\"); ok {\n\t\tcluster.Server = v.(string)\n\t}\n\n\tif v, ok := d.GetOk(\"shard\"); ok {\n\t\tshard, err := convertStringToInt64Pointer(v.(string))\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tcluster.Shard = shard\n\t}\n\n\tif ns, ok := d.GetOk(\"namespaces\"); ok {\n\t\tfor _, n := range ns.([]interface{}) {\n\t\t\tif n == nil {\n\t\t\t\treturn nil, fmt.Errorf(\"namespaces: must contain non-empty strings\")\n\t\t\t}\n\n\t\t\tcluster.Namespaces = append(cluster.Namespaces, n.(string))\n\t\t}\n\t}\n\n\tif v, ok := d.GetOk(\"config\"); ok {\n\t\tcluster.Config = expandClusterConfig(v.([]interface{})[0])\n\t}\n\n\tm := expandMetadata(d)\n\tcluster.Annotations = m.Annotations\n\tcluster.Labels = m.Labels\n\n\tif v, ok := d.GetOk(\"project\"); ok {\n\t\tcluster.Project = v.(string)\n\t}\n\n\treturn cluster, nil\n}\n\nfunc expandClusterConfig(config interface{}) application.ClusterConfig {\n\tclusterConfig := application.ClusterConfig{}\n\n\tc := config.(map[string]interface{})\n\tif aws, ok := c[\"aws_auth_config\"].([]interface{}); ok && len(aws) > 0 {\n\t\tclusterConfig.AWSAuthConfig = &application.AWSAuthConfig{}\n\n\t\tfor k, v := range aws[0].(map[string]interface{}) {\n\t\t\tswitch k {\n\t\t\tcase \"cluster_name\":\n\t\t\t\tclusterConfig.AWSAuthConfig.ClusterName = v.(string)\n\t\t\tcase \"role_arn\":\n\t\t\t\tclusterConfig.AWSAuthConfig.RoleARN = v.(string)\n\t\t\t}\n\t\t}\n\t}\n\n\tif v, ok := c[\"bearer_token\"]; ok {\n\t\tclusterConfig.BearerToken = v.(string)\n\t}\n\n\tif v, ok := c[\"username\"]; ok {\n\t\tclusterConfig.Username = v.(string)\n\t}\n\n\tif v, ok := c[\"password\"]; ok {\n\t\tclusterConfig.Password = v.(string)\n\t}\n\n\tif tls, ok := c[\"tls_client_config\"].([]interface{}); ok && len(tls) > 0 {\n\t\tclusterConfig.TLSClientConfig = application.TLSClientConfig{}\n\n\t\tfor k, v := range tls[0].(map[string]interface{}) {\n\t\t\tswitch k {\n\t\t\tcase \"ca_data\":\n\t\t\t\tclusterConfig.CAData = []byte(v.(string))\n\t\t\tcase \"cert_data\":\n\t\t\t\tclusterConfig.CertData = []byte(v.(string))\n\t\t\tcase \"key_data\":\n\t\t\t\tclusterConfig.KeyData = []byte(v.(string))\n\t\t\tcase \"insecure\":\n\t\t\t\tclusterConfig.Insecure = v.(bool)\n\t\t\tcase \"server_name\":\n\t\t\t\tclusterConfig.ServerName = v.(string)\n\t\t\t}\n\t\t}\n\t}\n\n\tif epc, ok := c[\"exec_provider_config\"].([]interface{}); ok && len(epc) > 0 {\n\t\tclusterConfig.ExecProviderConfig = &application.ExecProviderConfig{}\n\n\t\tfor k, v := range epc[0].(map[string]interface{}) {\n\t\t\tswitch k {\n\t\t\tcase \"api_version\":\n\t\t\t\tclusterConfig.ExecProviderConfig.APIVersion = v.(string)\n\t\t\tcase \"args\":\n\t\t\t\targsI := v.([]interface{})\n\t\t\t\tfor _, argI := range argsI {\n\t\t\t\t\tclusterConfig.ExecProviderConfig.Args = append(clusterConfig.ExecProviderConfig.Args, argI.(string))\n\t\t\t\t}\n\t\t\tcase \"command\":\n\t\t\t\tclusterConfig.ExecProviderConfig.Command = v.(string)\n\t\t\tcase \"install_hint\":\n\t\t\t\tclusterConfig.ExecProviderConfig.InstallHint = v.(string)\n\t\t\tcase \"env\":\n\t\t\t\tclusterConfig.ExecProviderConfig.Env = make(map[string]string)\n\n\t\t\t\tenvI := v.(map[string]interface{})\n\t\t\t\tfor key, val := range envI {\n\t\t\t\t\tclusterConfig.ExecProviderConfig.Env[key] = val.(string)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn clusterConfig\n}\n\nfunc flattenCluster(cluster *application.Cluster, d *schema.ResourceData) error {\n\tr := map[string]interface{}{\n\t\t\"name\":       cluster.Name,\n\t\t\"server\":     cluster.Server,\n\t\t\"namespaces\": cluster.Namespaces,\n\t\t\"info\":       flattenClusterInfo(cluster.Info),\n\t\t\"config\":     flattenClusterConfig(cluster.Config, d),\n\t\t\"project\":    cluster.Project,\n\t}\n\n\tif len(cluster.Annotations) != 0 || len(cluster.Labels) != 0 {\n\t\t// The generic flattenMetadata function can not be used since the Cluster\n\t\t// object does not actually have ObjectMeta, just label and annotation maps\n\t\tr[\"metadata\"] = flattenClusterMetadata(cluster.Annotations, cluster.Labels)\n\t}\n\n\tif cluster.Shard != nil {\n\t\tr[\"shard\"] = convertInt64PointerToString(cluster.Shard)\n\t}\n\n\tfor k, v := range r {\n\t\tif err := persistToState(k, v, d); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc flattenClusterInfo(info application.ClusterInfo) []map[string]interface{} {\n\treturn []map[string]interface{}{\n\t\t{\n\t\t\t\"server_version\":     info.ServerVersion,\n\t\t\t\"applications_count\": convertInt64ToString(info.ApplicationsCount),\n\t\t\t\"connection_state\": []map[string]string{\n\t\t\t\t{\n\t\t\t\t\t\"message\": info.ConnectionState.Message,\n\t\t\t\t\t\"status\":  info.ConnectionState.Status,\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc flattenClusterConfig(config application.ClusterConfig, d *schema.ResourceData) []map[string]interface{} {\n\tr := map[string]interface{}{\n\t\t\"username\":             config.Username,\n\t\t\"exec_provider_config\": flattenClusterConfigExecProviderConfig(d),\n\t\t\"tls_client_config\":    flattenClusterConfigTLSClientConfig(config.TLSClientConfig, d),\n\t}\n\n\tif config.AWSAuthConfig != nil {\n\t\tr[\"aws_auth_config\"] = []map[string]string{\n\t\t\t{\n\t\t\t\t\"cluster_name\": config.AWSAuthConfig.ClusterName,\n\t\t\t\t\"role_arn\":     config.AWSAuthConfig.RoleARN,\n\t\t\t},\n\t\t}\n\t}\n\n\t// ArgoCD API does not return these fields as they may contain\n\t// sensitive data. Thus, we can't track the state of these\n\t// attributes and load them from state instead.\n\t// See https://github.com/argoproj/argo-cd/blob/8840929187f4dd7b9d9fd908ea5085a006895507/server/cluster/cluster.go#L448-L466\n\tif bt, ok := d.GetOk(\"config.0.bearer_token\"); ok {\n\t\tr[\"bearer_token\"] = bt\n\t}\n\n\tif p, ok := d.GetOk(\"config.0.password\"); ok {\n\t\tr[\"password\"] = p\n\t}\n\n\treturn []map[string]interface{}{r}\n}\n\nfunc flattenClusterConfigTLSClientConfig(tcc application.TLSClientConfig, d *schema.ResourceData) []map[string]interface{} {\n\tc := map[string]interface{}{\n\t\t\"ca_data\":     string(tcc.CAData),\n\t\t\"cert_data\":   string(tcc.CertData),\n\t\t\"insecure\":    tcc.Insecure,\n\t\t\"server_name\": tcc.ServerName,\n\t}\n\n\t// ArgoCD API does not return sensitive data. Thus, we can't track\n\t// the state of this attribute and load it from state instead.\n\t// See https://github.com/argoproj/argo-cd/commit/60c62a944b155702e6d89cbef4c04ff0f525692f#diff-47255bee56d3ad7830d9721f65c73fac53009229cb98c63c67745527d598835bL473-L486\n\tif kd, ok := d.GetOk(\"config.0.tls_client_config.0.key_data\"); ok {\n\t\tc[\"key_data\"] = kd\n\t}\n\n\tif dd, ok := d.GetOk(\"config.0.tls_client_config.0.cert_data\"); ok {\n\t\tc[\"cert_data\"] = dd\n\t}\n\n\tif cd, ok := d.GetOk(\"config.0.tls_client_config.0.ca_data\"); ok {\n\t\tc[\"ca_data\"] = cd\n\t}\n\n\tif sn, ok := d.GetOk(\"config.0.tls_client_config.0.server_name\"); ok {\n\t\tc[\"server_name\"] = sn\n\t}\n\n\treturn []map[string]interface{}{c}\n}\n\nfunc flattenClusterConfigExecProviderConfig(d *schema.ResourceData) []map[string]interface{} {\n\t// ArgoCD API does not return the execProvider block as it may contain\n\t// sensitive data. Thus, we can't track the state of it\n\t// and load it from state instead.\n\t// See https://github.com/argoproj/argo-cd/commit/60c62a944b155702e6d89cbef4c04ff0f525692f#diff-47255bee56d3ad7830d9721f65c73fac53009229cb98c63c67745527d598835bL473-L486\n\tc := map[string]interface{}{}\n\tif args, ok := d.GetOk(\"config.0.exec_provider_config.0.args\"); ok {\n\t\tc[\"args\"] = args\n\t}\n\tif env, ok := d.GetOk(\"config.0.exec_provider_config.0.env\"); ok {\n\t\tc[\"env\"] = env\n\t}\n\tif command, ok := d.GetOk(\"config.0.exec_provider_config.0.command\"); ok {\n\t\tc[\"command\"] = command\n\t}\n\tif apiVersion, ok := d.GetOk(\"config.0.exec_provider_config.0.api_version\"); ok {\n\t\tc[\"api_version\"] = apiVersion\n\t}\n\tif installHint, ok := d.GetOk(\"config.0.exec_provider_config.0.install_hint\"); ok {\n\t\tc[\"install_hint\"] = installHint\n\t}\n\n\tif len(c) == 0 {\n\t\treturn nil\n\t}\n\treturn []map[string]interface{}{c}\n}\n\nfunc flattenClusterMetadata(annotations, labels map[string]string) []map[string]interface{} {\n\treturn []map[string]interface{}{\n\t\t{\n\t\t\t\"annotations\": annotations,\n\t\t\t\"labels\":      labels,\n\t\t},\n\t}\n}\n"
  },
  {
    "path": "argocd/structure_label_selector.go",
    "content": "package argocd\n\nimport (\n\t\"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema\"\n\tmetav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\"\n)\n\nfunc flattenLabelSelector(in *metav1.LabelSelector) []interface{} {\n\tif len(in.MatchLabels) == 0 && len(in.MatchExpressions) == 0 {\n\t\treturn nil\n\t}\n\n\tatt := make(map[string]interface{})\n\n\tif len(in.MatchLabels) > 0 {\n\t\tatt[\"match_labels\"] = in.MatchLabels\n\t}\n\n\tif len(in.MatchExpressions) > 0 {\n\t\tatt[\"match_expressions\"] = flattenLabelSelectorRequirement(in.MatchExpressions)\n\t}\n\n\treturn []interface{}{att}\n}\n\nfunc flattenLabelSelectorRequirement(in []metav1.LabelSelectorRequirement) []interface{} {\n\tatt := make([]interface{}, len(in))\n\n\tfor i, n := range in {\n\t\tm := make(map[string]interface{})\n\t\tm[\"key\"] = n.Key\n\t\tm[\"operator\"] = n.Operator\n\t\tm[\"values\"] = newStringSet(schema.HashString, n.Values)\n\t\tatt[i] = m\n\t}\n\n\treturn att\n}\n\nfunc expandLabelSelector(l []interface{}) metav1.LabelSelector {\n\tif len(l) == 0 || l[0] == nil {\n\t\treturn metav1.LabelSelector{}\n\t}\n\n\tobj := metav1.LabelSelector{}\n\tin := l[0].(map[string]interface{})\n\n\tif v, ok := in[\"match_labels\"].(map[string]interface{}); ok && len(v) > 0 {\n\t\tobj.MatchLabels = expandStringMap(v)\n\t}\n\n\tif v, ok := in[\"match_expressions\"].([]interface{}); ok && len(v) > 0 {\n\t\tobj.MatchExpressions = expandLabelSelectorRequirement(v)\n\t}\n\n\treturn obj\n}\n\nfunc expandLabelSelectorRequirement(l []interface{}) []metav1.LabelSelectorRequirement {\n\tif len(l) == 0 || l[0] == nil {\n\t\treturn []metav1.LabelSelectorRequirement{}\n\t}\n\n\tobj := make([]metav1.LabelSelectorRequirement, len(l))\n\n\tfor i, n := range l {\n\t\tin := n.(map[string]interface{})\n\t\tobj[i] = metav1.LabelSelectorRequirement{\n\t\t\tKey:      in[\"key\"].(string),\n\t\t\tOperator: metav1.LabelSelectorOperator(in[\"operator\"].(string)),\n\t\t\tValues:   sliceOfString(in[\"values\"].(*schema.Set).List()),\n\t\t}\n\t}\n\n\treturn obj\n}\n"
  },
  {
    "path": "argocd/structure_metadata.go",
    "content": "package argocd\n\nimport (\n\t\"fmt\"\n\t\"net/url\"\n\t\"strings\"\n\n\t\"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema\"\n\tmeta \"k8s.io/apimachinery/pkg/apis/meta/v1\"\n)\n\nfunc expandMetadata(d *schema.ResourceData) (meta meta.ObjectMeta) {\n\tm := d.Get(\"metadata.0\").(map[string]interface{})\n\n\tif v, ok := m[\"annotations\"].(map[string]interface{}); ok && len(v) > 0 {\n\t\tmeta.Annotations = expandStringMap(m[\"annotations\"].(map[string]interface{}))\n\t}\n\n\tif v, ok := m[\"labels\"].(map[string]interface{}); ok && len(v) > 0 {\n\t\tmeta.Labels = expandStringMap(m[\"labels\"].(map[string]interface{}))\n\t}\n\n\tif v, ok := m[\"name\"]; ok {\n\t\tmeta.Name = v.(string)\n\t}\n\n\tif v, ok := m[\"namespace\"]; ok {\n\t\tmeta.Namespace = v.(string)\n\t}\n\n\treturn meta\n}\n\nfunc flattenMetadata(meta meta.ObjectMeta, d *schema.ResourceData) []interface{} {\n\tm := map[string]interface{}{\n\t\t\"generation\":       meta.Generation,\n\t\t\"name\":             meta.Name,\n\t\t\"namespace\":        meta.Namespace,\n\t\t\"resource_version\": meta.ResourceVersion,\n\t\t\"uid\":              fmt.Sprintf(\"%v\", meta.UID),\n\t}\n\n\tannotations := d.Get(\"metadata.0.annotations\").(map[string]interface{})\n\tm[\"annotations\"] = metadataRemoveInternalKeys(meta.Annotations, annotations)\n\n\tlabels := d.Get(\"metadata.0.labels\").(map[string]interface{})\n\tm[\"labels\"] = metadataRemoveInternalKeys(meta.Labels, labels)\n\n\treturn []interface{}{m}\n}\n\nfunc metadataRemoveInternalKeys(m map[string]string, d map[string]interface{}) map[string]string {\n\tfor k := range m {\n\t\tif metadataIsInternalKey(k) && !isKeyInMap(k, d) {\n\t\t\tdelete(m, k)\n\t\t}\n\t}\n\n\treturn m\n}\n\nfunc metadataIsInternalKey(annotationKey string) bool {\n\tu, err := url.Parse(\"//\" + annotationKey)\n\tif err != nil {\n\t\treturn false\n\t}\n\n\treturn strings.HasSuffix(u.Hostname(), \"kubernetes.io\") || annotationKey == \"notified.notifications.argoproj.io\"\n}\n"
  },
  {
    "path": "argocd/structure_metadata_test.go",
    "content": "package argocd\n\nimport (\n\t\"fmt\"\n\t\"testing\"\n)\n\nfunc TestMetadataIsInternalKey(t *testing.T) {\n\tt.Parallel()\n\n\ttestCases := []struct {\n\t\tKey      string\n\t\tExpected bool\n\t}{\n\t\t{\"\", false},\n\t\t{\"anyKey\", false},\n\t\t{\"any.hostname.io\", false},\n\t\t{\"any.hostname.com/with/path\", false},\n\t\t{\"any.kubernetes.io\", true},\n\t\t{\"kubernetes.io\", true},\n\t\t{\"notified.notifications.argoproj.io\", true},\n\t}\n\tfor i, tc := range testCases {\n\t\tt.Run(fmt.Sprintf(\"%d\", i), func(t *testing.T) {\n\t\t\tt.Parallel()\n\n\t\t\tisInternal := metadataIsInternalKey(tc.Key)\n\t\t\tif tc.Expected && isInternal != tc.Expected {\n\t\t\t\tt.Fatalf(\"Expected %q to be internal\", tc.Key)\n\t\t\t}\n\n\t\t\tif !tc.Expected && isInternal != tc.Expected {\n\t\t\t\tt.Fatalf(\"Expected %q not to be internal\", tc.Key)\n\t\t\t}\n\t\t})\n\t}\n}\n"
  },
  {
    "path": "argocd/structures.go",
    "content": "package argocd\n\nimport (\n\t\"fmt\"\n\t\"strconv\"\n\t\"strings\"\n\n\tapplication \"github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1\"\n\t\"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema\"\n\t\"k8s.io/apimachinery/pkg/util/intstr\"\n)\n\nfunc expandIntOrString(s string) (*intstr.IntOrString, error) {\n\tif len(s) == 0 {\n\t\treturn nil, nil\n\t}\n\n\tif strings.HasSuffix(s, \"%\") {\n\t\treturn &intstr.IntOrString{\n\t\t\tStrVal: s,\n\t\t\tType:   intstr.String,\n\t\t}, nil\n\t}\n\n\ti, err := strconv.ParseInt(s, 10, 32)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to convert string to int32: %w\", err)\n\t}\n\n\treturn &intstr.IntOrString{\n\t\tIntVal: int32(i),\n\t\tType:   intstr.Int,\n\t}, nil\n}\n\nfunc expandSecretRef(sr map[string]interface{}) *application.SecretRef {\n\treturn &application.SecretRef{\n\t\tKey:        sr[\"key\"].(string),\n\t\tSecretName: sr[\"secret_name\"].(string),\n\t}\n}\n\nfunc expandConfigMapKeyRef(cmr map[string]interface{}) *application.ConfigMapKeyRef {\n\treturn &application.ConfigMapKeyRef{\n\t\tKey:           cmr[\"key\"].(string),\n\t\tConfigMapName: cmr[\"config_map_name\"].(string),\n\t}\n}\n\nfunc flattenIntOrString(ios *intstr.IntOrString) string {\n\tif ios == nil {\n\t\treturn \"\"\n\t}\n\n\tswitch {\n\tcase ios.StrVal != \"\":\n\t\treturn ios.StrVal\n\tdefault:\n\t\treturn strconv.Itoa(int(ios.IntVal))\n\t}\n}\n\nfunc flattenSecretRef(sr application.SecretRef) []map[string]interface{} {\n\treturn []map[string]interface{}{\n\t\t{\n\t\t\t\"key\":         sr.Key,\n\t\t\t\"secret_name\": sr.SecretName,\n\t\t},\n\t}\n}\n\nfunc flattenConfigMapKeyRef(cmr application.ConfigMapKeyRef) []map[string]interface{} {\n\treturn []map[string]interface{}{\n\t\t{\n\t\t\t\"key\":             cmr.Key,\n\t\t\t\"config_map_name\": cmr.ConfigMapName,\n\t\t},\n\t}\n}\n\nfunc newStringSet(f schema.SchemaSetFunc, in []string) *schema.Set {\n\tout := make([]interface{}, len(in))\n\n\tfor i, v := range in {\n\t\tout[i] = v\n\t}\n\n\treturn schema.NewSet(f, out)\n}\n"
  },
  {
    "path": "argocd/utils.go",
    "content": "package argocd\n\nimport (\n\t\"fmt\"\n\t\"regexp\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"github.com/argoproj-labs/terraform-provider-argocd/internal/features\"\n\n\t\"github.com/argoproj/argo-cd/v3/util/rbac\"\n\n\tfwdiag \"github.com/hashicorp/terraform-plugin-framework/diag\"\n\t\"github.com/hashicorp/terraform-plugin-sdk/v2/diag\"\n\t\"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema\"\n)\n\nfunc convertStringToInt64(s string) (i int64, err error) {\n\ti, err = strconv.ParseInt(s, 10, 64)\n\treturn\n}\n\nfunc convertInt64ToString(i int64) string {\n\treturn strconv.FormatInt(i, 10)\n}\n\nfunc convertInt64PointerToString(i *int64) string {\n\treturn strconv.FormatInt(*i, 10)\n}\n\nfunc convertStringToInt64Pointer(s string) (*int64, error) {\n\ti, err := convertStringToInt64(s)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"not a valid int64: %s\", s)\n\t}\n\n\treturn &i, nil\n}\n\nfunc isKeyInMap(key string, d map[string]interface{}) bool {\n\tif d == nil {\n\t\treturn false\n\t}\n\n\tfor k := range d {\n\t\tif k == key {\n\t\t\treturn true\n\t\t}\n\t}\n\n\treturn false\n}\n\nfunc expandBoolMap(m map[string]interface{}) map[string]bool {\n\tresult := make(map[string]bool)\n\n\tfor k, v := range m {\n\t\tresult[k] = v.(bool)\n\t}\n\n\treturn result\n}\n\nfunc expandStringMap(m map[string]interface{}) map[string]string {\n\tresult := make(map[string]string)\n\n\tfor k, v := range m {\n\t\tresult[k] = v.(string)\n\t}\n\n\treturn result\n}\n\nfunc expandStringList(l []interface{}) (result []string) {\n\tfor _, p := range l {\n\t\tresult = append(result, p.(string))\n\t}\n\n\treturn\n}\n\nfunc sliceOfString(slice []interface{}) []string {\n\tresult := make([]string, len(slice))\n\n\tfor i, s := range slice {\n\t\tresult[i] = s.(string)\n\t}\n\n\treturn result\n}\n\nfunc isValidPolicyAction(action string) bool {\n\tvalidActions := map[string]bool{\n\t\trbac.ActionGet:      true,\n\t\trbac.ActionCreate:   true,\n\t\trbac.ActionUpdate:   true,\n\t\trbac.ActionDelete:   true,\n\t\trbac.ActionSync:     true,\n\t\trbac.ActionOverride: true,\n\t\t\"*\":                 true,\n\t}\n\tvalidActionPatterns := []*regexp.Regexp{\n\t\tregexp.MustCompile(\"action/.*\"),\n\t\tregexp.MustCompile(\"update/.*\"),\n\t\tregexp.MustCompile(\"delete/.*\"),\n\t}\n\n\tif validActions[action] {\n\t\treturn true\n\t}\n\n\tfor i := range validActionPatterns {\n\t\tif validActionPatterns[i].MatchString(action) {\n\t\t\treturn true\n\t\t}\n\t}\n\n\treturn false\n}\n\nfunc validatePolicy(project string, role string, policy string) error {\n\tpolicyComponents := strings.Split(policy, \",\")\n\tif len(policyComponents) != 6 || strings.Trim(policyComponents[0], \" \") != \"p\" {\n\t\treturn fmt.Errorf(\"invalid policy rule '%s': must be of the form: 'p, sub, res, act, obj, eft'\", policy)\n\t}\n\n\t// subject\n\tsubject := strings.Trim(policyComponents[1], \" \")\n\texpectedSubject := fmt.Sprintf(\"proj:%s:%s\", project, role)\n\n\tif subject != expectedSubject {\n\t\treturn fmt.Errorf(\"invalid policy rule '%s': policy subject must be: '%s', not '%s'\", policy, expectedSubject, subject)\n\t}\n\n\t// resource\n\t// https://github.com/argoproj/argo-cd/blob/c99669e088b5f25c8ce8faff6df25797a8beb5ba/pkg/apis/application/v1alpha1/types.go#L1554\n\tvalidResources := map[string]bool{\n\t\trbac.ResourceApplications:    true,\n\t\trbac.ResourceRepositories:    true,\n\t\trbac.ResourceClusters:        true,\n\t\trbac.ResourceExec:            true,\n\t\trbac.ResourceLogs:            true,\n\t\trbac.ResourceApplicationSets: true,\n\t\trbac.ResourceProjects:        true,\n\t}\n\n\tresource := strings.Trim(policyComponents[2], \" \")\n\tif !validResources[resource] {\n\t\treturn fmt.Errorf(\"invalid policy rule '%s': resource '%s' not recognised\", policy, resource)\n\t}\n\n\t// action\n\taction := strings.Trim(policyComponents[3], \" \")\n\tif !isValidPolicyAction(action) {\n\t\treturn fmt.Errorf(\"invalid policy rule '%s': invalid action '%s'\", policy, action)\n\t}\n\n\t// object\n\tobject := strings.Trim(policyComponents[4], \" \")\n\n\tobjectRegexp, err := regexp.Compile(fmt.Sprintf(`^%s(/[*\\w-.]+){1,2}$`, project))\n\tif err != nil || !objectRegexp.MatchString(object) {\n\t\treturn fmt.Errorf(\"invalid policy rule '%s': object must be of form '%s/*' or '%s/<APPNAME>' or '%s/<NS>/<APPNAME>', not '%s'\", policy, project, project, project, object)\n\t}\n\n\t// effect\n\teffect := strings.Trim(policyComponents[5], \" \")\n\tif effect != \"allow\" && effect != \"deny\" {\n\t\treturn fmt.Errorf(\"invalid policy rule '%s': effect must be: 'allow' or 'deny'\", policy)\n\t}\n\n\treturn nil\n}\n\nfunc persistToState(key string, data interface{}, d *schema.ResourceData) error {\n\tif err := d.Set(key, data); err != nil {\n\t\treturn fmt.Errorf(\"error persisting %s: %s\", key, err)\n\t}\n\n\treturn nil\n}\n\nfunc argoCDAPIError(action, resource, id string, err error) diag.Diagnostics {\n\treturn []diag.Diagnostic{\n\t\t{\n\t\t\tSeverity: diag.Error,\n\t\t\tSummary:  fmt.Sprintf(\"failed to %s %s %s\", action, resource, id),\n\t\t\tDetail:   err.Error(),\n\t\t},\n\t}\n}\n\nfunc errorToDiagnostics(summary string, err error) diag.Diagnostics {\n\td := diag.Diagnostic{\n\t\tSeverity: diag.Error,\n\t\tSummary:  summary,\n\t}\n\n\tif err != nil {\n\t\td.Detail = err.Error()\n\t}\n\n\treturn []diag.Diagnostic{d}\n}\n\nfunc featureNotSupported(feature features.Feature) diag.Diagnostics {\n\tf := features.ConstraintsMap[feature]\n\n\treturn []diag.Diagnostic{\n\t\t{\n\t\t\tSeverity: diag.Error,\n\t\t\tSummary:  fmt.Sprintf(\"%s is only supported from ArgoCD %s onwards\", f.Name, f.MinVersion.String()),\n\t\t},\n\t}\n}\n\n// pluginSDKDiags converts diagnostics from `terraform-plugin-framework/diag` to\n// `terraform-plugin-sdk/v2/diag`\nfunc pluginSDKDiags(ds fwdiag.Diagnostics) diag.Diagnostics {\n\tvar diags diag.Diagnostics\n\n\tfor _, d := range ds {\n\t\t_diag := diag.Diagnostic{\n\t\t\tDetail:  d.Detail(),\n\t\t\tSummary: d.Summary(),\n\t\t}\n\n\t\tswitch d.Severity() {\n\t\tcase fwdiag.SeverityError:\n\t\t\t_diag.Severity = diag.Error\n\t\tdefault:\n\t\t\t_diag.Severity = diag.Warning\n\t\t}\n\n\t\tdiags = append(diags, _diag)\n\t}\n\n\treturn diags\n}\n"
  },
  {
    "path": "argocd/utils_test.go",
    "content": "package argocd\n\nimport (\n\t\"testing\"\n)\n\nfunc TestValidatePolicy(t *testing.T) {\n\tt.Parallel()\n\n\tproject := \"myproject\"\n\trole := \"admin\"\n\n\ttests := []struct {\n\t\tname        string\n\t\tpolicy      string\n\t\texpectError bool\n\t}{\n\t\t{\n\t\t\tname:        \"Valid policy\",\n\t\t\tpolicy:      \"p, proj:myproject:admin, applications, get, myproject/*, allow\",\n\t\t\texpectError: false,\n\t\t},\n\t\t{\n\t\t\tname:        \"Valid applicationsets policy\",\n\t\t\tpolicy:      \"p, proj:myproject:admin, applicationsets, get, myproject/*, allow\",\n\t\t\texpectError: false,\n\t\t},\n\t\t{\n\t\t\tname:        \"Invalid format - not enough components\",\n\t\t\tpolicy:      \"p, proj:myproject:admin, applications, get\",\n\t\t\texpectError: true,\n\t\t},\n\t\t{\n\t\t\tname:        \"Invalid subject\",\n\t\t\tpolicy:      \"p, proj:otherproject:admin, applications, get, myproject/*, allow\",\n\t\t\texpectError: true,\n\t\t},\n\t\t{\n\t\t\tname:        \"Invalid resource\",\n\t\t\tpolicy:      \"p, proj:myproject:admin, invalidResource, get, myproject/*, allow\",\n\t\t\texpectError: true,\n\t\t},\n\t\t{\n\t\t\tname:        \"Invalid action\",\n\t\t\tpolicy:      \"p, proj:myproject:admin, applications, invalid, myproject/*, allow\",\n\t\t\texpectError: true,\n\t\t},\n\t\t{\n\t\t\tname:        \"Invalid object format\",\n\t\t\tpolicy:      \"p, proj:myproject:admin, applications, get, otherproject/*, allow\",\n\t\t\texpectError: true,\n\t\t},\n\t\t{\n\t\t\tname:        \"Invalid effect\",\n\t\t\tpolicy:      \"p, proj:myproject:admin, applications, get, myproject/*, maybe\",\n\t\t\texpectError: true,\n\t\t},\n\t\t{\n\t\t\tname:        \"Object with valid app name\",\n\t\t\tpolicy:      \"p, proj:myproject:admin, applications, get, myproject/app-01, allow\",\n\t\t\texpectError: false,\n\t\t},\n\t\t{\n\t\t\tname:        \"Object with valid ns/app combo\",\n\t\t\tpolicy:      \"p, proj:myproject:admin, applications, get, myproject/default/app-01, allow\",\n\t\t\texpectError: false,\n\t\t},\n\t\t{\n\t\t\tname:        \"Object with valid ns wildcard\",\n\t\t\tpolicy:      \"p, proj:myproject:admin, applications, get, myproject/default/*, allow\",\n\t\t\texpectError: false,\n\t\t},\n\n\t\t{\n\t\t\tname:        \"Object with dash and dot in name\",\n\t\t\tpolicy:      \"p, proj:myproject:admin, applications, get, myproject/app-1.2, allow\",\n\t\t\texpectError: false,\n\t\t},\n\t}\n\n\tfor _, tc := range tests {\n\t\tt.Run(tc.name, func(t *testing.T) {\n\t\t\tt.Parallel()\n\n\t\t\terr := validatePolicy(project, role, tc.policy)\n\t\t\tif (err != nil) != tc.expectError {\n\t\t\t\tt.Errorf(\"validatePolicy() error = %v, expectError = %v\", err, tc.expectError)\n\t\t\t}\n\t\t})\n\t}\n}\n"
  },
  {
    "path": "argocd/validators.go",
    "content": "package argocd\n\nimport (\n\t\"fmt\"\n\t\"regexp\"\n\t\"strings\"\n\t\"time\"\n\t_ \"time/tzdata\"\n\n\tapiValidation \"k8s.io/apimachinery/pkg/api/validation\"\n\tutilValidation \"k8s.io/apimachinery/pkg/util/validation\"\n)\n\nfunc validateMetadataLabels(isAppSet bool) func(value interface{}, key string) (ws []string, es []error) {\n\treturn func(value interface{}, key string) (ws []string, es []error) {\n\t\tm := value.(map[string]interface{})\n\t\tfor k, v := range m {\n\t\t\tfor _, msg := range utilValidation.IsQualifiedName(k) {\n\t\t\t\tes = append(es, fmt.Errorf(\"%s (%q) %s\", key, k, msg))\n\t\t\t}\n\n\t\t\tval, isString := v.(string)\n\t\t\tif !isString {\n\t\t\t\tes = append(es, fmt.Errorf(\"%s.%s (%#v): Expected value to be string\", key, k, v))\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tif isAppSet && strings.HasPrefix(val, \"{{\") && strings.HasSuffix(val, \"}}\") {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tfor _, msg := range utilValidation.IsValidLabelValue(val) {\n\t\t\t\tes = append(es, fmt.Errorf(\"%s (%q) %s\", key, val, msg))\n\t\t\t}\n\t\t}\n\n\t\treturn\n\t}\n}\n\nfunc validateMetadataAnnotations(value interface{}, key string) (ws []string, es []error) {\n\tm := value.(map[string]interface{})\n\tfor k := range m {\n\t\terrors := utilValidation.IsQualifiedName(strings.ToLower(k))\n\t\tif len(errors) > 0 {\n\t\t\tfor _, e := range errors {\n\t\t\t\tes = append(es, fmt.Errorf(\"%s (%q) %s\", key, k, e))\n\t\t\t}\n\t\t}\n\t}\n\n\treturn\n}\n\nfunc validateMetadataName(value interface{}, key string) (ws []string, es []error) {\n\tv := value.(string)\n\n\terrors := apiValidation.NameIsDNSSubdomain(v, false)\n\tif len(errors) > 0 {\n\t\tfor _, err := range errors {\n\t\t\tes = append(es, fmt.Errorf(\"%s %s\", key, err))\n\t\t}\n\t}\n\n\treturn\n}\n\nfunc validateDuration(value interface{}, key string) (ws []string, es []error) {\n\tv := value.(string)\n\n\tif _, err := time.ParseDuration(v); err != nil {\n\t\tes = append(es, fmt.Errorf(\"%s: invalid duration '%s': %s\", key, v, err))\n\t}\n\n\treturn\n}\n\nfunc validateIntOrStringPercentage(value interface{}, key string) (ws []string, es []error) {\n\tv := value.(string)\n\n\tpositiveIntegerOrPercentageRegexp := regexp.MustCompile(`^[+]?\\d+?%?$`)\n\n\tif !positiveIntegerOrPercentageRegexp.MatchString(v) {\n\t\tes = append(es, fmt.Errorf(\"%s: invalid input '%s'. String input must match a positive integer (e.g. '100') or percentage (e.g. '20%%')\", key, v))\n\t}\n\n\treturn\n}\n"
  },
  {
    "path": "argocd/validators_test.go",
    "content": "package argocd\n\nimport (\n\t\"fmt\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc Test_validateMetadataLabels(t *testing.T) {\n\tt.Parallel()\n\n\ttests := []struct {\n\t\tname     string\n\t\tisAppSet bool\n\t\tvalue    interface{}\n\t\tkey      string\n\t\twantWs   []string\n\t\twantEs   []error\n\t}{\n\t\t{\n\t\t\tname:     \"Valid labels\",\n\t\t\tisAppSet: false,\n\t\t\tvalue: map[string]interface{}{\n\t\t\t\t\"valid-key\": \"valid-value\",\n\t\t\t},\n\t\t\tkey:    \"metadata_labels\",\n\t\t\twantWs: nil,\n\t\t\twantEs: nil,\n\t\t},\n\t\t{\n\t\t\tname:     \"Invalid label key\",\n\t\t\tisAppSet: false,\n\t\t\tvalue: map[string]interface{}{\n\t\t\t\t\"Invalid Key!\": \"valid-value\",\n\t\t\t},\n\t\t\tkey:    \"metadata_labels\",\n\t\t\twantWs: nil,\n\t\t\twantEs: []error{\n\t\t\t\tfmt.Errorf(\"metadata_labels (\\\"Invalid Key!\\\") name part must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyName',  or 'my.name',  or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]')\"),\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname:     \"Invalid label value\",\n\t\t\tisAppSet: false,\n\t\t\tvalue: map[string]interface{}{\n\t\t\t\t\"valid-key\": \"Invalid Value!\",\n\t\t\t},\n\t\t\tkey:    \"metadata_labels\",\n\t\t\twantWs: nil,\n\t\t\twantEs: []error{\n\t\t\t\tfmt.Errorf(\"metadata_labels (\\\"Invalid Value!\\\") a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue',  or 'my_value',  or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')\"),\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname:     \"Non-string label value\",\n\t\t\tisAppSet: false,\n\t\t\tvalue: map[string]interface{}{\n\t\t\t\t\"valid-key\": 123,\n\t\t\t},\n\t\t\tkey:    \"metadata_labels\",\n\t\t\twantWs: nil,\n\t\t\twantEs: []error{\n\t\t\t\tfmt.Errorf(\"metadata_labels.valid-key (123): Expected value to be string\"),\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname:     \"Valid templated value for AppSet\",\n\t\t\tisAppSet: true,\n\t\t\tvalue: map[string]interface{}{\n\t\t\t\t\"valid-key\": \"{{ valid-template }}\",\n\t\t\t},\n\t\t\tkey:    \"metadata_labels\",\n\t\t\twantWs: nil,\n\t\t\twantEs: nil,\n\t\t},\n\t\t{\n\t\t\tname:     \"Invalid templated value for non-AppSet\",\n\t\t\tisAppSet: false,\n\t\t\tvalue: map[string]interface{}{\n\t\t\t\t\"valid-key\": \"{{ invalid-template }}\",\n\t\t\t},\n\t\t\tkey:    \"metadata_labels\",\n\t\t\twantWs: nil,\n\t\t\twantEs: []error{\n\t\t\t\tfmt.Errorf(\"metadata_labels (\\\"{{ invalid-template }}\\\") a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue',  or 'my_value',  or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')\"),\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname:     \"Empty label key\",\n\t\t\tisAppSet: false,\n\t\t\tvalue: map[string]interface{}{\n\t\t\t\t\"\": \"valid-value\",\n\t\t\t},\n\t\t\tkey:    \"metadata_labels\",\n\t\t\twantWs: nil,\n\t\t\twantEs: []error{\n\t\t\t\tfmt.Errorf(\"metadata_labels (\\\"\\\") name part must be non-empty\"),\n\t\t\t\tfmt.Errorf(\"metadata_labels (\\\"\\\") name part must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyName',  or 'my.name',  or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]')\"),\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname:     \"Empty label value\",\n\t\t\tisAppSet: false,\n\t\t\tvalue: map[string]interface{}{\n\t\t\t\t\"valid-key\": \"\",\n\t\t\t},\n\t\t\tkey:    \"metadata_labels\",\n\t\t\twantWs: nil,\n\t\t\twantEs: nil,\n\t\t},\n\t}\n\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\tt.Parallel()\n\n\t\t\tgotWs, gotEs := validateMetadataLabels(tt.isAppSet)(tt.value, tt.key)\n\n\t\t\trequire.Equal(t, tt.wantWs, gotWs)\n\t\t\trequire.Equal(t, tt.wantEs, gotEs)\n\t\t})\n\t}\n}\n"
  },
  {
    "path": "docs/data-sources/application.md",
    "content": "---\n# generated by https://github.com/hashicorp/terraform-plugin-docs\npage_title: \"argocd_application Data Source - terraform-provider-argocd\"\nsubcategory: \"\"\ndescription: |-\n  Reads an existing ArgoCD application.\n---\n\n# argocd_application (Data Source)\n\nReads an existing ArgoCD application.\n\n## Example Usage\n\n```terraform\ndata \"argocd_application\" \"foo\" {\n  metadata = {\n    name      = \"foo\"\n    namespace = \"argocd\"\n  }\n}\n```\n\n<!-- schema generated by tfplugindocs -->\n## Schema\n\n### Required\n\n- `metadata` (Attributes) Standard Kubernetes object metadata. For more info see the [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata). (see [below for nested schema](#nestedatt--metadata))\n\n### Read-Only\n\n- `id` (String) ArgoCD application identifier\n- `spec` (Attributes) The application specification. (see [below for nested schema](#nestedatt--spec))\n- `status` (Attributes) Status information for the application. (see [below for nested schema](#nestedatt--status))\n\n<a id=\"nestedatt--metadata\"></a>\n### Nested Schema for `metadata`\n\nRequired:\n\n- `name` (String) Name of the applications.argoproj.io, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\n\nOptional:\n\n- `namespace` (String) Namespace of the applications.argoproj.io, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/\n\nRead-Only:\n\n- `annotations` (Map of String) An unstructured key value map stored with the applications.argoproj.io that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/\n- `generation` (Number) A sequence number representing a specific generation of the desired state.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the applications.argoproj.io. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels\n- `resource_version` (String) An opaque value that represents the internal version of this applications.argoproj.io that can be used by clients to determine when the applications.argoproj.io has changed. Read more: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency\n- `uid` (String) The unique in time and space value for this applications.argoproj.io. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids\n\n\n<a id=\"nestedatt--spec\"></a>\n### Nested Schema for `spec`\n\nRead-Only:\n\n- `destination` (Attributes) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedatt--spec--destination))\n- `ignore_differences` (Attributes List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedatt--spec--ignore_differences))\n- `infos` (Attributes List) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedatt--spec--infos))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `sources` (Attributes List) Location of the application's manifests or chart. (see [below for nested schema](#nestedatt--spec--sources))\n- `sync_policy` (Attributes) Controls when and how a sync will be performed. (see [below for nested schema](#nestedatt--spec--sync_policy))\n\n<a id=\"nestedatt--spec--destination\"></a>\n### Nested Schema for `spec.destination`\n\nRead-Only:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedatt--spec--ignore_differences\"></a>\n### Nested Schema for `spec.ignore_differences`\n\nRead-Only:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedatt--spec--infos\"></a>\n### Nested Schema for `spec.infos`\n\nRead-Only:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedatt--spec--sources\"></a>\n### Nested Schema for `spec.sources`\n\nRead-Only:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Attributes) Path/directory specific options. (see [below for nested schema](#nestedatt--spec--sources--directory))\n- `helm` (Attributes) Helm specific options. (see [below for nested schema](#nestedatt--spec--sources--helm))\n- `kustomize` (Attributes) Kustomize specific options. (see [below for nested schema](#nestedatt--spec--sources--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Attributes) Config management plugin specific options. (see [below for nested schema](#nestedatt--spec--sources--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedatt--spec--sources--directory\"></a>\n### Nested Schema for `spec.sources.directory`\n\nRead-Only:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Attributes) Jsonnet specific options. (see [below for nested schema](#nestedatt--spec--sources--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedatt--spec--sources--directory--jsonnet\"></a>\n### Nested Schema for `spec.sources.directory.jsonnet`\n\nRead-Only:\n\n- `ext_vars` (Attributes List) List of Jsonnet External Variables. (see [below for nested schema](#nestedatt--spec--sources--directory--jsonnet--ext_vars))\n- `libs` (List of String) Additional library search dirs.\n- `tlas` (Attributes List) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedatt--spec--sources--directory--jsonnet--tlas))\n\n<a id=\"nestedatt--spec--sources--directory--jsonnet--ext_vars\"></a>\n### Nested Schema for `spec.sources.directory.jsonnet.ext_vars`\n\nRead-Only:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedatt--spec--sources--directory--jsonnet--tlas\"></a>\n### Nested Schema for `spec.sources.directory.jsonnet.tlas`\n\nRead-Only:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedatt--spec--sources--helm\"></a>\n### Nested Schema for `spec.sources.helm`\n\nRead-Only:\n\n- `file_parameters` (Attributes List) File parameters for the helm template. (see [below for nested schema](#nestedatt--spec--sources--helm--file_parameters))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameters` (Attributes List) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedatt--spec--sources--helm--parameters))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a Attribute.\n\n<a id=\"nestedatt--spec--sources--helm--file_parameters\"></a>\n### Nested Schema for `spec.sources.helm.file_parameters`\n\nRead-Only:\n\n- `name` (String) Name of the Helm parameters.\n- `path` (String) Path to the file containing the values for the Helm parameters.\n\n\n<a id=\"nestedatt--spec--sources--helm--parameters\"></a>\n### Nested Schema for `spec.sources.helm.parameters`\n\nRead-Only:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameters.\n- `value` (String) Value of the Helm parameters.\n\n\n\n<a id=\"nestedatt--spec--sources--kustomize\"></a>\n### Nested Schema for `spec.sources.kustomize`\n\nRead-Only:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n\n<a id=\"nestedatt--spec--sources--plugin\"></a>\n### Nested Schema for `spec.sources.plugin`\n\nRead-Only:\n\n- `env` (Attributes List) Environment variables passed to the plugin. (see [below for nested schema](#nestedatt--spec--sources--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n- `parameters` (Attributes List) Parameters to supply to config management plugin. (see [below for nested schema](#nestedatt--spec--sources--plugin--parameters))\n\n<a id=\"nestedatt--spec--sources--plugin--env\"></a>\n### Nested Schema for `spec.sources.plugin.env`\n\nRead-Only:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n<a id=\"nestedatt--spec--sources--plugin--parameters\"></a>\n### Nested Schema for `spec.sources.plugin.parameters`\n\nRead-Only:\n\n- `array` (List of String) Value of an array type parameters.\n- `map` (Map of String) Value of a map type parameters.\n- `name` (String) Name identifying a parameters.\n- `string` (String) Value of a string type parameters.\n\n\n\n\n<a id=\"nestedatt--spec--sync_policy\"></a>\n### Nested Schema for `spec.sync_policy`\n\nRead-Only:\n\n- `automated` (Attributes) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedatt--spec--sync_policy--automated))\n- `retry` (Attributes) Controls failed sync retry behavior. (see [below for nested schema](#nestedatt--spec--sync_policy--retry))\n- `sync_options` (Set of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedatt--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.sync_policy.automated`\n\nRead-Only:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedatt--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.sync_policy.retry`\n\nRead-Only:\n\n- `backoff` (Attributes) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedatt--spec--sync_policy--retry--backoff))\n- `limit` (Number) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedatt--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.sync_policy.retry.backoff`\n\nRead-Only:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (Number) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n<a id=\"nestedatt--status\"></a>\n### Nested Schema for `status`\n\nRead-Only:\n\n- `conditions` (Attributes List) List of currently observed application conditions. (see [below for nested schema](#nestedatt--status--conditions))\n- `health` (Attributes) Application's current health status. (see [below for nested schema](#nestedatt--status--health))\n- `operation_state` (Attributes) Information about any ongoing operations, such as a sync. (see [below for nested schema](#nestedatt--status--operation_state))\n- `reconciled_at` (String) When the application state was reconciled using the latest git version.\n- `resources` (Attributes List) List of Kubernetes resources managed by this application. (see [below for nested schema](#nestedatt--status--resources))\n- `summary` (Attributes) List of URLs and container images used by this application. (see [below for nested schema](#nestedatt--status--summary))\n- `sync` (Attributes) Application's current sync status (see [below for nested schema](#nestedatt--status--sync))\n\n<a id=\"nestedatt--status--conditions\"></a>\n### Nested Schema for `status.conditions`\n\nRead-Only:\n\n- `last_transition_time` (String) The time the condition was last observed.\n- `message` (String) Human-readable message indicating details about condition.\n- `type` (String) Application condition type.\n\n\n<a id=\"nestedatt--status--health\"></a>\n### Nested Schema for `status.health`\n\nRead-Only:\n\n- `message` (String) Human-readable informational message describing the health status.\n- `status` (String) Status code of the application or resource.\n\n\n<a id=\"nestedatt--status--operation_state\"></a>\n### Nested Schema for `status.operation_state`\n\nRead-Only:\n\n- `finished_at` (String) Time of operation completion.\n- `message` (String) Any pertinent messages when attempting to perform operation (typically errors).\n- `phase` (String) The current phase of the operation.\n- `retry_count` (Number) Count of operation retries.\n- `started_at` (String) Time of operation start.\n\n\n<a id=\"nestedatt--status--resources\"></a>\n### Nested Schema for `status.resources`\n\nRead-Only:\n\n- `group` (String) The Kubernetes resource Group.\n- `health` (Attributes) Resource health status. (see [below for nested schema](#nestedatt--status--resources--health))\n- `hook` (Boolean) Indicates whether or not this resource has a hook annotation.\n- `kind` (String) The Kubernetes resource Kind.\n- `name` (String) The Kubernetes resource Name.\n- `namespace` (String) The Kubernetes resource Namespace.\n- `requires_pruning` (Boolean) Indicates if the resources requires pruning or not.\n- `status` (String) Resource sync status.\n- `sync_wave` (Number) Sync wave.\n- `version` (String) The Kubernetes resource Version.\n\n<a id=\"nestedatt--status--resources--health\"></a>\n### Nested Schema for `status.resources.health`\n\nRead-Only:\n\n- `message` (String) Human-readable informational message describing the health status.\n- `status` (String) Status code of the application or resource.\n\n\n\n<a id=\"nestedatt--status--summary\"></a>\n### Nested Schema for `status.summary`\n\nRead-Only:\n\n- `external_urls` (List of String) All external URLs of application child resources.\n- `images` (List of String) All images of application child resources.\n\n\n<a id=\"nestedatt--status--sync\"></a>\n### Nested Schema for `status.sync`\n\nRead-Only:\n\n- `revisions` (List of String) Information about the revision(s) the comparison has been performed to.\n- `status` (String) Sync state of the comparison.\n"
  },
  {
    "path": "docs/index.md",
    "content": "---\npage_title: \"Provider: ArgoCD\"\ndescription: |-\n  The ArgoCD provider provides lifecycle management of ArgoCD resources.\n---\n\n# ArgoCD Provider\n\nThe ArgoCD Provider provides lifecycle management of [ArgoCD](https://argo-cd.readthedocs.io/en/stable/) resources.\n\n**NB**: The provider is not concerned with the installation/configuration of ArgoCD itself. To make use of the provider, you will need to have an existing ArgoCD installation.\n\nThe correct provider configuration largely depends on whether or not your ArgoCD API server is exposed or not.\n\nIf your ArgoCD API server is exposed, then:\n- use `server_addr` along with a `username`/`password` or `auth_token`.\n- use `use_local_config` if you have (pre)authenticated via the ArgoCD CLI (E.g. via SSO using `argocd login --sso`.\n\nIf you have not exposed your ArgoCD API server or have not deployed the API server ([ArgoCD core](https://argo-cd.readthedocs.io/en/stable/operator-manual/installation/#core)), see below for options. **Note**: in both these cases, you need sufficient access to the Kubernetes API to perform any actions.\n- use `port_forward_with_namespace` and optionally `kubernetes` configuration (to temporarily expose the ArgoCD API server using port forwarding) along with a `username`/`password` or `auth_token`.\n  - if you use port-forwarding and your argo-cd-server is running on plain HTTP you need to add the flag `plain_text = true` to the provider configuration as well\n- use `core` to run a local ArgoCD API server that communicates directly with the Kubernetes API. **NB**: When using `core`, take note of the warning in the docs below.\n\nIf you are struggling to determine the correct configuration for the provider or the provider is behaving strangely and failing to connect for whatever reason, then we would suggest that you first figure out what combination of parameters work to log in using the ArgoCD CLI (`argocd login`) and then set the provider configuration to match what you used in the CLI. See also the ArgoCD [Getting Started](https://argo-cd.readthedocs.io/en/stable/getting_started/#3-access-the-argo-cd-api-server) docs.\n\n## Example Usage\n\n```terraform\n# Exposed ArgoCD API - authenticated using authentication token.\nprovider \"argocd\" {\n  server_addr = \"argocd.local:443\"\n  auth_token  = \"1234...\"\n}\n\n# Exposed ArgoCD API - authenticated using `username`/`password`\nprovider \"argocd\" {\n  server_addr = \"argocd.local:443\"\n  username    = \"foo\"\n  password    = local.password\n}\n\n# Exposed ArgoCD API - (pre)authenticated using local ArgoCD config (e.g. when\n# you have previously logged in using SSO).\nprovider \"argocd\" {\n  use_local_config = true\n  # context = \"foo\" # Use explicit context from ArgoCD config instead of `current-context`.\n}\n\n# Unexposed ArgoCD API - using the current Kubernetes context and\n# port-forwarding to temporarily expose ArgoCD API and authenticating using\n# `auth_token`.\nprovider \"argocd\" {\n  auth_token   = \"1234...\"\n  port_forward = true\n}\n\n# Unexposed ArgoCD API - using port-forwarding to temporarily expose ArgoCD API\n# whilst overriding the current context in kubeconfig.\nprovider \"argocd\" {\n  auth_token                  = \"1234...\"\n  port_forward_with_namespace = \"custom-argocd-namespace\"\n  kubernetes {\n    config_context = \"kind-argocd\"\n  }\n}\n\n# Unexposed ArgoCD API - using `core` to run ArgoCD server locally and\n# communicate directly with the Kubernetes API.\nprovider \"argocd\" {\n  core = true\n}\n```\n\n<br/><!-- schema generated by tfplugindocs -->\n## Schema\n\n### Optional\n\n- `auth_token` (String, Sensitive) ArgoCD authentication token, takes precedence over `username`/`password`. Can be set through the `ARGOCD_AUTH_TOKEN` environment variable.\n- `cert_file` (String) Additional root CA certificates file to add to the client TLS connection pool.\n- `client_cert_file` (String) Client certificate.\n- `client_cert_key` (String) Client certificate key.\n- `config_path` (String) Override the default config path of `$HOME/.config/argocd/config`. Only relevant when `use_local_config`. Can be set through the `ARGOCD_CONFIG_PATH` environment variable.\n- `context` (String) Context to choose when using a local ArgoCD config file. Only relevant when `use_local_config`. Can be set through `ARGOCD_CONTEXT` environment variable.\n- `core` (Boolean) Configure direct access using Kubernetes API server.\n\n  **Warning**: this feature works by starting a local ArgoCD API server that talks directly to the Kubernetes API using the **current context in the default kubeconfig** (`~/.kube/config`). This behavior cannot be overridden using either environment variables or the `kubernetes` block in the provider configuration at present).\n\n  If the server fails to start (e.g. your kubeconfig is misconfigured) then the provider will fail as a result of the `argocd` module forcing it to exit and no logs will be available to help you debug this. The error message will be similar to\n  > `The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ReadResource call. The plugin logs may contain more details.`\n\n  To debug this, you will need to login via the ArgoCD CLI using `argocd login --core` and then running an operation. E.g. `argocd app list`.\n- `grpc_web` (Boolean) Whether to use gRPC web proxy client. Useful if Argo CD server is behind proxy which does not support HTTP2.\n- `grpc_web_root_path` (String) Use the gRPC web proxy client and set the web root, e.g. `argo-cd`. Useful if the Argo CD server is behind a proxy at a non-root path.\n- `headers` (Set of String) Additional headers to add to each request to the ArgoCD server.\n- `insecure` (Boolean) Whether to skip TLS server certificate. Can be set through the `ARGOCD_INSECURE` environment variable.\n- `kubernetes` (Block List, Max: 1) Kubernetes configuration overrides.  Only relevant when `port_forward = true` or `port_forward_with_namespace = \"foo\"`. The kubeconfig file that is used can be overridden using the [`KUBECONFIG` environment variable](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#the-kubeconfig-environment-variable)). (see [below for nested schema](#nestedblock--kubernetes))\n- `password` (String, Sensitive) Authentication password. Can be set through the `ARGOCD_AUTH_PASSWORD` environment variable.\n- `plain_text` (Boolean) Whether to initiate an unencrypted connection to ArgoCD server.\n- `port_forward` (Boolean) Connect to a random argocd-server port using port forwarding.\n- `port_forward_with_namespace` (String) Namespace name which should be used for port forwarding.\n- `server_addr` (String) ArgoCD server address with port. Can be set through the `ARGOCD_SERVER` environment variable.\n- `use_local_config` (Boolean) Use the authentication settings found in the local config file. Useful when you have previously logged in using SSO. Conflicts with `auth_token`, `username` and `password`.\n- `user_agent` (String) User-Agent request header override.\n- `username` (String) Authentication username. Can be set through the `ARGOCD_AUTH_USERNAME` environment variable.\n\n<a id=\"nestedblock--kubernetes\"></a>\n### Nested Schema for `kubernetes`\n\nOptional:\n\n- `client_certificate` (String) PEM-encoded client certificate for TLS authentication. Can be sourced from `KUBE_CLIENT_CERT_DATA`.\n- `client_key` (String, Sensitive) PEM-encoded client certificate key for TLS authentication. Can be sourced from `KUBE_CLIENT_KEY_DATA`.\n- `cluster_ca_certificate` (String) PEM-encoded root certificates bundle for TLS authentication. Can be sourced from `KUBE_CLUSTER_CA_CERT_DATA`.\n- `config_context` (String) Context to choose from the config file. Can be sourced from `KUBE_CTX`.\n- `config_context_auth_info` (String)\n- `config_context_cluster` (String)\n- `exec` (Block List, Max: 1) Configuration block to use an [exec-based credential plugin](https://kubernetes.io/docs/reference/access-authn-authz/authentication/#client-go-credential-plugins), e.g. call an external command to receive user credentials. (see [below for nested schema](#nestedblock--kubernetes--exec))\n- `host` (String) The hostname (in form of URI) of the Kubernetes API. Can be sourced from `KUBE_HOST`.\n- `insecure` (Boolean) Whether server should be accessed without verifying the TLS certificate. Can be sourced from `KUBE_INSECURE`.\n- `password` (String, Sensitive) The password to use for HTTP basic authentication when accessing the Kubernetes API. Can be sourced from `KUBE_PASSWORD`.\n- `token` (String, Sensitive) Token to authenticate an service account. Can be sourced from `KUBE_TOKEN`.\n- `username` (String) The username to use for HTTP basic authentication when accessing the Kubernetes API. Can be sourced from `KUBE_USER`.\n\n<a id=\"nestedblock--kubernetes--exec\"></a>\n### Nested Schema for `kubernetes.exec`\n\nRequired:\n\n- `api_version` (String) API version to use when decoding the ExecCredentials resource, e.g. `client.authentication.k8s.io/v1beta1`.\n- `command` (String) Command to execute.\n\nOptional:\n\n- `args` (List of String) Map of environment variables to set when executing the plugin.\n- `env` (Map of String) List of arguments to pass when executing the plugin."
  },
  {
    "path": "docs/resources/account_token.md",
    "content": "---\n# generated by https://github.com/hashicorp/terraform-plugin-docs\npage_title: \"argocd_account_token Resource - terraform-provider-argocd\"\nsubcategory: \"\"\ndescription: |-\n  Manages ArgoCD account https://argo-cd.readthedocs.io/en/latest/user-guide/commands/argocd_account/ JWT tokens.\n  ~> Security Notice The JWT token generated by this resource is treated as sensitive and, thus, not displayed in console output. However, it will be stored unencrypted in your Terraform state file. Read more about sensitive data handling in the Terraform documentation https://www.terraform.io/docs/language/state/sensitive-data.html.\n---\n\n# argocd_account_token (Resource)\n\nManages ArgoCD [account](https://argo-cd.readthedocs.io/en/latest/user-guide/commands/argocd_account/) JWT tokens.\n\n~> **Security Notice** The JWT token generated by this resource is treated as sensitive and, thus, not displayed in console output. However, it will be stored *unencrypted* in your Terraform state file. Read more about sensitive data handling in the [Terraform documentation](https://www.terraform.io/docs/language/state/sensitive-data.html).\n\n## Example Usage\n\n```terraform\n# Token for account configured on the `provider`\nresource \"argocd_account_token\" \"this\" {\n  renew_after = \"168h\" # renew after 7 days\n}\n\n# Token for ac count `foo`\nresource \"argocd_account_token\" \"foo\" {\n  account      = \"foo\"\n  expires_in   = \"168h\" # expire in 7 days\n  renew_before = \"84h\"  # renew when less than 3.5 days remain until expiry\n}\n```\n\n<!-- schema generated by tfplugindocs -->\n## Schema\n\n### Optional\n\n- `account` (String) Account name. Defaults to the current account. I.e. the account configured on the `provider` block.\n- `expires_in` (String) Duration before the token will expire. Valid time units are `ns`, `us` (or `µs`), `ms`, `s`, `m`, `h`. E.g. `30m`, `12h`. Default: No expiration.\n- `renew_after` (String) Duration to control token silent regeneration based on token age. Valid time units are `ns`, `us` (or `µs`), `ms`, `s`, `m`, `h`. If set, then the token will be regenerated if it is older than `renew_after`. I.e. if `currentDate - issued_at > renew_after`.\n- `renew_before` (String) Duration to control token silent regeneration based on remaining token lifetime. If `expires_in` is set, Terraform will regenerate the token if `expires_at - currentDate < renew_before`. Valid time units are `ns`, `us` (or `µs`), `ms`, `s`, `m`, `h`.\n\n### Read-Only\n\n- `expires_at` (String) If `expires_in` is set, Unix timestamp upon which the token will expire.\n- `id` (String) The ID of this resource.\n- `issued_at` (String) Unix timestamp at which the token was issued.\n- `jwt` (String, Sensitive) The raw JWT.\n"
  },
  {
    "path": "docs/resources/application.md",
    "content": "---\n# generated by https://github.com/hashicorp/terraform-plugin-docs\npage_title: \"argocd_application Resource - terraform-provider-argocd\"\nsubcategory: \"\"\ndescription: |-\n  Manages applications https://argo-cd.readthedocs.io/en/stable/operator-manual/declarative-setup/#applications within ArgoCD.\n---\n\n# argocd_application (Resource)\n\nManages [applications](https://argo-cd.readthedocs.io/en/stable/operator-manual/declarative-setup/#applications) within ArgoCD.\n\n## Example Usage\n\n```terraform\n# Kustomize application\nresource \"argocd_application\" \"kustomize\" {\n  metadata {\n    name      = \"kustomize-app\"\n    namespace = \"argocd\"\n    labels = {\n      test = \"true\"\n    }\n  }\n\n  cascade = false # disable cascading deletion\n  wait    = true\n\n  spec {\n    project = \"myproject\"\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"foo\"\n    }\n\n    source {\n      repo_url        = \"https://github.com/kubernetes-sigs/kustomize\"\n      path            = \"examples/helloWorld\"\n      target_revision = \"master\"\n      kustomize {\n        name_prefix = \"foo-\"\n        name_suffix = \"-bar\"\n        images      = [\"hashicorp/terraform:light\"]\n        common_labels = {\n          \"this.is.a.common\" = \"la-bel\"\n          \"another.io/one\"   = \"true\"\n        }\n      }\n    }\n\n    sync_policy {\n      automated {\n        prune       = true\n        self_heal   = true\n        allow_empty = true\n      }\n      # Only available from ArgoCD 1.5.0 onwards\n      sync_options = [\"Validate=false\"]\n      retry {\n        limit = \"5\"\n        backoff {\n          duration     = \"30s\"\n          max_duration = \"2m\"\n          factor       = \"2\"\n        }\n      }\n    }\n\n    ignore_difference {\n      group         = \"apps\"\n      kind          = \"Deployment\"\n      json_pointers = [\"/spec/replicas\"]\n    }\n\n    ignore_difference {\n      group = \"apps\"\n      kind  = \"StatefulSet\"\n      name  = \"someStatefulSet\"\n      json_pointers = [\n        \"/spec/replicas\",\n        \"/spec/template/spec/metadata/labels/bar\",\n      ]\n      # Only available from ArgoCD 2.1.0 onwards\n      jq_path_expressions = [\n        \".spec.replicas\",\n        \".spec.template.spec.metadata.labels.bar\",\n      ]\n    }\n  }\n}\n\n# Helm application\nresource \"argocd_application\" \"helm\" {\n  metadata {\n    name      = \"helm-app\"\n    namespace = \"argocd\"\n    labels = {\n      test = \"true\"\n    }\n  }\n\n  spec {\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n\n    source {\n      repo_url        = \"https://some.chart.repo.io\"\n      chart           = \"mychart\"\n      target_revision = \"1.2.3\"\n      helm {\n        release_name = \"testing\"\n        parameter {\n          name  = \"image.tag\"\n          value = \"1.2.3\"\n        }\n        parameter {\n          name  = \"someotherparameter\"\n          value = \"true\"\n        }\n        value_files = [\"values-test.yml\"]\n        values = yamlencode({\n          someparameter = {\n            enabled   = true\n            someArray = [\"foo\", \"bar\"]\n          }\n        })\n      }\n    }\n  }\n}\n\n# Multiple Application Sources with Helm value files from external Git repository\nresource \"argocd_application\" \"multiple_sources\" {\n  metadata {\n    name      = \"helm-app-with-external-values\"\n    namespace = \"argocd\"\n  }\n\n  spec {\n    project = \"default\"\n\n    source {\n      repo_url        = \"https://charts.helm.sh/stable\"\n      chart           = \"wordpress\"\n      target_revision = \"9.0.3\"\n      helm {\n        value_files = [\"$values/helm-dependency/values.yaml\"]\n      }\n    }\n\n    source {\n      repo_url        = \"https://github.com/argoproj/argocd-example-apps.git\"\n      target_revision = \"HEAD\"\n      ref             = \"values\"\n    }\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n  }\n}\n```\n\n<!-- schema generated by tfplugindocs -->\n## Schema\n\n### Required\n\n- `metadata` (Block List, Min: 1, Max: 1) Standard Kubernetes object metadata. For more info see the [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata). (see [below for nested schema](#nestedblock--metadata))\n- `spec` (Block List, Min: 1, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec))\n\n### Optional\n\n- `cascade` (Boolean) Whether to applying cascading deletion when application is removed.\n- `sync` (Boolean) Trigger sync immediately after create/update. Helps in case when a Sync window is defined. It is required that the sync window is defined with `manual_sync = true`.\n- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))\n- `validate` (Boolean) Whether to validate the application spec before creating or updating the application.\n- `wait` (Boolean) Upon application creation or update, wait for application health/sync status to be healthy/Synced, upon application deletion, wait for application to be removed, when set to true. Wait timeouts are controlled by Terraform Create, Update and Delete resource timeouts (all default to 5 minutes). **Note**: if ArgoCD decides not to sync an application (e.g. because the project to which the application belongs has a `sync_window` applied) then you will experience an expected timeout event if `wait = true`.\n\n### Read-Only\n\n- `id` (String) The ID of this resource.\n- `status` (List of Object) Status information for the application. **Note**: this is not guaranteed to be up to date immediately after creating/updating an application unless `wait=true`. (see [below for nested schema](#nestedatt--status))\n\n<a id=\"nestedblock--metadata\"></a>\n### Nested Schema for `metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map stored with the applications.argoproj.io that may be used to store arbitrary metadata. More info: http://kubernetes.io/docs/user-guide/annotations\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the applications.argoproj.io. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels\n- `name` (String) Name of the applications.argoproj.io, must be unique. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names\n- `namespace` (String) Namespace of the applications.argoproj.io, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/\n\nRead-Only:\n\n- `generation` (Number) A sequence number representing a specific generation of the desired state.\n- `resource_version` (String) An opaque value that represents the internal version of this applications.argoproj.io that can be used by clients to determine when applications.argoproj.io has changed. Read more: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency\n- `uid` (String) The unique in time and space value for this applications.argoproj.io. More info: http://kubernetes.io/docs/user-guide/identifiers#uids\n\n\n<a id=\"nestedblock--spec\"></a>\n### Nested Schema for `spec`\n\nRequired:\n\n- `destination` (Block Set, Min: 1, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--destination))\n- `source` (Block List, Min: 1) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--source))\n\nOptional:\n\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--sync_policy))\n\n<a id=\"nestedblock--spec--destination\"></a>\n### Nested Schema for `spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--source\"></a>\n### Nested Schema for `spec.source`\n\nRequired:\n\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--source--directory\"></a>\n### Nested Schema for `spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--source--helm\"></a>\n### Nested Schema for `spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--source--kustomize\"></a>\n### Nested Schema for `spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--source--plugin\"></a>\n### Nested Schema for `spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--ignore_difference\"></a>\n### Nested Schema for `spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--info\"></a>\n### Nested Schema for `spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--sync_policy\"></a>\n### Nested Schema for `spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n<a id=\"nestedblock--timeouts\"></a>\n### Nested Schema for `timeouts`\n\nOptional:\n\n- `create` (String)\n- `delete` (String)\n- `update` (String)\n\n\n<a id=\"nestedatt--status\"></a>\n### Nested Schema for `status`\n\nRead-Only:\n\n- `conditions` (List of Object) (see [below for nested schema](#nestedobjatt--status--conditions))\n- `health` (List of Object) (see [below for nested schema](#nestedobjatt--status--health))\n- `operation_state` (List of Object) (see [below for nested schema](#nestedobjatt--status--operation_state))\n- `reconciled_at` (String)\n- `resources` (List of Object) (see [below for nested schema](#nestedobjatt--status--resources))\n- `summary` (List of Object) (see [below for nested schema](#nestedobjatt--status--summary))\n- `sync` (List of Object) (see [below for nested schema](#nestedobjatt--status--sync))\n\n<a id=\"nestedobjatt--status--conditions\"></a>\n### Nested Schema for `status.conditions`\n\nRead-Only:\n\n- `last_transition_time` (String)\n- `message` (String)\n- `type` (String)\n\n\n<a id=\"nestedobjatt--status--health\"></a>\n### Nested Schema for `status.health`\n\nRead-Only:\n\n- `message` (String)\n- `status` (String)\n\n\n<a id=\"nestedobjatt--status--operation_state\"></a>\n### Nested Schema for `status.operation_state`\n\nRead-Only:\n\n- `finished_at` (String)\n- `message` (String)\n- `phase` (String)\n- `retry_count` (String)\n- `started_at` (String)\n\n\n<a id=\"nestedobjatt--status--resources\"></a>\n### Nested Schema for `status.resources`\n\nRead-Only:\n\n- `group` (String)\n- `health` (List of Object) (see [below for nested schema](#nestedobjatt--status--resources--health))\n- `hook` (Boolean)\n- `kind` (String)\n- `name` (String)\n- `namespace` (String)\n- `requires_pruning` (Boolean)\n- `status` (String)\n- `sync_wave` (String)\n- `version` (String)\n\n<a id=\"nestedobjatt--status--resources--health\"></a>\n### Nested Schema for `status.resources.health`\n\nRead-Only:\n\n- `message` (String)\n- `status` (String)\n\n\n\n<a id=\"nestedobjatt--status--summary\"></a>\n### Nested Schema for `status.summary`\n\nRead-Only:\n\n- `external_urls` (List of String)\n- `images` (List of String)\n\n\n<a id=\"nestedobjatt--status--sync\"></a>\n### Nested Schema for `status.sync`\n\nRead-Only:\n\n- `revision` (String)\n- `revisions` (List of String)\n- `status` (String)\n\n## Import\n\nImport is supported using the following syntax:\n\nThe [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:\n\n```shell\n# ArgoCD applications can be imported using an id consisting of `{name}:{namespace}`.\n\nterraform import argocd_application.myapp myapp:argocd\n```\n"
  },
  {
    "path": "docs/resources/application_set.md",
    "content": "---\n# generated by https://github.com/hashicorp/terraform-plugin-docs\npage_title: \"argocd_application_set Resource - terraform-provider-argocd\"\nsubcategory: \"\"\ndescription: |-\n  Manages application sets https://argo-cd.readthedocs.io/en/stable/user-guide/application-set/ within ArgoCD.\n---\n\n# argocd_application_set (Resource)\n\nManages [application sets](https://argo-cd.readthedocs.io/en/stable/user-guide/application-set/) within ArgoCD.\n\n## Example Usage\n\n```terraform\n# Clusters Generator\nresource \"argocd_application_set\" \"clusters_selector\" {\n  metadata {\n    name = \"clusters-selector\"\n  }\n\n  spec {\n    generator {\n      clusters {\n        selector {\n          match_labels = {\n            \"argocd.argoproj.io/secret-type\" = \"cluster\"\n          }\n        }\n      }\n    }\n\n    template {\n      metadata {\n        name = \"{{name}}-clusters-selector\"\n      }\n\n      spec {\n        source {\n          repo_url        = \"https://github.com/argoproj/argocd-example-apps/\"\n          target_revision = \"HEAD\"\n          path            = \"guestbook\"\n        }\n\n        destination {\n          server    = \"{{server}}\"\n          namespace = \"default\"\n        }\n      }\n    }\n  }\n}\n\n# Cluster Decision Resource Generator\nresource \"argocd_application_set\" \"cluster_decision_resource\" {\n  metadata {\n    name = \"cluster-decision-resource\"\n  }\n\n  spec {\n    generator {\n      cluster_decision_resource {\n        config_map_ref = \"my-configmap\"\n        name           = \"quak\"\n      }\n    }\n\n    template {\n      metadata {\n        name = \"{{name}}-guestbook\"\n      }\n\n      spec {\n        source {\n          repo_url        = \"https://github.com/argoproj/argocd-example-apps/\"\n          target_revision = \"HEAD\"\n          path            = \"guestbook\"\n        }\n\n        destination {\n          server    = \"{{server}}\"\n          namespace = \"default\"\n        }\n      }\n    }\n  }\n}\n\n\n# Git Generator - Directories\nresource \"argocd_application_set\" \"git_directories\" {\n  metadata {\n    name = \"git-directories\"\n  }\n\n  spec {\n    generator {\n      git {\n        repo_url = \"https://github.com/argoproj/argo-cd.git\"\n        revision = \"HEAD\"\n\n        directory {\n          path = \"applicationset/examples/git-generator-directory/cluster-addons/*\"\n        }\n\n        directory {\n          path    = \"applicationset/examples/git-generator-directory/excludes/cluster-addons/exclude-helm-guestbook\"\n          exclude = true\n        }\n      }\n    }\n\n    template {\n      metadata {\n        name = \"{{path.basename}}-git-directories\"\n      }\n\n      spec {\n        source {\n          repo_url        = \"https://github.com/argoproj/argo-cd.git\"\n          target_revision = \"HEAD\"\n          path            = \"{{path}}\"\n        }\n\n        destination {\n          server    = \"https://kubernetes.default.svc\"\n          namespace = \"{{path.basename}}\"\n        }\n      }\n    }\n  }\n}\n\n# Git Generator - Files\nresource \"argocd_application_set\" \"git_files\" {\n  metadata {\n    name = \"git-files\"\n  }\n\n  spec {\n    generator {\n      git {\n        repo_url = \"https://github.com/argoproj/argo-cd.git\"\n        revision = \"HEAD\"\n\n        file {\n          path = \"applicationset/examples/git-generator-files-discovery/cluster-config/**/config.json\"\n        }\n      }\n    }\n\n    template {\n      metadata {\n        name = \"{{cluster.name}}-git-files\"\n      }\n\n      spec {\n        source {\n          repo_url        = \"https://github.com/argoproj/argo-cd.git\"\n          target_revision = \"HEAD\"\n          path            = \"applicationset/examples/git-generator-files-discovery/apps/guestbook\"\n        }\n\n        destination {\n          server    = \"{{cluster.address}}\"\n          namespace = \"guestbook\"\n        }\n      }\n    }\n  }\n}\n\n# List Generator\nresource \"argocd_application_set\" \"list\" {\n  metadata {\n    name = \"list\"\n  }\n\n  spec {\n    generator {\n      list {\n        elements = [\n          {\n            cluster = \"engineering-dev\"\n            url     = \"https://kubernetes.default.svc\"\n          },\n          {\n            cluster = \"engineering-prod\"\n            url     = \"https://kubernetes.default.svc\"\n            foo     = \"bar\"\n          }\n        ]\n      }\n    }\n\n    template {\n      metadata {\n        name = \"{{cluster}}-guestbook\"\n      }\n\n      spec {\n        project = \"my-project\"\n\n        source {\n          repo_url        = \"https://github.com/argoproj/argo-cd.git\"\n          target_revision = \"HEAD\"\n          path            = \"applicationset/examples/list-generator/guestbook/{{cluster}}\"\n        }\n\n        destination {\n          server    = \"{{url}}\"\n          namespace = \"guestbook\"\n        }\n      }\n    }\n  }\n}\n\n# List Generator with elements_yaml\nresource \"argocd_application_set\" \"list_elements_yaml\" {\n  metadata {\n    name = \"list-elements-yaml\"\n  }\n\n  spec {\n    generator {\n      list {\n        elements_yaml = <<-EOT\n          - cluster: engineering-dev\n            url: https://kubernetes.default.svc\n            environment: development\n          - cluster: engineering-prod\n            url: https://kubernetes.default.svc\n            environment: production\n            foo: bar\n        EOT\n      }\n    }\n\n    template {\n      metadata {\n        name = \"{{cluster}}-guestbook\"\n      }\n\n      spec {\n        project = \"my-project\"\n\n        source {\n          repo_url        = \"https://github.com/argoproj/argo-cd.git\"\n          target_revision = \"HEAD\"\n          path            = \"applicationset/examples/list-generator/guestbook/{{cluster}}\"\n        }\n\n        destination {\n          server    = \"{{url}}\"\n          namespace = \"guestbook\"\n        }\n      }\n    }\n  }\n}\n\n# Matrix Generator\nresource \"argocd_application_set\" \"matrix\" {\n  metadata {\n    name = \"matrix\"\n  }\n\n  spec {\n    generator {\n      matrix {\n        generator {\n          git {\n            repo_url = \"https://github.com/argoproj/argo-cd.git\"\n            revision = \"HEAD\"\n\n            directory {\n              path = \"applicationset/examples/matrix/cluster-addons/*\"\n            }\n          }\n        }\n\n        generator {\n          clusters {\n            selector {\n              match_labels = {\n                \"argocd.argoproj.io/secret-type\" = \"cluster\"\n              }\n            }\n          }\n        }\n      }\n    }\n\n    template {\n      metadata {\n        name = \"{{path.basename}}-{{name}}\"\n      }\n\n      spec {\n        project = \"default\"\n\n        source {\n          repo_url        = \"https://github.com/argoproj/argo-cd.git\"\n          target_revision = \"HEAD\"\n          path            = \"{{path}}\"\n        }\n\n        destination {\n          server    = \"{{server}}\"\n          namespace = \"{{path.basename}}\"\n        }\n      }\n    }\n  }\n}\n\n# Merge Generator\nresource \"argocd_application_set\" \"merge\" {\n  metadata {\n    name = \"merge\"\n  }\n\n  spec {\n    generator {\n      merge {\n        merge_keys = [\n          \"server\"\n        ]\n\n        generator {\n          clusters {\n            values = {\n              kafka = true\n              redis = false\n            }\n          }\n        }\n\n        generator {\n          clusters {\n            selector {\n              match_labels = {\n                use-kafka = \"false\"\n              }\n            }\n\n            values = {\n              kafka = \"false\"\n            }\n          }\n        }\n\n        generator {\n          list {\n            elements = [\n              {\n                server         = \"https://2.4.6.8\"\n                \"values.redis\" = \"true\"\n              },\n            ]\n          }\n        }\n      }\n    }\n\n    template {\n      metadata {\n        name = \"{{name}}\"\n      }\n\n      spec {\n        project = \"default\"\n\n        source {\n          repo_url        = \"https://github.com/argoproj/argo-cd.git\"\n          path            = \"app\"\n          target_revision = \"HEAD\"\n\n          helm {\n            parameter {\n              name  = \"kafka\"\n              value = \"{{values.kafka}}\"\n            }\n\n            parameter {\n              name  = \"redis\"\n              value = \"{{values.redis}}\"\n            }\n          }\n        }\n\n        destination {\n          server    = \"{{server}}\"\n          namespace = \"default\"\n        }\n      }\n    }\n  }\n}\n\n# Pull Request Generator - GitHub\nresource \"argocd_application_set\" \"pr_github\" {\n  metadata {\n    name = \"pr-github\"\n  }\n\n  spec {\n    generator {\n      pull_request {\n        github {\n          api             = \"https://git.example.com/\"\n          owner           = \"myorg\"\n          repo            = \"myrepository\"\n          app_secret_name = \"github-app-repo-creds\"\n\n          token_ref {\n            secret_name = \"github-token\"\n            key         = \"token\"\n          }\n\n          labels = [\n            \"preview\"\n          ]\n        }\n      }\n    }\n\n    template {\n      metadata {\n        name = \"myapp-{{branch}}-{{number}}\"\n      }\n\n      spec {\n        project = \"default\"\n\n        source {\n          repo_url        = \"https://github.com/myorg/myrepo.git\"\n          path            = \"kubernetes/\"\n          target_revision = \"{{head_sha}}\"\n\n          helm {\n            parameter {\n              name  = \"image.tag\"\n              value = \"pull-{{head_sha}}\"\n            }\n          }\n        }\n\n        destination {\n          server    = \"https://kubernetes.default.svc\"\n          namespace = \"default\"\n        }\n      }\n    }\n  }\n}\n\n# Pull Request Generator - Azure DevOps\nresource \"argocd_application_set\" \"pr_azure_devops\" {\n  metadata {\n    name = \"pr-azure-devops\"\n  }\n\n  spec {\n    generator {\n      pull_request {\n        azure_devops {\n          api          = \"https://dev.azure.com\"\n          organization = \"myorg\"\n          project      = \"myproject\"\n          repo         = \"myrepository\"\n          labels       = [\"preview\"]\n\n          token_ref {\n            secret_name = \"azure-devops-token\"\n            key         = \"token\"\n          }\n        }\n      }\n    }\n\n    template {\n      metadata {\n        name = \"myapp-{{branch}}-{{number}}\"\n      }\n\n      spec {\n        project = \"default\"\n\n        source {\n          repo_url        = \"https://github.com/myorg/myrepo.git\"\n          path            = \"kubernetes/\"\n          target_revision = \"{{head_sha}}\"\n\n          helm {\n            parameter {\n              name  = \"image.tag\"\n              value = \"pull-{{head_sha}}\"\n            }\n          }\n        }\n\n        destination {\n          server    = \"https://kubernetes.default.svc\"\n          namespace = \"default\"\n        }\n      }\n    }\n  }\n}\n\n# SCM Provider Generator - GitHub\nresource \"argocd_application_set\" \"scm_github\" {\n  metadata {\n    name = \"scm-github\"\n  }\n\n  spec {\n    generator {\n      scm_provider {\n        github {\n          app_secret_name = \"gh-app-repo-creds\"\n          organization    = \"myorg\"\n\n          # all_branches = true\n          # api          = \"https://git.example.com/\"\n\n          # token_ref {\n          #   secret_name = \"github-token\"\n          #   key         = \"token\"\n          # }\n        }\n      }\n    }\n\n    template {\n      metadata {\n        name = \"{{repository}}\"\n      }\n\n      spec {\n        project = \"default\"\n\n        source {\n          repo_url        = \"{{url}}\"\n          path            = \"kubernetes/\"\n          target_revision = \"{{branch}}\"\n        }\n\n        destination {\n          server    = \"https://kubernetes.default.svc\"\n          namespace = \"default\"\n        }\n      }\n    }\n  }\n}\n\n# Progressive Sync - Rolling Update\nresource \"argocd_application_set\" \"progressive_sync\" {\n  metadata {\n    name = \"progressive-sync\"\n  }\n\n  spec {\n    generator {\n      list {\n        elements = [\n          {\n            cluster = \"engineering-dev\"\n            url     = \"https://1.2.3.4\"\n            env     = \"env-dev\"\n          },\n          {\n            cluster = \"engineering-qa\"\n            url     = \"https://2.4.6.8\"\n            env     = \"env-qa\"\n          },\n          {\n            cluster = \"engineering-prod\"\n            url     = \"https://9.8.7.6/\"\n            env     = \"env-prod\"\n          }\n        ]\n      }\n    }\n\n    strategy {\n      type = \"RollingSync\"\n      rolling_sync {\n        step {\n          match_expressions {\n            key      = \"envLabel\"\n            operator = \"In\"\n            values = [\n              \"env-dev\"\n            ]\n          }\n\n          # max_update = \"100%\"  # if undefined, all applications matched are updated together (default is 100%)\n        }\n\n        step {\n          match_expressions {\n            key      = \"envLabel\"\n            operator = \"In\"\n            values = [\n              \"env-qa\"\n            ]\n          }\n\n          max_update = \"0\"\n        }\n\n        step {\n          match_expressions {\n            key      = \"envLabel\"\n            operator = \"In\"\n            values = [\n              \"env-prod\"\n            ]\n          }\n\n          max_update = \"10%\"\n        }\n      }\n    }\n\n    go_template = true\n\n    template {\n      metadata {\n        name = \"{{.cluster}}-guestbook\"\n        labels = {\n          envLabel = \"{{.env}}\"\n        }\n      }\n\n      spec {\n        project = \"default\"\n\n        source {\n          repo_url        = \"https://github.com/infra-team/cluster-deployments.git\"\n          path            = \"guestbook/{{.cluster}}\"\n          target_revision = \"HEAD\"\n        }\n\n        destination {\n          server    = \"{{.url}}\"\n          namespace = \"guestbook\"\n        }\n      }\n    }\n  }\n}\n```\n\n<!-- schema generated by tfplugindocs -->\n## Schema\n\n### Required\n\n- `metadata` (Block List, Min: 1, Max: 1) Standard Kubernetes object metadata. For more info see the [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata). (see [below for nested schema](#nestedblock--metadata))\n- `spec` (Block List, Min: 1, Max: 1) ArgoCD application set resource spec. (see [below for nested schema](#nestedblock--spec))\n\n### Read-Only\n\n- `id` (String) The ID of this resource.\n\n<a id=\"nestedblock--metadata\"></a>\n### Nested Schema for `metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map stored with the applicationsets.argoproj.io that may be used to store arbitrary metadata. More info: http://kubernetes.io/docs/user-guide/annotations\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the applicationsets.argoproj.io. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels\n- `name` (String) Name of the applicationsets.argoproj.io, must be unique. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names\n- `namespace` (String) Namespace of the applicationsets.argoproj.io, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/\n\nRead-Only:\n\n- `generation` (Number) A sequence number representing a specific generation of the desired state.\n- `resource_version` (String) An opaque value that represents the internal version of this applicationsets.argoproj.io that can be used by clients to determine when applicationsets.argoproj.io has changed. Read more: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency\n- `uid` (String) The unique in time and space value for this applicationsets.argoproj.io. More info: http://kubernetes.io/docs/user-guide/identifiers#uids\n\n\n<a id=\"nestedblock--spec\"></a>\n### Nested Schema for `spec`\n\nRequired:\n\n- `generator` (Block List, Min: 1) Application set generators. Generators are responsible for generating parameters, which are then rendered into the template: fields of the ApplicationSet resource. (see [below for nested schema](#nestedblock--spec--generator))\n- `template` (Block List, Min: 1, Max: 1) Application set template. The template fields of the ApplicationSet spec are used to generate Argo CD Application resources. (see [below for nested schema](#nestedblock--spec--template))\n\nOptional:\n\n- `go_template` (Boolean) Enable use of [Go Text Template](https://pkg.go.dev/text/template).\n- `go_template_options` (Set of String) Optional list of [Go Templating Options](https://pkg.go.dev/text/template#Template.Option). Only relevant if `go_template` is true.\n- `ignore_application_differences` (Block List) Application Set [ignoreApplicationDifferences](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Controlling-Resource-Modification/#ignore-certain-changes-to-applications). (see [below for nested schema](#nestedblock--spec--ignore_application_differences))\n- `strategy` (Block List, Max: 1) [Progressive Sync](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Progressive-Syncs/) strategy (see [below for nested schema](#nestedblock--spec--strategy))\n- `sync_policy` (Block List, Max: 1) Application Set [sync policy](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Controlling-Resource-Modification/). (see [below for nested schema](#nestedblock--spec--sync_policy))\n- `template_patch` (String) Application set template patch, as in the [Argo CD ApplicationSet spec](https://argocd-applicationset.readthedocs.io/en/stable/fields/#templatepatch).\n\n<a id=\"nestedblock--spec--generator\"></a>\n### Nested Schema for `spec.generator`\n\nOptional:\n\n- `cluster_decision_resource` (Block List) The [cluster decision resource](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Cluster-Decision-Resource/) generates a list of Argo CD clusters. (see [below for nested schema](#nestedblock--spec--generator--cluster_decision_resource))\n- `clusters` (Block List) The [cluster generator](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Cluster/) produces parameters based on the list of items found within the cluster secret. (see [below for nested schema](#nestedblock--spec--generator--clusters))\n- `git` (Block List) [Git generators](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Git/) generates parameters using either the directory structure of a specified Git repository (directory generator), or, using the contents of JSON/YAML files found within a specified repository (file generator). (see [below for nested schema](#nestedblock--spec--generator--git))\n- `list` (Block List) [List generators](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-List/) generate parameters based on an arbitrary list of key/value pairs (as long as the values are string values). (see [below for nested schema](#nestedblock--spec--generator--list))\n- `matrix` (Block List) [Matrix generators](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Matrix/) combine the parameters generated by two child generators, iterating through every combination of each generator's generated parameters. Take note of the [restrictions](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Matrix/#restrictions) regarding their usage - particularly regarding nesting matrix generators. (see [below for nested schema](#nestedblock--spec--generator--matrix))\n- `merge` (Block List) [Merge generators](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Merge/) combine parameters produced by the base (first) generator with matching parameter sets produced by subsequent generators. Take note of the [restrictions](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Merge/#restrictions) regarding their usage - particularly regarding nesting merge generators. (see [below for nested schema](#nestedblock--spec--generator--merge))\n- `plugin` (Block List) [Plugin generators](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Plugin/) generates parameters using a custom plugin. (see [below for nested schema](#nestedblock--spec--generator--plugin))\n- `pull_request` (Block List) [Pull Request generators](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Pull-Request/) uses the API of an SCMaaS provider to automatically discover open pull requests within a repository. (see [below for nested schema](#nestedblock--spec--generator--pull_request))\n- `scm_provider` (Block List) [SCM Provider generators](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-SCM-Provider/) uses the API of an SCMaaS provider to automatically discover repositories within an organization. (see [below for nested schema](#nestedblock--spec--generator--scm_provider))\n- `selector` (Block List, Max: 1) The Selector allows to post-filter based on generated values using the kubernetes common labelSelector format. (see [below for nested schema](#nestedblock--spec--generator--selector))\n\n<a id=\"nestedblock--spec--generator--cluster_decision_resource\"></a>\n### Nested Schema for `spec.generator.cluster_decision_resource`\n\nRequired:\n\n- `config_map_ref` (String) ConfigMap with the duck type definitions needed to retrieve the data this includes apiVersion(group/version), kind, matchKey and validation settings.\n\nOptional:\n\n- `label_selector` (Block List, Max: 1) Label selector used to find the resource defined in the `config_map_ref`. Alternative to `name`. (see [below for nested schema](#nestedblock--spec--generator--cluster_decision_resource--label_selector))\n- `name` (String) Resource name of the kind, group and version, defined in the `config_map_ref`.\n- `requeue_after_seconds` (String) How often to check for changes (in seconds). Default: 3min.\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--cluster_decision_resource--template))\n- `values` (Map of String) Arbitrary string key-value pairs which are passed directly as parameters to the template.\n\n<a id=\"nestedblock--spec--generator--cluster_decision_resource--label_selector\"></a>\n### Nested Schema for `spec.generator.cluster_decision_resource.label_selector`\n\nOptional:\n\n- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--generator--cluster_decision_resource--label_selector--match_expressions))\n- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.\n\n<a id=\"nestedblock--spec--generator--cluster_decision_resource--label_selector--match_expressions\"></a>\n### Nested Schema for `spec.generator.cluster_decision_resource.label_selector.match_expressions`\n\nOptional:\n\n- `key` (String) The label key that the selector applies to.\n- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`.\n- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch.\n\n\n\n<a id=\"nestedblock--spec--generator--cluster_decision_resource--template\"></a>\n### Nested Schema for `spec.generator.cluster_decision_resource.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--cluster_decision_resource--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--cluster_decision_resource--template--spec))\n\n<a id=\"nestedblock--spec--generator--cluster_decision_resource--template--metadata\"></a>\n### Nested Schema for `spec.generator.cluster_decision_resource.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--cluster_decision_resource--template--spec\"></a>\n### Nested Schema for `spec.generator.cluster_decision_resource.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--cluster_decision_resource--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--cluster_decision_resource--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--cluster_decision_resource--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--cluster_decision_resource--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--cluster_decision_resource--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--cluster_decision_resource--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.cluster_decision_resource.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--cluster_decision_resource--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.cluster_decision_resource.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--cluster_decision_resource--template--spec--info\"></a>\n### Nested Schema for `spec.generator.cluster_decision_resource.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--cluster_decision_resource--template--spec--source\"></a>\n### Nested Schema for `spec.generator.cluster_decision_resource.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--cluster_decision_resource--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--cluster_decision_resource--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--cluster_decision_resource--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--cluster_decision_resource--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--cluster_decision_resource--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.cluster_decision_resource.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--cluster_decision_resource--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--cluster_decision_resource--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.cluster_decision_resource.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--cluster_decision_resource--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--cluster_decision_resource--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--cluster_decision_resource--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.cluster_decision_resource.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--cluster_decision_resource--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.cluster_decision_resource.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--cluster_decision_resource--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.cluster_decision_resource.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--cluster_decision_resource--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--cluster_decision_resource--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--cluster_decision_resource--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.cluster_decision_resource.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--cluster_decision_resource--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.cluster_decision_resource.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--cluster_decision_resource--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.cluster_decision_resource.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--cluster_decision_resource--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--cluster_decision_resource--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.cluster_decision_resource.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--cluster_decision_resource--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--cluster_decision_resource--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.cluster_decision_resource.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--cluster_decision_resource--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.cluster_decision_resource.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--cluster_decision_resource--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--cluster_decision_resource--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.cluster_decision_resource.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--cluster_decision_resource--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.cluster_decision_resource.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--cluster_decision_resource--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--cluster_decision_resource--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--cluster_decision_resource--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--cluster_decision_resource--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.cluster_decision_resource.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--cluster_decision_resource--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.cluster_decision_resource.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--cluster_decision_resource--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.cluster_decision_resource.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--cluster_decision_resource--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--cluster_decision_resource--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.cluster_decision_resource.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--clusters\"></a>\n### Nested Schema for `spec.generator.clusters`\n\nOptional:\n\n- `enabled` (Boolean) Boolean value defaulting to `true` to indicate that this block has been added thereby allowing all other attributes to be optional.\n- `selector` (Block List, Max: 1) Label selector used to narrow the scope of targeted clusters. (see [below for nested schema](#nestedblock--spec--generator--clusters--selector))\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--clusters--template))\n- `values` (Map of String) Arbitrary string key-value pairs to pass to the template via the values field of the cluster generator.\n\n<a id=\"nestedblock--spec--generator--clusters--selector\"></a>\n### Nested Schema for `spec.generator.clusters.selector`\n\nOptional:\n\n- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--generator--clusters--selector--match_expressions))\n- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.\n\n<a id=\"nestedblock--spec--generator--clusters--selector--match_expressions\"></a>\n### Nested Schema for `spec.generator.clusters.selector.match_expressions`\n\nOptional:\n\n- `key` (String) The label key that the selector applies to.\n- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`.\n- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch.\n\n\n\n<a id=\"nestedblock--spec--generator--clusters--template\"></a>\n### Nested Schema for `spec.generator.clusters.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--clusters--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--clusters--template--spec))\n\n<a id=\"nestedblock--spec--generator--clusters--template--metadata\"></a>\n### Nested Schema for `spec.generator.clusters.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--clusters--template--spec\"></a>\n### Nested Schema for `spec.generator.clusters.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--clusters--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--clusters--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--clusters--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--clusters--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--clusters--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--clusters--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.clusters.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--clusters--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.clusters.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--clusters--template--spec--info\"></a>\n### Nested Schema for `spec.generator.clusters.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--clusters--template--spec--source\"></a>\n### Nested Schema for `spec.generator.clusters.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--clusters--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--clusters--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--clusters--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--clusters--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--clusters--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.clusters.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--clusters--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--clusters--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.clusters.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--clusters--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--clusters--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--clusters--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.clusters.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--clusters--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.clusters.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--clusters--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.clusters.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--clusters--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--clusters--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--clusters--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.clusters.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--clusters--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.clusters.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--clusters--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.clusters.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--clusters--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--clusters--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.clusters.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--clusters--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--clusters--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.clusters.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--clusters--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.clusters.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--clusters--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--clusters--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.clusters.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--clusters--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.clusters.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--clusters--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--clusters--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--clusters--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--clusters--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.clusters.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--clusters--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.clusters.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--clusters--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.clusters.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--clusters--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--clusters--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.clusters.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--git\"></a>\n### Nested Schema for `spec.generator.git`\n\nRequired:\n\n- `repo_url` (String) URL to the repository to use.\n\nOptional:\n\n- `directory` (Block List) List of directories in the source repository to use when template the Application.. (see [below for nested schema](#nestedblock--spec--generator--git--directory))\n- `file` (Block List) List of files in the source repository to use when template the Application. (see [below for nested schema](#nestedblock--spec--generator--git--file))\n- `path_param_prefix` (String) Prefix for all path-related parameter names.\n- `requeue_after_seconds` (String) How often to check for changes (in seconds). Default: 3min.\n- `revision` (String) Revision of the source repository to use.\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--git--template))\n- `values` (Map of String) Arbitrary string key-value pairs to pass to the template via the values field of the git generator.\n\n<a id=\"nestedblock--spec--generator--git--directory\"></a>\n### Nested Schema for `spec.generator.git.directory`\n\nRequired:\n\n- `path` (String) Path in the repository.\n\nOptional:\n\n- `exclude` (Boolean) Flag indicating whether or not the directory should be excluded when templating.\n\n\n<a id=\"nestedblock--spec--generator--git--file\"></a>\n### Nested Schema for `spec.generator.git.file`\n\nRequired:\n\n- `path` (String) Path to the file in the repository.\n\n\n<a id=\"nestedblock--spec--generator--git--template\"></a>\n### Nested Schema for `spec.generator.git.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--git--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--git--template--spec))\n\n<a id=\"nestedblock--spec--generator--git--template--metadata\"></a>\n### Nested Schema for `spec.generator.git.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--git--template--spec\"></a>\n### Nested Schema for `spec.generator.git.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--git--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--git--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--git--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--git--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--git--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--git--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.git.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--git--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.git.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--git--template--spec--info\"></a>\n### Nested Schema for `spec.generator.git.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--git--template--spec--source\"></a>\n### Nested Schema for `spec.generator.git.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--git--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--git--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--git--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--git--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--git--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.git.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--git--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--git--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.git.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--git--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--git--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--git--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.git.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--git--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.git.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--git--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.git.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--git--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--git--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--git--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.git.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--git--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.git.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--git--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.git.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--git--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--git--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.git.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--git--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--git--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.git.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--git--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.git.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--git--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--git--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.git.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--git--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.git.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--git--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--git--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--git--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--git--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.git.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--git--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.git.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--git--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.git.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--git--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--git--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.git.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--list\"></a>\n### Nested Schema for `spec.generator.list`\n\nOptional:\n\n- `elements` (List of Map of String) List of key/value pairs to pass as parameters into the template\n- `elements_yaml` (String) YAML string containing list of key/value pairs to pass as parameters into the template\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--list--template))\n\n<a id=\"nestedblock--spec--generator--list--template\"></a>\n### Nested Schema for `spec.generator.list.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--list--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--list--template--spec))\n\n<a id=\"nestedblock--spec--generator--list--template--metadata\"></a>\n### Nested Schema for `spec.generator.list.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--list--template--spec\"></a>\n### Nested Schema for `spec.generator.list.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--list--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--list--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--list--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--list--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--list--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--list--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.list.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--list--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.list.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--list--template--spec--info\"></a>\n### Nested Schema for `spec.generator.list.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--list--template--spec--source\"></a>\n### Nested Schema for `spec.generator.list.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--list--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--list--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--list--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--list--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--list--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.list.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--list--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--list--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.list.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--list--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--list--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--list--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.list.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--list--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.list.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--list--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.list.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--list--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--list--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--list--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.list.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--list--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.list.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--list--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.list.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--list--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--list--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.list.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--list--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--list--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.list.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--list--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.list.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--list--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--list--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.list.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--list--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.list.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--list--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--list--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--list--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--list--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.list.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--list--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.list.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--list--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.list.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--list--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--list--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.list.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix\"></a>\n### Nested Schema for `spec.generator.matrix`\n\nRequired:\n\n- `generator` (Block List, Min: 2, Max: 2) Child generator. Generators are responsible for generating parameters, which are then combined by the parent matrix generator into the template fields of the ApplicationSet resource. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator))\n\nOptional:\n\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--matrix--template))\n\n<a id=\"nestedblock--spec--generator--matrix--generator\"></a>\n### Nested Schema for `spec.generator.matrix.generator`\n\nOptional:\n\n- `cluster_decision_resource` (Block List) The [cluster decision resource](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Cluster-Decision-Resource/) generates a list of Argo CD clusters. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--cluster_decision_resource))\n- `clusters` (Block List) The [cluster generator](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Cluster/) produces parameters based on the list of items found within the cluster secret. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--clusters))\n- `git` (Block List) [Git generators](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Git/) generates parameters using either the directory structure of a specified Git repository (directory generator), or, using the contents of JSON/YAML files found within a specified repository (file generator). (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--git))\n- `list` (Block List) [List generators](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-List/) generate parameters based on an arbitrary list of key/value pairs (as long as the values are string values). (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--list))\n- `matrix` (Block List) [Matrix generators](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Matrix/) combine the parameters generated by two child generators, iterating through every combination of each generator's generated parameters. Take note of the [restrictions](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Matrix/#restrictions) regarding their usage - particularly regarding nesting matrix generators. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix))\n- `merge` (Block List) [Merge generators](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Merge/) combine parameters produced by the base (first) generator with matching parameter sets produced by subsequent generators. Take note of the [restrictions](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Merge/#restrictions) regarding their usage - particularly regarding nesting merge generators. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge))\n- `plugin` (Block List) [Plugin generators](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Plugin/) generates parameters using a custom plugin. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--plugin))\n- `pull_request` (Block List) [Pull Request generators](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Pull-Request/) uses the API of an SCMaaS provider to automatically discover open pull requests within a repository. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--pull_request))\n- `scm_provider` (Block List) [SCM Provider generators](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-SCM-Provider/) uses the API of an SCMaaS provider to automatically discover repositories within an organization. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--scm_provider))\n- `selector` (Block List, Max: 1) The Selector allows to post-filter based on generated values using the kubernetes common labelSelector format. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--selector))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--cluster_decision_resource\"></a>\n### Nested Schema for `spec.generator.matrix.generator.cluster_decision_resource`\n\nRequired:\n\n- `config_map_ref` (String) ConfigMap with the duck type definitions needed to retrieve the data this includes apiVersion(group/version), kind, matchKey and validation settings.\n\nOptional:\n\n- `label_selector` (Block List, Max: 1) Label selector used to find the resource defined in the `config_map_ref`. Alternative to `name`. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--cluster_decision_resource--label_selector))\n- `name` (String) Resource name of the kind, group and version, defined in the `config_map_ref`.\n- `requeue_after_seconds` (String) How often to check for changes (in seconds). Default: 3min.\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--cluster_decision_resource--template))\n- `values` (Map of String) Arbitrary string key-value pairs which are passed directly as parameters to the template.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--cluster_decision_resource--label_selector\"></a>\n### Nested Schema for `spec.generator.matrix.generator.cluster_decision_resource.label_selector`\n\nOptional:\n\n- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--cluster_decision_resource--label_selector--match_expressions))\n- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--cluster_decision_resource--label_selector--match_expressions\"></a>\n### Nested Schema for `spec.generator.matrix.generator.cluster_decision_resource.label_selector.match_expressions`\n\nOptional:\n\n- `key` (String) The label key that the selector applies to.\n- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`.\n- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--cluster_decision_resource--template\"></a>\n### Nested Schema for `spec.generator.matrix.generator.cluster_decision_resource.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--cluster_decision_resource--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--cluster_decision_resource--template--spec))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--cluster_decision_resource--template--metadata\"></a>\n### Nested Schema for `spec.generator.matrix.generator.cluster_decision_resource.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--cluster_decision_resource--template--spec\"></a>\n### Nested Schema for `spec.generator.matrix.generator.cluster_decision_resource.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--cluster_decision_resource--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--cluster_decision_resource--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--cluster_decision_resource--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--cluster_decision_resource--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--cluster_decision_resource--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--cluster_decision_resource--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.matrix.generator.cluster_decision_resource.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--cluster_decision_resource--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.matrix.generator.cluster_decision_resource.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--cluster_decision_resource--template--spec--info\"></a>\n### Nested Schema for `spec.generator.matrix.generator.cluster_decision_resource.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--cluster_decision_resource--template--spec--source\"></a>\n### Nested Schema for `spec.generator.matrix.generator.cluster_decision_resource.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--cluster_decision_resource--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--cluster_decision_resource--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--cluster_decision_resource--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--cluster_decision_resource--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--cluster_decision_resource--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.matrix.generator.cluster_decision_resource.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--cluster_decision_resource--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--cluster_decision_resource--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.matrix.generator.cluster_decision_resource.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--cluster_decision_resource--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--cluster_decision_resource--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--cluster_decision_resource--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.matrix.generator.cluster_decision_resource.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--cluster_decision_resource--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.matrix.generator.cluster_decision_resource.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--cluster_decision_resource--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.matrix.generator.cluster_decision_resource.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--cluster_decision_resource--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--cluster_decision_resource--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--matrix--generator--cluster_decision_resource--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.cluster_decision_resource.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--cluster_decision_resource--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.cluster_decision_resource.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--cluster_decision_resource--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.matrix.generator.cluster_decision_resource.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--cluster_decision_resource--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--cluster_decision_resource--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.matrix.generator.cluster_decision_resource.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--cluster_decision_resource--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--cluster_decision_resource--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.matrix.generator.cluster_decision_resource.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--cluster_decision_resource--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.matrix.generator.cluster_decision_resource.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--cluster_decision_resource--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--cluster_decision_resource--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.matrix.generator.cluster_decision_resource.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--cluster_decision_resource--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.matrix.generator.cluster_decision_resource.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--cluster_decision_resource--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--cluster_decision_resource--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--cluster_decision_resource--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--cluster_decision_resource--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.matrix.generator.cluster_decision_resource.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--cluster_decision_resource--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.matrix.generator.cluster_decision_resource.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--cluster_decision_resource--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.matrix.generator.cluster_decision_resource.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--cluster_decision_resource--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--cluster_decision_resource--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.matrix.generator.cluster_decision_resource.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--clusters\"></a>\n### Nested Schema for `spec.generator.matrix.generator.clusters`\n\nOptional:\n\n- `enabled` (Boolean) Boolean value defaulting to `true` to indicate that this block has been added thereby allowing all other attributes to be optional.\n- `selector` (Block List, Max: 1) Label selector used to narrow the scope of targeted clusters. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--clusters--selector))\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--clusters--template))\n- `values` (Map of String) Arbitrary string key-value pairs to pass to the template via the values field of the cluster generator.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--clusters--selector\"></a>\n### Nested Schema for `spec.generator.matrix.generator.clusters.selector`\n\nOptional:\n\n- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--clusters--selector--match_expressions))\n- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--clusters--selector--match_expressions\"></a>\n### Nested Schema for `spec.generator.matrix.generator.clusters.selector.match_expressions`\n\nOptional:\n\n- `key` (String) The label key that the selector applies to.\n- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`.\n- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--clusters--template\"></a>\n### Nested Schema for `spec.generator.matrix.generator.clusters.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--clusters--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--clusters--template--spec))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--clusters--template--metadata\"></a>\n### Nested Schema for `spec.generator.matrix.generator.clusters.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--clusters--template--spec\"></a>\n### Nested Schema for `spec.generator.matrix.generator.clusters.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--clusters--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--clusters--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--clusters--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--clusters--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--clusters--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--clusters--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.matrix.generator.clusters.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--clusters--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.matrix.generator.clusters.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--clusters--template--spec--info\"></a>\n### Nested Schema for `spec.generator.matrix.generator.clusters.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--clusters--template--spec--source\"></a>\n### Nested Schema for `spec.generator.matrix.generator.clusters.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--clusters--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--clusters--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--clusters--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--clusters--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--clusters--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.matrix.generator.clusters.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--clusters--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--clusters--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.matrix.generator.clusters.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--clusters--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--clusters--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--clusters--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.matrix.generator.clusters.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--clusters--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.matrix.generator.clusters.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--clusters--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.matrix.generator.clusters.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--clusters--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--clusters--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--matrix--generator--clusters--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.clusters.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--clusters--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.clusters.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--clusters--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.matrix.generator.clusters.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--clusters--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--clusters--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.matrix.generator.clusters.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--clusters--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--clusters--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.matrix.generator.clusters.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--clusters--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.matrix.generator.clusters.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--clusters--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--clusters--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.matrix.generator.clusters.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--clusters--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.matrix.generator.clusters.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--clusters--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--clusters--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--clusters--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--clusters--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.matrix.generator.clusters.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--clusters--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.matrix.generator.clusters.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--clusters--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.matrix.generator.clusters.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--clusters--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--clusters--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.matrix.generator.clusters.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--git\"></a>\n### Nested Schema for `spec.generator.matrix.generator.git`\n\nRequired:\n\n- `repo_url` (String) URL to the repository to use.\n\nOptional:\n\n- `directory` (Block List) List of directories in the source repository to use when template the Application.. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--git--directory))\n- `file` (Block List) List of files in the source repository to use when template the Application. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--git--file))\n- `path_param_prefix` (String) Prefix for all path-related parameter names.\n- `requeue_after_seconds` (String) How often to check for changes (in seconds). Default: 3min.\n- `revision` (String) Revision of the source repository to use.\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--git--template))\n- `values` (Map of String) Arbitrary string key-value pairs to pass to the template via the values field of the git generator.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--git--directory\"></a>\n### Nested Schema for `spec.generator.matrix.generator.git.directory`\n\nRequired:\n\n- `path` (String) Path in the repository.\n\nOptional:\n\n- `exclude` (Boolean) Flag indicating whether or not the directory should be excluded when templating.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--git--file\"></a>\n### Nested Schema for `spec.generator.matrix.generator.git.file`\n\nRequired:\n\n- `path` (String) Path to the file in the repository.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--git--template\"></a>\n### Nested Schema for `spec.generator.matrix.generator.git.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--git--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--git--template--spec))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--git--template--metadata\"></a>\n### Nested Schema for `spec.generator.matrix.generator.git.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--git--template--spec\"></a>\n### Nested Schema for `spec.generator.matrix.generator.git.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--git--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--git--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--git--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--git--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--git--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--git--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.matrix.generator.git.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--git--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.matrix.generator.git.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--git--template--spec--info\"></a>\n### Nested Schema for `spec.generator.matrix.generator.git.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--git--template--spec--source\"></a>\n### Nested Schema for `spec.generator.matrix.generator.git.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--git--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--git--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--git--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--git--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--git--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.matrix.generator.git.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--git--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--git--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.matrix.generator.git.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--git--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--git--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--git--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.matrix.generator.git.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--git--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.matrix.generator.git.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--git--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.matrix.generator.git.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--git--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--git--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--matrix--generator--git--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.git.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--git--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.git.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--git--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.matrix.generator.git.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--git--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--git--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.matrix.generator.git.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--git--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--git--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.matrix.generator.git.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--git--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.matrix.generator.git.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--git--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--git--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.matrix.generator.git.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--git--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.matrix.generator.git.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--git--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--git--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--git--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--git--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.matrix.generator.git.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--git--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.matrix.generator.git.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--git--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.matrix.generator.git.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--git--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--git--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.matrix.generator.git.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--list\"></a>\n### Nested Schema for `spec.generator.matrix.generator.list`\n\nOptional:\n\n- `elements` (List of Map of String) List of key/value pairs to pass as parameters into the template\n- `elements_yaml` (String) YAML string containing list of key/value pairs to pass as parameters into the template\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--list--template))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--list--template\"></a>\n### Nested Schema for `spec.generator.matrix.generator.list.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--list--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--list--template--spec))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--list--template--metadata\"></a>\n### Nested Schema for `spec.generator.matrix.generator.list.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--list--template--spec\"></a>\n### Nested Schema for `spec.generator.matrix.generator.list.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--list--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--list--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--list--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--list--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--list--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--list--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.matrix.generator.list.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--list--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.matrix.generator.list.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--list--template--spec--info\"></a>\n### Nested Schema for `spec.generator.matrix.generator.list.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--list--template--spec--source\"></a>\n### Nested Schema for `spec.generator.matrix.generator.list.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--list--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--list--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--list--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--list--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--list--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.matrix.generator.list.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--list--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--list--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.matrix.generator.list.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--list--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--list--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--list--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.matrix.generator.list.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--list--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.matrix.generator.list.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--list--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.matrix.generator.list.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--list--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--list--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--matrix--generator--list--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.list.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--list--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.list.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--list--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.matrix.generator.list.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--list--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--list--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.matrix.generator.list.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--list--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--list--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.matrix.generator.list.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--list--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.matrix.generator.list.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--list--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--list--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.matrix.generator.list.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--list--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.matrix.generator.list.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--list--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--list--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--list--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--list--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.matrix.generator.list.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--list--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.matrix.generator.list.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--list--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.matrix.generator.list.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--list--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--list--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.matrix.generator.list.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix`\n\nRequired:\n\n- `generator` (Block List, Min: 2, Max: 2) Child generator. Generators are responsible for generating parameters, which are then combined by the parent matrix generator into the template fields of the ApplicationSet resource. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator))\n\nOptional:\n\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--template))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator`\n\nOptional:\n\n- `cluster_decision_resource` (Block List) The [cluster decision resource](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Cluster-Decision-Resource/) generates a list of Argo CD clusters. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource))\n- `clusters` (Block List) The [cluster generator](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Cluster/) produces parameters based on the list of items found within the cluster secret. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--clusters))\n- `git` (Block List) [Git generators](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Git/) generates parameters using either the directory structure of a specified Git repository (directory generator), or, using the contents of JSON/YAML files found within a specified repository (file generator). (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--git))\n- `list` (Block List) [List generators](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-List/) generate parameters based on an arbitrary list of key/value pairs (as long as the values are string values). (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--list))\n- `plugin` (Block List) [Plugin generators](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Plugin/) generates parameters using a custom plugin. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--plugin))\n- `pull_request` (Block List) [Pull Request generators](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Pull-Request/) uses the API of an SCMaaS provider to automatically discover open pull requests within a repository. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request))\n- `scm_provider` (Block List) [SCM Provider generators](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-SCM-Provider/) uses the API of an SCMaaS provider to automatically discover repositories within an organization. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider))\n- `selector` (Block List, Max: 1) The Selector allows to post-filter based on generated values using the kubernetes common labelSelector format. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--selector))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.cluster_decision_resource`\n\nRequired:\n\n- `config_map_ref` (String) ConfigMap with the duck type definitions needed to retrieve the data this includes apiVersion(group/version), kind, matchKey and validation settings.\n\nOptional:\n\n- `label_selector` (Block List, Max: 1) Label selector used to find the resource defined in the `config_map_ref`. Alternative to `name`. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--label_selector))\n- `name` (String) Resource name of the kind, group and version, defined in the `config_map_ref`.\n- `requeue_after_seconds` (String) How often to check for changes (in seconds). Default: 3min.\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--template))\n- `values` (Map of String) Arbitrary string key-value pairs which are passed directly as parameters to the template.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--label_selector\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.cluster_decision_resource.label_selector`\n\nOptional:\n\n- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--label_selector--match_expressions))\n- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--label_selector--match_expressions\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.cluster_decision_resource.label_selector.match_expressions`\n\nOptional:\n\n- `key` (String) The label key that the selector applies to.\n- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`.\n- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--template\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.cluster_decision_resource.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--template--spec))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--template--metadata\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.cluster_decision_resource.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--template--spec\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.cluster_decision_resource.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.cluster_decision_resource.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.cluster_decision_resource.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--template--spec--info\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.cluster_decision_resource.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--template--spec--source\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.cluster_decision_resource.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.cluster_decision_resource.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.cluster_decision_resource.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.cluster_decision_resource.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.cluster_decision_resource.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.cluster_decision_resource.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.cluster_decision_resource.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.cluster_decision_resource.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.cluster_decision_resource.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.cluster_decision_resource.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.cluster_decision_resource.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.cluster_decision_resource.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.cluster_decision_resource.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.cluster_decision_resource.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.cluster_decision_resource.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.cluster_decision_resource.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.cluster_decision_resource.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--cluster_decision_resource--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.cluster_decision_resource.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--clusters\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.clusters`\n\nOptional:\n\n- `enabled` (Boolean) Boolean value defaulting to `true` to indicate that this block has been added thereby allowing all other attributes to be optional.\n- `selector` (Block List, Max: 1) Label selector used to narrow the scope of targeted clusters. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--selector))\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--template))\n- `values` (Map of String) Arbitrary string key-value pairs to pass to the template via the values field of the cluster generator.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--selector\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.clusters.selector`\n\nOptional:\n\n- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--selector--match_expressions))\n- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--selector--match_expressions\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.clusters.selector.match_expressions`\n\nOptional:\n\n- `key` (String) The label key that the selector applies to.\n- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`.\n- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--template\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.clusters.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--template--spec))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--template--metadata\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.clusters.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--template--spec\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.clusters.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.clusters.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.clusters.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--template--spec--info\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.clusters.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--template--spec--source\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.clusters.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.clusters.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.clusters.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.clusters.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.clusters.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.clusters.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.clusters.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.clusters.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.clusters.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.clusters.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.clusters.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.clusters.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.clusters.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.clusters.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.clusters.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.clusters.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.clusters.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--clusters--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.clusters.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--git\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.git`\n\nRequired:\n\n- `repo_url` (String) URL to the repository to use.\n\nOptional:\n\n- `directory` (Block List) List of directories in the source repository to use when template the Application.. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--git--directory))\n- `file` (Block List) List of files in the source repository to use when template the Application. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--git--file))\n- `path_param_prefix` (String) Prefix for all path-related parameter names.\n- `requeue_after_seconds` (String) How often to check for changes (in seconds). Default: 3min.\n- `revision` (String) Revision of the source repository to use.\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--git--template))\n- `values` (Map of String) Arbitrary string key-value pairs to pass to the template via the values field of the git generator.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--git--directory\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.git.directory`\n\nRequired:\n\n- `path` (String) Path in the repository.\n\nOptional:\n\n- `exclude` (Boolean) Flag indicating whether or not the directory should be excluded when templating.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--git--file\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.git.file`\n\nRequired:\n\n- `path` (String) Path to the file in the repository.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--git--template\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.git.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--git--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--git--template--spec))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--git--template--metadata\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.git.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--git--template--spec\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.git.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--git--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--git--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--git--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--git--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--git--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--git--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.git.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--git--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.git.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--git--template--spec--info\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.git.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--git--template--spec--source\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.git.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--git--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--git--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--git--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--git--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--git--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.git.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--git--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--git--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.git.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--git--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--git--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--git--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.git.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--git--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.git.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--git--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.git.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--git--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--git--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--git--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.git.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--git--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.git.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--git--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.git.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--git--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--git--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.git.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--git--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--git--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.git.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--git--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.git.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--git--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--git--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.git.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--git--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.git.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--git--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--git--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--git--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--git--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.git.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--git--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.git.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--git--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.git.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--git--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--git--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.git.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--list\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.list`\n\nOptional:\n\n- `elements` (List of Map of String) List of key/value pairs to pass as parameters into the template\n- `elements_yaml` (String) YAML string containing list of key/value pairs to pass as parameters into the template\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--list--template))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--list--template\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.list.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--list--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--list--template--spec))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--list--template--metadata\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.list.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--list--template--spec\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.list.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--list--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--list--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--list--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--list--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--list--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--list--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.list.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--list--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.list.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--list--template--spec--info\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.list.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--list--template--spec--source\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.list.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--list--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--list--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--list--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--list--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--list--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.list.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--list--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--list--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.list.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--list--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--list--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--list--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.list.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--list--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.list.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--list--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.list.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--list--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--list--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--list--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.list.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--list--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.list.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--list--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.list.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--list--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--list--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.list.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--list--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--list--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.list.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--list--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.list.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--list--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--list--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.list.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--list--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.list.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--list--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--list--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--list--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--list--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.list.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--list--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.list.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--list--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.list.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--list--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--list--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.list.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--plugin\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.plugin`\n\nRequired:\n\n- `config_map_ref` (String) ConfigMap with the plugin configuration needed to retrieve the data.\n\nOptional:\n\n- `input` (Block List, Max: 1) The input parameters used for calling the plugin. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--plugin--input))\n- `requeue_after_seconds` (String) How often to check for changes (in seconds). Default: 3min.\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--plugin--template))\n- `values` (Map of String) Arbitrary string key-value pairs to pass to the template via the values field of the git generator.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--plugin--input\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.plugin.input`\n\nRequired:\n\n- `parameters` (Map of String) Arbitrary key-value pairs which are passed directly as parameters to the plugin. A current limitation is that this cannot fully express the parameters that can be accepted by the plugin generator.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--plugin--template\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.plugin.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--plugin--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--plugin--template--spec))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--plugin--template--metadata\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.plugin.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--plugin--template--spec\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.plugin.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--plugin--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--plugin--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--plugin--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--plugin--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--plugin--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--plugin--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.plugin.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--plugin--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.plugin.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--plugin--template--spec--info\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.plugin.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--plugin--template--spec--source\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.plugin.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--plugin--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--plugin--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--plugin--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--plugin--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--plugin--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.plugin.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--plugin--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--plugin--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.plugin.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--plugin--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--plugin--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--plugin--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.plugin.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--plugin--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.plugin.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--plugin--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.plugin.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--plugin--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--plugin--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--plugin--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.plugin.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--plugin--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.plugin.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--plugin--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.plugin.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--plugin--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--plugin--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.plugin.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--plugin--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--plugin--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.plugin.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--plugin--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.plugin.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--plugin--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--plugin--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.plugin.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--plugin--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.plugin.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--plugin--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--plugin--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--plugin--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--plugin--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.plugin.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--plugin--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.plugin.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--plugin--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.plugin.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--plugin--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--plugin--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.plugin.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.pull_request`\n\nOptional:\n\n- `azure_devops` (Block List, Max: 1) Fetch pull requests from an Azure DevOps repository. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--azure_devops))\n- `bitbucket_server` (Block List, Max: 1) Fetch pull requests from a repo hosted on a Bitbucket Server. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--bitbucket_server))\n- `filter` (Block List) Filters allow selecting which pull requests to generate for. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--filter))\n- `gitea` (Block List, Max: 1) Specify the repository from which to fetch the Gitea Pull requests. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--gitea))\n- `github` (Block List, Max: 1) Specify the repository from which to fetch the GitHub Pull requests. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--github))\n- `gitlab` (Block List, Max: 1) Specify the project from which to fetch the GitLab merge requests. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--gitlab))\n- `requeue_after_seconds` (String) How often to check for changes (in seconds). Default: 30min.\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--template))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--azure_devops\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.pull_request.azure_devops`\n\nRequired:\n\n- `organization` (String) Azure DevOps org to scan. Required.\n- `project` (String) Azure DevOps project name to scan. Required.\n- `repo` (String) Azure DevOps repo name to scan. Required.\n\nOptional:\n\n- `api` (String) The Azure DevOps API URL to talk to. If blank, uses https://dev.azure.com/.\n- `labels` (List of String) Labels is used to filter the PRs that you want to target.\n- `token_ref` (Block List, Max: 1) Authentication token reference. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--azure_devops--token_ref))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--azure_devops--token_ref\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.pull_request.azure_devops.token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--bitbucket_server\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.pull_request.bitbucket_server`\n\nRequired:\n\n- `api` (String) The Bitbucket REST API URL to talk to e.g. https://bitbucket.org/rest.\n- `project` (String) Project to scan.\n- `repo` (String) Repo name to scan.\n\nOptional:\n\n- `basic_auth` (Block List, Max: 1) Credentials for Basic auth. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--bitbucket_server--basic_auth))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--bitbucket_server--basic_auth\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.pull_request.bitbucket_server.basic_auth`\n\nOptional:\n\n- `password_ref` (Block List, Max: 1) Password (or personal access token) reference. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--bitbucket_server--basic_auth--password_ref))\n- `username` (String) Username for Basic auth.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--bitbucket_server--basic_auth--password_ref\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.pull_request.bitbucket_server.basic_auth.password_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--filter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.pull_request.filter`\n\nOptional:\n\n- `branch_match` (String) A regex which must match the branch name.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--gitea\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.pull_request.gitea`\n\nRequired:\n\n- `api` (String) The Gitea API URL to talk to.\n- `owner` (String) Gitea org or user to scan.\n- `repo` (String) Gitea repo name to scan.\n\nOptional:\n\n- `insecure` (Boolean) Allow insecure tls, for self-signed certificates; default: false.\n- `token_ref` (Block List, Max: 1) Authentication token reference. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--gitea--token_ref))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--gitea--token_ref\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.pull_request.gitea.token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--github\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.pull_request.github`\n\nRequired:\n\n- `owner` (String) GitHub org or user to scan.\n- `repo` (String) GitHub repo name to scan.\n\nOptional:\n\n- `api` (String) The GitHub API URL to talk to. Default https://api.github.com/.\n- `app_secret_name` (String) Reference to a GitHub App repo-creds secret with permission to access pull requests.\n- `labels` (List of String) Labels is used to filter the PRs that you want to target.\n- `token_ref` (Block List, Max: 1) Authentication token reference. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--github--token_ref))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--github--token_ref\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.pull_request.github.token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--gitlab\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.pull_request.gitlab`\n\nRequired:\n\n- `project` (String) GitLab project to scan.\n\nOptional:\n\n- `api` (String) The GitLab API URL to talk to. If blank, uses https://gitlab.com/.\n- `ca_ref` (Block List, Max: 1) Reference to a ConfigMap key containing trusted CA certificates for verifying the SCM server's TLS certificate. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--gitlab--ca_ref))\n- `insecure` (Boolean) A flag for checking the validity of the SCM's certificates.\n- `labels` (List of String) Labels is used to filter the PRs that you want to target.\n- `pull_request_state` (String) additional MRs filter to get only those with a certain state. Default:  \"\" (all states).\n- `token_ref` (Block List, Max: 1) Authentication token reference. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--gitlab--token_ref))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--gitlab--ca_ref\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.pull_request.gitlab.ca_ref`\n\nRequired:\n\n- `config_map_name` (String) Name of the ConfigMap.\n- `key` (String) Key containing information in trusted CA certs.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--gitlab--token_ref\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.pull_request.gitlab.token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--template\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.pull_request.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--template--spec))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--template--metadata\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.pull_request.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--template--spec\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.pull_request.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.pull_request.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.pull_request.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--template--spec--info\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.pull_request.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--template--spec--source\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.pull_request.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.pull_request.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.pull_request.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.pull_request.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.pull_request.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.pull_request.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.pull_request.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.pull_request.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.pull_request.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.pull_request.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.pull_request.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.pull_request.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.pull_request.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.pull_request.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.pull_request.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.pull_request.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.pull_request.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--pull_request--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.pull_request.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.scm_provider`\n\nOptional:\n\n- `azure_devops` (Block List, Max: 1) Uses the Azure DevOps API to look up eligible repositories based on a team project within an Azure DevOps organization. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--azure_devops))\n- `bitbucket_cloud` (Block List, Max: 1) Uses the Bitbucket API V2 to scan a workspace in bitbucket.org. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--bitbucket_cloud))\n- `bitbucket_server` (Block List, Max: 1) Use the Bitbucket Server API (1.0) to scan repos in a project. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--bitbucket_server))\n- `clone_protocol` (String) Which protocol to use for the SCM URL. Default is provider-specific but ssh if possible. Not all providers necessarily support all protocols.\n- `filter` (Block List) Filters for which repos should be considered. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--filter))\n- `gitea` (Block List, Max: 1) Gitea mode uses the Gitea API to scan organizations in your instance. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--gitea))\n- `github` (Block List, Max: 1) Uses the GitHub API to scan an organization in either github.com or GitHub Enterprise. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--github))\n- `gitlab` (Block List, Max: 1) Uses the GitLab API to scan and organization in either gitlab.com or self-hosted GitLab. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--gitlab))\n- `requeue_after_seconds` (String) How often to check for changes (in seconds). Default: 3min.\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--template))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--azure_devops\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.scm_provider.azure_devops`\n\nRequired:\n\n- `organization` (String) Azure Devops organization. E.g. \"my-organization\".\n- `team_project` (String) Azure Devops team project. E.g. \"my-team\".\n\nOptional:\n\n- `access_token_ref` (Block List, Max: 1) The Personal Access Token (PAT) to use when connecting. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--azure_devops--access_token_ref))\n- `all_branches` (Boolean) Scan all branches instead of just the default branch.\n- `api` (String) The URL to Azure DevOps. Defaults to https://dev.azure.com.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--azure_devops--access_token_ref\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.scm_provider.azure_devops.access_token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--bitbucket_cloud\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.scm_provider.bitbucket_cloud`\n\nRequired:\n\n- `owner` (String) Bitbucket workspace to scan.\n- `user` (String) Bitbucket user to use when authenticating. Should have a \"member\" role to be able to read all repositories and branches.\n\nOptional:\n\n- `all_branches` (Boolean) Scan all branches instead of just the default branch.\n- `app_password_ref` (Block List, Max: 1) The app password to use for the user. See: https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--bitbucket_cloud--app_password_ref))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--bitbucket_cloud--app_password_ref\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.scm_provider.bitbucket_cloud.app_password_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--bitbucket_server\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.scm_provider.bitbucket_server`\n\nRequired:\n\n- `api` (String) The Bitbucket REST API URL to talk to e.g. https://bitbucket.org/rest.\n- `project` (String) Project to scan.\n\nOptional:\n\n- `all_branches` (Boolean) Scan all branches instead of just the default branch.\n- `basic_auth` (Block List, Max: 1) Credentials for Basic auth. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--bitbucket_server--basic_auth))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--bitbucket_server--basic_auth\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.scm_provider.bitbucket_server.basic_auth`\n\nOptional:\n\n- `password_ref` (Block List, Max: 1) Password (or personal access token) reference. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--bitbucket_server--basic_auth--password_ref))\n- `username` (String) Username for Basic auth.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--bitbucket_server--basic_auth--password_ref\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.scm_provider.bitbucket_server.basic_auth.password_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--filter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.scm_provider.filter`\n\nOptional:\n\n- `branch_match` (String) A regex which must match the branch name.\n- `label_match` (String) A regex which must match at least one label.\n- `paths_do_not_exist` (List of String) An array of paths, all of which must not exist.\n- `paths_exist` (List of String) An array of paths, all of which must exist.\n- `repository_match` (String) A regex for repo names.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--gitea\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.scm_provider.gitea`\n\nRequired:\n\n- `owner` (String) Gitea organization or user to scan.\n\nOptional:\n\n- `all_branches` (Boolean) Scan all branches instead of just the default branch.\n- `api` (String) The Gitea URL to talk to. For example https://gitea.mydomain.com/.\n- `insecure` (Boolean) Allow self-signed TLS / Certificates.\n- `token_ref` (Block List, Max: 1) Authentication token reference. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--gitea--token_ref))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--gitea--token_ref\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.scm_provider.gitea.token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--github\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.scm_provider.github`\n\nRequired:\n\n- `organization` (String) GitHub org to scan.\n\nOptional:\n\n- `all_branches` (Boolean) If true, scan every branch of every repository. If false, scan only the default branch.\n- `api` (String) The GitHub API URL to talk to. Default https://api.github.com/.\n- `app_secret_name` (String) Reference to a GitHub App repo-creds secret. Uses a GitHub App to access the API instead of a PAT.\n- `token_ref` (Block List, Max: 1) Authentication token reference. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--github--token_ref))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--github--token_ref\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.scm_provider.github.token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--gitlab\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.scm_provider.gitlab`\n\nRequired:\n\n- `group` (String) Gitlab group to scan. You can use either the project id (recommended) or the full namespaced path.\n\nOptional:\n\n- `all_branches` (Boolean) If true, scan every branch of every repository. If false, scan only the default branch.\n- `api` (String) The Gitlab API URL to talk to.\n- `include_subgroups` (Boolean) Recurse through subgroups (true) or scan only the base group (false). Defaults to `false`.\n- `token_ref` (Block List, Max: 1) Authentication token reference. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--gitlab--token_ref))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--gitlab--token_ref\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.scm_provider.gitlab.token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--template\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.scm_provider.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--template--spec))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--template--metadata\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.scm_provider.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--template--spec\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.scm_provider.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.scm_provider.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.scm_provider.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--template--spec--info\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.scm_provider.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--template--spec--source\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.scm_provider.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.scm_provider.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.scm_provider.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.scm_provider.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.scm_provider.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.scm_provider.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.scm_provider.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.scm_provider.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.scm_provider.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.scm_provider.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.scm_provider.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.scm_provider.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.scm_provider.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.scm_provider.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.scm_provider.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.scm_provider.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.scm_provider.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--scm_provider--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.scm_provider.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--selector\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.selector`\n\nOptional:\n\n- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--generator--selector--match_expressions))\n- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--generator--selector--match_expressions\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.generator.selector.match_expressions`\n\nOptional:\n\n- `key` (String) The label key that the selector applies to.\n- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`.\n- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--template\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--template--spec))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--template--metadata\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--template--spec\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--template--spec--info\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--template--spec--source\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--matrix--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--matrix--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.matrix.generator.matrix.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge`\n\nRequired:\n\n- `generator` (Block List, Min: 2) Child generator. Generators are responsible for generating parameters, which are then combined by the parent merge generator. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator))\n- `merge_keys` (List of String) Keys to merge into resulting parameter set.\n\nOptional:\n\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--template))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator`\n\nOptional:\n\n- `cluster_decision_resource` (Block List) The [cluster decision resource](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Cluster-Decision-Resource/) generates a list of Argo CD clusters. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource))\n- `clusters` (Block List) The [cluster generator](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Cluster/) produces parameters based on the list of items found within the cluster secret. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--clusters))\n- `git` (Block List) [Git generators](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Git/) generates parameters using either the directory structure of a specified Git repository (directory generator), or, using the contents of JSON/YAML files found within a specified repository (file generator). (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--git))\n- `list` (Block List) [List generators](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-List/) generate parameters based on an arbitrary list of key/value pairs (as long as the values are string values). (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--list))\n- `plugin` (Block List) [Plugin generators](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Plugin/) generates parameters using a custom plugin. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--plugin))\n- `pull_request` (Block List) [Pull Request generators](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Pull-Request/) uses the API of an SCMaaS provider to automatically discover open pull requests within a repository. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--pull_request))\n- `scm_provider` (Block List) [SCM Provider generators](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-SCM-Provider/) uses the API of an SCMaaS provider to automatically discover repositories within an organization. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider))\n- `selector` (Block List, Max: 1) The Selector allows to post-filter based on generated values using the kubernetes common labelSelector format. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--selector))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.cluster_decision_resource`\n\nRequired:\n\n- `config_map_ref` (String) ConfigMap with the duck type definitions needed to retrieve the data this includes apiVersion(group/version), kind, matchKey and validation settings.\n\nOptional:\n\n- `label_selector` (Block List, Max: 1) Label selector used to find the resource defined in the `config_map_ref`. Alternative to `name`. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--label_selector))\n- `name` (String) Resource name of the kind, group and version, defined in the `config_map_ref`.\n- `requeue_after_seconds` (String) How often to check for changes (in seconds). Default: 3min.\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--template))\n- `values` (Map of String) Arbitrary string key-value pairs which are passed directly as parameters to the template.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--label_selector\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.cluster_decision_resource.label_selector`\n\nOptional:\n\n- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--label_selector--match_expressions))\n- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--label_selector--match_expressions\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.cluster_decision_resource.label_selector.match_expressions`\n\nOptional:\n\n- `key` (String) The label key that the selector applies to.\n- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`.\n- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--template\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.cluster_decision_resource.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--template--spec))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--template--metadata\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.cluster_decision_resource.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--template--spec\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.cluster_decision_resource.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.cluster_decision_resource.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.cluster_decision_resource.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--template--spec--info\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.cluster_decision_resource.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--template--spec--source\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.cluster_decision_resource.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.cluster_decision_resource.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.cluster_decision_resource.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.cluster_decision_resource.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.cluster_decision_resource.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.cluster_decision_resource.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.cluster_decision_resource.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.cluster_decision_resource.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.cluster_decision_resource.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.cluster_decision_resource.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.cluster_decision_resource.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.cluster_decision_resource.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.cluster_decision_resource.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.cluster_decision_resource.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.cluster_decision_resource.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.cluster_decision_resource.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.cluster_decision_resource.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--cluster_decision_resource--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.cluster_decision_resource.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--clusters\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.clusters`\n\nOptional:\n\n- `enabled` (Boolean) Boolean value defaulting to `true` to indicate that this block has been added thereby allowing all other attributes to be optional.\n- `selector` (Block List, Max: 1) Label selector used to narrow the scope of targeted clusters. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--clusters--selector))\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--clusters--template))\n- `values` (Map of String) Arbitrary string key-value pairs to pass to the template via the values field of the cluster generator.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--clusters--selector\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.clusters.selector`\n\nOptional:\n\n- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--clusters--selector--match_expressions))\n- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--clusters--selector--match_expressions\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.clusters.selector.match_expressions`\n\nOptional:\n\n- `key` (String) The label key that the selector applies to.\n- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`.\n- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--clusters--template\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.clusters.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--clusters--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--clusters--template--spec))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--clusters--template--metadata\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.clusters.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--clusters--template--spec\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.clusters.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--clusters--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--clusters--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--clusters--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--clusters--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--clusters--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--clusters--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.clusters.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--clusters--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.clusters.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--clusters--template--spec--info\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.clusters.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--clusters--template--spec--source\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.clusters.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--clusters--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--clusters--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--clusters--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--clusters--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--clusters--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.clusters.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--clusters--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--clusters--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.clusters.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--clusters--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--clusters--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--clusters--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.clusters.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--clusters--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.clusters.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--clusters--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.clusters.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--clusters--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--clusters--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--clusters--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.clusters.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--clusters--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.clusters.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--clusters--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.clusters.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--clusters--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--clusters--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.clusters.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--clusters--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--clusters--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.clusters.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--clusters--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.clusters.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--clusters--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--clusters--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.clusters.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--clusters--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.clusters.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--clusters--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--clusters--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--clusters--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--clusters--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.clusters.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--clusters--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.clusters.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--clusters--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.clusters.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--clusters--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--clusters--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.clusters.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--git\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.git`\n\nRequired:\n\n- `repo_url` (String) URL to the repository to use.\n\nOptional:\n\n- `directory` (Block List) List of directories in the source repository to use when template the Application.. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--git--directory))\n- `file` (Block List) List of files in the source repository to use when template the Application. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--git--file))\n- `path_param_prefix` (String) Prefix for all path-related parameter names.\n- `requeue_after_seconds` (String) How often to check for changes (in seconds). Default: 3min.\n- `revision` (String) Revision of the source repository to use.\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--git--template))\n- `values` (Map of String) Arbitrary string key-value pairs to pass to the template via the values field of the git generator.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--git--directory\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.git.directory`\n\nRequired:\n\n- `path` (String) Path in the repository.\n\nOptional:\n\n- `exclude` (Boolean) Flag indicating whether or not the directory should be excluded when templating.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--git--file\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.git.file`\n\nRequired:\n\n- `path` (String) Path to the file in the repository.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--git--template\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.git.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--git--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--git--template--spec))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--git--template--metadata\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.git.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--git--template--spec\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.git.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--git--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--git--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--git--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--git--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--git--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--git--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.git.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--git--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.git.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--git--template--spec--info\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.git.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--git--template--spec--source\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.git.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--git--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--git--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--git--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--git--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--git--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.git.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--git--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--git--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.git.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--git--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--git--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--git--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.git.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--git--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.git.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--git--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.git.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--git--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--git--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--git--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.git.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--git--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.git.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--git--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.git.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--git--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--git--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.git.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--git--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--git--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.git.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--git--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.git.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--git--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--git--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.git.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--git--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.git.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--git--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--git--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--git--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--git--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.git.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--git--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.git.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--git--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.git.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--git--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--git--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.git.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--list\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.list`\n\nOptional:\n\n- `elements` (List of Map of String) List of key/value pairs to pass as parameters into the template\n- `elements_yaml` (String) YAML string containing list of key/value pairs to pass as parameters into the template\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--list--template))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--list--template\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.list.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--list--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--list--template--spec))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--list--template--metadata\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.list.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--list--template--spec\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.list.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--list--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--list--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--list--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--list--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--list--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--list--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.list.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--list--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.list.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--list--template--spec--info\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.list.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--list--template--spec--source\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.list.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--list--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--list--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--list--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--list--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--list--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.list.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--list--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--list--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.list.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--list--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--list--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--list--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.list.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--list--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.list.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--list--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.list.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--list--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--list--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--list--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.list.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--list--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.list.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--list--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.list.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--list--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--list--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.list.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--list--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--list--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.list.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--list--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.list.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--list--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--list--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.list.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--list--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.list.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--list--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--list--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--list--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--list--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.list.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--list--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.list.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--list--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.list.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--list--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--list--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.list.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--plugin\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.plugin`\n\nRequired:\n\n- `config_map_ref` (String) ConfigMap with the plugin configuration needed to retrieve the data.\n\nOptional:\n\n- `input` (Block List, Max: 1) The input parameters used for calling the plugin. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--plugin--input))\n- `requeue_after_seconds` (String) How often to check for changes (in seconds). Default: 3min.\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--plugin--template))\n- `values` (Map of String) Arbitrary string key-value pairs to pass to the template via the values field of the git generator.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--plugin--input\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.plugin.input`\n\nRequired:\n\n- `parameters` (Map of String) Arbitrary key-value pairs which are passed directly as parameters to the plugin. A current limitation is that this cannot fully express the parameters that can be accepted by the plugin generator.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--plugin--template\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.plugin.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--plugin--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--plugin--template--spec))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--plugin--template--metadata\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.plugin.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--plugin--template--spec\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.plugin.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--plugin--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--plugin--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--plugin--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--plugin--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--plugin--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--plugin--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.plugin.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--plugin--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.plugin.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--plugin--template--spec--info\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.plugin.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--plugin--template--spec--source\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.plugin.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--plugin--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--plugin--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--plugin--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--plugin--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--plugin--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.plugin.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--plugin--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--plugin--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.plugin.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--plugin--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--plugin--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--plugin--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.plugin.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--plugin--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.plugin.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--plugin--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.plugin.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--plugin--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--plugin--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--plugin--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.plugin.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--plugin--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.plugin.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--plugin--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.plugin.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--plugin--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--plugin--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.plugin.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--plugin--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--plugin--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.plugin.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--plugin--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.plugin.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--plugin--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--plugin--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.plugin.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--plugin--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.plugin.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--plugin--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--plugin--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--plugin--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--plugin--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.plugin.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--plugin--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.plugin.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--plugin--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.plugin.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--plugin--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--plugin--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.plugin.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--pull_request\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.pull_request`\n\nOptional:\n\n- `azure_devops` (Block List, Max: 1) Fetch pull requests from an Azure DevOps repository. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--azure_devops))\n- `bitbucket_server` (Block List, Max: 1) Fetch pull requests from a repo hosted on a Bitbucket Server. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--bitbucket_server))\n- `filter` (Block List) Filters allow selecting which pull requests to generate for. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--filter))\n- `gitea` (Block List, Max: 1) Specify the repository from which to fetch the Gitea Pull requests. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--gitea))\n- `github` (Block List, Max: 1) Specify the repository from which to fetch the GitHub Pull requests. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--github))\n- `gitlab` (Block List, Max: 1) Specify the project from which to fetch the GitLab merge requests. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--gitlab))\n- `requeue_after_seconds` (String) How often to check for changes (in seconds). Default: 30min.\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--template))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--azure_devops\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.pull_request.azure_devops`\n\nRequired:\n\n- `organization` (String) Azure DevOps org to scan. Required.\n- `project` (String) Azure DevOps project name to scan. Required.\n- `repo` (String) Azure DevOps repo name to scan. Required.\n\nOptional:\n\n- `api` (String) The Azure DevOps API URL to talk to. If blank, uses https://dev.azure.com/.\n- `labels` (List of String) Labels is used to filter the PRs that you want to target.\n- `token_ref` (Block List, Max: 1) Authentication token reference. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--azure_devops--token_ref))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--azure_devops--token_ref\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.pull_request.azure_devops.token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--bitbucket_server\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.pull_request.bitbucket_server`\n\nRequired:\n\n- `api` (String) The Bitbucket REST API URL to talk to e.g. https://bitbucket.org/rest.\n- `project` (String) Project to scan.\n- `repo` (String) Repo name to scan.\n\nOptional:\n\n- `basic_auth` (Block List, Max: 1) Credentials for Basic auth. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--bitbucket_server--basic_auth))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--bitbucket_server--basic_auth\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.pull_request.bitbucket_server.basic_auth`\n\nOptional:\n\n- `password_ref` (Block List, Max: 1) Password (or personal access token) reference. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--bitbucket_server--basic_auth--password_ref))\n- `username` (String) Username for Basic auth.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--bitbucket_server--basic_auth--password_ref\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.pull_request.bitbucket_server.basic_auth.password_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--filter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.pull_request.filter`\n\nOptional:\n\n- `branch_match` (String) A regex which must match the branch name.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--gitea\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.pull_request.gitea`\n\nRequired:\n\n- `api` (String) The Gitea API URL to talk to.\n- `owner` (String) Gitea org or user to scan.\n- `repo` (String) Gitea repo name to scan.\n\nOptional:\n\n- `insecure` (Boolean) Allow insecure tls, for self-signed certificates; default: false.\n- `token_ref` (Block List, Max: 1) Authentication token reference. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--gitea--token_ref))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--gitea--token_ref\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.pull_request.gitea.token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--github\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.pull_request.github`\n\nRequired:\n\n- `owner` (String) GitHub org or user to scan.\n- `repo` (String) GitHub repo name to scan.\n\nOptional:\n\n- `api` (String) The GitHub API URL to talk to. Default https://api.github.com/.\n- `app_secret_name` (String) Reference to a GitHub App repo-creds secret with permission to access pull requests.\n- `labels` (List of String) Labels is used to filter the PRs that you want to target.\n- `token_ref` (Block List, Max: 1) Authentication token reference. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--github--token_ref))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--github--token_ref\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.pull_request.github.token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--gitlab\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.pull_request.gitlab`\n\nRequired:\n\n- `project` (String) GitLab project to scan.\n\nOptional:\n\n- `api` (String) The GitLab API URL to talk to. If blank, uses https://gitlab.com/.\n- `ca_ref` (Block List, Max: 1) Reference to a ConfigMap key containing trusted CA certificates for verifying the SCM server's TLS certificate. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--gitlab--ca_ref))\n- `insecure` (Boolean) A flag for checking the validity of the SCM's certificates.\n- `labels` (List of String) Labels is used to filter the PRs that you want to target.\n- `pull_request_state` (String) additional MRs filter to get only those with a certain state. Default:  \"\" (all states).\n- `token_ref` (Block List, Max: 1) Authentication token reference. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--gitlab--token_ref))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--gitlab--ca_ref\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.pull_request.gitlab.ca_ref`\n\nRequired:\n\n- `config_map_name` (String) Name of the ConfigMap.\n- `key` (String) Key containing information in trusted CA certs.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--gitlab--token_ref\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.pull_request.gitlab.token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--template\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.pull_request.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--template--spec))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--template--metadata\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.pull_request.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--template--spec\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.pull_request.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.pull_request.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.pull_request.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--template--spec--info\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.pull_request.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--template--spec--source\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.pull_request.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.pull_request.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.pull_request.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.pull_request.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.pull_request.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.pull_request.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.pull_request.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.pull_request.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.pull_request.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.pull_request.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.pull_request.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.pull_request.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.pull_request.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.pull_request.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.pull_request.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.pull_request.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.pull_request.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--pull_request--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.pull_request.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.scm_provider`\n\nOptional:\n\n- `azure_devops` (Block List, Max: 1) Uses the Azure DevOps API to look up eligible repositories based on a team project within an Azure DevOps organization. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--azure_devops))\n- `bitbucket_cloud` (Block List, Max: 1) Uses the Bitbucket API V2 to scan a workspace in bitbucket.org. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--bitbucket_cloud))\n- `bitbucket_server` (Block List, Max: 1) Use the Bitbucket Server API (1.0) to scan repos in a project. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--bitbucket_server))\n- `clone_protocol` (String) Which protocol to use for the SCM URL. Default is provider-specific but ssh if possible. Not all providers necessarily support all protocols.\n- `filter` (Block List) Filters for which repos should be considered. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--filter))\n- `gitea` (Block List, Max: 1) Gitea mode uses the Gitea API to scan organizations in your instance. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--gitea))\n- `github` (Block List, Max: 1) Uses the GitHub API to scan an organization in either github.com or GitHub Enterprise. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--github))\n- `gitlab` (Block List, Max: 1) Uses the GitLab API to scan and organization in either gitlab.com or self-hosted GitLab. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--gitlab))\n- `requeue_after_seconds` (String) How often to check for changes (in seconds). Default: 3min.\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--template))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--azure_devops\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.scm_provider.azure_devops`\n\nRequired:\n\n- `organization` (String) Azure Devops organization. E.g. \"my-organization\".\n- `team_project` (String) Azure Devops team project. E.g. \"my-team\".\n\nOptional:\n\n- `access_token_ref` (Block List, Max: 1) The Personal Access Token (PAT) to use when connecting. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--azure_devops--access_token_ref))\n- `all_branches` (Boolean) Scan all branches instead of just the default branch.\n- `api` (String) The URL to Azure DevOps. Defaults to https://dev.azure.com.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--azure_devops--access_token_ref\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.scm_provider.azure_devops.access_token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--bitbucket_cloud\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.scm_provider.bitbucket_cloud`\n\nRequired:\n\n- `owner` (String) Bitbucket workspace to scan.\n- `user` (String) Bitbucket user to use when authenticating. Should have a \"member\" role to be able to read all repositories and branches.\n\nOptional:\n\n- `all_branches` (Boolean) Scan all branches instead of just the default branch.\n- `app_password_ref` (Block List, Max: 1) The app password to use for the user. See: https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--bitbucket_cloud--app_password_ref))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--bitbucket_cloud--app_password_ref\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.scm_provider.bitbucket_cloud.app_password_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--bitbucket_server\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.scm_provider.bitbucket_server`\n\nRequired:\n\n- `api` (String) The Bitbucket REST API URL to talk to e.g. https://bitbucket.org/rest.\n- `project` (String) Project to scan.\n\nOptional:\n\n- `all_branches` (Boolean) Scan all branches instead of just the default branch.\n- `basic_auth` (Block List, Max: 1) Credentials for Basic auth. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--bitbucket_server--basic_auth))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--bitbucket_server--basic_auth\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.scm_provider.bitbucket_server.basic_auth`\n\nOptional:\n\n- `password_ref` (Block List, Max: 1) Password (or personal access token) reference. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--bitbucket_server--basic_auth--password_ref))\n- `username` (String) Username for Basic auth.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--bitbucket_server--basic_auth--password_ref\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.scm_provider.bitbucket_server.basic_auth.password_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--filter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.scm_provider.filter`\n\nOptional:\n\n- `branch_match` (String) A regex which must match the branch name.\n- `label_match` (String) A regex which must match at least one label.\n- `paths_do_not_exist` (List of String) An array of paths, all of which must not exist.\n- `paths_exist` (List of String) An array of paths, all of which must exist.\n- `repository_match` (String) A regex for repo names.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--gitea\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.scm_provider.gitea`\n\nRequired:\n\n- `owner` (String) Gitea organization or user to scan.\n\nOptional:\n\n- `all_branches` (Boolean) Scan all branches instead of just the default branch.\n- `api` (String) The Gitea URL to talk to. For example https://gitea.mydomain.com/.\n- `insecure` (Boolean) Allow self-signed TLS / Certificates.\n- `token_ref` (Block List, Max: 1) Authentication token reference. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--gitea--token_ref))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--gitea--token_ref\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.scm_provider.gitea.token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--github\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.scm_provider.github`\n\nRequired:\n\n- `organization` (String) GitHub org to scan.\n\nOptional:\n\n- `all_branches` (Boolean) If true, scan every branch of every repository. If false, scan only the default branch.\n- `api` (String) The GitHub API URL to talk to. Default https://api.github.com/.\n- `app_secret_name` (String) Reference to a GitHub App repo-creds secret. Uses a GitHub App to access the API instead of a PAT.\n- `token_ref` (Block List, Max: 1) Authentication token reference. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--github--token_ref))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--github--token_ref\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.scm_provider.github.token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--gitlab\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.scm_provider.gitlab`\n\nRequired:\n\n- `group` (String) Gitlab group to scan. You can use either the project id (recommended) or the full namespaced path.\n\nOptional:\n\n- `all_branches` (Boolean) If true, scan every branch of every repository. If false, scan only the default branch.\n- `api` (String) The Gitlab API URL to talk to.\n- `include_subgroups` (Boolean) Recurse through subgroups (true) or scan only the base group (false). Defaults to `false`.\n- `token_ref` (Block List, Max: 1) Authentication token reference. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--gitlab--token_ref))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--gitlab--token_ref\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.scm_provider.gitlab.token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--template\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.scm_provider.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--template--spec))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--template--metadata\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.scm_provider.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--template--spec\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.scm_provider.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.scm_provider.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.scm_provider.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--template--spec--info\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.scm_provider.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--template--spec--source\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.scm_provider.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.scm_provider.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.scm_provider.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.scm_provider.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.scm_provider.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.scm_provider.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.scm_provider.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.scm_provider.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.scm_provider.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.scm_provider.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.scm_provider.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.scm_provider.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.scm_provider.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.scm_provider.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.scm_provider.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.scm_provider.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.scm_provider.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--scm_provider--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.scm_provider.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--selector\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.selector`\n\nOptional:\n\n- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--generator--selector--match_expressions))\n- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--generator--selector--match_expressions\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.generator.selector.match_expressions`\n\nOptional:\n\n- `key` (String) The label key that the selector applies to.\n- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`.\n- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--template\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--template--spec))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--template--metadata\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--template--spec\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--template--spec--info\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--template--spec--source\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--merge--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--merge--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.matrix.generator.merge.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--plugin\"></a>\n### Nested Schema for `spec.generator.matrix.generator.plugin`\n\nRequired:\n\n- `config_map_ref` (String) ConfigMap with the plugin configuration needed to retrieve the data.\n\nOptional:\n\n- `input` (Block List, Max: 1) The input parameters used for calling the plugin. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--plugin--input))\n- `requeue_after_seconds` (String) How often to check for changes (in seconds). Default: 3min.\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--plugin--template))\n- `values` (Map of String) Arbitrary string key-value pairs to pass to the template via the values field of the git generator.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--plugin--input\"></a>\n### Nested Schema for `spec.generator.matrix.generator.plugin.input`\n\nRequired:\n\n- `parameters` (Map of String) Arbitrary key-value pairs which are passed directly as parameters to the plugin. A current limitation is that this cannot fully express the parameters that can be accepted by the plugin generator.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--plugin--template\"></a>\n### Nested Schema for `spec.generator.matrix.generator.plugin.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--plugin--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--plugin--template--spec))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--plugin--template--metadata\"></a>\n### Nested Schema for `spec.generator.matrix.generator.plugin.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--plugin--template--spec\"></a>\n### Nested Schema for `spec.generator.matrix.generator.plugin.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--plugin--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--plugin--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--plugin--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--plugin--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--plugin--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--plugin--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.matrix.generator.plugin.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--plugin--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.matrix.generator.plugin.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--plugin--template--spec--info\"></a>\n### Nested Schema for `spec.generator.matrix.generator.plugin.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--plugin--template--spec--source\"></a>\n### Nested Schema for `spec.generator.matrix.generator.plugin.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--plugin--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--plugin--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--plugin--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--plugin--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--plugin--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.matrix.generator.plugin.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--plugin--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--plugin--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.matrix.generator.plugin.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--plugin--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--plugin--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--plugin--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.matrix.generator.plugin.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--plugin--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.matrix.generator.plugin.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--plugin--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.matrix.generator.plugin.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--plugin--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--plugin--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--matrix--generator--plugin--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.plugin.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--plugin--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.plugin.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--plugin--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.matrix.generator.plugin.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--plugin--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--plugin--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.matrix.generator.plugin.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--plugin--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--plugin--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.matrix.generator.plugin.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--plugin--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.matrix.generator.plugin.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--plugin--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--plugin--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.matrix.generator.plugin.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--plugin--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.matrix.generator.plugin.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--plugin--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--plugin--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--plugin--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--plugin--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.matrix.generator.plugin.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--plugin--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.matrix.generator.plugin.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--plugin--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.matrix.generator.plugin.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--plugin--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--plugin--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.matrix.generator.plugin.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--pull_request\"></a>\n### Nested Schema for `spec.generator.matrix.generator.pull_request`\n\nOptional:\n\n- `azure_devops` (Block List, Max: 1) Fetch pull requests from an Azure DevOps repository. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--pull_request--azure_devops))\n- `bitbucket_server` (Block List, Max: 1) Fetch pull requests from a repo hosted on a Bitbucket Server. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--pull_request--bitbucket_server))\n- `filter` (Block List) Filters allow selecting which pull requests to generate for. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--pull_request--filter))\n- `gitea` (Block List, Max: 1) Specify the repository from which to fetch the Gitea Pull requests. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--pull_request--gitea))\n- `github` (Block List, Max: 1) Specify the repository from which to fetch the GitHub Pull requests. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--pull_request--github))\n- `gitlab` (Block List, Max: 1) Specify the project from which to fetch the GitLab merge requests. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--pull_request--gitlab))\n- `requeue_after_seconds` (String) How often to check for changes (in seconds). Default: 30min.\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--pull_request--template))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--pull_request--azure_devops\"></a>\n### Nested Schema for `spec.generator.matrix.generator.pull_request.azure_devops`\n\nRequired:\n\n- `organization` (String) Azure DevOps org to scan. Required.\n- `project` (String) Azure DevOps project name to scan. Required.\n- `repo` (String) Azure DevOps repo name to scan. Required.\n\nOptional:\n\n- `api` (String) The Azure DevOps API URL to talk to. If blank, uses https://dev.azure.com/.\n- `labels` (List of String) Labels is used to filter the PRs that you want to target.\n- `token_ref` (Block List, Max: 1) Authentication token reference. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--pull_request--azure_devops--token_ref))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--pull_request--azure_devops--token_ref\"></a>\n### Nested Schema for `spec.generator.matrix.generator.pull_request.azure_devops.token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--pull_request--bitbucket_server\"></a>\n### Nested Schema for `spec.generator.matrix.generator.pull_request.bitbucket_server`\n\nRequired:\n\n- `api` (String) The Bitbucket REST API URL to talk to e.g. https://bitbucket.org/rest.\n- `project` (String) Project to scan.\n- `repo` (String) Repo name to scan.\n\nOptional:\n\n- `basic_auth` (Block List, Max: 1) Credentials for Basic auth. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--pull_request--bitbucket_server--basic_auth))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--pull_request--bitbucket_server--basic_auth\"></a>\n### Nested Schema for `spec.generator.matrix.generator.pull_request.bitbucket_server.basic_auth`\n\nOptional:\n\n- `password_ref` (Block List, Max: 1) Password (or personal access token) reference. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--pull_request--bitbucket_server--basic_auth--password_ref))\n- `username` (String) Username for Basic auth.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--pull_request--bitbucket_server--basic_auth--password_ref\"></a>\n### Nested Schema for `spec.generator.matrix.generator.pull_request.bitbucket_server.basic_auth.password_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--pull_request--filter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.pull_request.filter`\n\nOptional:\n\n- `branch_match` (String) A regex which must match the branch name.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--pull_request--gitea\"></a>\n### Nested Schema for `spec.generator.matrix.generator.pull_request.gitea`\n\nRequired:\n\n- `api` (String) The Gitea API URL to talk to.\n- `owner` (String) Gitea org or user to scan.\n- `repo` (String) Gitea repo name to scan.\n\nOptional:\n\n- `insecure` (Boolean) Allow insecure tls, for self-signed certificates; default: false.\n- `token_ref` (Block List, Max: 1) Authentication token reference. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--pull_request--gitea--token_ref))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--pull_request--gitea--token_ref\"></a>\n### Nested Schema for `spec.generator.matrix.generator.pull_request.gitea.token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--pull_request--github\"></a>\n### Nested Schema for `spec.generator.matrix.generator.pull_request.github`\n\nRequired:\n\n- `owner` (String) GitHub org or user to scan.\n- `repo` (String) GitHub repo name to scan.\n\nOptional:\n\n- `api` (String) The GitHub API URL to talk to. Default https://api.github.com/.\n- `app_secret_name` (String) Reference to a GitHub App repo-creds secret with permission to access pull requests.\n- `labels` (List of String) Labels is used to filter the PRs that you want to target.\n- `token_ref` (Block List, Max: 1) Authentication token reference. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--pull_request--github--token_ref))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--pull_request--github--token_ref\"></a>\n### Nested Schema for `spec.generator.matrix.generator.pull_request.github.token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--pull_request--gitlab\"></a>\n### Nested Schema for `spec.generator.matrix.generator.pull_request.gitlab`\n\nRequired:\n\n- `project` (String) GitLab project to scan.\n\nOptional:\n\n- `api` (String) The GitLab API URL to talk to. If blank, uses https://gitlab.com/.\n- `ca_ref` (Block List, Max: 1) Reference to a ConfigMap key containing trusted CA certificates for verifying the SCM server's TLS certificate. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--pull_request--gitlab--ca_ref))\n- `insecure` (Boolean) A flag for checking the validity of the SCM's certificates.\n- `labels` (List of String) Labels is used to filter the PRs that you want to target.\n- `pull_request_state` (String) additional MRs filter to get only those with a certain state. Default:  \"\" (all states).\n- `token_ref` (Block List, Max: 1) Authentication token reference. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--pull_request--gitlab--token_ref))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--pull_request--gitlab--ca_ref\"></a>\n### Nested Schema for `spec.generator.matrix.generator.pull_request.gitlab.ca_ref`\n\nRequired:\n\n- `config_map_name` (String) Name of the ConfigMap.\n- `key` (String) Key containing information in trusted CA certs.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--pull_request--gitlab--token_ref\"></a>\n### Nested Schema for `spec.generator.matrix.generator.pull_request.gitlab.token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--pull_request--template\"></a>\n### Nested Schema for `spec.generator.matrix.generator.pull_request.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--pull_request--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--pull_request--template--spec))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--pull_request--template--metadata\"></a>\n### Nested Schema for `spec.generator.matrix.generator.pull_request.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--pull_request--template--spec\"></a>\n### Nested Schema for `spec.generator.matrix.generator.pull_request.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--pull_request--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--pull_request--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--pull_request--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--pull_request--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--pull_request--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--pull_request--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.matrix.generator.pull_request.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--pull_request--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.matrix.generator.pull_request.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--pull_request--template--spec--info\"></a>\n### Nested Schema for `spec.generator.matrix.generator.pull_request.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--pull_request--template--spec--source\"></a>\n### Nested Schema for `spec.generator.matrix.generator.pull_request.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--pull_request--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--pull_request--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--pull_request--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--pull_request--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--pull_request--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.matrix.generator.pull_request.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--pull_request--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--pull_request--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.matrix.generator.pull_request.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--pull_request--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--pull_request--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--pull_request--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.matrix.generator.pull_request.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--pull_request--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.matrix.generator.pull_request.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--pull_request--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.matrix.generator.pull_request.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--pull_request--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--pull_request--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--matrix--generator--pull_request--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.pull_request.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--pull_request--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.pull_request.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--pull_request--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.matrix.generator.pull_request.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--pull_request--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--pull_request--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.matrix.generator.pull_request.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--pull_request--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--pull_request--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.matrix.generator.pull_request.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--pull_request--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.matrix.generator.pull_request.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--pull_request--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--pull_request--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.matrix.generator.pull_request.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--pull_request--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.matrix.generator.pull_request.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--pull_request--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--pull_request--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--pull_request--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--pull_request--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.matrix.generator.pull_request.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--pull_request--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.matrix.generator.pull_request.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--pull_request--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.matrix.generator.pull_request.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--pull_request--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--pull_request--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.matrix.generator.pull_request.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--scm_provider\"></a>\n### Nested Schema for `spec.generator.matrix.generator.scm_provider`\n\nOptional:\n\n- `azure_devops` (Block List, Max: 1) Uses the Azure DevOps API to look up eligible repositories based on a team project within an Azure DevOps organization. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--scm_provider--azure_devops))\n- `bitbucket_cloud` (Block List, Max: 1) Uses the Bitbucket API V2 to scan a workspace in bitbucket.org. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--scm_provider--bitbucket_cloud))\n- `bitbucket_server` (Block List, Max: 1) Use the Bitbucket Server API (1.0) to scan repos in a project. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--scm_provider--bitbucket_server))\n- `clone_protocol` (String) Which protocol to use for the SCM URL. Default is provider-specific but ssh if possible. Not all providers necessarily support all protocols.\n- `filter` (Block List) Filters for which repos should be considered. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--scm_provider--filter))\n- `gitea` (Block List, Max: 1) Gitea mode uses the Gitea API to scan organizations in your instance. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--scm_provider--gitea))\n- `github` (Block List, Max: 1) Uses the GitHub API to scan an organization in either github.com or GitHub Enterprise. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--scm_provider--github))\n- `gitlab` (Block List, Max: 1) Uses the GitLab API to scan and organization in either gitlab.com or self-hosted GitLab. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--scm_provider--gitlab))\n- `requeue_after_seconds` (String) How often to check for changes (in seconds). Default: 3min.\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--scm_provider--template))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--scm_provider--azure_devops\"></a>\n### Nested Schema for `spec.generator.matrix.generator.scm_provider.azure_devops`\n\nRequired:\n\n- `organization` (String) Azure Devops organization. E.g. \"my-organization\".\n- `team_project` (String) Azure Devops team project. E.g. \"my-team\".\n\nOptional:\n\n- `access_token_ref` (Block List, Max: 1) The Personal Access Token (PAT) to use when connecting. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--scm_provider--azure_devops--access_token_ref))\n- `all_branches` (Boolean) Scan all branches instead of just the default branch.\n- `api` (String) The URL to Azure DevOps. Defaults to https://dev.azure.com.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--scm_provider--azure_devops--access_token_ref\"></a>\n### Nested Schema for `spec.generator.matrix.generator.scm_provider.azure_devops.access_token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--scm_provider--bitbucket_cloud\"></a>\n### Nested Schema for `spec.generator.matrix.generator.scm_provider.bitbucket_cloud`\n\nRequired:\n\n- `owner` (String) Bitbucket workspace to scan.\n- `user` (String) Bitbucket user to use when authenticating. Should have a \"member\" role to be able to read all repositories and branches.\n\nOptional:\n\n- `all_branches` (Boolean) Scan all branches instead of just the default branch.\n- `app_password_ref` (Block List, Max: 1) The app password to use for the user. See: https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--scm_provider--bitbucket_cloud--app_password_ref))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--scm_provider--bitbucket_cloud--app_password_ref\"></a>\n### Nested Schema for `spec.generator.matrix.generator.scm_provider.bitbucket_cloud.app_password_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--scm_provider--bitbucket_server\"></a>\n### Nested Schema for `spec.generator.matrix.generator.scm_provider.bitbucket_server`\n\nRequired:\n\n- `api` (String) The Bitbucket REST API URL to talk to e.g. https://bitbucket.org/rest.\n- `project` (String) Project to scan.\n\nOptional:\n\n- `all_branches` (Boolean) Scan all branches instead of just the default branch.\n- `basic_auth` (Block List, Max: 1) Credentials for Basic auth. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--scm_provider--bitbucket_server--basic_auth))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--scm_provider--bitbucket_server--basic_auth\"></a>\n### Nested Schema for `spec.generator.matrix.generator.scm_provider.bitbucket_server.basic_auth`\n\nOptional:\n\n- `password_ref` (Block List, Max: 1) Password (or personal access token) reference. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--scm_provider--bitbucket_server--basic_auth--password_ref))\n- `username` (String) Username for Basic auth.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--scm_provider--bitbucket_server--basic_auth--password_ref\"></a>\n### Nested Schema for `spec.generator.matrix.generator.scm_provider.bitbucket_server.basic_auth.password_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--scm_provider--filter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.scm_provider.filter`\n\nOptional:\n\n- `branch_match` (String) A regex which must match the branch name.\n- `label_match` (String) A regex which must match at least one label.\n- `paths_do_not_exist` (List of String) An array of paths, all of which must not exist.\n- `paths_exist` (List of String) An array of paths, all of which must exist.\n- `repository_match` (String) A regex for repo names.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--scm_provider--gitea\"></a>\n### Nested Schema for `spec.generator.matrix.generator.scm_provider.gitea`\n\nRequired:\n\n- `owner` (String) Gitea organization or user to scan.\n\nOptional:\n\n- `all_branches` (Boolean) Scan all branches instead of just the default branch.\n- `api` (String) The Gitea URL to talk to. For example https://gitea.mydomain.com/.\n- `insecure` (Boolean) Allow self-signed TLS / Certificates.\n- `token_ref` (Block List, Max: 1) Authentication token reference. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--scm_provider--gitea--token_ref))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--scm_provider--gitea--token_ref\"></a>\n### Nested Schema for `spec.generator.matrix.generator.scm_provider.gitea.token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--scm_provider--github\"></a>\n### Nested Schema for `spec.generator.matrix.generator.scm_provider.github`\n\nRequired:\n\n- `organization` (String) GitHub org to scan.\n\nOptional:\n\n- `all_branches` (Boolean) If true, scan every branch of every repository. If false, scan only the default branch.\n- `api` (String) The GitHub API URL to talk to. Default https://api.github.com/.\n- `app_secret_name` (String) Reference to a GitHub App repo-creds secret. Uses a GitHub App to access the API instead of a PAT.\n- `token_ref` (Block List, Max: 1) Authentication token reference. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--scm_provider--github--token_ref))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--scm_provider--github--token_ref\"></a>\n### Nested Schema for `spec.generator.matrix.generator.scm_provider.github.token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--scm_provider--gitlab\"></a>\n### Nested Schema for `spec.generator.matrix.generator.scm_provider.gitlab`\n\nRequired:\n\n- `group` (String) Gitlab group to scan. You can use either the project id (recommended) or the full namespaced path.\n\nOptional:\n\n- `all_branches` (Boolean) If true, scan every branch of every repository. If false, scan only the default branch.\n- `api` (String) The Gitlab API URL to talk to.\n- `include_subgroups` (Boolean) Recurse through subgroups (true) or scan only the base group (false). Defaults to `false`.\n- `token_ref` (Block List, Max: 1) Authentication token reference. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--scm_provider--gitlab--token_ref))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--scm_provider--gitlab--token_ref\"></a>\n### Nested Schema for `spec.generator.matrix.generator.scm_provider.gitlab.token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--scm_provider--template\"></a>\n### Nested Schema for `spec.generator.matrix.generator.scm_provider.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--scm_provider--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--scm_provider--template--spec))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--scm_provider--template--metadata\"></a>\n### Nested Schema for `spec.generator.matrix.generator.scm_provider.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--scm_provider--template--spec\"></a>\n### Nested Schema for `spec.generator.matrix.generator.scm_provider.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--scm_provider--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--scm_provider--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--scm_provider--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--scm_provider--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--scm_provider--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--scm_provider--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.matrix.generator.scm_provider.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--scm_provider--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.matrix.generator.scm_provider.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--scm_provider--template--spec--info\"></a>\n### Nested Schema for `spec.generator.matrix.generator.scm_provider.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--scm_provider--template--spec--source\"></a>\n### Nested Schema for `spec.generator.matrix.generator.scm_provider.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--scm_provider--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--scm_provider--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--scm_provider--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--scm_provider--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--scm_provider--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.matrix.generator.scm_provider.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--scm_provider--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--scm_provider--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.matrix.generator.scm_provider.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--scm_provider--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--scm_provider--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--matrix--generator--scm_provider--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.matrix.generator.scm_provider.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--scm_provider--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.matrix.generator.scm_provider.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--scm_provider--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.matrix.generator.scm_provider.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--scm_provider--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--scm_provider--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--matrix--generator--scm_provider--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.scm_provider.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--scm_provider--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.matrix.generator.scm_provider.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--scm_provider--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.matrix.generator.scm_provider.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--scm_provider--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--scm_provider--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.matrix.generator.scm_provider.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--scm_provider--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--scm_provider--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.matrix.generator.scm_provider.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--scm_provider--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.matrix.generator.scm_provider.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--scm_provider--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--scm_provider--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.matrix.generator.scm_provider.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--scm_provider--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.matrix.generator.scm_provider.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--scm_provider--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--scm_provider--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--scm_provider--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--scm_provider--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.matrix.generator.scm_provider.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--scm_provider--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.matrix.generator.scm_provider.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--scm_provider--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.matrix.generator.scm_provider.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--scm_provider--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--scm_provider--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.matrix.generator.scm_provider.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--generator--selector\"></a>\n### Nested Schema for `spec.generator.matrix.generator.selector`\n\nOptional:\n\n- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--generator--matrix--generator--selector--match_expressions))\n- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.\n\n<a id=\"nestedblock--spec--generator--matrix--generator--selector--match_expressions\"></a>\n### Nested Schema for `spec.generator.matrix.generator.selector.match_expressions`\n\nOptional:\n\n- `key` (String) The label key that the selector applies to.\n- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`.\n- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--template\"></a>\n### Nested Schema for `spec.generator.matrix.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--matrix--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--matrix--template--spec))\n\n<a id=\"nestedblock--spec--generator--matrix--template--metadata\"></a>\n### Nested Schema for `spec.generator.matrix.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--matrix--template--spec\"></a>\n### Nested Schema for `spec.generator.matrix.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--matrix--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--matrix--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--matrix--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--matrix--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--matrix--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--matrix--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.matrix.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--matrix--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.matrix.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--matrix--template--spec--info\"></a>\n### Nested Schema for `spec.generator.matrix.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--matrix--template--spec--source\"></a>\n### Nested Schema for `spec.generator.matrix.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--matrix--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.matrix.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--matrix--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--matrix--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.matrix.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--matrix--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--matrix--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--matrix--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.matrix.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--matrix--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.matrix.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.matrix.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--matrix--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--matrix--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--matrix--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.matrix.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--matrix--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.matrix.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.matrix.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--matrix--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--matrix--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.matrix.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--matrix--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--matrix--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.matrix.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.matrix.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--matrix--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--matrix--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.matrix.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--matrix--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.matrix.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--matrix--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--matrix--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--matrix--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--matrix--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.matrix.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--matrix--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.matrix.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--matrix--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.matrix.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--matrix--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--matrix--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.matrix.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge\"></a>\n### Nested Schema for `spec.generator.merge`\n\nRequired:\n\n- `generator` (Block List, Min: 2) Child generator. Generators are responsible for generating parameters, which are then combined by the parent merge generator. (see [below for nested schema](#nestedblock--spec--generator--merge--generator))\n- `merge_keys` (List of String) Keys to merge into resulting parameter set.\n\nOptional:\n\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--merge--template))\n\n<a id=\"nestedblock--spec--generator--merge--generator\"></a>\n### Nested Schema for `spec.generator.merge.generator`\n\nOptional:\n\n- `cluster_decision_resource` (Block List) The [cluster decision resource](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Cluster-Decision-Resource/) generates a list of Argo CD clusters. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--cluster_decision_resource))\n- `clusters` (Block List) The [cluster generator](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Cluster/) produces parameters based on the list of items found within the cluster secret. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--clusters))\n- `git` (Block List) [Git generators](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Git/) generates parameters using either the directory structure of a specified Git repository (directory generator), or, using the contents of JSON/YAML files found within a specified repository (file generator). (see [below for nested schema](#nestedblock--spec--generator--merge--generator--git))\n- `list` (Block List) [List generators](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-List/) generate parameters based on an arbitrary list of key/value pairs (as long as the values are string values). (see [below for nested schema](#nestedblock--spec--generator--merge--generator--list))\n- `matrix` (Block List) [Matrix generators](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Matrix/) combine the parameters generated by two child generators, iterating through every combination of each generator's generated parameters. Take note of the [restrictions](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Matrix/#restrictions) regarding their usage - particularly regarding nesting matrix generators. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix))\n- `merge` (Block List) [Merge generators](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Merge/) combine parameters produced by the base (first) generator with matching parameter sets produced by subsequent generators. Take note of the [restrictions](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Merge/#restrictions) regarding their usage - particularly regarding nesting merge generators. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge))\n- `plugin` (Block List) [Plugin generators](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Plugin/) generates parameters using a custom plugin. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--plugin))\n- `pull_request` (Block List) [Pull Request generators](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Pull-Request/) uses the API of an SCMaaS provider to automatically discover open pull requests within a repository. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--pull_request))\n- `scm_provider` (Block List) [SCM Provider generators](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-SCM-Provider/) uses the API of an SCMaaS provider to automatically discover repositories within an organization. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--scm_provider))\n- `selector` (Block List, Max: 1) The Selector allows to post-filter based on generated values using the kubernetes common labelSelector format. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--selector))\n\n<a id=\"nestedblock--spec--generator--merge--generator--cluster_decision_resource\"></a>\n### Nested Schema for `spec.generator.merge.generator.cluster_decision_resource`\n\nRequired:\n\n- `config_map_ref` (String) ConfigMap with the duck type definitions needed to retrieve the data this includes apiVersion(group/version), kind, matchKey and validation settings.\n\nOptional:\n\n- `label_selector` (Block List, Max: 1) Label selector used to find the resource defined in the `config_map_ref`. Alternative to `name`. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--cluster_decision_resource--label_selector))\n- `name` (String) Resource name of the kind, group and version, defined in the `config_map_ref`.\n- `requeue_after_seconds` (String) How often to check for changes (in seconds). Default: 3min.\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--cluster_decision_resource--template))\n- `values` (Map of String) Arbitrary string key-value pairs which are passed directly as parameters to the template.\n\n<a id=\"nestedblock--spec--generator--merge--generator--cluster_decision_resource--label_selector\"></a>\n### Nested Schema for `spec.generator.merge.generator.cluster_decision_resource.label_selector`\n\nOptional:\n\n- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--cluster_decision_resource--label_selector--match_expressions))\n- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.\n\n<a id=\"nestedblock--spec--generator--merge--generator--cluster_decision_resource--label_selector--match_expressions\"></a>\n### Nested Schema for `spec.generator.merge.generator.cluster_decision_resource.label_selector.match_expressions`\n\nOptional:\n\n- `key` (String) The label key that the selector applies to.\n- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`.\n- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--cluster_decision_resource--template\"></a>\n### Nested Schema for `spec.generator.merge.generator.cluster_decision_resource.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--cluster_decision_resource--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--cluster_decision_resource--template--spec))\n\n<a id=\"nestedblock--spec--generator--merge--generator--cluster_decision_resource--template--metadata\"></a>\n### Nested Schema for `spec.generator.merge.generator.cluster_decision_resource.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--cluster_decision_resource--template--spec\"></a>\n### Nested Schema for `spec.generator.merge.generator.cluster_decision_resource.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--cluster_decision_resource--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--cluster_decision_resource--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--cluster_decision_resource--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--cluster_decision_resource--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--cluster_decision_resource--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--merge--generator--cluster_decision_resource--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.merge.generator.cluster_decision_resource.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--cluster_decision_resource--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.merge.generator.cluster_decision_resource.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--cluster_decision_resource--template--spec--info\"></a>\n### Nested Schema for `spec.generator.merge.generator.cluster_decision_resource.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--cluster_decision_resource--template--spec--source\"></a>\n### Nested Schema for `spec.generator.merge.generator.cluster_decision_resource.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--cluster_decision_resource--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--cluster_decision_resource--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--cluster_decision_resource--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--cluster_decision_resource--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--merge--generator--cluster_decision_resource--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.merge.generator.cluster_decision_resource.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--cluster_decision_resource--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--merge--generator--cluster_decision_resource--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.merge.generator.cluster_decision_resource.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--cluster_decision_resource--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--merge--generator--cluster_decision_resource--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--merge--generator--cluster_decision_resource--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.merge.generator.cluster_decision_resource.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--cluster_decision_resource--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.merge.generator.cluster_decision_resource.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--cluster_decision_resource--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.merge.generator.cluster_decision_resource.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--cluster_decision_resource--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--cluster_decision_resource--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--merge--generator--cluster_decision_resource--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.merge.generator.cluster_decision_resource.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--cluster_decision_resource--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.merge.generator.cluster_decision_resource.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--cluster_decision_resource--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.merge.generator.cluster_decision_resource.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--cluster_decision_resource--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--merge--generator--cluster_decision_resource--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.merge.generator.cluster_decision_resource.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--merge--generator--cluster_decision_resource--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--merge--generator--cluster_decision_resource--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.merge.generator.cluster_decision_resource.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--cluster_decision_resource--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.merge.generator.cluster_decision_resource.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--cluster_decision_resource--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--merge--generator--cluster_decision_resource--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.merge.generator.cluster_decision_resource.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--cluster_decision_resource--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.merge.generator.cluster_decision_resource.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--cluster_decision_resource--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--merge--generator--cluster_decision_resource--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--cluster_decision_resource--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--merge--generator--cluster_decision_resource--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.merge.generator.cluster_decision_resource.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--cluster_decision_resource--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.merge.generator.cluster_decision_resource.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--cluster_decision_resource--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.merge.generator.cluster_decision_resource.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--cluster_decision_resource--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--merge--generator--cluster_decision_resource--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.merge.generator.cluster_decision_resource.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--clusters\"></a>\n### Nested Schema for `spec.generator.merge.generator.clusters`\n\nOptional:\n\n- `enabled` (Boolean) Boolean value defaulting to `true` to indicate that this block has been added thereby allowing all other attributes to be optional.\n- `selector` (Block List, Max: 1) Label selector used to narrow the scope of targeted clusters. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--clusters--selector))\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--clusters--template))\n- `values` (Map of String) Arbitrary string key-value pairs to pass to the template via the values field of the cluster generator.\n\n<a id=\"nestedblock--spec--generator--merge--generator--clusters--selector\"></a>\n### Nested Schema for `spec.generator.merge.generator.clusters.selector`\n\nOptional:\n\n- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--clusters--selector--match_expressions))\n- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.\n\n<a id=\"nestedblock--spec--generator--merge--generator--clusters--selector--match_expressions\"></a>\n### Nested Schema for `spec.generator.merge.generator.clusters.selector.match_expressions`\n\nOptional:\n\n- `key` (String) The label key that the selector applies to.\n- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`.\n- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--clusters--template\"></a>\n### Nested Schema for `spec.generator.merge.generator.clusters.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--clusters--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--clusters--template--spec))\n\n<a id=\"nestedblock--spec--generator--merge--generator--clusters--template--metadata\"></a>\n### Nested Schema for `spec.generator.merge.generator.clusters.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--clusters--template--spec\"></a>\n### Nested Schema for `spec.generator.merge.generator.clusters.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--clusters--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--clusters--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--clusters--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--clusters--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--clusters--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--merge--generator--clusters--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.merge.generator.clusters.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--clusters--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.merge.generator.clusters.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--clusters--template--spec--info\"></a>\n### Nested Schema for `spec.generator.merge.generator.clusters.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--clusters--template--spec--source\"></a>\n### Nested Schema for `spec.generator.merge.generator.clusters.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--clusters--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--clusters--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--clusters--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--clusters--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--merge--generator--clusters--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.merge.generator.clusters.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--clusters--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--merge--generator--clusters--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.merge.generator.clusters.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--clusters--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--merge--generator--clusters--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--merge--generator--clusters--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.merge.generator.clusters.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--clusters--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.merge.generator.clusters.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--clusters--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.merge.generator.clusters.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--clusters--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--clusters--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--merge--generator--clusters--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.merge.generator.clusters.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--clusters--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.merge.generator.clusters.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--clusters--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.merge.generator.clusters.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--clusters--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--merge--generator--clusters--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.merge.generator.clusters.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--merge--generator--clusters--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--merge--generator--clusters--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.merge.generator.clusters.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--clusters--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.merge.generator.clusters.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--clusters--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--merge--generator--clusters--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.merge.generator.clusters.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--clusters--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.merge.generator.clusters.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--clusters--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--merge--generator--clusters--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--clusters--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--merge--generator--clusters--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.merge.generator.clusters.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--clusters--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.merge.generator.clusters.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--clusters--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.merge.generator.clusters.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--clusters--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--merge--generator--clusters--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.merge.generator.clusters.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--git\"></a>\n### Nested Schema for `spec.generator.merge.generator.git`\n\nRequired:\n\n- `repo_url` (String) URL to the repository to use.\n\nOptional:\n\n- `directory` (Block List) List of directories in the source repository to use when template the Application.. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--git--directory))\n- `file` (Block List) List of files in the source repository to use when template the Application. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--git--file))\n- `path_param_prefix` (String) Prefix for all path-related parameter names.\n- `requeue_after_seconds` (String) How often to check for changes (in seconds). Default: 3min.\n- `revision` (String) Revision of the source repository to use.\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--git--template))\n- `values` (Map of String) Arbitrary string key-value pairs to pass to the template via the values field of the git generator.\n\n<a id=\"nestedblock--spec--generator--merge--generator--git--directory\"></a>\n### Nested Schema for `spec.generator.merge.generator.git.directory`\n\nRequired:\n\n- `path` (String) Path in the repository.\n\nOptional:\n\n- `exclude` (Boolean) Flag indicating whether or not the directory should be excluded when templating.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--git--file\"></a>\n### Nested Schema for `spec.generator.merge.generator.git.file`\n\nRequired:\n\n- `path` (String) Path to the file in the repository.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--git--template\"></a>\n### Nested Schema for `spec.generator.merge.generator.git.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--git--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--git--template--spec))\n\n<a id=\"nestedblock--spec--generator--merge--generator--git--template--metadata\"></a>\n### Nested Schema for `spec.generator.merge.generator.git.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--git--template--spec\"></a>\n### Nested Schema for `spec.generator.merge.generator.git.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--git--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--git--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--git--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--git--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--git--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--merge--generator--git--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.merge.generator.git.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--git--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.merge.generator.git.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--git--template--spec--info\"></a>\n### Nested Schema for `spec.generator.merge.generator.git.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--git--template--spec--source\"></a>\n### Nested Schema for `spec.generator.merge.generator.git.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--git--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--git--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--git--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--git--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--merge--generator--git--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.merge.generator.git.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--git--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--merge--generator--git--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.merge.generator.git.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--git--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--merge--generator--git--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--merge--generator--git--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.merge.generator.git.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--git--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.merge.generator.git.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--git--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.merge.generator.git.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--git--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--git--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--merge--generator--git--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.merge.generator.git.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--git--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.merge.generator.git.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--git--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.merge.generator.git.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--git--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--merge--generator--git--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.merge.generator.git.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--merge--generator--git--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--merge--generator--git--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.merge.generator.git.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--git--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.merge.generator.git.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--git--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--merge--generator--git--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.merge.generator.git.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--git--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.merge.generator.git.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--git--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--merge--generator--git--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--git--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--merge--generator--git--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.merge.generator.git.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--git--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.merge.generator.git.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--git--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.merge.generator.git.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--git--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--merge--generator--git--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.merge.generator.git.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--list\"></a>\n### Nested Schema for `spec.generator.merge.generator.list`\n\nOptional:\n\n- `elements` (List of Map of String) List of key/value pairs to pass as parameters into the template\n- `elements_yaml` (String) YAML string containing list of key/value pairs to pass as parameters into the template\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--list--template))\n\n<a id=\"nestedblock--spec--generator--merge--generator--list--template\"></a>\n### Nested Schema for `spec.generator.merge.generator.list.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--list--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--list--template--spec))\n\n<a id=\"nestedblock--spec--generator--merge--generator--list--template--metadata\"></a>\n### Nested Schema for `spec.generator.merge.generator.list.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--list--template--spec\"></a>\n### Nested Schema for `spec.generator.merge.generator.list.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--list--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--list--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--list--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--list--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--list--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--merge--generator--list--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.merge.generator.list.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--list--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.merge.generator.list.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--list--template--spec--info\"></a>\n### Nested Schema for `spec.generator.merge.generator.list.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--list--template--spec--source\"></a>\n### Nested Schema for `spec.generator.merge.generator.list.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--list--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--list--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--list--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--list--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--merge--generator--list--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.merge.generator.list.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--list--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--merge--generator--list--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.merge.generator.list.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--list--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--merge--generator--list--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--merge--generator--list--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.merge.generator.list.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--list--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.merge.generator.list.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--list--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.merge.generator.list.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--list--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--list--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--merge--generator--list--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.merge.generator.list.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--list--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.merge.generator.list.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--list--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.merge.generator.list.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--list--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--merge--generator--list--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.merge.generator.list.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--merge--generator--list--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--merge--generator--list--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.merge.generator.list.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--list--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.merge.generator.list.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--list--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--merge--generator--list--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.merge.generator.list.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--list--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.merge.generator.list.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--list--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--merge--generator--list--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--list--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--merge--generator--list--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.merge.generator.list.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--list--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.merge.generator.list.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--list--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.merge.generator.list.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--list--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--merge--generator--list--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.merge.generator.list.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix`\n\nRequired:\n\n- `generator` (Block List, Min: 2, Max: 2) Child generator. Generators are responsible for generating parameters, which are then combined by the parent matrix generator into the template fields of the ApplicationSet resource. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator))\n\nOptional:\n\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--template))\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator`\n\nOptional:\n\n- `cluster_decision_resource` (Block List) The [cluster decision resource](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Cluster-Decision-Resource/) generates a list of Argo CD clusters. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource))\n- `clusters` (Block List) The [cluster generator](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Cluster/) produces parameters based on the list of items found within the cluster secret. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--clusters))\n- `git` (Block List) [Git generators](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Git/) generates parameters using either the directory structure of a specified Git repository (directory generator), or, using the contents of JSON/YAML files found within a specified repository (file generator). (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--git))\n- `list` (Block List) [List generators](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-List/) generate parameters based on an arbitrary list of key/value pairs (as long as the values are string values). (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--list))\n- `plugin` (Block List) [Plugin generators](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Plugin/) generates parameters using a custom plugin. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--plugin))\n- `pull_request` (Block List) [Pull Request generators](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Pull-Request/) uses the API of an SCMaaS provider to automatically discover open pull requests within a repository. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--pull_request))\n- `scm_provider` (Block List) [SCM Provider generators](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-SCM-Provider/) uses the API of an SCMaaS provider to automatically discover repositories within an organization. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider))\n- `selector` (Block List, Max: 1) The Selector allows to post-filter based on generated values using the kubernetes common labelSelector format. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--selector))\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.cluster_decision_resource`\n\nRequired:\n\n- `config_map_ref` (String) ConfigMap with the duck type definitions needed to retrieve the data this includes apiVersion(group/version), kind, matchKey and validation settings.\n\nOptional:\n\n- `label_selector` (Block List, Max: 1) Label selector used to find the resource defined in the `config_map_ref`. Alternative to `name`. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--label_selector))\n- `name` (String) Resource name of the kind, group and version, defined in the `config_map_ref`.\n- `requeue_after_seconds` (String) How often to check for changes (in seconds). Default: 3min.\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--template))\n- `values` (Map of String) Arbitrary string key-value pairs which are passed directly as parameters to the template.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--label_selector\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.cluster_decision_resource.label_selector`\n\nOptional:\n\n- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--label_selector--match_expressions))\n- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--label_selector--match_expressions\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.cluster_decision_resource.label_selector.match_expressions`\n\nOptional:\n\n- `key` (String) The label key that the selector applies to.\n- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`.\n- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--template\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.cluster_decision_resource.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--template--spec))\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--template--metadata\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.cluster_decision_resource.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--template--spec\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.cluster_decision_resource.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.cluster_decision_resource.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.cluster_decision_resource.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--template--spec--info\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.cluster_decision_resource.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--template--spec--source\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.cluster_decision_resource.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.cluster_decision_resource.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.cluster_decision_resource.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.cluster_decision_resource.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.cluster_decision_resource.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.cluster_decision_resource.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.cluster_decision_resource.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.cluster_decision_resource.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.cluster_decision_resource.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.cluster_decision_resource.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.cluster_decision_resource.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.cluster_decision_resource.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.cluster_decision_resource.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.cluster_decision_resource.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.cluster_decision_resource.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.cluster_decision_resource.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.cluster_decision_resource.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--cluster_decision_resource--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.cluster_decision_resource.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--clusters\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.clusters`\n\nOptional:\n\n- `enabled` (Boolean) Boolean value defaulting to `true` to indicate that this block has been added thereby allowing all other attributes to be optional.\n- `selector` (Block List, Max: 1) Label selector used to narrow the scope of targeted clusters. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--clusters--selector))\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--clusters--template))\n- `values` (Map of String) Arbitrary string key-value pairs to pass to the template via the values field of the cluster generator.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--clusters--selector\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.clusters.selector`\n\nOptional:\n\n- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--clusters--selector--match_expressions))\n- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--clusters--selector--match_expressions\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.clusters.selector.match_expressions`\n\nOptional:\n\n- `key` (String) The label key that the selector applies to.\n- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`.\n- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--clusters--template\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.clusters.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--clusters--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--clusters--template--spec))\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--clusters--template--metadata\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.clusters.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--clusters--template--spec\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.clusters.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--clusters--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--clusters--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--clusters--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--clusters--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--clusters--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--clusters--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.clusters.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--clusters--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.clusters.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--clusters--template--spec--info\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.clusters.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--clusters--template--spec--source\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.clusters.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--clusters--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--clusters--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--clusters--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--clusters--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--clusters--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.clusters.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--clusters--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--clusters--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.clusters.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--clusters--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--clusters--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--clusters--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.clusters.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--clusters--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.clusters.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--clusters--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.clusters.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--clusters--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--clusters--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--clusters--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.clusters.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--clusters--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.clusters.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--clusters--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.clusters.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--clusters--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--clusters--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.clusters.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--clusters--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--clusters--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.clusters.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--clusters--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.clusters.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--clusters--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--clusters--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.clusters.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--clusters--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.clusters.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--clusters--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--clusters--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--clusters--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--clusters--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.clusters.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--clusters--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.clusters.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--clusters--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.clusters.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--clusters--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--clusters--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.clusters.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--git\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.git`\n\nRequired:\n\n- `repo_url` (String) URL to the repository to use.\n\nOptional:\n\n- `directory` (Block List) List of directories in the source repository to use when template the Application.. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--git--directory))\n- `file` (Block List) List of files in the source repository to use when template the Application. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--git--file))\n- `path_param_prefix` (String) Prefix for all path-related parameter names.\n- `requeue_after_seconds` (String) How often to check for changes (in seconds). Default: 3min.\n- `revision` (String) Revision of the source repository to use.\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--git--template))\n- `values` (Map of String) Arbitrary string key-value pairs to pass to the template via the values field of the git generator.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--git--directory\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.git.directory`\n\nRequired:\n\n- `path` (String) Path in the repository.\n\nOptional:\n\n- `exclude` (Boolean) Flag indicating whether or not the directory should be excluded when templating.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--git--file\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.git.file`\n\nRequired:\n\n- `path` (String) Path to the file in the repository.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--git--template\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.git.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--git--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--git--template--spec))\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--git--template--metadata\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.git.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--git--template--spec\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.git.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--git--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--git--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--git--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--git--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--git--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--git--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.git.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--git--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.git.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--git--template--spec--info\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.git.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--git--template--spec--source\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.git.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--git--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--git--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--git--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--git--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--git--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.git.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--git--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--git--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.git.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--git--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--git--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--git--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.git.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--git--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.git.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--git--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.git.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--git--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--git--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--git--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.git.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--git--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.git.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--git--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.git.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--git--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--git--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.git.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--git--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--git--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.git.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--git--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.git.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--git--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--git--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.git.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--git--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.git.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--git--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--git--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--git--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--git--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.git.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--git--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.git.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--git--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.git.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--git--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--git--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.git.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--list\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.list`\n\nOptional:\n\n- `elements` (List of Map of String) List of key/value pairs to pass as parameters into the template\n- `elements_yaml` (String) YAML string containing list of key/value pairs to pass as parameters into the template\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--list--template))\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--list--template\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.list.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--list--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--list--template--spec))\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--list--template--metadata\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.list.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--list--template--spec\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.list.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--list--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--list--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--list--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--list--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--list--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--list--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.list.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--list--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.list.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--list--template--spec--info\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.list.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--list--template--spec--source\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.list.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--list--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--list--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--list--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--list--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--list--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.list.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--list--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--list--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.list.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--list--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--list--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--list--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.list.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--list--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.list.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--list--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.list.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--list--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--list--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--list--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.list.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--list--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.list.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--list--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.list.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--list--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--list--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.list.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--list--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--list--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.list.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--list--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.list.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--list--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--list--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.list.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--list--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.list.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--list--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--list--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--list--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--list--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.list.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--list--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.list.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--list--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.list.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--list--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--list--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.list.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--plugin\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.plugin`\n\nRequired:\n\n- `config_map_ref` (String) ConfigMap with the plugin configuration needed to retrieve the data.\n\nOptional:\n\n- `input` (Block List, Max: 1) The input parameters used for calling the plugin. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--plugin--input))\n- `requeue_after_seconds` (String) How often to check for changes (in seconds). Default: 3min.\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--plugin--template))\n- `values` (Map of String) Arbitrary string key-value pairs to pass to the template via the values field of the git generator.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--plugin--input\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.plugin.input`\n\nRequired:\n\n- `parameters` (Map of String) Arbitrary key-value pairs which are passed directly as parameters to the plugin. A current limitation is that this cannot fully express the parameters that can be accepted by the plugin generator.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--plugin--template\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.plugin.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--plugin--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--plugin--template--spec))\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--plugin--template--metadata\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.plugin.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--plugin--template--spec\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.plugin.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--plugin--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--plugin--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--plugin--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--plugin--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--plugin--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--plugin--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.plugin.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--plugin--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.plugin.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--plugin--template--spec--info\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.plugin.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--plugin--template--spec--source\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.plugin.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--plugin--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--plugin--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--plugin--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--plugin--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--plugin--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.plugin.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--plugin--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--plugin--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.plugin.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--plugin--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--plugin--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--plugin--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.plugin.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--plugin--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.plugin.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--plugin--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.plugin.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--plugin--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--plugin--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--plugin--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.plugin.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--plugin--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.plugin.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--plugin--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.plugin.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--plugin--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--plugin--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.plugin.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--plugin--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--plugin--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.plugin.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--plugin--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.plugin.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--plugin--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--plugin--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.plugin.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--plugin--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.plugin.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--plugin--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--plugin--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--plugin--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--plugin--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.plugin.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--plugin--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.plugin.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--plugin--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.plugin.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--plugin--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--plugin--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.plugin.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--pull_request\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.pull_request`\n\nOptional:\n\n- `azure_devops` (Block List, Max: 1) Fetch pull requests from an Azure DevOps repository. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--azure_devops))\n- `bitbucket_server` (Block List, Max: 1) Fetch pull requests from a repo hosted on a Bitbucket Server. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--bitbucket_server))\n- `filter` (Block List) Filters allow selecting which pull requests to generate for. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--filter))\n- `gitea` (Block List, Max: 1) Specify the repository from which to fetch the Gitea Pull requests. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--gitea))\n- `github` (Block List, Max: 1) Specify the repository from which to fetch the GitHub Pull requests. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--github))\n- `gitlab` (Block List, Max: 1) Specify the project from which to fetch the GitLab merge requests. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--gitlab))\n- `requeue_after_seconds` (String) How often to check for changes (in seconds). Default: 30min.\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--template))\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--azure_devops\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.pull_request.azure_devops`\n\nRequired:\n\n- `organization` (String) Azure DevOps org to scan. Required.\n- `project` (String) Azure DevOps project name to scan. Required.\n- `repo` (String) Azure DevOps repo name to scan. Required.\n\nOptional:\n\n- `api` (String) The Azure DevOps API URL to talk to. If blank, uses https://dev.azure.com/.\n- `labels` (List of String) Labels is used to filter the PRs that you want to target.\n- `token_ref` (Block List, Max: 1) Authentication token reference. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--azure_devops--token_ref))\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--azure_devops--token_ref\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.pull_request.azure_devops.token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--bitbucket_server\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.pull_request.bitbucket_server`\n\nRequired:\n\n- `api` (String) The Bitbucket REST API URL to talk to e.g. https://bitbucket.org/rest.\n- `project` (String) Project to scan.\n- `repo` (String) Repo name to scan.\n\nOptional:\n\n- `basic_auth` (Block List, Max: 1) Credentials for Basic auth. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--bitbucket_server--basic_auth))\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--bitbucket_server--basic_auth\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.pull_request.bitbucket_server.basic_auth`\n\nOptional:\n\n- `password_ref` (Block List, Max: 1) Password (or personal access token) reference. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--bitbucket_server--basic_auth--password_ref))\n- `username` (String) Username for Basic auth.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--bitbucket_server--basic_auth--password_ref\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.pull_request.bitbucket_server.basic_auth.password_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--filter\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.pull_request.filter`\n\nOptional:\n\n- `branch_match` (String) A regex which must match the branch name.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--gitea\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.pull_request.gitea`\n\nRequired:\n\n- `api` (String) The Gitea API URL to talk to.\n- `owner` (String) Gitea org or user to scan.\n- `repo` (String) Gitea repo name to scan.\n\nOptional:\n\n- `insecure` (Boolean) Allow insecure tls, for self-signed certificates; default: false.\n- `token_ref` (Block List, Max: 1) Authentication token reference. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--gitea--token_ref))\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--gitea--token_ref\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.pull_request.gitea.token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--github\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.pull_request.github`\n\nRequired:\n\n- `owner` (String) GitHub org or user to scan.\n- `repo` (String) GitHub repo name to scan.\n\nOptional:\n\n- `api` (String) The GitHub API URL to talk to. Default https://api.github.com/.\n- `app_secret_name` (String) Reference to a GitHub App repo-creds secret with permission to access pull requests.\n- `labels` (List of String) Labels is used to filter the PRs that you want to target.\n- `token_ref` (Block List, Max: 1) Authentication token reference. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--github--token_ref))\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--github--token_ref\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.pull_request.github.token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--gitlab\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.pull_request.gitlab`\n\nRequired:\n\n- `project` (String) GitLab project to scan.\n\nOptional:\n\n- `api` (String) The GitLab API URL to talk to. If blank, uses https://gitlab.com/.\n- `ca_ref` (Block List, Max: 1) Reference to a ConfigMap key containing trusted CA certificates for verifying the SCM server's TLS certificate. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--gitlab--ca_ref))\n- `insecure` (Boolean) A flag for checking the validity of the SCM's certificates.\n- `labels` (List of String) Labels is used to filter the PRs that you want to target.\n- `pull_request_state` (String) additional MRs filter to get only those with a certain state. Default:  \"\" (all states).\n- `token_ref` (Block List, Max: 1) Authentication token reference. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--gitlab--token_ref))\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--gitlab--ca_ref\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.pull_request.gitlab.ca_ref`\n\nRequired:\n\n- `config_map_name` (String) Name of the ConfigMap.\n- `key` (String) Key containing information in trusted CA certs.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--gitlab--token_ref\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.pull_request.gitlab.token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--template\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.pull_request.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--template--spec))\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--template--metadata\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.pull_request.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--template--spec\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.pull_request.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.pull_request.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.pull_request.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--template--spec--info\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.pull_request.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--template--spec--source\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.pull_request.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.pull_request.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.pull_request.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.pull_request.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.pull_request.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.pull_request.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.pull_request.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.pull_request.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.pull_request.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.pull_request.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.pull_request.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.pull_request.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.pull_request.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.pull_request.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.pull_request.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.pull_request.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.pull_request.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--pull_request--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.pull_request.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.scm_provider`\n\nOptional:\n\n- `azure_devops` (Block List, Max: 1) Uses the Azure DevOps API to look up eligible repositories based on a team project within an Azure DevOps organization. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--azure_devops))\n- `bitbucket_cloud` (Block List, Max: 1) Uses the Bitbucket API V2 to scan a workspace in bitbucket.org. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--bitbucket_cloud))\n- `bitbucket_server` (Block List, Max: 1) Use the Bitbucket Server API (1.0) to scan repos in a project. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--bitbucket_server))\n- `clone_protocol` (String) Which protocol to use for the SCM URL. Default is provider-specific but ssh if possible. Not all providers necessarily support all protocols.\n- `filter` (Block List) Filters for which repos should be considered. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--filter))\n- `gitea` (Block List, Max: 1) Gitea mode uses the Gitea API to scan organizations in your instance. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--gitea))\n- `github` (Block List, Max: 1) Uses the GitHub API to scan an organization in either github.com or GitHub Enterprise. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--github))\n- `gitlab` (Block List, Max: 1) Uses the GitLab API to scan and organization in either gitlab.com or self-hosted GitLab. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--gitlab))\n- `requeue_after_seconds` (String) How often to check for changes (in seconds). Default: 3min.\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--template))\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--azure_devops\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.scm_provider.azure_devops`\n\nRequired:\n\n- `organization` (String) Azure Devops organization. E.g. \"my-organization\".\n- `team_project` (String) Azure Devops team project. E.g. \"my-team\".\n\nOptional:\n\n- `access_token_ref` (Block List, Max: 1) The Personal Access Token (PAT) to use when connecting. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--azure_devops--access_token_ref))\n- `all_branches` (Boolean) Scan all branches instead of just the default branch.\n- `api` (String) The URL to Azure DevOps. Defaults to https://dev.azure.com.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--azure_devops--access_token_ref\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.scm_provider.azure_devops.access_token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--bitbucket_cloud\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.scm_provider.bitbucket_cloud`\n\nRequired:\n\n- `owner` (String) Bitbucket workspace to scan.\n- `user` (String) Bitbucket user to use when authenticating. Should have a \"member\" role to be able to read all repositories and branches.\n\nOptional:\n\n- `all_branches` (Boolean) Scan all branches instead of just the default branch.\n- `app_password_ref` (Block List, Max: 1) The app password to use for the user. See: https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--bitbucket_cloud--app_password_ref))\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--bitbucket_cloud--app_password_ref\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.scm_provider.bitbucket_cloud.app_password_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--bitbucket_server\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.scm_provider.bitbucket_server`\n\nRequired:\n\n- `api` (String) The Bitbucket REST API URL to talk to e.g. https://bitbucket.org/rest.\n- `project` (String) Project to scan.\n\nOptional:\n\n- `all_branches` (Boolean) Scan all branches instead of just the default branch.\n- `basic_auth` (Block List, Max: 1) Credentials for Basic auth. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--bitbucket_server--basic_auth))\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--bitbucket_server--basic_auth\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.scm_provider.bitbucket_server.basic_auth`\n\nOptional:\n\n- `password_ref` (Block List, Max: 1) Password (or personal access token) reference. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--bitbucket_server--basic_auth--password_ref))\n- `username` (String) Username for Basic auth.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--bitbucket_server--basic_auth--password_ref\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.scm_provider.bitbucket_server.basic_auth.password_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--filter\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.scm_provider.filter`\n\nOptional:\n\n- `branch_match` (String) A regex which must match the branch name.\n- `label_match` (String) A regex which must match at least one label.\n- `paths_do_not_exist` (List of String) An array of paths, all of which must not exist.\n- `paths_exist` (List of String) An array of paths, all of which must exist.\n- `repository_match` (String) A regex for repo names.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--gitea\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.scm_provider.gitea`\n\nRequired:\n\n- `owner` (String) Gitea organization or user to scan.\n\nOptional:\n\n- `all_branches` (Boolean) Scan all branches instead of just the default branch.\n- `api` (String) The Gitea URL to talk to. For example https://gitea.mydomain.com/.\n- `insecure` (Boolean) Allow self-signed TLS / Certificates.\n- `token_ref` (Block List, Max: 1) Authentication token reference. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--gitea--token_ref))\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--gitea--token_ref\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.scm_provider.gitea.token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--github\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.scm_provider.github`\n\nRequired:\n\n- `organization` (String) GitHub org to scan.\n\nOptional:\n\n- `all_branches` (Boolean) If true, scan every branch of every repository. If false, scan only the default branch.\n- `api` (String) The GitHub API URL to talk to. Default https://api.github.com/.\n- `app_secret_name` (String) Reference to a GitHub App repo-creds secret. Uses a GitHub App to access the API instead of a PAT.\n- `token_ref` (Block List, Max: 1) Authentication token reference. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--github--token_ref))\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--github--token_ref\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.scm_provider.github.token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--gitlab\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.scm_provider.gitlab`\n\nRequired:\n\n- `group` (String) Gitlab group to scan. You can use either the project id (recommended) or the full namespaced path.\n\nOptional:\n\n- `all_branches` (Boolean) If true, scan every branch of every repository. If false, scan only the default branch.\n- `api` (String) The Gitlab API URL to talk to.\n- `include_subgroups` (Boolean) Recurse through subgroups (true) or scan only the base group (false). Defaults to `false`.\n- `token_ref` (Block List, Max: 1) Authentication token reference. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--gitlab--token_ref))\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--gitlab--token_ref\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.scm_provider.gitlab.token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--template\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.scm_provider.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--template--spec))\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--template--metadata\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.scm_provider.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--template--spec\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.scm_provider.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.scm_provider.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.scm_provider.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--template--spec--info\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.scm_provider.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--template--spec--source\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.scm_provider.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.scm_provider.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.scm_provider.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.scm_provider.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.scm_provider.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.scm_provider.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.scm_provider.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.scm_provider.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.scm_provider.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.scm_provider.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.scm_provider.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.scm_provider.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.scm_provider.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.scm_provider.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.scm_provider.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.scm_provider.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.scm_provider.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--scm_provider--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.scm_provider.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--selector\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.selector`\n\nOptional:\n\n- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--generator--selector--match_expressions))\n- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--generator--selector--match_expressions\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.generator.selector.match_expressions`\n\nOptional:\n\n- `key` (String) The label key that the selector applies to.\n- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`.\n- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--template\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--template--spec))\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--template--metadata\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--template--spec\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--template--spec--info\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--template--spec--source\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--matrix--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--merge--generator--matrix--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.merge.generator.matrix.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge`\n\nRequired:\n\n- `generator` (Block List, Min: 2) Child generator. Generators are responsible for generating parameters, which are then combined by the parent merge generator. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator))\n- `merge_keys` (List of String) Keys to merge into resulting parameter set.\n\nOptional:\n\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--template))\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator`\n\nOptional:\n\n- `cluster_decision_resource` (Block List) The [cluster decision resource](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Cluster-Decision-Resource/) generates a list of Argo CD clusters. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource))\n- `clusters` (Block List) The [cluster generator](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Cluster/) produces parameters based on the list of items found within the cluster secret. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--clusters))\n- `git` (Block List) [Git generators](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Git/) generates parameters using either the directory structure of a specified Git repository (directory generator), or, using the contents of JSON/YAML files found within a specified repository (file generator). (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--git))\n- `list` (Block List) [List generators](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-List/) generate parameters based on an arbitrary list of key/value pairs (as long as the values are string values). (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--list))\n- `plugin` (Block List) [Plugin generators](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Plugin/) generates parameters using a custom plugin. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--plugin))\n- `pull_request` (Block List) [Pull Request generators](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Pull-Request/) uses the API of an SCMaaS provider to automatically discover open pull requests within a repository. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--pull_request))\n- `scm_provider` (Block List) [SCM Provider generators](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-SCM-Provider/) uses the API of an SCMaaS provider to automatically discover repositories within an organization. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--scm_provider))\n- `selector` (Block List, Max: 1) The Selector allows to post-filter based on generated values using the kubernetes common labelSelector format. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--selector))\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.cluster_decision_resource`\n\nRequired:\n\n- `config_map_ref` (String) ConfigMap with the duck type definitions needed to retrieve the data this includes apiVersion(group/version), kind, matchKey and validation settings.\n\nOptional:\n\n- `label_selector` (Block List, Max: 1) Label selector used to find the resource defined in the `config_map_ref`. Alternative to `name`. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--label_selector))\n- `name` (String) Resource name of the kind, group and version, defined in the `config_map_ref`.\n- `requeue_after_seconds` (String) How often to check for changes (in seconds). Default: 3min.\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--template))\n- `values` (Map of String) Arbitrary string key-value pairs which are passed directly as parameters to the template.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--label_selector\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.cluster_decision_resource.label_selector`\n\nOptional:\n\n- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--label_selector--match_expressions))\n- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--label_selector--match_expressions\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.cluster_decision_resource.label_selector.match_expressions`\n\nOptional:\n\n- `key` (String) The label key that the selector applies to.\n- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`.\n- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--template\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.cluster_decision_resource.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--template--spec))\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--template--metadata\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.cluster_decision_resource.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--template--spec\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.cluster_decision_resource.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.cluster_decision_resource.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.cluster_decision_resource.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--template--spec--info\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.cluster_decision_resource.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--template--spec--source\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.cluster_decision_resource.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.cluster_decision_resource.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.cluster_decision_resource.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.cluster_decision_resource.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.cluster_decision_resource.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.cluster_decision_resource.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.cluster_decision_resource.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.cluster_decision_resource.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.cluster_decision_resource.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.cluster_decision_resource.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.cluster_decision_resource.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.cluster_decision_resource.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.cluster_decision_resource.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.cluster_decision_resource.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.cluster_decision_resource.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.cluster_decision_resource.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.cluster_decision_resource.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--cluster_decision_resource--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.cluster_decision_resource.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--clusters\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.clusters`\n\nOptional:\n\n- `enabled` (Boolean) Boolean value defaulting to `true` to indicate that this block has been added thereby allowing all other attributes to be optional.\n- `selector` (Block List, Max: 1) Label selector used to narrow the scope of targeted clusters. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--clusters--selector))\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--clusters--template))\n- `values` (Map of String) Arbitrary string key-value pairs to pass to the template via the values field of the cluster generator.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--clusters--selector\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.clusters.selector`\n\nOptional:\n\n- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--clusters--selector--match_expressions))\n- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--clusters--selector--match_expressions\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.clusters.selector.match_expressions`\n\nOptional:\n\n- `key` (String) The label key that the selector applies to.\n- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`.\n- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--clusters--template\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.clusters.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--clusters--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--clusters--template--spec))\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--clusters--template--metadata\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.clusters.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--clusters--template--spec\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.clusters.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--clusters--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--clusters--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--clusters--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--clusters--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--clusters--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--clusters--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.clusters.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--clusters--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.clusters.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--clusters--template--spec--info\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.clusters.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--clusters--template--spec--source\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.clusters.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--clusters--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--clusters--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--clusters--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--clusters--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--clusters--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.clusters.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--clusters--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--clusters--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.clusters.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--clusters--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--clusters--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--clusters--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.clusters.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--clusters--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.clusters.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--clusters--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.clusters.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--clusters--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--clusters--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--clusters--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.clusters.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--clusters--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.clusters.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--clusters--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.clusters.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--clusters--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--clusters--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.clusters.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--clusters--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--clusters--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.clusters.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--clusters--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.clusters.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--clusters--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--clusters--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.clusters.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--clusters--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.clusters.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--clusters--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--clusters--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--clusters--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--clusters--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.clusters.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--clusters--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.clusters.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--clusters--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.clusters.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--clusters--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--clusters--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.clusters.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--git\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.git`\n\nRequired:\n\n- `repo_url` (String) URL to the repository to use.\n\nOptional:\n\n- `directory` (Block List) List of directories in the source repository to use when template the Application.. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--git--directory))\n- `file` (Block List) List of files in the source repository to use when template the Application. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--git--file))\n- `path_param_prefix` (String) Prefix for all path-related parameter names.\n- `requeue_after_seconds` (String) How often to check for changes (in seconds). Default: 3min.\n- `revision` (String) Revision of the source repository to use.\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--git--template))\n- `values` (Map of String) Arbitrary string key-value pairs to pass to the template via the values field of the git generator.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--git--directory\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.git.directory`\n\nRequired:\n\n- `path` (String) Path in the repository.\n\nOptional:\n\n- `exclude` (Boolean) Flag indicating whether or not the directory should be excluded when templating.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--git--file\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.git.file`\n\nRequired:\n\n- `path` (String) Path to the file in the repository.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--git--template\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.git.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--git--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--git--template--spec))\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--git--template--metadata\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.git.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--git--template--spec\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.git.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--git--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--git--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--git--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--git--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--git--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--git--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.git.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--git--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.git.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--git--template--spec--info\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.git.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--git--template--spec--source\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.git.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--git--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--git--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--git--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--git--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--git--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.git.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--git--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--git--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.git.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--git--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--git--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--git--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.git.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--git--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.git.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--git--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.git.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--git--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--git--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--git--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.git.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--git--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.git.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--git--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.git.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--git--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--git--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.git.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--git--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--git--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.git.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--git--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.git.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--git--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--git--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.git.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--git--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.git.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--git--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--git--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--git--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--git--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.git.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--git--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.git.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--git--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.git.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--git--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--git--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.git.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--list\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.list`\n\nOptional:\n\n- `elements` (List of Map of String) List of key/value pairs to pass as parameters into the template\n- `elements_yaml` (String) YAML string containing list of key/value pairs to pass as parameters into the template\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--list--template))\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--list--template\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.list.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--list--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--list--template--spec))\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--list--template--metadata\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.list.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--list--template--spec\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.list.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--list--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--list--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--list--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--list--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--list--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--list--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.list.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--list--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.list.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--list--template--spec--info\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.list.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--list--template--spec--source\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.list.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--list--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--list--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--list--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--list--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--list--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.list.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--list--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--list--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.list.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--list--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--list--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--list--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.list.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--list--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.list.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--list--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.list.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--list--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--list--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--list--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.list.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--list--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.list.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--list--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.list.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--list--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--list--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.list.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--list--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--list--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.list.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--list--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.list.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--list--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--list--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.list.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--list--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.list.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--list--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--list--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--list--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--list--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.list.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--list--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.list.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--list--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.list.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--list--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--list--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.list.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--plugin\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.plugin`\n\nRequired:\n\n- `config_map_ref` (String) ConfigMap with the plugin configuration needed to retrieve the data.\n\nOptional:\n\n- `input` (Block List, Max: 1) The input parameters used for calling the plugin. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--plugin--input))\n- `requeue_after_seconds` (String) How often to check for changes (in seconds). Default: 3min.\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--plugin--template))\n- `values` (Map of String) Arbitrary string key-value pairs to pass to the template via the values field of the git generator.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--plugin--input\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.plugin.input`\n\nRequired:\n\n- `parameters` (Map of String) Arbitrary key-value pairs which are passed directly as parameters to the plugin. A current limitation is that this cannot fully express the parameters that can be accepted by the plugin generator.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--plugin--template\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.plugin.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--plugin--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--plugin--template--spec))\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--plugin--template--metadata\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.plugin.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--plugin--template--spec\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.plugin.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--plugin--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--plugin--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--plugin--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--plugin--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--plugin--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--plugin--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.plugin.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--plugin--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.plugin.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--plugin--template--spec--info\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.plugin.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--plugin--template--spec--source\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.plugin.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--plugin--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--plugin--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--plugin--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--plugin--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--plugin--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.plugin.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--plugin--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--plugin--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.plugin.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--plugin--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--plugin--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--plugin--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.plugin.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--plugin--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.plugin.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--plugin--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.plugin.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--plugin--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--plugin--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--plugin--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.plugin.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--plugin--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.plugin.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--plugin--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.plugin.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--plugin--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--plugin--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.plugin.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--plugin--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--plugin--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.plugin.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--plugin--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.plugin.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--plugin--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--plugin--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.plugin.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--plugin--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.plugin.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--plugin--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--plugin--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--plugin--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--plugin--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.plugin.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--plugin--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.plugin.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--plugin--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.plugin.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--plugin--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--plugin--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.plugin.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--pull_request\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.pull_request`\n\nOptional:\n\n- `azure_devops` (Block List, Max: 1) Fetch pull requests from an Azure DevOps repository. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--pull_request--azure_devops))\n- `bitbucket_server` (Block List, Max: 1) Fetch pull requests from a repo hosted on a Bitbucket Server. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--pull_request--bitbucket_server))\n- `filter` (Block List) Filters allow selecting which pull requests to generate for. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--pull_request--filter))\n- `gitea` (Block List, Max: 1) Specify the repository from which to fetch the Gitea Pull requests. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--pull_request--gitea))\n- `github` (Block List, Max: 1) Specify the repository from which to fetch the GitHub Pull requests. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--pull_request--github))\n- `gitlab` (Block List, Max: 1) Specify the project from which to fetch the GitLab merge requests. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--pull_request--gitlab))\n- `requeue_after_seconds` (String) How often to check for changes (in seconds). Default: 30min.\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--pull_request--template))\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--pull_request--azure_devops\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.pull_request.azure_devops`\n\nRequired:\n\n- `organization` (String) Azure DevOps org to scan. Required.\n- `project` (String) Azure DevOps project name to scan. Required.\n- `repo` (String) Azure DevOps repo name to scan. Required.\n\nOptional:\n\n- `api` (String) The Azure DevOps API URL to talk to. If blank, uses https://dev.azure.com/.\n- `labels` (List of String) Labels is used to filter the PRs that you want to target.\n- `token_ref` (Block List, Max: 1) Authentication token reference. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--pull_request--azure_devops--token_ref))\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--pull_request--azure_devops--token_ref\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.pull_request.azure_devops.token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--pull_request--bitbucket_server\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.pull_request.bitbucket_server`\n\nRequired:\n\n- `api` (String) The Bitbucket REST API URL to talk to e.g. https://bitbucket.org/rest.\n- `project` (String) Project to scan.\n- `repo` (String) Repo name to scan.\n\nOptional:\n\n- `basic_auth` (Block List, Max: 1) Credentials for Basic auth. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--pull_request--bitbucket_server--basic_auth))\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--pull_request--bitbucket_server--basic_auth\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.pull_request.bitbucket_server.basic_auth`\n\nOptional:\n\n- `password_ref` (Block List, Max: 1) Password (or personal access token) reference. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--pull_request--bitbucket_server--basic_auth--password_ref))\n- `username` (String) Username for Basic auth.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--pull_request--bitbucket_server--basic_auth--password_ref\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.pull_request.bitbucket_server.basic_auth.password_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--pull_request--filter\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.pull_request.filter`\n\nOptional:\n\n- `branch_match` (String) A regex which must match the branch name.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--pull_request--gitea\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.pull_request.gitea`\n\nRequired:\n\n- `api` (String) The Gitea API URL to talk to.\n- `owner` (String) Gitea org or user to scan.\n- `repo` (String) Gitea repo name to scan.\n\nOptional:\n\n- `insecure` (Boolean) Allow insecure tls, for self-signed certificates; default: false.\n- `token_ref` (Block List, Max: 1) Authentication token reference. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--pull_request--gitea--token_ref))\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--pull_request--gitea--token_ref\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.pull_request.gitea.token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--pull_request--github\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.pull_request.github`\n\nRequired:\n\n- `owner` (String) GitHub org or user to scan.\n- `repo` (String) GitHub repo name to scan.\n\nOptional:\n\n- `api` (String) The GitHub API URL to talk to. Default https://api.github.com/.\n- `app_secret_name` (String) Reference to a GitHub App repo-creds secret with permission to access pull requests.\n- `labels` (List of String) Labels is used to filter the PRs that you want to target.\n- `token_ref` (Block List, Max: 1) Authentication token reference. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--pull_request--github--token_ref))\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--pull_request--github--token_ref\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.pull_request.github.token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--pull_request--gitlab\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.pull_request.gitlab`\n\nRequired:\n\n- `project` (String) GitLab project to scan.\n\nOptional:\n\n- `api` (String) The GitLab API URL to talk to. If blank, uses https://gitlab.com/.\n- `ca_ref` (Block List, Max: 1) Reference to a ConfigMap key containing trusted CA certificates for verifying the SCM server's TLS certificate. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--pull_request--gitlab--ca_ref))\n- `insecure` (Boolean) A flag for checking the validity of the SCM's certificates.\n- `labels` (List of String) Labels is used to filter the PRs that you want to target.\n- `pull_request_state` (String) additional MRs filter to get only those with a certain state. Default:  \"\" (all states).\n- `token_ref` (Block List, Max: 1) Authentication token reference. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--pull_request--gitlab--token_ref))\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--pull_request--gitlab--ca_ref\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.pull_request.gitlab.ca_ref`\n\nRequired:\n\n- `config_map_name` (String) Name of the ConfigMap.\n- `key` (String) Key containing information in trusted CA certs.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--pull_request--gitlab--token_ref\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.pull_request.gitlab.token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--pull_request--template\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.pull_request.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--pull_request--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--pull_request--template--spec))\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--pull_request--template--metadata\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.pull_request.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--pull_request--template--spec\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.pull_request.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--pull_request--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--pull_request--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--pull_request--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--pull_request--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--pull_request--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--pull_request--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.pull_request.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--pull_request--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.pull_request.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--pull_request--template--spec--info\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.pull_request.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--pull_request--template--spec--source\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.pull_request.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--pull_request--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--pull_request--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--pull_request--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--pull_request--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--pull_request--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.pull_request.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--pull_request--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--pull_request--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.pull_request.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--pull_request--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--pull_request--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--pull_request--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.pull_request.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--pull_request--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.pull_request.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--pull_request--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.pull_request.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--pull_request--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--pull_request--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--pull_request--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.pull_request.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--pull_request--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.pull_request.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--pull_request--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.pull_request.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--pull_request--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--pull_request--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.pull_request.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--pull_request--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--pull_request--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.pull_request.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--pull_request--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.pull_request.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--pull_request--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--pull_request--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.pull_request.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--pull_request--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.pull_request.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--pull_request--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--pull_request--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--pull_request--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--pull_request--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.pull_request.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--pull_request--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.pull_request.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--pull_request--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.pull_request.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--pull_request--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--pull_request--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.pull_request.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--scm_provider\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.scm_provider`\n\nOptional:\n\n- `azure_devops` (Block List, Max: 1) Uses the Azure DevOps API to look up eligible repositories based on a team project within an Azure DevOps organization. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--azure_devops))\n- `bitbucket_cloud` (Block List, Max: 1) Uses the Bitbucket API V2 to scan a workspace in bitbucket.org. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--bitbucket_cloud))\n- `bitbucket_server` (Block List, Max: 1) Use the Bitbucket Server API (1.0) to scan repos in a project. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--bitbucket_server))\n- `clone_protocol` (String) Which protocol to use for the SCM URL. Default is provider-specific but ssh if possible. Not all providers necessarily support all protocols.\n- `filter` (Block List) Filters for which repos should be considered. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--filter))\n- `gitea` (Block List, Max: 1) Gitea mode uses the Gitea API to scan organizations in your instance. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--gitea))\n- `github` (Block List, Max: 1) Uses the GitHub API to scan an organization in either github.com or GitHub Enterprise. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--github))\n- `gitlab` (Block List, Max: 1) Uses the GitLab API to scan and organization in either gitlab.com or self-hosted GitLab. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--gitlab))\n- `requeue_after_seconds` (String) How often to check for changes (in seconds). Default: 3min.\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--template))\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--azure_devops\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.scm_provider.azure_devops`\n\nRequired:\n\n- `organization` (String) Azure Devops organization. E.g. \"my-organization\".\n- `team_project` (String) Azure Devops team project. E.g. \"my-team\".\n\nOptional:\n\n- `access_token_ref` (Block List, Max: 1) The Personal Access Token (PAT) to use when connecting. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--azure_devops--access_token_ref))\n- `all_branches` (Boolean) Scan all branches instead of just the default branch.\n- `api` (String) The URL to Azure DevOps. Defaults to https://dev.azure.com.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--azure_devops--access_token_ref\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.scm_provider.azure_devops.access_token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--bitbucket_cloud\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.scm_provider.bitbucket_cloud`\n\nRequired:\n\n- `owner` (String) Bitbucket workspace to scan.\n- `user` (String) Bitbucket user to use when authenticating. Should have a \"member\" role to be able to read all repositories and branches.\n\nOptional:\n\n- `all_branches` (Boolean) Scan all branches instead of just the default branch.\n- `app_password_ref` (Block List, Max: 1) The app password to use for the user. See: https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--bitbucket_cloud--app_password_ref))\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--bitbucket_cloud--app_password_ref\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.scm_provider.bitbucket_cloud.app_password_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--bitbucket_server\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.scm_provider.bitbucket_server`\n\nRequired:\n\n- `api` (String) The Bitbucket REST API URL to talk to e.g. https://bitbucket.org/rest.\n- `project` (String) Project to scan.\n\nOptional:\n\n- `all_branches` (Boolean) Scan all branches instead of just the default branch.\n- `basic_auth` (Block List, Max: 1) Credentials for Basic auth. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--bitbucket_server--basic_auth))\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--bitbucket_server--basic_auth\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.scm_provider.bitbucket_server.basic_auth`\n\nOptional:\n\n- `password_ref` (Block List, Max: 1) Password (or personal access token) reference. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--bitbucket_server--basic_auth--password_ref))\n- `username` (String) Username for Basic auth.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--bitbucket_server--basic_auth--password_ref\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.scm_provider.bitbucket_server.basic_auth.password_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--filter\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.scm_provider.filter`\n\nOptional:\n\n- `branch_match` (String) A regex which must match the branch name.\n- `label_match` (String) A regex which must match at least one label.\n- `paths_do_not_exist` (List of String) An array of paths, all of which must not exist.\n- `paths_exist` (List of String) An array of paths, all of which must exist.\n- `repository_match` (String) A regex for repo names.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--gitea\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.scm_provider.gitea`\n\nRequired:\n\n- `owner` (String) Gitea organization or user to scan.\n\nOptional:\n\n- `all_branches` (Boolean) Scan all branches instead of just the default branch.\n- `api` (String) The Gitea URL to talk to. For example https://gitea.mydomain.com/.\n- `insecure` (Boolean) Allow self-signed TLS / Certificates.\n- `token_ref` (Block List, Max: 1) Authentication token reference. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--gitea--token_ref))\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--gitea--token_ref\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.scm_provider.gitea.token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--github\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.scm_provider.github`\n\nRequired:\n\n- `organization` (String) GitHub org to scan.\n\nOptional:\n\n- `all_branches` (Boolean) If true, scan every branch of every repository. If false, scan only the default branch.\n- `api` (String) The GitHub API URL to talk to. Default https://api.github.com/.\n- `app_secret_name` (String) Reference to a GitHub App repo-creds secret. Uses a GitHub App to access the API instead of a PAT.\n- `token_ref` (Block List, Max: 1) Authentication token reference. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--github--token_ref))\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--github--token_ref\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.scm_provider.github.token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--gitlab\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.scm_provider.gitlab`\n\nRequired:\n\n- `group` (String) Gitlab group to scan. You can use either the project id (recommended) or the full namespaced path.\n\nOptional:\n\n- `all_branches` (Boolean) If true, scan every branch of every repository. If false, scan only the default branch.\n- `api` (String) The Gitlab API URL to talk to.\n- `include_subgroups` (Boolean) Recurse through subgroups (true) or scan only the base group (false). Defaults to `false`.\n- `token_ref` (Block List, Max: 1) Authentication token reference. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--gitlab--token_ref))\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--gitlab--token_ref\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.scm_provider.gitlab.token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--template\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.scm_provider.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--template--spec))\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--template--metadata\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.scm_provider.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--template--spec\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.scm_provider.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.scm_provider.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.scm_provider.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--template--spec--info\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.scm_provider.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--template--spec--source\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.scm_provider.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.scm_provider.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.scm_provider.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.scm_provider.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.scm_provider.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.scm_provider.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.scm_provider.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.scm_provider.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.scm_provider.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.scm_provider.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.scm_provider.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.scm_provider.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.scm_provider.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.scm_provider.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.scm_provider.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.scm_provider.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.scm_provider.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--scm_provider--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.scm_provider.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--selector\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.selector`\n\nOptional:\n\n- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--generator--selector--match_expressions))\n- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--generator--selector--match_expressions\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.generator.selector.match_expressions`\n\nOptional:\n\n- `key` (String) The label key that the selector applies to.\n- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`.\n- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--template\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--template--spec))\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--template--metadata\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--template--spec\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--template--spec--info\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--template--spec--source\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--merge--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--merge--generator--merge--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.merge.generator.merge.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--plugin\"></a>\n### Nested Schema for `spec.generator.merge.generator.plugin`\n\nRequired:\n\n- `config_map_ref` (String) ConfigMap with the plugin configuration needed to retrieve the data.\n\nOptional:\n\n- `input` (Block List, Max: 1) The input parameters used for calling the plugin. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--plugin--input))\n- `requeue_after_seconds` (String) How often to check for changes (in seconds). Default: 3min.\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--plugin--template))\n- `values` (Map of String) Arbitrary string key-value pairs to pass to the template via the values field of the git generator.\n\n<a id=\"nestedblock--spec--generator--merge--generator--plugin--input\"></a>\n### Nested Schema for `spec.generator.merge.generator.plugin.input`\n\nRequired:\n\n- `parameters` (Map of String) Arbitrary key-value pairs which are passed directly as parameters to the plugin. A current limitation is that this cannot fully express the parameters that can be accepted by the plugin generator.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--plugin--template\"></a>\n### Nested Schema for `spec.generator.merge.generator.plugin.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--plugin--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--plugin--template--spec))\n\n<a id=\"nestedblock--spec--generator--merge--generator--plugin--template--metadata\"></a>\n### Nested Schema for `spec.generator.merge.generator.plugin.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--plugin--template--spec\"></a>\n### Nested Schema for `spec.generator.merge.generator.plugin.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--plugin--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--plugin--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--plugin--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--plugin--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--plugin--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--merge--generator--plugin--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.merge.generator.plugin.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--plugin--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.merge.generator.plugin.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--plugin--template--spec--info\"></a>\n### Nested Schema for `spec.generator.merge.generator.plugin.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--plugin--template--spec--source\"></a>\n### Nested Schema for `spec.generator.merge.generator.plugin.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--plugin--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--plugin--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--plugin--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--plugin--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--merge--generator--plugin--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.merge.generator.plugin.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--plugin--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--merge--generator--plugin--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.merge.generator.plugin.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--plugin--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--merge--generator--plugin--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--merge--generator--plugin--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.merge.generator.plugin.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--plugin--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.merge.generator.plugin.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--plugin--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.merge.generator.plugin.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--plugin--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--plugin--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--merge--generator--plugin--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.merge.generator.plugin.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--plugin--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.merge.generator.plugin.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--plugin--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.merge.generator.plugin.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--plugin--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--merge--generator--plugin--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.merge.generator.plugin.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--merge--generator--plugin--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--merge--generator--plugin--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.merge.generator.plugin.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--plugin--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.merge.generator.plugin.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--plugin--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--merge--generator--plugin--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.merge.generator.plugin.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--plugin--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.merge.generator.plugin.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--plugin--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--merge--generator--plugin--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--plugin--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--merge--generator--plugin--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.merge.generator.plugin.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--plugin--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.merge.generator.plugin.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--plugin--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.merge.generator.plugin.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--plugin--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--merge--generator--plugin--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.merge.generator.plugin.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--pull_request\"></a>\n### Nested Schema for `spec.generator.merge.generator.pull_request`\n\nOptional:\n\n- `azure_devops` (Block List, Max: 1) Fetch pull requests from an Azure DevOps repository. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--pull_request--azure_devops))\n- `bitbucket_server` (Block List, Max: 1) Fetch pull requests from a repo hosted on a Bitbucket Server. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--pull_request--bitbucket_server))\n- `filter` (Block List) Filters allow selecting which pull requests to generate for. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--pull_request--filter))\n- `gitea` (Block List, Max: 1) Specify the repository from which to fetch the Gitea Pull requests. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--pull_request--gitea))\n- `github` (Block List, Max: 1) Specify the repository from which to fetch the GitHub Pull requests. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--pull_request--github))\n- `gitlab` (Block List, Max: 1) Specify the project from which to fetch the GitLab merge requests. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--pull_request--gitlab))\n- `requeue_after_seconds` (String) How often to check for changes (in seconds). Default: 30min.\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--pull_request--template))\n\n<a id=\"nestedblock--spec--generator--merge--generator--pull_request--azure_devops\"></a>\n### Nested Schema for `spec.generator.merge.generator.pull_request.azure_devops`\n\nRequired:\n\n- `organization` (String) Azure DevOps org to scan. Required.\n- `project` (String) Azure DevOps project name to scan. Required.\n- `repo` (String) Azure DevOps repo name to scan. Required.\n\nOptional:\n\n- `api` (String) The Azure DevOps API URL to talk to. If blank, uses https://dev.azure.com/.\n- `labels` (List of String) Labels is used to filter the PRs that you want to target.\n- `token_ref` (Block List, Max: 1) Authentication token reference. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--pull_request--azure_devops--token_ref))\n\n<a id=\"nestedblock--spec--generator--merge--generator--pull_request--azure_devops--token_ref\"></a>\n### Nested Schema for `spec.generator.merge.generator.pull_request.azure_devops.token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--pull_request--bitbucket_server\"></a>\n### Nested Schema for `spec.generator.merge.generator.pull_request.bitbucket_server`\n\nRequired:\n\n- `api` (String) The Bitbucket REST API URL to talk to e.g. https://bitbucket.org/rest.\n- `project` (String) Project to scan.\n- `repo` (String) Repo name to scan.\n\nOptional:\n\n- `basic_auth` (Block List, Max: 1) Credentials for Basic auth. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--pull_request--bitbucket_server--basic_auth))\n\n<a id=\"nestedblock--spec--generator--merge--generator--pull_request--bitbucket_server--basic_auth\"></a>\n### Nested Schema for `spec.generator.merge.generator.pull_request.bitbucket_server.basic_auth`\n\nOptional:\n\n- `password_ref` (Block List, Max: 1) Password (or personal access token) reference. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--pull_request--bitbucket_server--basic_auth--password_ref))\n- `username` (String) Username for Basic auth.\n\n<a id=\"nestedblock--spec--generator--merge--generator--pull_request--bitbucket_server--basic_auth--password_ref\"></a>\n### Nested Schema for `spec.generator.merge.generator.pull_request.bitbucket_server.basic_auth.password_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--pull_request--filter\"></a>\n### Nested Schema for `spec.generator.merge.generator.pull_request.filter`\n\nOptional:\n\n- `branch_match` (String) A regex which must match the branch name.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--pull_request--gitea\"></a>\n### Nested Schema for `spec.generator.merge.generator.pull_request.gitea`\n\nRequired:\n\n- `api` (String) The Gitea API URL to talk to.\n- `owner` (String) Gitea org or user to scan.\n- `repo` (String) Gitea repo name to scan.\n\nOptional:\n\n- `insecure` (Boolean) Allow insecure tls, for self-signed certificates; default: false.\n- `token_ref` (Block List, Max: 1) Authentication token reference. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--pull_request--gitea--token_ref))\n\n<a id=\"nestedblock--spec--generator--merge--generator--pull_request--gitea--token_ref\"></a>\n### Nested Schema for `spec.generator.merge.generator.pull_request.gitea.token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--pull_request--github\"></a>\n### Nested Schema for `spec.generator.merge.generator.pull_request.github`\n\nRequired:\n\n- `owner` (String) GitHub org or user to scan.\n- `repo` (String) GitHub repo name to scan.\n\nOptional:\n\n- `api` (String) The GitHub API URL to talk to. Default https://api.github.com/.\n- `app_secret_name` (String) Reference to a GitHub App repo-creds secret with permission to access pull requests.\n- `labels` (List of String) Labels is used to filter the PRs that you want to target.\n- `token_ref` (Block List, Max: 1) Authentication token reference. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--pull_request--github--token_ref))\n\n<a id=\"nestedblock--spec--generator--merge--generator--pull_request--github--token_ref\"></a>\n### Nested Schema for `spec.generator.merge.generator.pull_request.github.token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--pull_request--gitlab\"></a>\n### Nested Schema for `spec.generator.merge.generator.pull_request.gitlab`\n\nRequired:\n\n- `project` (String) GitLab project to scan.\n\nOptional:\n\n- `api` (String) The GitLab API URL to talk to. If blank, uses https://gitlab.com/.\n- `ca_ref` (Block List, Max: 1) Reference to a ConfigMap key containing trusted CA certificates for verifying the SCM server's TLS certificate. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--pull_request--gitlab--ca_ref))\n- `insecure` (Boolean) A flag for checking the validity of the SCM's certificates.\n- `labels` (List of String) Labels is used to filter the PRs that you want to target.\n- `pull_request_state` (String) additional MRs filter to get only those with a certain state. Default:  \"\" (all states).\n- `token_ref` (Block List, Max: 1) Authentication token reference. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--pull_request--gitlab--token_ref))\n\n<a id=\"nestedblock--spec--generator--merge--generator--pull_request--gitlab--ca_ref\"></a>\n### Nested Schema for `spec.generator.merge.generator.pull_request.gitlab.ca_ref`\n\nRequired:\n\n- `config_map_name` (String) Name of the ConfigMap.\n- `key` (String) Key containing information in trusted CA certs.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--pull_request--gitlab--token_ref\"></a>\n### Nested Schema for `spec.generator.merge.generator.pull_request.gitlab.token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--pull_request--template\"></a>\n### Nested Schema for `spec.generator.merge.generator.pull_request.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--pull_request--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--pull_request--template--spec))\n\n<a id=\"nestedblock--spec--generator--merge--generator--pull_request--template--metadata\"></a>\n### Nested Schema for `spec.generator.merge.generator.pull_request.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--pull_request--template--spec\"></a>\n### Nested Schema for `spec.generator.merge.generator.pull_request.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--pull_request--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--pull_request--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--pull_request--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--pull_request--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--pull_request--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--merge--generator--pull_request--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.merge.generator.pull_request.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--pull_request--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.merge.generator.pull_request.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--pull_request--template--spec--info\"></a>\n### Nested Schema for `spec.generator.merge.generator.pull_request.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--pull_request--template--spec--source\"></a>\n### Nested Schema for `spec.generator.merge.generator.pull_request.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--pull_request--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--pull_request--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--pull_request--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--pull_request--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--merge--generator--pull_request--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.merge.generator.pull_request.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--pull_request--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--merge--generator--pull_request--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.merge.generator.pull_request.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--pull_request--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--merge--generator--pull_request--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--merge--generator--pull_request--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.merge.generator.pull_request.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--pull_request--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.merge.generator.pull_request.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--pull_request--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.merge.generator.pull_request.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--pull_request--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--pull_request--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--merge--generator--pull_request--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.merge.generator.pull_request.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--pull_request--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.merge.generator.pull_request.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--pull_request--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.merge.generator.pull_request.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--pull_request--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--merge--generator--pull_request--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.merge.generator.pull_request.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--merge--generator--pull_request--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--merge--generator--pull_request--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.merge.generator.pull_request.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--pull_request--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.merge.generator.pull_request.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--pull_request--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--merge--generator--pull_request--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.merge.generator.pull_request.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--pull_request--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.merge.generator.pull_request.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--pull_request--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--merge--generator--pull_request--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--pull_request--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--merge--generator--pull_request--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.merge.generator.pull_request.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--pull_request--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.merge.generator.pull_request.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--pull_request--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.merge.generator.pull_request.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--pull_request--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--merge--generator--pull_request--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.merge.generator.pull_request.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--scm_provider\"></a>\n### Nested Schema for `spec.generator.merge.generator.scm_provider`\n\nOptional:\n\n- `azure_devops` (Block List, Max: 1) Uses the Azure DevOps API to look up eligible repositories based on a team project within an Azure DevOps organization. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--scm_provider--azure_devops))\n- `bitbucket_cloud` (Block List, Max: 1) Uses the Bitbucket API V2 to scan a workspace in bitbucket.org. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--scm_provider--bitbucket_cloud))\n- `bitbucket_server` (Block List, Max: 1) Use the Bitbucket Server API (1.0) to scan repos in a project. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--scm_provider--bitbucket_server))\n- `clone_protocol` (String) Which protocol to use for the SCM URL. Default is provider-specific but ssh if possible. Not all providers necessarily support all protocols.\n- `filter` (Block List) Filters for which repos should be considered. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--scm_provider--filter))\n- `gitea` (Block List, Max: 1) Gitea mode uses the Gitea API to scan organizations in your instance. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--scm_provider--gitea))\n- `github` (Block List, Max: 1) Uses the GitHub API to scan an organization in either github.com or GitHub Enterprise. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--scm_provider--github))\n- `gitlab` (Block List, Max: 1) Uses the GitLab API to scan and organization in either gitlab.com or self-hosted GitLab. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--scm_provider--gitlab))\n- `requeue_after_seconds` (String) How often to check for changes (in seconds). Default: 3min.\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--scm_provider--template))\n\n<a id=\"nestedblock--spec--generator--merge--generator--scm_provider--azure_devops\"></a>\n### Nested Schema for `spec.generator.merge.generator.scm_provider.azure_devops`\n\nRequired:\n\n- `organization` (String) Azure Devops organization. E.g. \"my-organization\".\n- `team_project` (String) Azure Devops team project. E.g. \"my-team\".\n\nOptional:\n\n- `access_token_ref` (Block List, Max: 1) The Personal Access Token (PAT) to use when connecting. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--scm_provider--azure_devops--access_token_ref))\n- `all_branches` (Boolean) Scan all branches instead of just the default branch.\n- `api` (String) The URL to Azure DevOps. Defaults to https://dev.azure.com.\n\n<a id=\"nestedblock--spec--generator--merge--generator--scm_provider--azure_devops--access_token_ref\"></a>\n### Nested Schema for `spec.generator.merge.generator.scm_provider.azure_devops.access_token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--scm_provider--bitbucket_cloud\"></a>\n### Nested Schema for `spec.generator.merge.generator.scm_provider.bitbucket_cloud`\n\nRequired:\n\n- `owner` (String) Bitbucket workspace to scan.\n- `user` (String) Bitbucket user to use when authenticating. Should have a \"member\" role to be able to read all repositories and branches.\n\nOptional:\n\n- `all_branches` (Boolean) Scan all branches instead of just the default branch.\n- `app_password_ref` (Block List, Max: 1) The app password to use for the user. See: https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--scm_provider--bitbucket_cloud--app_password_ref))\n\n<a id=\"nestedblock--spec--generator--merge--generator--scm_provider--bitbucket_cloud--app_password_ref\"></a>\n### Nested Schema for `spec.generator.merge.generator.scm_provider.bitbucket_cloud.app_password_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--scm_provider--bitbucket_server\"></a>\n### Nested Schema for `spec.generator.merge.generator.scm_provider.bitbucket_server`\n\nRequired:\n\n- `api` (String) The Bitbucket REST API URL to talk to e.g. https://bitbucket.org/rest.\n- `project` (String) Project to scan.\n\nOptional:\n\n- `all_branches` (Boolean) Scan all branches instead of just the default branch.\n- `basic_auth` (Block List, Max: 1) Credentials for Basic auth. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--scm_provider--bitbucket_server--basic_auth))\n\n<a id=\"nestedblock--spec--generator--merge--generator--scm_provider--bitbucket_server--basic_auth\"></a>\n### Nested Schema for `spec.generator.merge.generator.scm_provider.bitbucket_server.basic_auth`\n\nOptional:\n\n- `password_ref` (Block List, Max: 1) Password (or personal access token) reference. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--scm_provider--bitbucket_server--basic_auth--password_ref))\n- `username` (String) Username for Basic auth.\n\n<a id=\"nestedblock--spec--generator--merge--generator--scm_provider--bitbucket_server--basic_auth--password_ref\"></a>\n### Nested Schema for `spec.generator.merge.generator.scm_provider.bitbucket_server.basic_auth.password_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--scm_provider--filter\"></a>\n### Nested Schema for `spec.generator.merge.generator.scm_provider.filter`\n\nOptional:\n\n- `branch_match` (String) A regex which must match the branch name.\n- `label_match` (String) A regex which must match at least one label.\n- `paths_do_not_exist` (List of String) An array of paths, all of which must not exist.\n- `paths_exist` (List of String) An array of paths, all of which must exist.\n- `repository_match` (String) A regex for repo names.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--scm_provider--gitea\"></a>\n### Nested Schema for `spec.generator.merge.generator.scm_provider.gitea`\n\nRequired:\n\n- `owner` (String) Gitea organization or user to scan.\n\nOptional:\n\n- `all_branches` (Boolean) Scan all branches instead of just the default branch.\n- `api` (String) The Gitea URL to talk to. For example https://gitea.mydomain.com/.\n- `insecure` (Boolean) Allow self-signed TLS / Certificates.\n- `token_ref` (Block List, Max: 1) Authentication token reference. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--scm_provider--gitea--token_ref))\n\n<a id=\"nestedblock--spec--generator--merge--generator--scm_provider--gitea--token_ref\"></a>\n### Nested Schema for `spec.generator.merge.generator.scm_provider.gitea.token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--scm_provider--github\"></a>\n### Nested Schema for `spec.generator.merge.generator.scm_provider.github`\n\nRequired:\n\n- `organization` (String) GitHub org to scan.\n\nOptional:\n\n- `all_branches` (Boolean) If true, scan every branch of every repository. If false, scan only the default branch.\n- `api` (String) The GitHub API URL to talk to. Default https://api.github.com/.\n- `app_secret_name` (String) Reference to a GitHub App repo-creds secret. Uses a GitHub App to access the API instead of a PAT.\n- `token_ref` (Block List, Max: 1) Authentication token reference. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--scm_provider--github--token_ref))\n\n<a id=\"nestedblock--spec--generator--merge--generator--scm_provider--github--token_ref\"></a>\n### Nested Schema for `spec.generator.merge.generator.scm_provider.github.token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--scm_provider--gitlab\"></a>\n### Nested Schema for `spec.generator.merge.generator.scm_provider.gitlab`\n\nRequired:\n\n- `group` (String) Gitlab group to scan. You can use either the project id (recommended) or the full namespaced path.\n\nOptional:\n\n- `all_branches` (Boolean) If true, scan every branch of every repository. If false, scan only the default branch.\n- `api` (String) The Gitlab API URL to talk to.\n- `include_subgroups` (Boolean) Recurse through subgroups (true) or scan only the base group (false). Defaults to `false`.\n- `token_ref` (Block List, Max: 1) Authentication token reference. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--scm_provider--gitlab--token_ref))\n\n<a id=\"nestedblock--spec--generator--merge--generator--scm_provider--gitlab--token_ref\"></a>\n### Nested Schema for `spec.generator.merge.generator.scm_provider.gitlab.token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--scm_provider--template\"></a>\n### Nested Schema for `spec.generator.merge.generator.scm_provider.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--scm_provider--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--scm_provider--template--spec))\n\n<a id=\"nestedblock--spec--generator--merge--generator--scm_provider--template--metadata\"></a>\n### Nested Schema for `spec.generator.merge.generator.scm_provider.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--scm_provider--template--spec\"></a>\n### Nested Schema for `spec.generator.merge.generator.scm_provider.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--scm_provider--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--scm_provider--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--scm_provider--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--scm_provider--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--scm_provider--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--merge--generator--scm_provider--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.merge.generator.scm_provider.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--scm_provider--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.merge.generator.scm_provider.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--scm_provider--template--spec--info\"></a>\n### Nested Schema for `spec.generator.merge.generator.scm_provider.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--scm_provider--template--spec--source\"></a>\n### Nested Schema for `spec.generator.merge.generator.scm_provider.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--scm_provider--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--scm_provider--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--scm_provider--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--scm_provider--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--merge--generator--scm_provider--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.merge.generator.scm_provider.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--scm_provider--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--merge--generator--scm_provider--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.merge.generator.scm_provider.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--scm_provider--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--merge--generator--scm_provider--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--merge--generator--scm_provider--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.merge.generator.scm_provider.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--scm_provider--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.merge.generator.scm_provider.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--scm_provider--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.merge.generator.scm_provider.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--scm_provider--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--scm_provider--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--merge--generator--scm_provider--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.merge.generator.scm_provider.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--scm_provider--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.merge.generator.scm_provider.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--scm_provider--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.merge.generator.scm_provider.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--scm_provider--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--merge--generator--scm_provider--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.merge.generator.scm_provider.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--merge--generator--scm_provider--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--merge--generator--scm_provider--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.merge.generator.scm_provider.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--scm_provider--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.merge.generator.scm_provider.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--scm_provider--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--merge--generator--scm_provider--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.merge.generator.scm_provider.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--scm_provider--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.merge.generator.scm_provider.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--scm_provider--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--merge--generator--scm_provider--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--scm_provider--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--merge--generator--scm_provider--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.merge.generator.scm_provider.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--scm_provider--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.merge.generator.scm_provider.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--scm_provider--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.merge.generator.scm_provider.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--scm_provider--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--merge--generator--scm_provider--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.merge.generator.scm_provider.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--generator--selector\"></a>\n### Nested Schema for `spec.generator.merge.generator.selector`\n\nOptional:\n\n- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--generator--merge--generator--selector--match_expressions))\n- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.\n\n<a id=\"nestedblock--spec--generator--merge--generator--selector--match_expressions\"></a>\n### Nested Schema for `spec.generator.merge.generator.selector.match_expressions`\n\nOptional:\n\n- `key` (String) The label key that the selector applies to.\n- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`.\n- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--template\"></a>\n### Nested Schema for `spec.generator.merge.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--merge--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--merge--template--spec))\n\n<a id=\"nestedblock--spec--generator--merge--template--metadata\"></a>\n### Nested Schema for `spec.generator.merge.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--merge--template--spec\"></a>\n### Nested Schema for `spec.generator.merge.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--merge--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--merge--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--merge--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--merge--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--merge--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--merge--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.merge.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--merge--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.merge.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--merge--template--spec--info\"></a>\n### Nested Schema for `spec.generator.merge.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--merge--template--spec--source\"></a>\n### Nested Schema for `spec.generator.merge.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--merge--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.merge.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--merge--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--merge--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.merge.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--merge--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--merge--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--merge--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.merge.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--merge--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.merge.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.merge.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--merge--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--merge--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--merge--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.merge.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--merge--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.merge.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--merge--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.merge.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--merge--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--merge--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.merge.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--merge--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--merge--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.merge.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.merge.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--merge--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--merge--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.merge.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--merge--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.merge.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--merge--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--merge--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--merge--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--merge--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.merge.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--merge--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.merge.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--merge--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.merge.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--merge--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--merge--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.merge.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--plugin\"></a>\n### Nested Schema for `spec.generator.plugin`\n\nRequired:\n\n- `config_map_ref` (String) ConfigMap with the plugin configuration needed to retrieve the data.\n\nOptional:\n\n- `input` (Block List, Max: 1) The input parameters used for calling the plugin. (see [below for nested schema](#nestedblock--spec--generator--plugin--input))\n- `requeue_after_seconds` (String) How often to check for changes (in seconds). Default: 3min.\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--plugin--template))\n- `values` (Map of String) Arbitrary string key-value pairs to pass to the template via the values field of the git generator.\n\n<a id=\"nestedblock--spec--generator--plugin--input\"></a>\n### Nested Schema for `spec.generator.plugin.input`\n\nRequired:\n\n- `parameters` (Map of String) Arbitrary key-value pairs which are passed directly as parameters to the plugin. A current limitation is that this cannot fully express the parameters that can be accepted by the plugin generator.\n\n\n<a id=\"nestedblock--spec--generator--plugin--template\"></a>\n### Nested Schema for `spec.generator.plugin.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--plugin--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--plugin--template--spec))\n\n<a id=\"nestedblock--spec--generator--plugin--template--metadata\"></a>\n### Nested Schema for `spec.generator.plugin.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--plugin--template--spec\"></a>\n### Nested Schema for `spec.generator.plugin.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--plugin--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--plugin--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--plugin--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--plugin--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--plugin--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--plugin--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.plugin.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--plugin--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.plugin.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--plugin--template--spec--info\"></a>\n### Nested Schema for `spec.generator.plugin.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--plugin--template--spec--source\"></a>\n### Nested Schema for `spec.generator.plugin.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--plugin--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--plugin--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--plugin--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--plugin--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--plugin--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.plugin.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--plugin--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--plugin--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.plugin.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--plugin--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--plugin--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--plugin--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.plugin.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--plugin--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.plugin.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--plugin--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.plugin.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--plugin--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--plugin--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--plugin--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.plugin.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--plugin--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.plugin.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--plugin--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.plugin.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--plugin--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--plugin--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.plugin.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--plugin--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--plugin--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.plugin.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--plugin--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.plugin.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--plugin--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--plugin--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.plugin.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--plugin--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.plugin.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--plugin--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--plugin--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--plugin--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--plugin--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.plugin.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--plugin--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.plugin.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--plugin--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.plugin.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--plugin--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--plugin--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.plugin.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--pull_request\"></a>\n### Nested Schema for `spec.generator.pull_request`\n\nOptional:\n\n- `azure_devops` (Block List, Max: 1) Fetch pull requests from an Azure DevOps repository. (see [below for nested schema](#nestedblock--spec--generator--pull_request--azure_devops))\n- `bitbucket_server` (Block List, Max: 1) Fetch pull requests from a repo hosted on a Bitbucket Server. (see [below for nested schema](#nestedblock--spec--generator--pull_request--bitbucket_server))\n- `filter` (Block List) Filters allow selecting which pull requests to generate for. (see [below for nested schema](#nestedblock--spec--generator--pull_request--filter))\n- `gitea` (Block List, Max: 1) Specify the repository from which to fetch the Gitea Pull requests. (see [below for nested schema](#nestedblock--spec--generator--pull_request--gitea))\n- `github` (Block List, Max: 1) Specify the repository from which to fetch the GitHub Pull requests. (see [below for nested schema](#nestedblock--spec--generator--pull_request--github))\n- `gitlab` (Block List, Max: 1) Specify the project from which to fetch the GitLab merge requests. (see [below for nested schema](#nestedblock--spec--generator--pull_request--gitlab))\n- `requeue_after_seconds` (String) How often to check for changes (in seconds). Default: 30min.\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--pull_request--template))\n\n<a id=\"nestedblock--spec--generator--pull_request--azure_devops\"></a>\n### Nested Schema for `spec.generator.pull_request.azure_devops`\n\nRequired:\n\n- `organization` (String) Azure DevOps org to scan. Required.\n- `project` (String) Azure DevOps project name to scan. Required.\n- `repo` (String) Azure DevOps repo name to scan. Required.\n\nOptional:\n\n- `api` (String) The Azure DevOps API URL to talk to. If blank, uses https://dev.azure.com/.\n- `labels` (List of String) Labels is used to filter the PRs that you want to target.\n- `token_ref` (Block List, Max: 1) Authentication token reference. (see [below for nested schema](#nestedblock--spec--generator--pull_request--azure_devops--token_ref))\n\n<a id=\"nestedblock--spec--generator--pull_request--azure_devops--token_ref\"></a>\n### Nested Schema for `spec.generator.pull_request.azure_devops.token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--pull_request--bitbucket_server\"></a>\n### Nested Schema for `spec.generator.pull_request.bitbucket_server`\n\nRequired:\n\n- `api` (String) The Bitbucket REST API URL to talk to e.g. https://bitbucket.org/rest.\n- `project` (String) Project to scan.\n- `repo` (String) Repo name to scan.\n\nOptional:\n\n- `basic_auth` (Block List, Max: 1) Credentials for Basic auth. (see [below for nested schema](#nestedblock--spec--generator--pull_request--bitbucket_server--basic_auth))\n\n<a id=\"nestedblock--spec--generator--pull_request--bitbucket_server--basic_auth\"></a>\n### Nested Schema for `spec.generator.pull_request.bitbucket_server.basic_auth`\n\nOptional:\n\n- `password_ref` (Block List, Max: 1) Password (or personal access token) reference. (see [below for nested schema](#nestedblock--spec--generator--pull_request--bitbucket_server--basic_auth--password_ref))\n- `username` (String) Username for Basic auth.\n\n<a id=\"nestedblock--spec--generator--pull_request--bitbucket_server--basic_auth--password_ref\"></a>\n### Nested Schema for `spec.generator.pull_request.bitbucket_server.basic_auth.password_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n\n<a id=\"nestedblock--spec--generator--pull_request--filter\"></a>\n### Nested Schema for `spec.generator.pull_request.filter`\n\nOptional:\n\n- `branch_match` (String) A regex which must match the branch name.\n\n\n<a id=\"nestedblock--spec--generator--pull_request--gitea\"></a>\n### Nested Schema for `spec.generator.pull_request.gitea`\n\nRequired:\n\n- `api` (String) The Gitea API URL to talk to.\n- `owner` (String) Gitea org or user to scan.\n- `repo` (String) Gitea repo name to scan.\n\nOptional:\n\n- `insecure` (Boolean) Allow insecure tls, for self-signed certificates; default: false.\n- `token_ref` (Block List, Max: 1) Authentication token reference. (see [below for nested schema](#nestedblock--spec--generator--pull_request--gitea--token_ref))\n\n<a id=\"nestedblock--spec--generator--pull_request--gitea--token_ref\"></a>\n### Nested Schema for `spec.generator.pull_request.gitea.token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--pull_request--github\"></a>\n### Nested Schema for `spec.generator.pull_request.github`\n\nRequired:\n\n- `owner` (String) GitHub org or user to scan.\n- `repo` (String) GitHub repo name to scan.\n\nOptional:\n\n- `api` (String) The GitHub API URL to talk to. Default https://api.github.com/.\n- `app_secret_name` (String) Reference to a GitHub App repo-creds secret with permission to access pull requests.\n- `labels` (List of String) Labels is used to filter the PRs that you want to target.\n- `token_ref` (Block List, Max: 1) Authentication token reference. (see [below for nested schema](#nestedblock--spec--generator--pull_request--github--token_ref))\n\n<a id=\"nestedblock--spec--generator--pull_request--github--token_ref\"></a>\n### Nested Schema for `spec.generator.pull_request.github.token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--pull_request--gitlab\"></a>\n### Nested Schema for `spec.generator.pull_request.gitlab`\n\nRequired:\n\n- `project` (String) GitLab project to scan.\n\nOptional:\n\n- `api` (String) The GitLab API URL to talk to. If blank, uses https://gitlab.com/.\n- `ca_ref` (Block List, Max: 1) Reference to a ConfigMap key containing trusted CA certificates for verifying the SCM server's TLS certificate. (see [below for nested schema](#nestedblock--spec--generator--pull_request--gitlab--ca_ref))\n- `insecure` (Boolean) A flag for checking the validity of the SCM's certificates.\n- `labels` (List of String) Labels is used to filter the PRs that you want to target.\n- `pull_request_state` (String) additional MRs filter to get only those with a certain state. Default:  \"\" (all states).\n- `token_ref` (Block List, Max: 1) Authentication token reference. (see [below for nested schema](#nestedblock--spec--generator--pull_request--gitlab--token_ref))\n\n<a id=\"nestedblock--spec--generator--pull_request--gitlab--ca_ref\"></a>\n### Nested Schema for `spec.generator.pull_request.gitlab.ca_ref`\n\nRequired:\n\n- `config_map_name` (String) Name of the ConfigMap.\n- `key` (String) Key containing information in trusted CA certs.\n\n\n<a id=\"nestedblock--spec--generator--pull_request--gitlab--token_ref\"></a>\n### Nested Schema for `spec.generator.pull_request.gitlab.token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--pull_request--template\"></a>\n### Nested Schema for `spec.generator.pull_request.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--pull_request--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--pull_request--template--spec))\n\n<a id=\"nestedblock--spec--generator--pull_request--template--metadata\"></a>\n### Nested Schema for `spec.generator.pull_request.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--pull_request--template--spec\"></a>\n### Nested Schema for `spec.generator.pull_request.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--pull_request--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--pull_request--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--pull_request--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--pull_request--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--pull_request--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--pull_request--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.pull_request.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--pull_request--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.pull_request.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--pull_request--template--spec--info\"></a>\n### Nested Schema for `spec.generator.pull_request.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--pull_request--template--spec--source\"></a>\n### Nested Schema for `spec.generator.pull_request.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--pull_request--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--pull_request--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--pull_request--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--pull_request--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--pull_request--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.pull_request.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--pull_request--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--pull_request--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.pull_request.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--pull_request--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--pull_request--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--pull_request--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.pull_request.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--pull_request--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.pull_request.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--pull_request--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.pull_request.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--pull_request--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--pull_request--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--pull_request--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.pull_request.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--pull_request--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.pull_request.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--pull_request--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.pull_request.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--pull_request--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--pull_request--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.pull_request.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--pull_request--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--pull_request--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.pull_request.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--pull_request--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.pull_request.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--pull_request--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--pull_request--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.pull_request.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--pull_request--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.pull_request.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--pull_request--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--pull_request--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--pull_request--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--pull_request--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.pull_request.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--pull_request--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.pull_request.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--pull_request--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.pull_request.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--pull_request--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--pull_request--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.pull_request.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--scm_provider\"></a>\n### Nested Schema for `spec.generator.scm_provider`\n\nOptional:\n\n- `azure_devops` (Block List, Max: 1) Uses the Azure DevOps API to look up eligible repositories based on a team project within an Azure DevOps organization. (see [below for nested schema](#nestedblock--spec--generator--scm_provider--azure_devops))\n- `bitbucket_cloud` (Block List, Max: 1) Uses the Bitbucket API V2 to scan a workspace in bitbucket.org. (see [below for nested schema](#nestedblock--spec--generator--scm_provider--bitbucket_cloud))\n- `bitbucket_server` (Block List, Max: 1) Use the Bitbucket Server API (1.0) to scan repos in a project. (see [below for nested schema](#nestedblock--spec--generator--scm_provider--bitbucket_server))\n- `clone_protocol` (String) Which protocol to use for the SCM URL. Default is provider-specific but ssh if possible. Not all providers necessarily support all protocols.\n- `filter` (Block List) Filters for which repos should be considered. (see [below for nested schema](#nestedblock--spec--generator--scm_provider--filter))\n- `gitea` (Block List, Max: 1) Gitea mode uses the Gitea API to scan organizations in your instance. (see [below for nested schema](#nestedblock--spec--generator--scm_provider--gitea))\n- `github` (Block List, Max: 1) Uses the GitHub API to scan an organization in either github.com or GitHub Enterprise. (see [below for nested schema](#nestedblock--spec--generator--scm_provider--github))\n- `gitlab` (Block List, Max: 1) Uses the GitLab API to scan and organization in either gitlab.com or self-hosted GitLab. (see [below for nested schema](#nestedblock--spec--generator--scm_provider--gitlab))\n- `requeue_after_seconds` (String) How often to check for changes (in seconds). Default: 3min.\n- `template` (Block List, Max: 1) Generator template. Used to override the values of the spec-level template. (see [below for nested schema](#nestedblock--spec--generator--scm_provider--template))\n\n<a id=\"nestedblock--spec--generator--scm_provider--azure_devops\"></a>\n### Nested Schema for `spec.generator.scm_provider.azure_devops`\n\nRequired:\n\n- `organization` (String) Azure Devops organization. E.g. \"my-organization\".\n- `team_project` (String) Azure Devops team project. E.g. \"my-team\".\n\nOptional:\n\n- `access_token_ref` (Block List, Max: 1) The Personal Access Token (PAT) to use when connecting. (see [below for nested schema](#nestedblock--spec--generator--scm_provider--azure_devops--access_token_ref))\n- `all_branches` (Boolean) Scan all branches instead of just the default branch.\n- `api` (String) The URL to Azure DevOps. Defaults to https://dev.azure.com.\n\n<a id=\"nestedblock--spec--generator--scm_provider--azure_devops--access_token_ref\"></a>\n### Nested Schema for `spec.generator.scm_provider.azure_devops.access_token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--scm_provider--bitbucket_cloud\"></a>\n### Nested Schema for `spec.generator.scm_provider.bitbucket_cloud`\n\nRequired:\n\n- `owner` (String) Bitbucket workspace to scan.\n- `user` (String) Bitbucket user to use when authenticating. Should have a \"member\" role to be able to read all repositories and branches.\n\nOptional:\n\n- `all_branches` (Boolean) Scan all branches instead of just the default branch.\n- `app_password_ref` (Block List, Max: 1) The app password to use for the user. See: https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/. (see [below for nested schema](#nestedblock--spec--generator--scm_provider--bitbucket_cloud--app_password_ref))\n\n<a id=\"nestedblock--spec--generator--scm_provider--bitbucket_cloud--app_password_ref\"></a>\n### Nested Schema for `spec.generator.scm_provider.bitbucket_cloud.app_password_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--scm_provider--bitbucket_server\"></a>\n### Nested Schema for `spec.generator.scm_provider.bitbucket_server`\n\nRequired:\n\n- `api` (String) The Bitbucket REST API URL to talk to e.g. https://bitbucket.org/rest.\n- `project` (String) Project to scan.\n\nOptional:\n\n- `all_branches` (Boolean) Scan all branches instead of just the default branch.\n- `basic_auth` (Block List, Max: 1) Credentials for Basic auth. (see [below for nested schema](#nestedblock--spec--generator--scm_provider--bitbucket_server--basic_auth))\n\n<a id=\"nestedblock--spec--generator--scm_provider--bitbucket_server--basic_auth\"></a>\n### Nested Schema for `spec.generator.scm_provider.bitbucket_server.basic_auth`\n\nOptional:\n\n- `password_ref` (Block List, Max: 1) Password (or personal access token) reference. (see [below for nested schema](#nestedblock--spec--generator--scm_provider--bitbucket_server--basic_auth--password_ref))\n- `username` (String) Username for Basic auth.\n\n<a id=\"nestedblock--spec--generator--scm_provider--bitbucket_server--basic_auth--password_ref\"></a>\n### Nested Schema for `spec.generator.scm_provider.bitbucket_server.basic_auth.password_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n\n<a id=\"nestedblock--spec--generator--scm_provider--filter\"></a>\n### Nested Schema for `spec.generator.scm_provider.filter`\n\nOptional:\n\n- `branch_match` (String) A regex which must match the branch name.\n- `label_match` (String) A regex which must match at least one label.\n- `paths_do_not_exist` (List of String) An array of paths, all of which must not exist.\n- `paths_exist` (List of String) An array of paths, all of which must exist.\n- `repository_match` (String) A regex for repo names.\n\n\n<a id=\"nestedblock--spec--generator--scm_provider--gitea\"></a>\n### Nested Schema for `spec.generator.scm_provider.gitea`\n\nRequired:\n\n- `owner` (String) Gitea organization or user to scan.\n\nOptional:\n\n- `all_branches` (Boolean) Scan all branches instead of just the default branch.\n- `api` (String) The Gitea URL to talk to. For example https://gitea.mydomain.com/.\n- `insecure` (Boolean) Allow self-signed TLS / Certificates.\n- `token_ref` (Block List, Max: 1) Authentication token reference. (see [below for nested schema](#nestedblock--spec--generator--scm_provider--gitea--token_ref))\n\n<a id=\"nestedblock--spec--generator--scm_provider--gitea--token_ref\"></a>\n### Nested Schema for `spec.generator.scm_provider.gitea.token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--scm_provider--github\"></a>\n### Nested Schema for `spec.generator.scm_provider.github`\n\nRequired:\n\n- `organization` (String) GitHub org to scan.\n\nOptional:\n\n- `all_branches` (Boolean) If true, scan every branch of every repository. If false, scan only the default branch.\n- `api` (String) The GitHub API URL to talk to. Default https://api.github.com/.\n- `app_secret_name` (String) Reference to a GitHub App repo-creds secret. Uses a GitHub App to access the API instead of a PAT.\n- `token_ref` (Block List, Max: 1) Authentication token reference. (see [below for nested schema](#nestedblock--spec--generator--scm_provider--github--token_ref))\n\n<a id=\"nestedblock--spec--generator--scm_provider--github--token_ref\"></a>\n### Nested Schema for `spec.generator.scm_provider.github.token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--scm_provider--gitlab\"></a>\n### Nested Schema for `spec.generator.scm_provider.gitlab`\n\nRequired:\n\n- `group` (String) Gitlab group to scan. You can use either the project id (recommended) or the full namespaced path.\n\nOptional:\n\n- `all_branches` (Boolean) If true, scan every branch of every repository. If false, scan only the default branch.\n- `api` (String) The Gitlab API URL to talk to.\n- `include_subgroups` (Boolean) Recurse through subgroups (true) or scan only the base group (false). Defaults to `false`.\n- `token_ref` (Block List, Max: 1) Authentication token reference. (see [below for nested schema](#nestedblock--spec--generator--scm_provider--gitlab--token_ref))\n\n<a id=\"nestedblock--spec--generator--scm_provider--gitlab--token_ref\"></a>\n### Nested Schema for `spec.generator.scm_provider.gitlab.token_ref`\n\nRequired:\n\n- `key` (String) Key containing information in Kubernetes `Secret`.\n- `secret_name` (String) Name of Kubernetes `Secret`.\n\n\n\n<a id=\"nestedblock--spec--generator--scm_provider--template\"></a>\n### Nested Schema for `spec.generator.scm_provider.template`\n\nOptional:\n\n- `metadata` (Block List, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--generator--scm_provider--template--metadata))\n- `spec` (Block List, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--generator--scm_provider--template--spec))\n\n<a id=\"nestedblock--spec--generator--scm_provider--template--metadata\"></a>\n### Nested Schema for `spec.generator.scm_provider.template.metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `name` (String) Name of the resulting Application\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--generator--scm_provider--template--spec\"></a>\n### Nested Schema for `spec.generator.scm_provider.template.spec`\n\nOptional:\n\n- `destination` (Block Set, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--generator--scm_provider--template--spec--destination))\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--generator--scm_provider--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--generator--scm_provider--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `source` (Block List) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--generator--scm_provider--template--spec--source))\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--generator--scm_provider--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--generator--scm_provider--template--spec--destination\"></a>\n### Nested Schema for `spec.generator.scm_provider.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--generator--scm_provider--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.generator.scm_provider.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--generator--scm_provider--template--spec--info\"></a>\n### Nested Schema for `spec.generator.scm_provider.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--generator--scm_provider--template--spec--source\"></a>\n### Nested Schema for `spec.generator.scm_provider.template.spec.source`\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--generator--scm_provider--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--generator--scm_provider--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--generator--scm_provider--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--generator--scm_provider--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--generator--scm_provider--template--spec--source--directory\"></a>\n### Nested Schema for `spec.generator.scm_provider.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--generator--scm_provider--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--generator--scm_provider--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.generator.scm_provider.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--generator--scm_provider--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--generator--scm_provider--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--generator--scm_provider--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.generator.scm_provider.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--generator--scm_provider--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.generator.scm_provider.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--scm_provider--template--spec--source--helm\"></a>\n### Nested Schema for `spec.generator.scm_provider.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--generator--scm_provider--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--generator--scm_provider--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--generator--scm_provider--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.generator.scm_provider.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--generator--scm_provider--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.generator.scm_provider.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--generator--scm_provider--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.generator.scm_provider.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--generator--scm_provider--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--generator--scm_provider--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.generator.scm_provider.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--generator--scm_provider--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--generator--scm_provider--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.generator.scm_provider.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--generator--scm_provider--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.generator.scm_provider.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--generator--scm_provider--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--generator--scm_provider--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.generator.scm_provider.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--generator--scm_provider--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.generator.scm_provider.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--generator--scm_provider--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--generator--scm_provider--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--generator--scm_provider--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--generator--scm_provider--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.generator.scm_provider.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--generator--scm_provider--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.generator.scm_provider.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--generator--scm_provider--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.generator.scm_provider.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--generator--scm_provider--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--generator--scm_provider--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.generator.scm_provider.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n\n<a id=\"nestedblock--spec--generator--selector\"></a>\n### Nested Schema for `spec.generator.selector`\n\nOptional:\n\n- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--generator--selector--match_expressions))\n- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.\n\n<a id=\"nestedblock--spec--generator--selector--match_expressions\"></a>\n### Nested Schema for `spec.generator.selector.match_expressions`\n\nOptional:\n\n- `key` (String) The label key that the selector applies to.\n- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`.\n- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch.\n\n\n\n\n<a id=\"nestedblock--spec--template\"></a>\n### Nested Schema for `spec.template`\n\nRequired:\n\n- `metadata` (Block List, Min: 1, Max: 1) Kubernetes object metadata for templated Application. (see [below for nested schema](#nestedblock--spec--template--metadata))\n- `spec` (Block List, Min: 1, Max: 1) The application specification. (see [below for nested schema](#nestedblock--spec--template--spec))\n\n<a id=\"nestedblock--spec--template--metadata\"></a>\n### Nested Schema for `spec.template.metadata`\n\nRequired:\n\n- `name` (String) Name of the resulting Application\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map that may be used to store arbitrary metadata for the resulting Application.\n- `finalizers` (List of String) List of finalizers to apply to the resulting Application.\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resulting Application.\n- `namespace` (String) Namespace of the resulting Application\n\n\n<a id=\"nestedblock--spec--template--spec\"></a>\n### Nested Schema for `spec.template.spec`\n\nRequired:\n\n- `destination` (Block Set, Min: 1, Max: 1) Reference to the Kubernetes server and namespace in which the application will be deployed. (see [below for nested schema](#nestedblock--spec--template--spec--destination))\n- `source` (Block List, Min: 1) Location of the application's manifests or chart. (see [below for nested schema](#nestedblock--spec--template--spec--source))\n\nOptional:\n\n- `ignore_difference` (Block List) Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. (see [below for nested schema](#nestedblock--spec--template--spec--ignore_difference))\n- `info` (Block Set) List of information (URLs, email addresses, and plain text) that relates to the application. (see [below for nested schema](#nestedblock--spec--template--spec--info))\n- `project` (String) The project the application belongs to. Defaults to `default`.\n- `revision_history_limit` (Number) Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\n- `sync_policy` (Block List, Max: 1) Controls when and how a sync will be performed. (see [below for nested schema](#nestedblock--spec--template--spec--sync_policy))\n\n<a id=\"nestedblock--spec--template--spec--destination\"></a>\n### Nested Schema for `spec.template.spec.destination`\n\nOptional:\n\n- `name` (String) Name of the target cluster. Can be used instead of `server`.\n- `namespace` (String) Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--template--spec--source\"></a>\n### Nested Schema for `spec.template.spec.source`\n\nRequired:\n\n- `repo_url` (String) URL to the repository (Git or Helm) that contains the application manifests.\n\nOptional:\n\n- `chart` (String) Helm chart name. Must be specified for applications sourced from a Helm repo.\n- `directory` (Block List, Max: 1) Path/directory specific options. (see [below for nested schema](#nestedblock--spec--template--spec--source--directory))\n- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--spec--template--spec--source--helm))\n- `kustomize` (Block List, Max: 1) Kustomize specific options. (see [below for nested schema](#nestedblock--spec--template--spec--source--kustomize))\n- `name` (String) Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\n- `path` (String) Directory path within the repository. Only valid for applications sourced from Git.\n- `plugin` (Block List, Max: 1) Config management plugin specific options. (see [below for nested schema](#nestedblock--spec--template--spec--source--plugin))\n- `ref` (String) Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\n- `target_revision` (String) Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\n\n<a id=\"nestedblock--spec--template--spec--source--directory\"></a>\n### Nested Schema for `spec.template.spec.source.directory`\n\nOptional:\n\n- `exclude` (String) Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\n- `include` (String) Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\n- `jsonnet` (Block List, Max: 1) Jsonnet specific options. (see [below for nested schema](#nestedblock--spec--template--spec--source--directory--jsonnet))\n- `recurse` (Boolean) Whether to scan a directory recursively for manifests.\n\n<a id=\"nestedblock--spec--template--spec--source--directory--jsonnet\"></a>\n### Nested Schema for `spec.template.spec.source.directory.jsonnet`\n\nOptional:\n\n- `ext_var` (Block List) List of Jsonnet External Variables. (see [below for nested schema](#nestedblock--spec--template--spec--source--directory--jsonnet--ext_var))\n- `libs` (List of String) Additional library search dirs.\n- `tla` (Block Set) List of Jsonnet Top-level Arguments (see [below for nested schema](#nestedblock--spec--template--spec--source--directory--jsonnet--tla))\n\n<a id=\"nestedblock--spec--template--spec--source--directory--jsonnet--ext_var\"></a>\n### Nested Schema for `spec.template.spec.source.directory.jsonnet.ext_var`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n<a id=\"nestedblock--spec--template--spec--source--directory--jsonnet--tla\"></a>\n### Nested Schema for `spec.template.spec.source.directory.jsonnet.tla`\n\nOptional:\n\n- `code` (Boolean) Determines whether the variable should be evaluated as jsonnet code or treated as string.\n- `name` (String) Name of Jsonnet variable.\n- `value` (String) Value of Jsonnet variable.\n\n\n\n\n<a id=\"nestedblock--spec--template--spec--source--helm\"></a>\n### Nested Schema for `spec.template.spec.source.helm`\n\nOptional:\n\n- `file_parameter` (Block Set) File parameters for the helm template. (see [below for nested schema](#nestedblock--spec--template--spec--source--helm--file_parameter))\n- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\n- `parameter` (Block Set) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--spec--template--spec--source--helm--parameter))\n- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\n- `release_name` (String) Helm release name. If omitted it will use the application name.\n- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\n- `skip_schema_validation` (Boolean) Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\n- `value_files` (List of String) List of Helm value files to use when generating a template.\n- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.\n- `version` (String) The Helm version to use for templating. Accepts either `v2` or `v3`\n\n<a id=\"nestedblock--spec--template--spec--source--helm--file_parameter\"></a>\n### Nested Schema for `spec.template.spec.source.helm.file_parameter`\n\nRequired:\n\n- `name` (String) Name of the Helm parameter.\n- `path` (String) Path to the file containing the values for the Helm parameter.\n\n\n<a id=\"nestedblock--spec--template--spec--source--helm--parameter\"></a>\n### Nested Schema for `spec.template.spec.source.helm.parameter`\n\nOptional:\n\n- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.\n- `name` (String) Name of the Helm parameter.\n- `value` (String) Value of the Helm parameter.\n\n\n\n<a id=\"nestedblock--spec--template--spec--source--kustomize\"></a>\n### Nested Schema for `spec.template.spec.source.kustomize`\n\nOptional:\n\n- `common_annotations` (Map of String) List of additional annotations to add to rendered manifests.\n- `common_labels` (Map of String) List of additional labels to add to rendered manifests.\n- `images` (Set of String) List of Kustomize image override specifications.\n- `name_prefix` (String) Prefix appended to resources for Kustomize apps.\n- `name_suffix` (String) Suffix appended to resources for Kustomize apps.\n- `patches` (Block List) A list of [Kustomize patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) to apply. (see [below for nested schema](#nestedblock--spec--template--spec--source--kustomize--patches))\n- `version` (String) Version of Kustomize to use for rendering manifests.\n\n<a id=\"nestedblock--spec--template--spec--source--kustomize--patches\"></a>\n### Nested Schema for `spec.template.spec.source.kustomize.patches`\n\nRequired:\n\n- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--template--spec--source--kustomize--patches--target))\n\nOptional:\n\n- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).\n- `patch` (String) Inline Kustomize patch to apply.\n- `path` (String) Path to a file containing the patch to apply.\n\n<a id=\"nestedblock--spec--template--spec--source--kustomize--patches--target\"></a>\n### Nested Schema for `spec.template.spec.source.kustomize.patches.target`\n\nOptional:\n\n- `annotation_selector` (String) Annotation selector to use when matching the Kubernetes resource.\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `label_selector` (String) Label selector to use when matching the Kubernetes resource.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n- `version` (String) The Kubernetes resource Version to match for.\n\n\n\n\n<a id=\"nestedblock--spec--template--spec--source--plugin\"></a>\n### Nested Schema for `spec.template.spec.source.plugin`\n\nOptional:\n\n- `env` (Block Set) Environment variables passed to the plugin. (see [below for nested schema](#nestedblock--spec--template--spec--source--plugin--env))\n- `name` (String) Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\n\n<a id=\"nestedblock--spec--template--spec--source--plugin--env\"></a>\n### Nested Schema for `spec.template.spec.source.plugin.env`\n\nOptional:\n\n- `name` (String) Name of the environment variable.\n- `value` (String) Value of the environment variable.\n\n\n\n\n<a id=\"nestedblock--spec--template--spec--ignore_difference\"></a>\n### Nested Schema for `spec.template.spec.ignore_difference`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `jq_path_expressions` (Set of String) List of JQ path expression strings targeting the field(s) to ignore.\n- `json_pointers` (Set of String) List of JSONPaths strings targeting the field(s) to ignore.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `managed_fields_managers` (Set of String) List of external controller manager names whose changes to fields should be ignored.\n- `name` (String) The Kubernetes resource Name to match for.\n- `namespace` (String) The Kubernetes resource Namespace to match for.\n\n\n<a id=\"nestedblock--spec--template--spec--info\"></a>\n### Nested Schema for `spec.template.spec.info`\n\nOptional:\n\n- `name` (String) Name of the information.\n- `value` (String) Value of the information.\n\n\n<a id=\"nestedblock--spec--template--spec--sync_policy\"></a>\n### Nested Schema for `spec.template.spec.sync_policy`\n\nOptional:\n\n- `automated` (Block Set, Max: 1) Whether to automatically keep an application synced to the target revision. (see [below for nested schema](#nestedblock--spec--template--spec--sync_policy--automated))\n- `managed_namespace_metadata` (Block List, Max: 1) Controls metadata in the given namespace (if `CreateNamespace=true`). (see [below for nested schema](#nestedblock--spec--template--spec--sync_policy--managed_namespace_metadata))\n- `retry` (Block List, Max: 1) Controls failed sync retry behavior. (see [below for nested schema](#nestedblock--spec--template--spec--sync_policy--retry))\n- `sync_options` (List of String) List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\n\n<a id=\"nestedblock--spec--template--spec--sync_policy--automated\"></a>\n### Nested Schema for `spec.template.spec.sync_policy.automated`\n\nOptional:\n\n- `allow_empty` (Boolean) Allows apps have zero live resources.\n- `prune` (Boolean) Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\n- `self_heal` (Boolean) Whether to revert resources back to their desired state upon modification in the cluster.\n\n\n<a id=\"nestedblock--spec--template--spec--sync_policy--managed_namespace_metadata\"></a>\n### Nested Schema for `spec.template.spec.sync_policy.managed_namespace_metadata`\n\nOptional:\n\n- `annotations` (Map of String) Annotations to apply to the namespace.\n- `labels` (Map of String) Labels to apply to the namespace.\n\n\n<a id=\"nestedblock--spec--template--spec--sync_policy--retry\"></a>\n### Nested Schema for `spec.template.spec.sync_policy.retry`\n\nOptional:\n\n- `backoff` (Block Set, Max: 1) Controls how to backoff on subsequent retries of failed syncs. (see [below for nested schema](#nestedblock--spec--template--spec--sync_policy--retry--backoff))\n- `limit` (String) Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\n\n<a id=\"nestedblock--spec--template--spec--sync_policy--retry--backoff\"></a>\n### Nested Schema for `spec.template.spec.sync_policy.retry.backoff`\n\nOptional:\n\n- `duration` (String) Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n- `factor` (String) Factor to multiply the base duration after each failed retry.\n- `max_duration` (String) Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\n\n\n\n\n\n\n<a id=\"nestedblock--spec--ignore_application_differences\"></a>\n### Nested Schema for `spec.ignore_application_differences`\n\nOptional:\n\n- `jq_path_expressions` (Set of String) jq path to ignore differences\n- `json_pointers` (Set of String) Json pointers to ignore differences\n- `name` (String) name\n\n\n<a id=\"nestedblock--spec--strategy\"></a>\n### Nested Schema for `spec.strategy`\n\nRequired:\n\n- `type` (String) Type of progressive sync.\n\nOptional:\n\n- `rolling_sync` (Block List) Update strategy allowing you to group Applications by labels present on the generated Application resources. When the ApplicationSet changes, the changes will be applied to each group of Application resources sequentially. (see [below for nested schema](#nestedblock--spec--strategy--rolling_sync))\n\n<a id=\"nestedblock--spec--strategy--rolling_sync\"></a>\n### Nested Schema for `spec.strategy.rolling_sync`\n\nRequired:\n\n- `step` (Block List, Min: 1) Configuration used to define which applications to include in each stage of the rolling sync. All Applications in each group must become Healthy before the ApplicationSet controller will proceed to update the next group of Applications. (see [below for nested schema](#nestedblock--spec--strategy--rolling_sync--step))\n\n<a id=\"nestedblock--spec--strategy--rolling_sync--step\"></a>\n### Nested Schema for `spec.strategy.rolling_sync.step`\n\nOptional:\n\n- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--strategy--rolling_sync--step--match_expressions))\n- `max_update` (String) Maximum number of simultaneous Application updates in a group. Supports both integer and percentage string values (rounds down, but floored at 1 Application for >0%). Default is 100%, unbounded.\n\n<a id=\"nestedblock--spec--strategy--rolling_sync--step--match_expressions\"></a>\n### Nested Schema for `spec.strategy.rolling_sync.step.match_expressions`\n\nOptional:\n\n- `key` (String) The label key that the selector applies to.\n- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`.\n- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch.\n\n\n\n\n\n<a id=\"nestedblock--spec--sync_policy\"></a>\n### Nested Schema for `spec.sync_policy`\n\nOptional:\n\n- `applications_sync` (String) Represents the policy applied on the generated applications. Possible values are create-only, create-update, create-delete, and sync.\n- `preserve_resources_on_deletion` (Boolean) Label selector used to narrow the scope of targeted clusters.\n"
  },
  {
    "path": "docs/resources/cluster.md",
    "content": "---\n# generated by https://github.com/hashicorp/terraform-plugin-docs\npage_title: \"argocd_cluster Resource - terraform-provider-argocd\"\nsubcategory: \"\"\ndescription: |-\n  Manages clusters https://argo-cd.readthedocs.io/en/stable/operator-manual/declarative-setup/#clusters within ArgoCD.\n---\n\n# argocd_cluster (Resource)\n\nManages [clusters](https://argo-cd.readthedocs.io/en/stable/operator-manual/declarative-setup/#clusters) within ArgoCD.\n\n## Example Usage\n\n```terraform\n## Bearer token Authentication\nresource \"argocd_cluster\" \"kubernetes\" {\n  server = \"https://1.2.3.4:12345\"\n\n  config {\n    bearer_token = \"eyJhbGciOiJSUzI...\"\n\n    tls_client_config {\n      ca_data = file(\"path/to/ca.pem\")\n      // ca_data = \"-----BEGIN CERTIFICATE-----\\nfoo\\nbar\\n-----END CERTIFICATE-----\"\n      // ca_data = base64decode(\"LS0tLS1CRUdJTiBDRVJUSUZ...\")\n      // insecure = true\n    }\n  }\n}\n\n## GCP GKE cluster\ndata \"google_container_cluster\" \"cluster\" {\n  name     = \"cluster\"\n  location = \"europe-west1\"\n}\n\nresource \"kubernetes_service_account\" \"argocd_manager\" {\n  metadata {\n    name      = \"argocd-manager\"\n    namespace = \"kube-system\"\n  }\n}\n\nresource \"kubernetes_cluster_role\" \"argocd_manager\" {\n  metadata {\n    name = \"argocd-manager-role\"\n  }\n\n  rule {\n    api_groups = [\"*\"]\n    resources  = [\"*\"]\n    verbs      = [\"*\"]\n  }\n\n  rule {\n    non_resource_urls = [\"*\"]\n    verbs             = [\"*\"]\n  }\n}\n\nresource \"kubernetes_cluster_role_binding\" \"argocd_manager\" {\n  metadata {\n    name = \"argocd-manager-role-binding\"\n  }\n\n  role_ref {\n    api_group = \"rbac.authorization.k8s.io\"\n    kind      = \"ClusterRole\"\n    name      = kubernetes_cluster_role.argocd_manager.metadata.0.name\n  }\n\n  subject {\n    kind      = \"ServiceAccount\"\n    name      = kubernetes_service_account.argocd_manager.metadata.0.name\n    namespace = kubernetes_service_account.argocd_manager.metadata.0.namespace\n  }\n}\n\ndata \"kubernetes_secret\" \"argocd_manager\" {\n  metadata {\n    name      = kubernetes_service_account.argocd_manager.default_secret_name\n    namespace = kubernetes_service_account.argocd_manager.metadata.0.namespace\n  }\n}\n\nresource \"argocd_cluster\" \"gke\" {\n  server = format(\"https://%s\", data.google_container_cluster.cluster.endpoint)\n  name   = \"gke\"\n\n  config {\n    bearer_token = data.kubernetes_secret.argocd_manager.data[\"token\"]\n    tls_client_config {\n      ca_data = base64decode(data.google_container_cluster.cluster.master_auth.0.cluster_ca_certificate)\n    }\n  }\n}\n\n## AWS EKS cluster\ndata \"aws_eks_cluster\" \"cluster\" {\n  name = \"cluster\"\n}\n\nresource \"argocd_cluster\" \"eks\" {\n  server     = format(\"https://%s\", data.aws_eks_cluster.cluster.endpoint)\n  name       = \"eks\"\n  namespaces = [\"default\", \"optional\"]\n\n  config {\n    aws_auth_config {\n      cluster_name = \"myekscluster\"\n      role_arn     = \"arn:aws:iam::<123456789012>:role/<role-name>\"\n    }\n    tls_client_config {\n      ca_data = base64decode(data.aws_eks_cluster.cluster.certificate_authority[0].data)\n    }\n  }\n}\n```\n\n<!-- schema generated by tfplugindocs -->\n## Schema\n\n### Required\n\n- `config` (Block List, Min: 1, Max: 1) Cluster information for connecting to a cluster. (see [below for nested schema](#nestedblock--config))\n\n### Optional\n\n- `metadata` (Block List, Max: 2) Standard cluster secret's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata))\n- `name` (String) Name of the cluster. If omitted, will use the server address.\n- `namespaces` (List of String) List of namespaces which are accessible in that cluster. Cluster level resources would be ignored if namespace list is not empty.\n- `project` (String) Reference between project and cluster that allow you automatically to be added as item inside Destinations project entity. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/projects/#project-scoped-repositories-and-clusters.\n- `server` (String) Server is the API server URL of the Kubernetes cluster.\n- `shard` (String) Optional shard number. Calculated on the fly by the application controller if not specified.\n\n### Read-Only\n\n- `id` (String) The ID of this resource.\n- `info` (List of Object) Information about cluster cache and state. (see [below for nested schema](#nestedatt--info))\n\n<a id=\"nestedblock--config\"></a>\n### Nested Schema for `config`\n\nOptional:\n\n- `aws_auth_config` (Block List) (see [below for nested schema](#nestedblock--config--aws_auth_config))\n- `bearer_token` (String, Sensitive) Server requires Bearer authentication. The client will not attempt to use refresh tokens for an OAuth2 flow.\n- `exec_provider_config` (Block List, Max: 1) Configuration for an exec provider used to call an external command to perform cluster authentication See: https://godoc.org/k8s.io/client-go/tools/clientcmd/api#ExecConfig. (see [below for nested schema](#nestedblock--config--exec_provider_config))\n- `password` (String, Sensitive) Password for servers that require Basic authentication.\n- `tls_client_config` (Block List, Max: 1) Settings to enable transport layer security when connecting to the cluster. (see [below for nested schema](#nestedblock--config--tls_client_config))\n- `username` (String) Username for servers that require Basic authentication.\n\n<a id=\"nestedblock--config--aws_auth_config\"></a>\n### Nested Schema for `config.aws_auth_config`\n\nOptional:\n\n- `cluster_name` (String) AWS cluster name.\n- `role_arn` (String) IAM role ARN. If set then AWS IAM Authenticator assume a role to perform cluster operations instead of the default AWS credential provider chain.\n\n\n<a id=\"nestedblock--config--exec_provider_config\"></a>\n### Nested Schema for `config.exec_provider_config`\n\nOptional:\n\n- `api_version` (String) Preferred input version of the ExecInfo\n- `args` (List of String, Sensitive) Arguments to pass to the command when executing it\n- `command` (String) Command to execute\n- `env` (Map of String, Sensitive) Env defines additional environment variables to expose to the process. Passed as a map of strings\n- `install_hint` (String) This text is shown to the user when the executable doesn't seem to be present\n\n\n<a id=\"nestedblock--config--tls_client_config\"></a>\n### Nested Schema for `config.tls_client_config`\n\nOptional:\n\n- `ca_data` (String) PEM-encoded bytes (typically read from a root certificates bundle).\n- `cert_data` (String) PEM-encoded bytes (typically read from a client certificate file).\n- `insecure` (Boolean) Whether server should be accessed without verifying the TLS certificate.\n- `key_data` (String, Sensitive) PEM-encoded bytes (typically read from a client certificate key file).\n- `server_name` (String) Name to pass to the server for SNI and used in the client to check server certificates against. If empty, the hostname used to contact the server is used.\n\n\n\n<a id=\"nestedblock--metadata\"></a>\n### Nested Schema for `metadata`\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map stored with the cluster secret that may be used to store arbitrary metadata. More info: http://kubernetes.io/docs/user-guide/annotations\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the cluster secret. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels\n\n\n<a id=\"nestedatt--info\"></a>\n### Nested Schema for `info`\n\nRead-Only:\n\n- `applications_count` (String)\n- `connection_state` (List of Object) (see [below for nested schema](#nestedobjatt--info--connection_state))\n- `server_version` (String)\n\n<a id=\"nestedobjatt--info--connection_state\"></a>\n### Nested Schema for `info.connection_state`\n\nRead-Only:\n\n- `message` (String)\n- `status` (String)\n\n## Import\n\nImport is supported using the following syntax:\n\nThe [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:\n\n```shell\n# Cluster credentials can be imported using the server URL.\n\nterraform import argocd_cluster.mycluster https://mycluster.io:443\n```\n"
  },
  {
    "path": "docs/resources/gpg_key.md",
    "content": "---\n# generated by https://github.com/hashicorp/terraform-plugin-docs\npage_title: \"argocd_gpg_key Resource - terraform-provider-argocd\"\nsubcategory: \"\"\ndescription: |-\n  Manages GPG keys https://argo-cd.readthedocs.io/en/stable/user-guide/gpg-verification/ within ArgoCD.\n---\n\n# argocd_gpg_key (Resource)\n\nManages [GPG keys](https://argo-cd.readthedocs.io/en/stable/user-guide/gpg-verification/) within ArgoCD.\n\n## Example Usage\n\n```terraform\nresource \"argocd_gpg_key\" \"this\" {\n  public_key = <<EOF\n-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQINBGSJdlcBEACnza+KvWLyKWUHJPhgs//HRL0EEmA/EcFKioBlrgPNYf/O7hNg\nKT3NDaNrD26pr+bOb4mfaqNNS9no8b9EP3C7Co3Wf2d4xpJ5/hlpIm3V652S5daZ\nI7ylVT8QOrhaqEnHH2hEcOfDaqjrYfrx3qiI8v7DmV6jfGi1tDUUgfJwiOyZk4q1\njiPo5k4+XNp9mCtUAGyidLFcUqQ9XbHKgBwgAoxtIKNSbdPCGhsjgTHHhzswMH/Z\nDhhtcraqrfOhoP9lI4/zyCS+B9OfUy7BS/1SqWKIgdsjFIR+zHIOI69lh77+ZAVE\nMVYJBdFke5/g/tTPaQGuBqaIJ3d/Mi/ZlbTsoBcq5qam73uh7fcgBV5la6NeuNcR\ntvKMVl4DlnkJS8LBtElLEeHEylTCdNltrUFwshDKDBtq6ilTKCK14R6g4lkn8VcE\n9xx7Mhdh77tp66FRZ6ge1E8EUEFwEeFhp240KRyaA5U1/kAarn8083zZ7d4+QObp\nL4KMqgrwLaxyPLgu0J/f946qLewV7XsbZRXE1jQa9Z7W5TEoJwjcC79DXe1wChc6\ncBfCtluDsnklwvldpKTEZU0q/hKE6Zt7NjLUyExV+5guoHllxoVxx7sh+jtKm/J+\n5gh+B3xOTDxRV2XYIx1TM6U1iLxAqchzFec8dfkuTbs/5f++PrddvZfiUQARAQAB\ntD1BcmdvQ0QgVGVycmFmb3JtIFByb3ZpZGVyIDxmYWtldXNlckB1c2Vycy5ub3Jl\ncGx5LmdpdGh1Yi5jb20+iQJOBBMBCgA4FiEEvK9bNlncXDhFAk6kmtkpVUAdOI0F\nAmSJdlcCGwMFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQmtkpVUAdOI2FdA//\nYuFYsX6SUVgI4l68ZHE34jLTWU5R2ujB6luErcguAlLyDtrD3melva3V/ETc69/1\n5o7Ayn3a7uz5lCEvUSLsCN+V2o3EjrA81pt8Zs+Z9WYeZE5F5DnKzq81PObdASB7\nPo2X0qLqqKIhpQxc/E7m26xmePCf82H36gtvPiEVmVA5yduk1lLG3aZtNIRCa4VK\ngmDjR8Se+OZeAw7JQCOeJB9/Y8oQ8nVkj1SWNIICaUwIXHtrj7r1z6XTDAEkGeBg\nHXW8IEhZDE1Nq3vQtZvgwftEoPT/Ff+8DwvL1JUov2ObQDolallzKaiiVfGZhPJZ\n4PMtEPEmSL9QWJAG5jiBVC3BdVZtXBNkC1HqTCXwZc/wzp5O9MmMXmCrUFr4FfHu\nIZ560MNpp/SrtUrOahLmvuG0B+Ze96e2nm5ap5wkCDaQouOIqM7Lj+FGq64cu2B/\noSsl7joBZQUYXv8meNOQssm6jArRLG2oFoiEdRqzd2/RjvvJliLN9OCNvV43f38h\n8Ep8RDi9RiHhSKvwrvDD9x/JRm6zQUetjrctmjdIYp8k129LrD0Qr9ULXfphZdrv\nxga7/lyQLmukLu7Mxwp+ss2bY/wjT8mlT5P55kBpXXyYILhLsUESCHG6D8/Ov+vv\nOoZS+BSfe/0vc1aTfDKxj5wAx27a6z5o25X27feEl3U=\n=kqkH\n-----END PGP PUBLIC KEY BLOCK-----\nEOF\n}\n```\n\n<!-- schema generated by tfplugindocs -->\n## Schema\n\n### Required\n\n- `public_key` (String) Raw key data of the GPG key to create\n\n### Read-Only\n\n- `fingerprint` (String) Fingerprint is the fingerprint of the key\n- `id` (String) GPG key identifier\n- `owner` (String) Owner holds the owner identification, e.g. a name and e-mail address\n- `sub_type` (String) SubType holds the key's sub type (e.g. rsa4096)\n- `trust` (String) Trust holds the level of trust assigned to this key\n\n## Import\n\nImport is supported using the following syntax:\n\nThe [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:\n\n```shell\n# GPG Keys can be imported using the key ID.\n\nterraform import argocd_gpg_key.this 9AD92955401D388D\n```\n"
  },
  {
    "path": "docs/resources/project.md",
    "content": "---\n# generated by https://github.com/hashicorp/terraform-plugin-docs\npage_title: \"argocd_project Resource - terraform-provider-argocd\"\nsubcategory: \"\"\ndescription: |-\n  Manages projects https://argo-cd.readthedocs.io/en/stable/user-guide/projects/ within ArgoCD.\n---\n\n# argocd_project (Resource)\n\nManages [projects](https://argo-cd.readthedocs.io/en/stable/user-guide/projects/) within ArgoCD.\n\n## Example Usage\n\n```terraform\nresource \"argocd_project\" \"myproject\" {\n  metadata {\n    name      = \"myproject\"\n    namespace = \"argocd\"\n    labels = {\n      acceptance = \"true\"\n    }\n    annotations = {\n      \"this.is.a.really.long.nested.key\" = \"yes, really!\"\n    }\n  }\n\n  spec {\n    description = \"simple project\"\n\n    source_namespaces = [\"argocd\"]\n    source_repos      = [\"*\"]\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"foo\"\n    }\n    destination {\n      name      = \"anothercluster\"\n      namespace = \"bar\"\n    }\n\n    cluster_resource_blacklist {\n      group = \"*\"\n      kind  = \"*\"\n    }\n    cluster_resource_whitelist {\n      group = \"rbac.authorization.k8s.io\"\n      kind  = \"ClusterRoleBinding\"\n    }\n    cluster_resource_whitelist {\n      group = \"rbac.authorization.k8s.io\"\n      kind  = \"ClusterRole\"\n    }\n\n    namespace_resource_blacklist {\n      group = \"networking.k8s.io\"\n      kind  = \"Ingress\"\n    }\n    namespace_resource_whitelist {\n      group = \"*\"\n      kind  = \"*\"\n    }\n\n    orphaned_resources {\n      warn = true\n\n      ignore {\n        group = \"apps/v1\"\n        kind  = \"Deployment\"\n        name  = \"ignored1\"\n      }\n\n      ignore {\n        group = \"apps/v1\"\n        kind  = \"Deployment\"\n        name  = \"ignored2\"\n      }\n    }\n\n    role {\n      name = \"testrole\"\n      policies = [\n        \"p, proj:myproject:testrole, applications, override, myproject/*, allow\",\n        \"p, proj:myproject:testrole, applications, sync, myproject/*, allow\",\n        \"p, proj:myproject:testrole, clusters, get, myproject/*, allow\",\n        \"p, proj:myproject:testrole, repositories, create, myproject/*, allow\",\n        \"p, proj:myproject:testrole, repositories, delete, myproject/*, allow\",\n        \"p, proj:myproject:testrole, repositories, update, myproject/*, allow\",\n        \"p, proj:myproject:testrole, logs, get, myproject/*, allow\",\n        \"p, proj:myproject:testrole, exec, create, myproject/*, allow\",\n      ]\n    }\n    role {\n      name = \"anotherrole\"\n      policies = [\n        \"p, proj:myproject:testrole, applications, get, myproject/*, allow\",\n        \"p, proj:myproject:testrole, applications, sync, myproject/*, deny\",\n      ]\n    }\n\n    sync_window {\n      kind         = \"allow\"\n      applications = [\"api-*\"]\n      clusters     = [\"*\"]\n      namespaces   = [\"*\"]\n      duration     = \"3600s\"\n      schedule     = \"10 1 * * *\"\n      manual_sync  = true\n    }\n    sync_window {\n      use_and_operator = true\n      kind             = \"deny\"\n      applications     = [\"foo\", \"bar\"]\n      clusters         = [\"in-cluster\"]\n      namespaces       = [\"default\"]\n      duration         = \"12h\"\n      schedule         = \"22 1 5 * *\"\n      manual_sync      = false\n      timezone         = \"Europe/London\"\n    }\n\n    signature_keys = [\n      \"4AEE18F83AFDEB23\",\n      \"07E34825A909B250\"\n    ]\n  }\n}\n```\n\n<!-- schema generated by tfplugindocs -->\n## Schema\n\n### Optional\n\n- `metadata` (Block List) Standard Kubernetes object metadata. For more info see the [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata). (see [below for nested schema](#nestedblock--metadata))\n- `spec` (Block List) ArgoCD AppProject spec. (see [below for nested schema](#nestedblock--spec))\n\n### Read-Only\n\n- `id` (String) Project identifier\n\n<a id=\"nestedblock--metadata\"></a>\n### Nested Schema for `metadata`\n\nRequired:\n\n- `name` (String) Name of the appproject, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\n\nOptional:\n\n- `annotations` (Map of String) An unstructured key value map stored with the appproject that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/\n- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the appproject. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels\n- `namespace` (String) Namespace of the appproject, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/\n\nRead-Only:\n\n- `generation` (Number) A sequence number representing a specific generation of the desired state.\n- `resource_version` (String) An opaque value that represents the internal version of this appproject that can be used by clients to determine when the appproject has changed. Read more: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency\n- `uid` (String) The unique in time and space value for this appproject. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids\n\n\n<a id=\"nestedblock--spec\"></a>\n### Nested Schema for `spec`\n\nOptional:\n\n- `cluster_resource_blacklist` (Block Set) Blacklisted cluster level resources. (see [below for nested schema](#nestedblock--spec--cluster_resource_blacklist))\n- `cluster_resource_whitelist` (Block Set) Whitelisted cluster level resources. (see [below for nested schema](#nestedblock--spec--cluster_resource_whitelist))\n- `description` (String) Project description.\n- `destination` (Block Set) Destinations available for deployment. (see [below for nested schema](#nestedblock--spec--destination))\n- `destination_service_account` (Block Set) Service accounts to be impersonated for the application sync operation for each destination. (see [below for nested schema](#nestedblock--spec--destination_service_account))\n- `namespace_resource_blacklist` (Block Set) Blacklisted namespace level resources. (see [below for nested schema](#nestedblock--spec--namespace_resource_blacklist))\n- `namespace_resource_whitelist` (Block Set) Whitelisted namespace level resources. (see [below for nested schema](#nestedblock--spec--namespace_resource_whitelist))\n- `orphaned_resources` (Block Set) Configuration for orphaned resources tracking. (see [below for nested schema](#nestedblock--spec--orphaned_resources))\n- `role` (Block Set) Project roles. (see [below for nested schema](#nestedblock--spec--role))\n- `signature_keys` (Set of String) Signature keys for verifying the integrity of applications.\n- `source_namespaces` (Set of String) List of source namespaces for applications.\n- `source_repos` (List of String) List of repositories from which applications may be created.\n- `sync_window` (Block Set) Controls when sync operations are allowed for the project. (see [below for nested schema](#nestedblock--spec--sync_window))\n\n<a id=\"nestedblock--spec--cluster_resource_blacklist\"></a>\n### Nested Schema for `spec.cluster_resource_blacklist`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n\n\n<a id=\"nestedblock--spec--cluster_resource_whitelist\"></a>\n### Nested Schema for `spec.cluster_resource_whitelist`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n\n\n<a id=\"nestedblock--spec--destination\"></a>\n### Nested Schema for `spec.destination`\n\nRequired:\n\n- `namespace` (String) Target namespace for applications' resources.\n\nOptional:\n\n- `name` (String) Name of the destination cluster which can be used instead of server.\n- `server` (String) URL of the target cluster and must be set to the Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--destination_service_account\"></a>\n### Nested Schema for `spec.destination_service_account`\n\nRequired:\n\n- `default_service_account` (String) Used for impersonation during the sync operation\n\nOptional:\n\n- `namespace` (String) Specifies the target namespace for the application's resources.\n- `server` (String) Specifies the URL of the target cluster's Kubernetes control plane API.\n\n\n<a id=\"nestedblock--spec--namespace_resource_blacklist\"></a>\n### Nested Schema for `spec.namespace_resource_blacklist`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n\n\n<a id=\"nestedblock--spec--namespace_resource_whitelist\"></a>\n### Nested Schema for `spec.namespace_resource_whitelist`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n\n\n<a id=\"nestedblock--spec--orphaned_resources\"></a>\n### Nested Schema for `spec.orphaned_resources`\n\nOptional:\n\n- `ignore` (Block Set) List of resources to ignore during orphaned resources detection. (see [below for nested schema](#nestedblock--spec--orphaned_resources--ignore))\n- `warn` (Boolean) Whether a warning condition should be created for apps which have orphaned resources.\n\n<a id=\"nestedblock--spec--orphaned_resources--ignore\"></a>\n### Nested Schema for `spec.orphaned_resources.ignore`\n\nOptional:\n\n- `group` (String) The Kubernetes resource Group to match for.\n- `kind` (String) The Kubernetes resource Kind to match for.\n- `name` (String) The Kubernetes resource name to match for.\n\n\n\n<a id=\"nestedblock--spec--role\"></a>\n### Nested Schema for `spec.role`\n\nRequired:\n\n- `name` (String) The name of the role.\n- `policies` (List of String) List of casbin formatted strings that define access policies for the role in the project. For more information, see the [ArgoCD RBAC reference](https://argoproj.github.io/argo-cd/operator-manual/rbac/#rbac-permission-structure).\n\nOptional:\n\n- `description` (String) Description of the role.\n- `groups` (List of String) List of OIDC group claims bound to this role.\n- `jwt_tokens` (Attributes Set) List of JWT tokens issued for this role. (see [below for nested schema](#nestedatt--spec--role--jwt_tokens))\n\n<a id=\"nestedatt--spec--role--jwt_tokens\"></a>\n### Nested Schema for `spec.role.jwt_tokens`\n\nRequired:\n\n- `iat` (Number) Token issued at (timestamp).\n\nOptional:\n\n- `exp` (Number) Token expiration (timestamp).\n- `id` (String) Token identifier.\n\n\n\n<a id=\"nestedblock--spec--sync_window\"></a>\n### Nested Schema for `spec.sync_window`\n\nOptional:\n\n- `applications` (List of String) List of applications that the window will apply to.\n- `clusters` (List of String) List of clusters that the window will apply to.\n- `duration` (String) Amount of time the sync window will be open.\n- `kind` (String) Defines if the window allows or blocks syncs, allowed values are `allow` or `deny`.\n- `manual_sync` (Boolean) Enables manual syncs when they would otherwise be blocked.\n- `namespaces` (List of String) List of namespaces that the window will apply to.\n- `schedule` (String) Time the window will begin, specified in cron format.\n- `timezone` (String) Timezone that the schedule will be evaluated in.\n- `use_and_operator` (Boolean) Defines if the AND operator should be used among the various conditions for the sync window.\n\n## Import\n\nImport is supported using the following syntax:\n\nThe [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:\n\n```shell\n# Projects can be imported using the project name.\n\nterraform import argocd_project.myproject myproject\n```\n"
  },
  {
    "path": "docs/resources/project_token.md",
    "content": "---\n# generated by https://github.com/hashicorp/terraform-plugin-docs\npage_title: \"argocd_project_token Resource - terraform-provider-argocd\"\nsubcategory: \"\"\ndescription: |-\n  Manages ArgoCD project role JWT tokens. See Project Roles https://argo-cd.readthedocs.io/en/stable/user-guide/projects/#project-roles for more info.\n  ~> Security Notice The JWT token generated by this resource is treated as sensitive and, thus, not displayed in console output. However, it will be stored unencrypted in your Terraform state file. Read more about sensitive data handling in the Terraform documentation https://www.terraform.io/docs/language/state/sensitive-data.html.\n---\n\n# argocd_project_token (Resource)\n\nManages ArgoCD project role JWT tokens. See [Project Roles](https://argo-cd.readthedocs.io/en/stable/user-guide/projects/#project-roles) for more info.\n\n~> **Security Notice** The JWT token generated by this resource is treated as sensitive and, thus, not displayed in console output. However, it will be stored *unencrypted* in your Terraform state file. Read more about sensitive data handling in the [Terraform documentation](https://www.terraform.io/docs/language/state/sensitive-data.html).\n\n## Example Usage\n\n```terraform\nresource \"argocd_project_token\" \"secret\" {\n  project      = \"someproject\"\n  role         = \"foobar\"\n  description  = \"short lived token\"\n  expires_in   = \"1h\"\n  renew_before = \"30m\"\n}\n```\n\n<!-- schema generated by tfplugindocs -->\n## Schema\n\n### Required\n\n- `project` (String) The project associated with the token.\n- `role` (String) The name of the role in the project associated with the token.\n\n### Optional\n\n- `description` (String) Description of the token.\n- `expires_in` (String) Duration before the token will expire. Valid time units are `ns`, `us` (or `µs`), `ms`, `s`, `m`, `h`. E.g. `30m`, `12h`. Default: No expiration.\n- `renew_after` (String) Duration to control token silent regeneration based on token age. Valid time units are `ns`, `us` (or `µs`), `ms`, `s`, `m`, `h`. If set, then the token will be regenerated if it is older than `renew_after`. I.e. if `currentDate - issued_at > renew_after`.\n- `renew_before` (String) Duration to control token silent regeneration based on remaining token lifetime. If `expires_in` is set, Terraform will regenerate the token if `expires_at - currentDate < renew_before`. Valid time units are `ns`, `us` (or `µs`), `ms`, `s`, `m`, `h`.\n\n### Read-Only\n\n- `expires_at` (String) If `expires_in` is set, Unix timestamp upon which the token will expire.\n- `id` (String) Token identifier\n- `issued_at` (String) Unix timestamp at which the token was issued.\n- `jwt` (String, Sensitive) The raw JWT.\n"
  },
  {
    "path": "docs/resources/repository.md",
    "content": "---\n# generated by https://github.com/hashicorp/terraform-plugin-docs\npage_title: \"argocd_repository Resource - terraform-provider-argocd\"\nsubcategory: \"\"\ndescription: |-\n  Manages repositories https://argo-cd.readthedocs.io/en/stable/operator-manual/declarative-setup/#repositories within ArgoCD.\n---\n\n# argocd_repository (Resource)\n\nManages [repositories](https://argo-cd.readthedocs.io/en/stable/operator-manual/declarative-setup/#repositories) within ArgoCD.\n\n## Example Usage\n\n```terraform\n# Public Helm repository\nresource \"argocd_repository\" \"public_nginx_helm\" {\n  repo = \"https://helm.nginx.com/stable\"\n  name = \"nginx-stable\"\n  type = \"helm\"\n}\n\n# Public Git repository\nresource \"argocd_repository\" \"public_git\" {\n  repo = \"git@github.com:user/somerepo.git\"\n}\n\n# Private Git repository\nresource \"argocd_repository\" \"private\" {\n  repo            = \"git@private-git-repository.local:somerepo.git\"\n  username        = \"git\"\n  ssh_private_key = \"-----BEGIN OPENSSH PRIVATE KEY-----\\nfoo\\nbar\\n-----END OPENSSH PRIVATE KEY-----\"\n  insecure        = true\n}\n\n# Repository with proxy configuration\nresource \"argocd_repository\" \"with_proxy\" {\n  repo     = \"https://github.com/example/repo.git\"\n  username = \"git\"\n  password = \"my-token\"\n  proxy    = \"http://proxy.example.com:8080\"\n  no_proxy = \"*.internal.example.com,localhost\"\n}\n\n# OCI repository (e.g., for Helm charts stored in OCI registries)\nresource \"argocd_repository\" \"oci_registry\" {\n  repo     = \"oci://ghcr.io/argoproj/argo-helm/argo-cd\"\n  name     = \"argocd-oci\"\n  type     = \"oci\"\n  username = \"my-username\"\n  password = \"my-token\"\n}\n```\n\n<!-- schema generated by tfplugindocs -->\n## Schema\n\n### Required\n\n- `repo` (String) URL of the repository.\n\n### Optional\n\n- `bearer_token` (String, Sensitive) BearerToken contains the bearer token used for Git BitBucket Data Center auth at the repo server\n- `depth` (Number) Depth specifies the depth for [shallow clones](https://argo-cd.readthedocs.io/en/stable/operator-manual/high_availability/#shallow-clone). A value of `0` means a full clone (the default). Shallow clone depths (`> 0`) are only supported from ArgoCD 3.3.0 onwards.\n- `enable_lfs` (Boolean) Whether `git-lfs` support should be enabled for this repository.\n- `enable_oci` (Boolean) Whether `helm-oci` support should be enabled for this repository.\n- `githubapp_enterprise_base_url` (String) GitHub API URL for GitHub app authentication.\n- `githubapp_id` (String) ID of the GitHub app used to access the repo.\n- `githubapp_installation_id` (String) The installation ID of the GitHub App used to access the repo.\n- `githubapp_private_key` (String, Sensitive) Private key data (PEM) for authentication via GitHub app.\n- `insecure` (Boolean) Whether the connection to the repository ignores any errors when verifying TLS certificates or SSH host keys.\n- `name` (String) Name to be used for this repo. Only used with Helm repos.\n- `no_proxy` (String) Comma-separated list of hostnames that should be excluded from proxying.\n- `password` (String, Sensitive) Password or PAT used for authenticating at the remote repository.\n- `project` (String) The project name, in case the repository is project scoped.\n- `proxy` (String) HTTP/HTTPS proxy to access the repository.\n- `ssh_private_key` (String, Sensitive) PEM data for authenticating at the repo server. Only used with Git repos.\n- `tls_client_cert_data` (String) TLS client certificate in PEM format for authenticating at the repo server.\n- `tls_client_cert_key` (String, Sensitive) TLS client certificate private key in PEM format for authenticating at the repo server.\n- `type` (String) Type of the repo. Can be either `git`, `helm` or `oci`. `git` is assumed if empty or absent.\n- `use_azure_workload_identity` (Boolean) Whether `Azure-Workload-identity` should be enabled for this repository.\n- `username` (String) Username used for authenticating at the remote repository.\n\n### Read-Only\n\n- `connection_state_status` (String) Contains information about the current state of connection to the repository server.\n- `id` (String) Repository identifier\n- `inherited_creds` (Boolean) Whether credentials were inherited from a credential set.\n\n## Import\n\nImport is supported using the following syntax:\n\nThe [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:\n\n```shell\n# Repositories can be imported using the repository URL.\n\n# Note: as the ArgoCD API does not return any sensitive information, a\n# subsequent `terraform apply` should be executed to make the `password`,\n# `ssh_private_key` and `tls_client_cert_key` attributes converge to their\n# expected values defined within the plan.\n\nterraform import argocd_repository.myrepo git@private-git-repository.local:somerepo.git\n```\n"
  },
  {
    "path": "docs/resources/repository_certificate.md",
    "content": "---\n# generated by https://github.com/hashicorp/terraform-plugin-docs\npage_title: \"argocd_repository_certificate Resource - terraform-provider-argocd\"\nsubcategory: \"\"\ndescription: |-\n  Manages custom TLS certificates https://argo-cd.readthedocs.io/en/stable/user-guide/private-repositories/#self-signed-untrusted-tls-certificates used by ArgoCD for connecting Git repositories.\n---\n\n# argocd_repository_certificate (Resource)\n\nManages [custom TLS certificates](https://argo-cd.readthedocs.io/en/stable/user-guide/private-repositories/#self-signed-untrusted-tls-certificates) used by ArgoCD for connecting Git repositories.\n\n## Example Usage\n\n```terraform\n# HTTPS certificate\nresource \"argocd_repository_certificate\" \"private-git-repository\" {\n  https {\n    server_name = \"private-git-repository.local\"\n    cert_data   = <<EOT\n-----BEGIN CERTIFICATE-----\\nfoo\\nbar\\n-----END CERTIFICATE-----\nEOT\n  }\n}\n\n# SSH certificate\nresource \"argocd_repository_certificate\" \"private-git-repository\" {\n  ssh {\n    server_name  = \"private-git-repository.local\"\n    cert_subtype = \"ssh-rsa\"\n    cert_data    = <<EOT\nAAAAB3NzaC1yc2EAAAADAQABAAABgQCiPZAufKgxwRgxP9qy2Gtub0FI8qJGtL8Ldb7KatBeRUQQPn8QK7ZYjzYDvP1GOutFMaQT0rKIqaGImIBsztNCno...\nEOT\n  }\n}\n```\n\n<!-- schema generated by tfplugindocs -->\n## Schema\n\n### Optional\n\n- `https` (Block List) HTTPS certificate configuration (see [below for nested schema](#nestedblock--https))\n- `ssh` (Block List) SSH certificate configuration (see [below for nested schema](#nestedblock--ssh))\n\n### Read-Only\n\n- `id` (String) Repository certificate identifier\n\n<a id=\"nestedblock--https\"></a>\n### Nested Schema for `https`\n\nRequired:\n\n- `cert_data` (String) The actual certificate data, dependent on the certificate type\n- `server_name` (String) DNS name of the server this certificate is intended for\n\nRead-Only:\n\n- `cert_info` (String) Additional certificate info, dependent on the certificate type (e.g. SSH fingerprint, X509 CommonName)\n- `cert_subtype` (String) The sub type of the cert, i.e. `ssh-rsa`\n\n\n<a id=\"nestedblock--ssh\"></a>\n### Nested Schema for `ssh`\n\nRequired:\n\n- `cert_data` (String) The actual certificate data, dependent on the certificate type\n- `cert_subtype` (String) The sub type of the cert, i.e. `ssh-rsa`\n- `server_name` (String) DNS name of the server this certificate is intended for\n\nRead-Only:\n\n- `cert_info` (String) Additional certificate info, dependent on the certificate type (e.g. SSH fingerprint, X509 CommonName)\n"
  },
  {
    "path": "docs/resources/repository_credentials.md",
    "content": "---\n# generated by https://github.com/hashicorp/terraform-plugin-docs\npage_title: \"argocd_repository_credentials Resource - terraform-provider-argocd\"\nsubcategory: \"\"\ndescription: |-\n  Manages repository credentials https://argo-cd.readthedocs.io/en/stable/user-guide/private-repositories/#credentials within ArgoCD.\n  Note: due to restrictions in the ArgoCD API the provider is unable to track drift in this resource to fields other than username. I.e. the provider is unable to detect changes to repository credentials that are made outside of Terraform (e.g. manual updates to the underlying Kubernetes Secrets).\n---\n\n# argocd_repository_credentials (Resource)\n\nManages [repository credentials](https://argo-cd.readthedocs.io/en/stable/user-guide/private-repositories/#credentials) within ArgoCD.\n\n**Note**: due to restrictions in the ArgoCD API the provider is unable to track drift in this resource to fields other than `username`. I.e. the provider is unable to detect changes to repository credentials that are made outside of Terraform (e.g. manual updates to the underlying Kubernetes Secrets).\n\n## Example Usage\n\n```terraform\nresource \"argocd_repository_credentials\" \"private\" {\n  url             = \"git@private-git-repository.local\"\n  username        = \"git\"\n  ssh_private_key = \"-----BEGIN OPENSSH PRIVATE KEY-----\\nfoo\\nbar\\n-----END OPENSSH PRIVATE KEY-----\"\n}\n```\n\n<!-- schema generated by tfplugindocs -->\n## Schema\n\n### Required\n\n- `url` (String) URL that these credentials match to\n\n### Optional\n\n- `enable_oci` (Boolean) Whether `helm-oci` support should be enabled for this repo. Can only be set to `true` when `type` is `helm`.\n- `githubapp_enterprise_base_url` (String) GitHub API URL for GitHub app authentication\n- `githubapp_id` (String) GitHub App ID of the app used to access the repo for GitHub app authentication\n- `githubapp_installation_id` (String) ID of the installed GitHub App for GitHub app authentication\n- `githubapp_private_key` (String, Sensitive) Private key data (PEM) for authentication via GitHub app\n- `password` (String, Sensitive) Password for authenticating at the repo server\n- `ssh_private_key` (String, Sensitive) Private key data for authenticating at the repo server using SSH (only Git repos)\n- `tls_client_cert_data` (String) TLS client cert data for authenticating at the repo server\n- `tls_client_cert_key` (String, Sensitive) TLS client cert key for authenticating at the repo server\n- `type` (String) Type of the repository credentials. Can be either `git`, `oci` or `helm`. `git` is assumed if empty or absent.\n- `use_azure_workload_identity` (Boolean) Whether `Azure-Workload-identity` should be enabled for this repository.\n- `username` (String) Username for authenticating at the repo server\n\n### Read-Only\n\n- `id` (String) Repository credentials identifier\n\n## Import\n\nImport is supported using the following syntax:\n\nThe [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:\n\n```shell\n# Repository credentials can be imported using the repository URL.\n\n# Note: as the ArgoCD API does not return any sensitive information, a\n# subsequent `terraform apply` should be executed to make the `password`,\n# `ssh_private_key` and `tls_client_cert_key` attributes converge to their\n# expected values defined within the plan.\n\nterraform import argocd_repository_credentials.myrepocreds git@private-git-repository.local:somerepo.git\n```\n"
  },
  {
    "path": "examples/data-sources/argocd_application/data-source.tf",
    "content": "data \"argocd_application\" \"foo\" {\n  metadata = {\n    name      = \"foo\"\n    namespace = \"argocd\"\n  }\n}\n"
  },
  {
    "path": "examples/provider/provider.tf",
    "content": "# Exposed ArgoCD API - authenticated using authentication token.\nprovider \"argocd\" {\n  server_addr = \"argocd.local:443\"\n  auth_token  = \"1234...\"\n}\n\n# Exposed ArgoCD API - authenticated using `username`/`password`\nprovider \"argocd\" {\n  server_addr = \"argocd.local:443\"\n  username    = \"foo\"\n  password    = local.password\n}\n\n# Exposed ArgoCD API - (pre)authenticated using local ArgoCD config (e.g. when\n# you have previously logged in using SSO).\nprovider \"argocd\" {\n  use_local_config = true\n  # context = \"foo\" # Use explicit context from ArgoCD config instead of `current-context`.\n}\n\n# Unexposed ArgoCD API - using the current Kubernetes context and\n# port-forwarding to temporarily expose ArgoCD API and authenticating using\n# `auth_token`.\nprovider \"argocd\" {\n  auth_token   = \"1234...\"\n  port_forward = true\n}\n\n# Unexposed ArgoCD API - using port-forwarding to temporarily expose ArgoCD API\n# whilst overriding the current context in kubeconfig.\nprovider \"argocd\" {\n  auth_token                  = \"1234...\"\n  port_forward_with_namespace = \"custom-argocd-namespace\"\n  kubernetes {\n    config_context = \"kind-argocd\"\n  }\n}\n\n# Unexposed ArgoCD API - using `core` to run ArgoCD server locally and\n# communicate directly with the Kubernetes API.\nprovider \"argocd\" {\n  core = true\n}\n"
  },
  {
    "path": "examples/resources/argocd_account_token/resource.tf",
    "content": "# Token for account configured on the `provider`\nresource \"argocd_account_token\" \"this\" {\n  renew_after = \"168h\" # renew after 7 days\n}\n\n# Token for ac count `foo`\nresource \"argocd_account_token\" \"foo\" {\n  account      = \"foo\"\n  expires_in   = \"168h\" # expire in 7 days\n  renew_before = \"84h\"  # renew when less than 3.5 days remain until expiry\n}\n"
  },
  {
    "path": "examples/resources/argocd_application/import.sh",
    "content": "# ArgoCD applications can be imported using an id consisting of `{name}:{namespace}`.\n\nterraform import argocd_application.myapp myapp:argocd"
  },
  {
    "path": "examples/resources/argocd_application/resource.tf",
    "content": "# Kustomize application\nresource \"argocd_application\" \"kustomize\" {\n  metadata {\n    name      = \"kustomize-app\"\n    namespace = \"argocd\"\n    labels = {\n      test = \"true\"\n    }\n  }\n\n  cascade = false # disable cascading deletion\n  wait    = true\n\n  spec {\n    project = \"myproject\"\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"foo\"\n    }\n\n    source {\n      repo_url        = \"https://github.com/kubernetes-sigs/kustomize\"\n      path            = \"examples/helloWorld\"\n      target_revision = \"master\"\n      kustomize {\n        name_prefix = \"foo-\"\n        name_suffix = \"-bar\"\n        images      = [\"hashicorp/terraform:light\"]\n        common_labels = {\n          \"this.is.a.common\" = \"la-bel\"\n          \"another.io/one\"   = \"true\"\n        }\n      }\n    }\n\n    sync_policy {\n      automated {\n        prune       = true\n        self_heal   = true\n        allow_empty = true\n      }\n      # Only available from ArgoCD 1.5.0 onwards\n      sync_options = [\"Validate=false\"]\n      retry {\n        limit = \"5\"\n        backoff {\n          duration     = \"30s\"\n          max_duration = \"2m\"\n          factor       = \"2\"\n        }\n      }\n    }\n\n    ignore_difference {\n      group         = \"apps\"\n      kind          = \"Deployment\"\n      json_pointers = [\"/spec/replicas\"]\n    }\n\n    ignore_difference {\n      group = \"apps\"\n      kind  = \"StatefulSet\"\n      name  = \"someStatefulSet\"\n      json_pointers = [\n        \"/spec/replicas\",\n        \"/spec/template/spec/metadata/labels/bar\",\n      ]\n      # Only available from ArgoCD 2.1.0 onwards\n      jq_path_expressions = [\n        \".spec.replicas\",\n        \".spec.template.spec.metadata.labels.bar\",\n      ]\n    }\n  }\n}\n\n# Helm application\nresource \"argocd_application\" \"helm\" {\n  metadata {\n    name      = \"helm-app\"\n    namespace = \"argocd\"\n    labels = {\n      test = \"true\"\n    }\n  }\n\n  spec {\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n\n    source {\n      repo_url        = \"https://some.chart.repo.io\"\n      chart           = \"mychart\"\n      target_revision = \"1.2.3\"\n      helm {\n        release_name = \"testing\"\n        parameter {\n          name  = \"image.tag\"\n          value = \"1.2.3\"\n        }\n        parameter {\n          name  = \"someotherparameter\"\n          value = \"true\"\n        }\n        value_files = [\"values-test.yml\"]\n        values = yamlencode({\n          someparameter = {\n            enabled   = true\n            someArray = [\"foo\", \"bar\"]\n          }\n        })\n      }\n    }\n  }\n}\n\n# Multiple Application Sources with Helm value files from external Git repository\nresource \"argocd_application\" \"multiple_sources\" {\n  metadata {\n    name      = \"helm-app-with-external-values\"\n    namespace = \"argocd\"\n  }\n\n  spec {\n    project = \"default\"\n\n    source {\n      repo_url        = \"https://charts.helm.sh/stable\"\n      chart           = \"wordpress\"\n      target_revision = \"9.0.3\"\n      helm {\n        value_files = [\"$values/helm-dependency/values.yaml\"]\n      }\n    }\n\n    source {\n      repo_url        = \"https://github.com/argoproj/argocd-example-apps.git\"\n      target_revision = \"HEAD\"\n      ref             = \"values\"\n    }\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n  }\n}\n"
  },
  {
    "path": "examples/resources/argocd_application_set/resource.tf",
    "content": "# Clusters Generator\nresource \"argocd_application_set\" \"clusters_selector\" {\n  metadata {\n    name = \"clusters-selector\"\n  }\n\n  spec {\n    generator {\n      clusters {\n        selector {\n          match_labels = {\n            \"argocd.argoproj.io/secret-type\" = \"cluster\"\n          }\n        }\n      }\n    }\n\n    template {\n      metadata {\n        name = \"{{name}}-clusters-selector\"\n      }\n\n      spec {\n        source {\n          repo_url        = \"https://github.com/argoproj/argocd-example-apps/\"\n          target_revision = \"HEAD\"\n          path            = \"guestbook\"\n        }\n\n        destination {\n          server    = \"{{server}}\"\n          namespace = \"default\"\n        }\n      }\n    }\n  }\n}\n\n# Cluster Decision Resource Generator\nresource \"argocd_application_set\" \"cluster_decision_resource\" {\n  metadata {\n    name = \"cluster-decision-resource\"\n  }\n\n  spec {\n    generator {\n      cluster_decision_resource {\n        config_map_ref = \"my-configmap\"\n        name           = \"quak\"\n      }\n    }\n\n    template {\n      metadata {\n        name = \"{{name}}-guestbook\"\n      }\n\n      spec {\n        source {\n          repo_url        = \"https://github.com/argoproj/argocd-example-apps/\"\n          target_revision = \"HEAD\"\n          path            = \"guestbook\"\n        }\n\n        destination {\n          server    = \"{{server}}\"\n          namespace = \"default\"\n        }\n      }\n    }\n  }\n}\n\n\n# Git Generator - Directories\nresource \"argocd_application_set\" \"git_directories\" {\n  metadata {\n    name = \"git-directories\"\n  }\n\n  spec {\n    generator {\n      git {\n        repo_url = \"https://github.com/argoproj/argo-cd.git\"\n        revision = \"HEAD\"\n\n        directory {\n          path = \"applicationset/examples/git-generator-directory/cluster-addons/*\"\n        }\n\n        directory {\n          path    = \"applicationset/examples/git-generator-directory/excludes/cluster-addons/exclude-helm-guestbook\"\n          exclude = true\n        }\n      }\n    }\n\n    template {\n      metadata {\n        name = \"{{path.basename}}-git-directories\"\n      }\n\n      spec {\n        source {\n          repo_url        = \"https://github.com/argoproj/argo-cd.git\"\n          target_revision = \"HEAD\"\n          path            = \"{{path}}\"\n        }\n\n        destination {\n          server    = \"https://kubernetes.default.svc\"\n          namespace = \"{{path.basename}}\"\n        }\n      }\n    }\n  }\n}\n\n# Git Generator - Files\nresource \"argocd_application_set\" \"git_files\" {\n  metadata {\n    name = \"git-files\"\n  }\n\n  spec {\n    generator {\n      git {\n        repo_url = \"https://github.com/argoproj/argo-cd.git\"\n        revision = \"HEAD\"\n\n        file {\n          path = \"applicationset/examples/git-generator-files-discovery/cluster-config/**/config.json\"\n        }\n      }\n    }\n\n    template {\n      metadata {\n        name = \"{{cluster.name}}-git-files\"\n      }\n\n      spec {\n        source {\n          repo_url        = \"https://github.com/argoproj/argo-cd.git\"\n          target_revision = \"HEAD\"\n          path            = \"applicationset/examples/git-generator-files-discovery/apps/guestbook\"\n        }\n\n        destination {\n          server    = \"{{cluster.address}}\"\n          namespace = \"guestbook\"\n        }\n      }\n    }\n  }\n}\n\n# List Generator\nresource \"argocd_application_set\" \"list\" {\n  metadata {\n    name = \"list\"\n  }\n\n  spec {\n    generator {\n      list {\n        elements = [\n          {\n            cluster = \"engineering-dev\"\n            url     = \"https://kubernetes.default.svc\"\n          },\n          {\n            cluster = \"engineering-prod\"\n            url     = \"https://kubernetes.default.svc\"\n            foo     = \"bar\"\n          }\n        ]\n      }\n    }\n\n    template {\n      metadata {\n        name = \"{{cluster}}-guestbook\"\n      }\n\n      spec {\n        project = \"my-project\"\n\n        source {\n          repo_url        = \"https://github.com/argoproj/argo-cd.git\"\n          target_revision = \"HEAD\"\n          path            = \"applicationset/examples/list-generator/guestbook/{{cluster}}\"\n        }\n\n        destination {\n          server    = \"{{url}}\"\n          namespace = \"guestbook\"\n        }\n      }\n    }\n  }\n}\n\n# List Generator with elements_yaml\nresource \"argocd_application_set\" \"list_elements_yaml\" {\n  metadata {\n    name = \"list-elements-yaml\"\n  }\n\n  spec {\n    generator {\n      list {\n        elements_yaml = <<-EOT\n          - cluster: engineering-dev\n            url: https://kubernetes.default.svc\n            environment: development\n          - cluster: engineering-prod\n            url: https://kubernetes.default.svc\n            environment: production\n            foo: bar\n        EOT\n      }\n    }\n\n    template {\n      metadata {\n        name = \"{{cluster}}-guestbook\"\n      }\n\n      spec {\n        project = \"my-project\"\n\n        source {\n          repo_url        = \"https://github.com/argoproj/argo-cd.git\"\n          target_revision = \"HEAD\"\n          path            = \"applicationset/examples/list-generator/guestbook/{{cluster}}\"\n        }\n\n        destination {\n          server    = \"{{url}}\"\n          namespace = \"guestbook\"\n        }\n      }\n    }\n  }\n}\n\n# Matrix Generator\nresource \"argocd_application_set\" \"matrix\" {\n  metadata {\n    name = \"matrix\"\n  }\n\n  spec {\n    generator {\n      matrix {\n        generator {\n          git {\n            repo_url = \"https://github.com/argoproj/argo-cd.git\"\n            revision = \"HEAD\"\n\n            directory {\n              path = \"applicationset/examples/matrix/cluster-addons/*\"\n            }\n          }\n        }\n\n        generator {\n          clusters {\n            selector {\n              match_labels = {\n                \"argocd.argoproj.io/secret-type\" = \"cluster\"\n              }\n            }\n          }\n        }\n      }\n    }\n\n    template {\n      metadata {\n        name = \"{{path.basename}}-{{name}}\"\n      }\n\n      spec {\n        project = \"default\"\n\n        source {\n          repo_url        = \"https://github.com/argoproj/argo-cd.git\"\n          target_revision = \"HEAD\"\n          path            = \"{{path}}\"\n        }\n\n        destination {\n          server    = \"{{server}}\"\n          namespace = \"{{path.basename}}\"\n        }\n      }\n    }\n  }\n}\n\n# Merge Generator\nresource \"argocd_application_set\" \"merge\" {\n  metadata {\n    name = \"merge\"\n  }\n\n  spec {\n    generator {\n      merge {\n        merge_keys = [\n          \"server\"\n        ]\n\n        generator {\n          clusters {\n            values = {\n              kafka = true\n              redis = false\n            }\n          }\n        }\n\n        generator {\n          clusters {\n            selector {\n              match_labels = {\n                use-kafka = \"false\"\n              }\n            }\n\n            values = {\n              kafka = \"false\"\n            }\n          }\n        }\n\n        generator {\n          list {\n            elements = [\n              {\n                server         = \"https://2.4.6.8\"\n                \"values.redis\" = \"true\"\n              },\n            ]\n          }\n        }\n      }\n    }\n\n    template {\n      metadata {\n        name = \"{{name}}\"\n      }\n\n      spec {\n        project = \"default\"\n\n        source {\n          repo_url        = \"https://github.com/argoproj/argo-cd.git\"\n          path            = \"app\"\n          target_revision = \"HEAD\"\n\n          helm {\n            parameter {\n              name  = \"kafka\"\n              value = \"{{values.kafka}}\"\n            }\n\n            parameter {\n              name  = \"redis\"\n              value = \"{{values.redis}}\"\n            }\n          }\n        }\n\n        destination {\n          server    = \"{{server}}\"\n          namespace = \"default\"\n        }\n      }\n    }\n  }\n}\n\n# Pull Request Generator - GitHub\nresource \"argocd_application_set\" \"pr_github\" {\n  metadata {\n    name = \"pr-github\"\n  }\n\n  spec {\n    generator {\n      pull_request {\n        github {\n          api             = \"https://git.example.com/\"\n          owner           = \"myorg\"\n          repo            = \"myrepository\"\n          app_secret_name = \"github-app-repo-creds\"\n\n          token_ref {\n            secret_name = \"github-token\"\n            key         = \"token\"\n          }\n\n          labels = [\n            \"preview\"\n          ]\n        }\n      }\n    }\n\n    template {\n      metadata {\n        name = \"myapp-{{branch}}-{{number}}\"\n      }\n\n      spec {\n        project = \"default\"\n\n        source {\n          repo_url        = \"https://github.com/myorg/myrepo.git\"\n          path            = \"kubernetes/\"\n          target_revision = \"{{head_sha}}\"\n\n          helm {\n            parameter {\n              name  = \"image.tag\"\n              value = \"pull-{{head_sha}}\"\n            }\n          }\n        }\n\n        destination {\n          server    = \"https://kubernetes.default.svc\"\n          namespace = \"default\"\n        }\n      }\n    }\n  }\n}\n\n# Pull Request Generator - Azure DevOps\nresource \"argocd_application_set\" \"pr_azure_devops\" {\n  metadata {\n    name = \"pr-azure-devops\"\n  }\n\n  spec {\n    generator {\n      pull_request {\n        azure_devops {\n          api          = \"https://dev.azure.com\"\n          organization = \"myorg\"\n          project      = \"myproject\"\n          repo         = \"myrepository\"\n          labels       = [\"preview\"]\n\n          token_ref {\n            secret_name = \"azure-devops-token\"\n            key         = \"token\"\n          }\n        }\n      }\n    }\n\n    template {\n      metadata {\n        name = \"myapp-{{branch}}-{{number}}\"\n      }\n\n      spec {\n        project = \"default\"\n\n        source {\n          repo_url        = \"https://github.com/myorg/myrepo.git\"\n          path            = \"kubernetes/\"\n          target_revision = \"{{head_sha}}\"\n\n          helm {\n            parameter {\n              name  = \"image.tag\"\n              value = \"pull-{{head_sha}}\"\n            }\n          }\n        }\n\n        destination {\n          server    = \"https://kubernetes.default.svc\"\n          namespace = \"default\"\n        }\n      }\n    }\n  }\n}\n\n# SCM Provider Generator - GitHub\nresource \"argocd_application_set\" \"scm_github\" {\n  metadata {\n    name = \"scm-github\"\n  }\n\n  spec {\n    generator {\n      scm_provider {\n        github {\n          app_secret_name = \"gh-app-repo-creds\"\n          organization    = \"myorg\"\n\n          # all_branches = true\n          # api          = \"https://git.example.com/\"\n\n          # token_ref {\n          #   secret_name = \"github-token\"\n          #   key         = \"token\"\n          # }\n        }\n      }\n    }\n\n    template {\n      metadata {\n        name = \"{{repository}}\"\n      }\n\n      spec {\n        project = \"default\"\n\n        source {\n          repo_url        = \"{{url}}\"\n          path            = \"kubernetes/\"\n          target_revision = \"{{branch}}\"\n        }\n\n        destination {\n          server    = \"https://kubernetes.default.svc\"\n          namespace = \"default\"\n        }\n      }\n    }\n  }\n}\n\n# Progressive Sync - Rolling Update\nresource \"argocd_application_set\" \"progressive_sync\" {\n  metadata {\n    name = \"progressive-sync\"\n  }\n\n  spec {\n    generator {\n      list {\n        elements = [\n          {\n            cluster = \"engineering-dev\"\n            url     = \"https://1.2.3.4\"\n            env     = \"env-dev\"\n          },\n          {\n            cluster = \"engineering-qa\"\n            url     = \"https://2.4.6.8\"\n            env     = \"env-qa\"\n          },\n          {\n            cluster = \"engineering-prod\"\n            url     = \"https://9.8.7.6/\"\n            env     = \"env-prod\"\n          }\n        ]\n      }\n    }\n\n    strategy {\n      type = \"RollingSync\"\n      rolling_sync {\n        step {\n          match_expressions {\n            key      = \"envLabel\"\n            operator = \"In\"\n            values = [\n              \"env-dev\"\n            ]\n          }\n\n          # max_update = \"100%\"  # if undefined, all applications matched are updated together (default is 100%)\n        }\n\n        step {\n          match_expressions {\n            key      = \"envLabel\"\n            operator = \"In\"\n            values = [\n              \"env-qa\"\n            ]\n          }\n\n          max_update = \"0\"\n        }\n\n        step {\n          match_expressions {\n            key      = \"envLabel\"\n            operator = \"In\"\n            values = [\n              \"env-prod\"\n            ]\n          }\n\n          max_update = \"10%\"\n        }\n      }\n    }\n\n    go_template = true\n\n    template {\n      metadata {\n        name = \"{{.cluster}}-guestbook\"\n        labels = {\n          envLabel = \"{{.env}}\"\n        }\n      }\n\n      spec {\n        project = \"default\"\n\n        source {\n          repo_url        = \"https://github.com/infra-team/cluster-deployments.git\"\n          path            = \"guestbook/{{.cluster}}\"\n          target_revision = \"HEAD\"\n        }\n\n        destination {\n          server    = \"{{.url}}\"\n          namespace = \"guestbook\"\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "examples/resources/argocd_cluster/import.sh",
    "content": "# Cluster credentials can be imported using the server URL.\n\nterraform import argocd_cluster.mycluster https://mycluster.io:443"
  },
  {
    "path": "examples/resources/argocd_cluster/resource.tf",
    "content": "## Bearer token Authentication\nresource \"argocd_cluster\" \"kubernetes\" {\n  server = \"https://1.2.3.4:12345\"\n\n  config {\n    bearer_token = \"eyJhbGciOiJSUzI...\"\n\n    tls_client_config {\n      ca_data = file(\"path/to/ca.pem\")\n      // ca_data = \"-----BEGIN CERTIFICATE-----\\nfoo\\nbar\\n-----END CERTIFICATE-----\"\n      // ca_data = base64decode(\"LS0tLS1CRUdJTiBDRVJUSUZ...\")\n      // insecure = true\n    }\n  }\n}\n\n## GCP GKE cluster\ndata \"google_container_cluster\" \"cluster\" {\n  name     = \"cluster\"\n  location = \"europe-west1\"\n}\n\nresource \"kubernetes_service_account\" \"argocd_manager\" {\n  metadata {\n    name      = \"argocd-manager\"\n    namespace = \"kube-system\"\n  }\n}\n\nresource \"kubernetes_cluster_role\" \"argocd_manager\" {\n  metadata {\n    name = \"argocd-manager-role\"\n  }\n\n  rule {\n    api_groups = [\"*\"]\n    resources  = [\"*\"]\n    verbs      = [\"*\"]\n  }\n\n  rule {\n    non_resource_urls = [\"*\"]\n    verbs             = [\"*\"]\n  }\n}\n\nresource \"kubernetes_cluster_role_binding\" \"argocd_manager\" {\n  metadata {\n    name = \"argocd-manager-role-binding\"\n  }\n\n  role_ref {\n    api_group = \"rbac.authorization.k8s.io\"\n    kind      = \"ClusterRole\"\n    name      = kubernetes_cluster_role.argocd_manager.metadata.0.name\n  }\n\n  subject {\n    kind      = \"ServiceAccount\"\n    name      = kubernetes_service_account.argocd_manager.metadata.0.name\n    namespace = kubernetes_service_account.argocd_manager.metadata.0.namespace\n  }\n}\n\ndata \"kubernetes_secret\" \"argocd_manager\" {\n  metadata {\n    name      = kubernetes_service_account.argocd_manager.default_secret_name\n    namespace = kubernetes_service_account.argocd_manager.metadata.0.namespace\n  }\n}\n\nresource \"argocd_cluster\" \"gke\" {\n  server = format(\"https://%s\", data.google_container_cluster.cluster.endpoint)\n  name   = \"gke\"\n\n  config {\n    bearer_token = data.kubernetes_secret.argocd_manager.data[\"token\"]\n    tls_client_config {\n      ca_data = base64decode(data.google_container_cluster.cluster.master_auth.0.cluster_ca_certificate)\n    }\n  }\n}\n\n## AWS EKS cluster\ndata \"aws_eks_cluster\" \"cluster\" {\n  name = \"cluster\"\n}\n\nresource \"argocd_cluster\" \"eks\" {\n  server     = format(\"https://%s\", data.aws_eks_cluster.cluster.endpoint)\n  name       = \"eks\"\n  namespaces = [\"default\", \"optional\"]\n\n  config {\n    aws_auth_config {\n      cluster_name = \"myekscluster\"\n      role_arn     = \"arn:aws:iam::<123456789012>:role/<role-name>\"\n    }\n    tls_client_config {\n      ca_data = base64decode(data.aws_eks_cluster.cluster.certificate_authority[0].data)\n    }\n  }\n}\n"
  },
  {
    "path": "examples/resources/argocd_gpg_key/import.sh",
    "content": "# GPG Keys can be imported using the key ID.\n\nterraform import argocd_gpg_key.this 9AD92955401D388D"
  },
  {
    "path": "examples/resources/argocd_gpg_key/resource.tf",
    "content": "resource \"argocd_gpg_key\" \"this\" {\n  public_key = <<EOF\n-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQINBGSJdlcBEACnza+KvWLyKWUHJPhgs//HRL0EEmA/EcFKioBlrgPNYf/O7hNg\nKT3NDaNrD26pr+bOb4mfaqNNS9no8b9EP3C7Co3Wf2d4xpJ5/hlpIm3V652S5daZ\nI7ylVT8QOrhaqEnHH2hEcOfDaqjrYfrx3qiI8v7DmV6jfGi1tDUUgfJwiOyZk4q1\njiPo5k4+XNp9mCtUAGyidLFcUqQ9XbHKgBwgAoxtIKNSbdPCGhsjgTHHhzswMH/Z\nDhhtcraqrfOhoP9lI4/zyCS+B9OfUy7BS/1SqWKIgdsjFIR+zHIOI69lh77+ZAVE\nMVYJBdFke5/g/tTPaQGuBqaIJ3d/Mi/ZlbTsoBcq5qam73uh7fcgBV5la6NeuNcR\ntvKMVl4DlnkJS8LBtElLEeHEylTCdNltrUFwshDKDBtq6ilTKCK14R6g4lkn8VcE\n9xx7Mhdh77tp66FRZ6ge1E8EUEFwEeFhp240KRyaA5U1/kAarn8083zZ7d4+QObp\nL4KMqgrwLaxyPLgu0J/f946qLewV7XsbZRXE1jQa9Z7W5TEoJwjcC79DXe1wChc6\ncBfCtluDsnklwvldpKTEZU0q/hKE6Zt7NjLUyExV+5guoHllxoVxx7sh+jtKm/J+\n5gh+B3xOTDxRV2XYIx1TM6U1iLxAqchzFec8dfkuTbs/5f++PrddvZfiUQARAQAB\ntD1BcmdvQ0QgVGVycmFmb3JtIFByb3ZpZGVyIDxmYWtldXNlckB1c2Vycy5ub3Jl\ncGx5LmdpdGh1Yi5jb20+iQJOBBMBCgA4FiEEvK9bNlncXDhFAk6kmtkpVUAdOI0F\nAmSJdlcCGwMFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQmtkpVUAdOI2FdA//\nYuFYsX6SUVgI4l68ZHE34jLTWU5R2ujB6luErcguAlLyDtrD3melva3V/ETc69/1\n5o7Ayn3a7uz5lCEvUSLsCN+V2o3EjrA81pt8Zs+Z9WYeZE5F5DnKzq81PObdASB7\nPo2X0qLqqKIhpQxc/E7m26xmePCf82H36gtvPiEVmVA5yduk1lLG3aZtNIRCa4VK\ngmDjR8Se+OZeAw7JQCOeJB9/Y8oQ8nVkj1SWNIICaUwIXHtrj7r1z6XTDAEkGeBg\nHXW8IEhZDE1Nq3vQtZvgwftEoPT/Ff+8DwvL1JUov2ObQDolallzKaiiVfGZhPJZ\n4PMtEPEmSL9QWJAG5jiBVC3BdVZtXBNkC1HqTCXwZc/wzp5O9MmMXmCrUFr4FfHu\nIZ560MNpp/SrtUrOahLmvuG0B+Ze96e2nm5ap5wkCDaQouOIqM7Lj+FGq64cu2B/\noSsl7joBZQUYXv8meNOQssm6jArRLG2oFoiEdRqzd2/RjvvJliLN9OCNvV43f38h\n8Ep8RDi9RiHhSKvwrvDD9x/JRm6zQUetjrctmjdIYp8k129LrD0Qr9ULXfphZdrv\nxga7/lyQLmukLu7Mxwp+ss2bY/wjT8mlT5P55kBpXXyYILhLsUESCHG6D8/Ov+vv\nOoZS+BSfe/0vc1aTfDKxj5wAx27a6z5o25X27feEl3U=\n=kqkH\n-----END PGP PUBLIC KEY BLOCK-----\nEOF\n}\n"
  },
  {
    "path": "examples/resources/argocd_project/import.sh",
    "content": "# Projects can be imported using the project name.\n\nterraform import argocd_project.myproject myproject\n"
  },
  {
    "path": "examples/resources/argocd_project/resource.tf",
    "content": "resource \"argocd_project\" \"myproject\" {\n  metadata {\n    name      = \"myproject\"\n    namespace = \"argocd\"\n    labels = {\n      acceptance = \"true\"\n    }\n    annotations = {\n      \"this.is.a.really.long.nested.key\" = \"yes, really!\"\n    }\n  }\n\n  spec {\n    description = \"simple project\"\n\n    source_namespaces = [\"argocd\"]\n    source_repos      = [\"*\"]\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"foo\"\n    }\n    destination {\n      name      = \"anothercluster\"\n      namespace = \"bar\"\n    }\n\n    cluster_resource_blacklist {\n      group = \"*\"\n      kind  = \"*\"\n    }\n    cluster_resource_whitelist {\n      group = \"rbac.authorization.k8s.io\"\n      kind  = \"ClusterRoleBinding\"\n    }\n    cluster_resource_whitelist {\n      group = \"rbac.authorization.k8s.io\"\n      kind  = \"ClusterRole\"\n    }\n\n    namespace_resource_blacklist {\n      group = \"networking.k8s.io\"\n      kind  = \"Ingress\"\n    }\n    namespace_resource_whitelist {\n      group = \"*\"\n      kind  = \"*\"\n    }\n\n    orphaned_resources {\n      warn = true\n\n      ignore {\n        group = \"apps/v1\"\n        kind  = \"Deployment\"\n        name  = \"ignored1\"\n      }\n\n      ignore {\n        group = \"apps/v1\"\n        kind  = \"Deployment\"\n        name  = \"ignored2\"\n      }\n    }\n\n    role {\n      name = \"testrole\"\n      policies = [\n        \"p, proj:myproject:testrole, applications, override, myproject/*, allow\",\n        \"p, proj:myproject:testrole, applications, sync, myproject/*, allow\",\n        \"p, proj:myproject:testrole, clusters, get, myproject/*, allow\",\n        \"p, proj:myproject:testrole, repositories, create, myproject/*, allow\",\n        \"p, proj:myproject:testrole, repositories, delete, myproject/*, allow\",\n        \"p, proj:myproject:testrole, repositories, update, myproject/*, allow\",\n        \"p, proj:myproject:testrole, logs, get, myproject/*, allow\",\n        \"p, proj:myproject:testrole, exec, create, myproject/*, allow\",\n      ]\n    }\n    role {\n      name = \"anotherrole\"\n      policies = [\n        \"p, proj:myproject:testrole, applications, get, myproject/*, allow\",\n        \"p, proj:myproject:testrole, applications, sync, myproject/*, deny\",\n      ]\n    }\n\n    sync_window {\n      kind         = \"allow\"\n      applications = [\"api-*\"]\n      clusters     = [\"*\"]\n      namespaces   = [\"*\"]\n      duration     = \"3600s\"\n      schedule     = \"10 1 * * *\"\n      manual_sync  = true\n    }\n    sync_window {\n      use_and_operator = true\n      kind             = \"deny\"\n      applications     = [\"foo\", \"bar\"]\n      clusters         = [\"in-cluster\"]\n      namespaces       = [\"default\"]\n      duration         = \"12h\"\n      schedule         = \"22 1 5 * *\"\n      manual_sync      = false\n      timezone         = \"Europe/London\"\n    }\n\n    signature_keys = [\n      \"4AEE18F83AFDEB23\",\n      \"07E34825A909B250\"\n    ]\n  }\n}\n"
  },
  {
    "path": "examples/resources/argocd_project_token/resource.tf",
    "content": "resource \"argocd_project_token\" \"secret\" {\n  project      = \"someproject\"\n  role         = \"foobar\"\n  description  = \"short lived token\"\n  expires_in   = \"1h\"\n  renew_before = \"30m\"\n}\n"
  },
  {
    "path": "examples/resources/argocd_repository/import.sh",
    "content": "# Repositories can be imported using the repository URL.\n\n# Note: as the ArgoCD API does not return any sensitive information, a\n# subsequent `terraform apply` should be executed to make the `password`,\n# `ssh_private_key` and `tls_client_cert_key` attributes converge to their\n# expected values defined within the plan.\n\nterraform import argocd_repository.myrepo git@private-git-repository.local:somerepo.git\n"
  },
  {
    "path": "examples/resources/argocd_repository/resource.tf",
    "content": "# Public Helm repository\nresource \"argocd_repository\" \"public_nginx_helm\" {\n  repo = \"https://helm.nginx.com/stable\"\n  name = \"nginx-stable\"\n  type = \"helm\"\n}\n\n# Public Git repository\nresource \"argocd_repository\" \"public_git\" {\n  repo = \"git@github.com:user/somerepo.git\"\n}\n\n# Private Git repository\nresource \"argocd_repository\" \"private\" {\n  repo            = \"git@private-git-repository.local:somerepo.git\"\n  username        = \"git\"\n  ssh_private_key = \"-----BEGIN OPENSSH PRIVATE KEY-----\\nfoo\\nbar\\n-----END OPENSSH PRIVATE KEY-----\"\n  insecure        = true\n}\n\n# Repository with proxy configuration\nresource \"argocd_repository\" \"with_proxy\" {\n  repo     = \"https://github.com/example/repo.git\"\n  username = \"git\"\n  password = \"my-token\"\n  proxy    = \"http://proxy.example.com:8080\"\n  no_proxy = \"*.internal.example.com,localhost\"\n}\n\n# OCI repository (e.g., for Helm charts stored in OCI registries)\nresource \"argocd_repository\" \"oci_registry\" {\n  repo     = \"oci://ghcr.io/argoproj/argo-helm/argo-cd\"\n  name     = \"argocd-oci\"\n  type     = \"oci\"\n  username = \"my-username\"\n  password = \"my-token\"\n}\n"
  },
  {
    "path": "examples/resources/argocd_repository_certificate/resource.tf",
    "content": "# HTTPS certificate\nresource \"argocd_repository_certificate\" \"private-git-repository\" {\n  https {\n    server_name = \"private-git-repository.local\"\n    cert_data   = <<EOT\n-----BEGIN CERTIFICATE-----\\nfoo\\nbar\\n-----END CERTIFICATE-----\nEOT\n  }\n}\n\n# SSH certificate\nresource \"argocd_repository_certificate\" \"private-git-repository\" {\n  ssh {\n    server_name  = \"private-git-repository.local\"\n    cert_subtype = \"ssh-rsa\"\n    cert_data    = <<EOT\nAAAAB3NzaC1yc2EAAAADAQABAAABgQCiPZAufKgxwRgxP9qy2Gtub0FI8qJGtL8Ldb7KatBeRUQQPn8QK7ZYjzYDvP1GOutFMaQT0rKIqaGImIBsztNCno...\nEOT\n  }\n}\n"
  },
  {
    "path": "examples/resources/argocd_repository_credentials/import.sh",
    "content": "# Repository credentials can be imported using the repository URL.\n\n# Note: as the ArgoCD API does not return any sensitive information, a\n# subsequent `terraform apply` should be executed to make the `password`,\n# `ssh_private_key` and `tls_client_cert_key` attributes converge to their\n# expected values defined within the plan.\n\nterraform import argocd_repository_credentials.myrepocreds git@private-git-repository.local:somerepo.git"
  },
  {
    "path": "examples/resources/argocd_repository_credentials/resource.tf",
    "content": "resource \"argocd_repository_credentials\" \"private\" {\n  url             = \"git@private-git-repository.local\"\n  username        = \"git\"\n  ssh_private_key = \"-----BEGIN OPENSSH PRIVATE KEY-----\\nfoo\\nbar\\n-----END OPENSSH PRIVATE KEY-----\"\n}\n"
  },
  {
    "path": "go.mod",
    "content": "module github.com/argoproj-labs/terraform-provider-argocd\n\ngo 1.25.8\n\nrequire (\n\tgithub.com/Masterminds/semver/v3 v3.4.0\n\tgithub.com/ProtonMail/gopenpgp/v3 v3.4.0\n\tgithub.com/argoproj/argo-cd/v3 v3.3.6\n\t// make sure this matches with version used in Argo CD's go.mod\n\tgithub.com/argoproj/gitops-engine v0.7.1-0.20251217140045-5baed5604d2d\n\tgithub.com/argoproj/pkg/v2 v2.0.1\n\tgithub.com/cristalhq/jwt/v5 v5.4.0\n\tgithub.com/elliotchance/pie/v2 v2.9.1\n\tgithub.com/hashicorp/terraform-plugin-framework v1.19.0\n\tgithub.com/hashicorp/terraform-plugin-framework-validators v0.19.0\n\tgithub.com/hashicorp/terraform-plugin-go v0.31.0\n\tgithub.com/hashicorp/terraform-plugin-log v0.10.0\n\tgithub.com/hashicorp/terraform-plugin-mux v0.23.0\n\tgithub.com/hashicorp/terraform-plugin-sdk/v2 v2.40.0\n\tgithub.com/hashicorp/terraform-plugin-testing v1.15.0\n\tgithub.com/robfig/cron/v3 v3.0.2-0.20210106135023-bc59245fe10e\n\tgithub.com/stretchr/testify v1.11.1\n\tgithub.com/testcontainers/testcontainers-go v0.42.0\n\tgithub.com/testcontainers/testcontainers-go/modules/k3s v0.42.0\n\tgolang.org/x/crypto v0.48.0 // indirect\n\tgoogle.golang.org/protobuf v1.36.11\n\tk8s.io/apiextensions-apiserver v0.34.0\n\tk8s.io/apimachinery v0.34.0\n\tk8s.io/client-go v0.34.0\n)\n\nrequire (\n\tcloud.google.com/go/auth v0.15.0 // indirect\n\tcloud.google.com/go/auth/oauth2adapt v0.2.7 // indirect\n\tcloud.google.com/go/compute/metadata v0.9.0 // indirect\n\tcode.gitea.io/sdk/gitea v0.22.1 // indirect\n\tcyphar.com/go-pathrs v0.2.1 // indirect\n\tdario.cat/mergo v1.0.2 // indirect\n\tgithub.com/42wim/httpsig v1.2.3 // indirect\n\tgithub.com/Azure/azure-sdk-for-go/sdk/azcore v1.20.0 // indirect\n\tgithub.com/Azure/azure-sdk-for-go/sdk/azidentity v1.13.1 // indirect\n\tgithub.com/Azure/azure-sdk-for-go/sdk/internal v1.11.2 // indirect\n\tgithub.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c // indirect\n\tgithub.com/AzureAD/microsoft-authentication-library-for-go v1.6.0 // indirect\n\tgithub.com/MakeNowJust/heredoc v1.0.0 // indirect\n\tgithub.com/Masterminds/goutils v1.1.1 // indirect\n\tgithub.com/Masterminds/sprig/v3 v3.3.0 // indirect\n\tgithub.com/Microsoft/go-winio v0.6.2 // indirect\n\tgithub.com/OvyFlash/telegram-bot-api v0.0.0-20241219171906-3f2ca0c14ada // indirect\n\tgithub.com/PagerDuty/go-pagerduty v1.8.0 // indirect\n\tgithub.com/ProtonMail/go-crypto v1.4.1 // indirect\n\tgithub.com/RocketChat/Rocket.Chat.Go.SDK v0.0.0-20240116134246-a8cbe886bab0 // indirect\n\tgithub.com/agext/levenshtein v1.2.2 // indirect\n\tgithub.com/alicebob/miniredis/v2 v2.35.0 // indirect\n\tgithub.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect\n\tgithub.com/argoproj/notifications-engine v0.5.1-0.20260119155007-a23b5827d630 // indirect\n\tgithub.com/argoproj/pkg v0.13.6 // indirect\n\tgithub.com/aws/aws-sdk-go v1.55.7 // indirect\n\tgithub.com/aws/aws-sdk-go-v2 v1.36.3 // indirect\n\tgithub.com/aws/aws-sdk-go-v2/config v1.29.9 // indirect\n\tgithub.com/aws/aws-sdk-go-v2/credentials v1.17.62 // indirect\n\tgithub.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30 // indirect\n\tgithub.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34 // indirect\n\tgithub.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34 // indirect\n\tgithub.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect\n\tgithub.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3 // indirect\n\tgithub.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15 // indirect\n\tgithub.com/aws/aws-sdk-go-v2/service/sqs v1.38.1 // indirect\n\tgithub.com/aws/aws-sdk-go-v2/service/sso v1.25.1 // indirect\n\tgithub.com/aws/aws-sdk-go-v2/service/ssooidc v1.29.1 // indirect\n\tgithub.com/aws/aws-sdk-go-v2/service/sts v1.33.17 // indirect\n\tgithub.com/aws/smithy-go v1.22.2 // indirect\n\tgithub.com/beorn7/perks v1.0.1 // indirect\n\tgithub.com/blang/semver/v4 v4.0.0 // indirect\n\tgithub.com/bmatcuk/doublestar/v4 v4.9.1 // indirect\n\tgithub.com/bombsimon/logrusr/v4 v4.1.0 // indirect\n\tgithub.com/bradleyfalzon/ghinstallation/v2 v2.17.0 // indirect\n\tgithub.com/casbin/casbin/v2 v2.135.0 // indirect\n\tgithub.com/casbin/govaluate v1.10.0 // indirect\n\tgithub.com/cenkalti/backoff/v4 v4.3.0 // indirect\n\tgithub.com/cenkalti/backoff/v5 v5.0.3 // indirect\n\tgithub.com/cespare/xxhash/v2 v2.3.0 // indirect\n\tgithub.com/chai2010/gettext-go v1.0.3 // indirect\n\tgithub.com/chainguard-dev/git-urls v1.0.2 // indirect\n\tgithub.com/cloudflare/circl v1.6.2 // indirect\n\tgithub.com/containerd/errdefs v1.0.0 // indirect\n\tgithub.com/containerd/errdefs/pkg v0.3.0 // indirect\n\tgithub.com/containerd/log v0.1.0 // indirect\n\tgithub.com/containerd/platforms v0.2.1 // indirect\n\tgithub.com/coreos/go-oidc/v3 v3.14.1 // indirect\n\tgithub.com/cpuguy83/dockercfg v0.3.2 // indirect\n\tgithub.com/cyphar/filepath-securejoin v0.6.1 // indirect\n\tgithub.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect\n\tgithub.com/davidmz/go-pageant v1.0.2 // indirect\n\tgithub.com/desertbit/timer v1.0.1 // indirect\n\tgithub.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect\n\tgithub.com/distribution/reference v0.6.0 // indirect\n\tgithub.com/dlclark/regexp2 v1.11.5 // indirect\n\tgithub.com/docker/go-connections v0.6.0 // indirect\n\tgithub.com/docker/go-units v0.5.0 // indirect\n\tgithub.com/ebitengine/purego v0.10.0 // indirect\n\tgithub.com/emicklei/go-restful/v3 v3.12.2 // indirect\n\tgithub.com/emirpasic/gods v1.18.1 // indirect\n\tgithub.com/evanphx/json-patch v5.9.11+incompatible // indirect\n\tgithub.com/evanphx/json-patch/v5 v5.9.11 // indirect\n\tgithub.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f // indirect\n\tgithub.com/expr-lang/expr v1.17.7 // indirect\n\tgithub.com/fatih/camelcase v1.0.0 // indirect\n\tgithub.com/fatih/color v1.18.0 // indirect\n\tgithub.com/felixge/httpsnoop v1.0.4 // indirect\n\tgithub.com/fxamacker/cbor/v2 v2.9.0 // indirect\n\tgithub.com/gfleury/go-bitbucket-v1 v0.0.0-20240917142304-df385efaac68 // indirect\n\tgithub.com/go-errors/errors v1.5.1 // indirect\n\tgithub.com/go-fed/httpsig v1.1.0 // indirect\n\tgithub.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect\n\tgithub.com/go-git/go-billy/v5 v5.6.2 // indirect\n\tgithub.com/go-git/go-git/v5 v5.16.5 // indirect\n\tgithub.com/go-jose/go-jose/v4 v4.1.3 // indirect\n\tgithub.com/go-logr/logr v1.4.3 // indirect\n\tgithub.com/go-logr/stdr v1.2.2 // indirect\n\tgithub.com/go-ole/go-ole v1.2.6 // indirect\n\tgithub.com/go-openapi/analysis v0.24.1 // indirect\n\tgithub.com/go-openapi/errors v0.22.4 // indirect\n\tgithub.com/go-openapi/jsonpointer v0.22.1 // indirect\n\tgithub.com/go-openapi/jsonreference v0.21.3 // indirect\n\tgithub.com/go-openapi/loads v0.23.2 // indirect\n\tgithub.com/go-openapi/runtime v0.29.2 // indirect\n\tgithub.com/go-openapi/spec v0.22.1 // indirect\n\tgithub.com/go-openapi/strfmt v0.25.0 // indirect\n\tgithub.com/go-openapi/swag v0.23.1 // indirect\n\tgithub.com/go-openapi/swag/conv v0.25.1 // indirect\n\tgithub.com/go-openapi/swag/fileutils v0.25.1 // indirect\n\tgithub.com/go-openapi/swag/jsonname v0.25.1 // indirect\n\tgithub.com/go-openapi/swag/jsonutils v0.25.1 // indirect\n\tgithub.com/go-openapi/swag/loading v0.25.1 // indirect\n\tgithub.com/go-openapi/swag/mangling v0.25.1 // indirect\n\tgithub.com/go-openapi/swag/stringutils v0.25.1 // indirect\n\tgithub.com/go-openapi/swag/typeutils v0.25.1 // indirect\n\tgithub.com/go-openapi/swag/yamlutils v0.25.1 // indirect\n\tgithub.com/go-openapi/validate v0.25.1 // indirect\n\tgithub.com/go-playground/webhooks/v6 v6.4.0 // indirect\n\tgithub.com/go-redis/cache/v9 v9.0.0 // indirect\n\tgithub.com/go-viper/mapstructure/v2 v2.4.0 // indirect\n\tgithub.com/gobwas/glob v0.2.3 // indirect\n\tgithub.com/gogits/go-gogs-client v0.0.0-20210131175652-1d7215cd8d85 // indirect\n\tgithub.com/gogo/protobuf v1.3.2 // indirect\n\tgithub.com/golang-jwt/jwt/v4 v4.5.2 // indirect\n\tgithub.com/golang-jwt/jwt/v5 v5.3.0 // indirect\n\tgithub.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect\n\tgithub.com/golang/protobuf v1.5.4 // indirect\n\tgithub.com/google/btree v1.1.3 // indirect\n\tgithub.com/google/gnostic-models v0.7.0 // indirect\n\tgithub.com/google/go-cmp v0.7.0 // indirect\n\tgithub.com/google/go-github/v69 v69.2.0 // indirect\n\tgithub.com/google/go-github/v75 v75.0.0 // indirect\n\tgithub.com/google/go-jsonnet v0.21.0 // indirect\n\tgithub.com/google/go-querystring v1.1.0 // indirect\n\tgithub.com/google/s2a-go v0.1.9 // indirect\n\tgithub.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect\n\tgithub.com/google/uuid v1.6.1-0.20241114170450-2d3c2a9cc518 // indirect\n\tgithub.com/googleapis/enterprise-certificate-proxy v0.3.4 // indirect\n\tgithub.com/googleapis/gax-go/v2 v2.14.1 // indirect\n\tgithub.com/gorilla/handlers v1.5.2 // indirect\n\tgithub.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 // indirect\n\tgithub.com/gosimple/slug v1.15.0 // indirect\n\tgithub.com/gosimple/unidecode v1.0.1 // indirect\n\tgithub.com/gregdel/pushover v1.3.1 // indirect\n\tgithub.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect\n\tgithub.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.1.0 // indirect\n\tgithub.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.3 // indirect\n\tgithub.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect\n\tgithub.com/hashicorp/errwrap v1.1.0 // indirect\n\tgithub.com/hashicorp/go-checkpoint v0.5.0 // indirect\n\tgithub.com/hashicorp/go-cleanhttp v0.5.2 // indirect\n\tgithub.com/hashicorp/go-cty v1.5.0 // indirect\n\tgithub.com/hashicorp/go-hclog v1.6.3 // indirect\n\tgithub.com/hashicorp/go-multierror v1.1.1 // indirect\n\tgithub.com/hashicorp/go-plugin v1.7.0 // indirect\n\tgithub.com/hashicorp/go-retryablehttp v0.7.8 // indirect\n\tgithub.com/hashicorp/go-uuid v1.0.3 // indirect\n\tgithub.com/hashicorp/go-version v1.8.0 // indirect\n\tgithub.com/hashicorp/hc-install v0.9.3 // indirect\n\tgithub.com/hashicorp/hcl/v2 v2.24.0 // indirect\n\tgithub.com/hashicorp/logutils v1.0.0 // indirect\n\tgithub.com/hashicorp/terraform-exec v0.25.0 // indirect\n\tgithub.com/hashicorp/terraform-json v0.27.2 // indirect\n\tgithub.com/hashicorp/terraform-registry-address v0.4.0 // indirect\n\tgithub.com/hashicorp/terraform-svchost v0.1.1 // indirect\n\tgithub.com/hashicorp/yamux v0.1.2 // indirect\n\tgithub.com/huandu/xstrings v1.5.0 // indirect\n\tgithub.com/improbable-eng/grpc-web v0.15.1-0.20230209220825-1d9bbb09a099 // indirect\n\tgithub.com/inconshreveable/mousetrap v1.1.0 // indirect\n\tgithub.com/itchyny/gojq v0.12.18 // indirect\n\tgithub.com/itchyny/timefmt-go v0.1.7 // indirect\n\tgithub.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect\n\tgithub.com/jeremywohl/flatten v1.0.2-0.20211013061545-07e4a09fb8e4 // indirect\n\tgithub.com/jmespath/go-jmespath v0.4.0 // indirect\n\tgithub.com/jonboulle/clockwork v0.5.0 // indirect\n\tgithub.com/josharian/intern v1.0.0 // indirect\n\tgithub.com/json-iterator/go v1.1.12 // indirect\n\tgithub.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect\n\tgithub.com/kevinburke/ssh_config v1.2.0 // indirect\n\tgithub.com/klauspost/compress v1.18.5 // indirect\n\tgithub.com/ktrysmt/go-bitbucket v0.9.88 // indirect\n\tgithub.com/kylelemons/godebug v1.1.0 // indirect\n\tgithub.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect\n\tgithub.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect\n\tgithub.com/magiconair/properties v1.8.10 // indirect\n\tgithub.com/mailru/easyjson v0.9.0 // indirect\n\tgithub.com/mattn/go-colorable v0.1.14 // indirect\n\tgithub.com/mattn/go-isatty v0.0.20 // indirect\n\tgithub.com/microsoft/azure-devops-go-api/azuredevops/v7 v7.1.1-0.20241014080628-3045bdf43455 // indirect\n\tgithub.com/mitchellh/copystructure v1.2.0 // indirect\n\tgithub.com/mitchellh/go-testing-interface v1.14.1 // indirect\n\tgithub.com/mitchellh/go-wordwrap v1.0.1 // indirect\n\tgithub.com/mitchellh/mapstructure v1.5.0 // indirect\n\tgithub.com/mitchellh/reflectwalk v1.0.2 // indirect\n\tgithub.com/moby/docker-image-spec v1.3.1 // indirect\n\tgithub.com/moby/go-archive v0.2.0 // indirect\n\tgithub.com/moby/moby/api v1.54.1 // indirect\n\tgithub.com/moby/moby/client v0.4.0 // indirect\n\tgithub.com/moby/patternmatcher v0.6.1 // indirect\n\tgithub.com/moby/spdystream v0.5.0 // indirect\n\tgithub.com/moby/sys/sequential v0.6.0 // indirect\n\tgithub.com/moby/sys/user v0.4.0 // indirect\n\tgithub.com/moby/sys/userns v0.1.0 // indirect\n\tgithub.com/moby/term v0.5.2 // indirect\n\tgithub.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect\n\tgithub.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect\n\tgithub.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect\n\tgithub.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect\n\tgithub.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect\n\tgithub.com/oklog/run v1.1.0 // indirect\n\tgithub.com/oklog/ulid v1.3.1 // indirect\n\tgithub.com/opencontainers/go-digest v1.0.0 // indirect\n\tgithub.com/opencontainers/image-spec v1.1.1 // indirect\n\tgithub.com/opsgenie/opsgenie-go-sdk-v2 v1.2.23 // indirect\n\tgithub.com/patrickmn/go-cache v2.1.1-0.20191004192108-46f407853014+incompatible // indirect\n\tgithub.com/peterbourgon/diskv v2.0.1+incompatible // indirect\n\tgithub.com/pjbgf/sha1cd v0.3.2 // indirect\n\tgithub.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect\n\tgithub.com/pkg/errors v0.9.1 // indirect\n\tgithub.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect\n\tgithub.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect\n\tgithub.com/prometheus/client_golang v1.23.2 // indirect\n\tgithub.com/prometheus/client_model v0.6.2 // indirect\n\tgithub.com/prometheus/common v0.66.1 // indirect\n\tgithub.com/prometheus/procfs v0.16.1 // indirect\n\tgithub.com/r3labs/diff/v3 v3.0.2 // indirect\n\tgithub.com/redis/go-redis/v9 v9.8.0 // indirect\n\tgithub.com/rs/cors v1.11.1 // indirect\n\tgithub.com/russross/blackfriday/v2 v2.1.0 // indirect\n\tgithub.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect\n\tgithub.com/shirou/gopsutil/v4 v4.26.3 // indirect\n\tgithub.com/shopspring/decimal v1.4.0 // indirect\n\tgithub.com/sirupsen/logrus v1.9.4 // indirect\n\tgithub.com/skeema/knownhosts v1.3.1 // indirect\n\tgithub.com/slack-go/slack v0.16.0 // indirect\n\tgithub.com/soheilhy/cmux v0.1.5 // indirect\n\tgithub.com/spf13/cast v1.7.1 // indirect\n\tgithub.com/spf13/cobra v1.10.2 // indirect\n\tgithub.com/spf13/pflag v1.0.10 // indirect\n\tgithub.com/tklauser/go-sysconf v0.3.16 // indirect\n\tgithub.com/tklauser/numcpus v0.11.0 // indirect\n\tgithub.com/valyala/bytebufferpool v1.0.0 // indirect\n\tgithub.com/valyala/fasttemplate v1.2.2 // indirect\n\tgithub.com/vmihailenco/go-tinylfu v0.2.2 // indirect\n\tgithub.com/vmihailenco/msgpack v4.0.4+incompatible // indirect\n\tgithub.com/vmihailenco/msgpack/v5 v5.4.1 // indirect\n\tgithub.com/vmihailenco/tagparser/v2 v2.0.0 // indirect\n\tgithub.com/x448/float16 v0.8.4 // indirect\n\tgithub.com/xanzy/ssh-agent v0.3.3 // indirect\n\tgithub.com/xlab/treeprint v1.2.0 // indirect\n\tgithub.com/yuin/gopher-lua v1.1.1 // indirect\n\tgithub.com/yusufpapurcu/wmi v1.2.4 // indirect\n\tgithub.com/zclconf/go-cty v1.17.0 // indirect\n\tgitlab.com/gitlab-org/api/client-go v1.8.1 // indirect\n\tgo.mongodb.org/mongo-driver v1.17.6 // indirect\n\tgo.opentelemetry.io/auto/sdk v1.2.1 // indirect\n\tgo.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.63.0 // indirect\n\tgo.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 // indirect\n\tgo.opentelemetry.io/otel v1.41.0 // indirect\n\tgo.opentelemetry.io/otel/metric v1.41.0 // indirect\n\tgo.opentelemetry.io/otel/trace v1.41.0 // indirect\n\tgo.yaml.in/yaml/v2 v2.4.2 // indirect\n\tgo.yaml.in/yaml/v3 v3.0.4 // indirect\n\tgolang.org/x/exp v0.0.0-20250813145105-42675adae3e6 // indirect\n\tgolang.org/x/mod v0.33.0 // indirect\n\tgolang.org/x/net v0.49.0 // indirect\n\tgolang.org/x/oauth2 v0.34.0 // indirect\n\tgolang.org/x/sync v0.19.0 // indirect\n\tgolang.org/x/sys v0.42.0 // indirect\n\tgolang.org/x/term v0.40.0 // indirect\n\tgolang.org/x/text v0.34.0 // indirect\n\tgolang.org/x/time v0.14.0 // indirect\n\tgolang.org/x/tools v0.41.0 // indirect\n\tgomodules.xyz/envconfig v1.3.1-0.20190308184047-426f31af0d45 // indirect\n\tgomodules.xyz/notify v0.1.1 // indirect\n\tgoogle.golang.org/api v0.223.0 // indirect\n\tgoogle.golang.org/appengine v1.6.8 // indirect\n\tgoogle.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect\n\tgoogle.golang.org/genproto/googleapis/api v0.0.0-20251202230838-ff82c1b0f217 // indirect\n\tgoogle.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217 // indirect\n\tgoogle.golang.org/grpc v1.79.3 // indirect\n\tgopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect\n\tgopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect\n\tgopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df // indirect\n\tgopkg.in/inf.v0 v0.9.1 // indirect\n\tgopkg.in/warnings.v0 v0.1.2 // indirect\n\tgopkg.in/yaml.v2 v2.4.0 // indirect\n\tgopkg.in/yaml.v3 v3.0.1 // indirect\n\tk8s.io/api v0.34.0 // indirect\n\tk8s.io/apiserver v0.34.0 // indirect\n\tk8s.io/cli-runtime v0.34.0 // indirect\n\tk8s.io/component-base v0.34.0 // indirect\n\tk8s.io/component-helpers v0.34.0 // indirect\n\tk8s.io/controller-manager v0.34.0 // indirect\n\tk8s.io/klog/v2 v2.130.1 // indirect\n\tk8s.io/kube-aggregator v0.34.0 // indirect\n\tk8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b // indirect\n\tk8s.io/kubectl v0.34.0 // indirect\n\tk8s.io/kubernetes v1.34.2 // indirect\n\tk8s.io/utils v0.0.0-20250604170112-4c0f3b243397 // indirect\n\tlayeh.com/gopher-json v0.0.0-20190114024228-97fed8db8427 // indirect\n\tnhooyr.io/websocket v1.8.7 // indirect\n\toras.land/oras-go/v2 v2.6.0 // indirect\n\tsigs.k8s.io/controller-runtime v0.21.0 // indirect\n\tsigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect\n\tsigs.k8s.io/kustomize/api v0.20.1 // indirect\n\tsigs.k8s.io/kustomize/kyaml v0.20.1 // indirect\n\tsigs.k8s.io/randfill v1.0.0 // indirect\n\tsigs.k8s.io/structured-merge-diff/v6 v6.3.1-0.20251003215857-446d8398e19c // indirect\n\tsigs.k8s.io/yaml v1.6.0 // indirect\n)\n\nreplace (\n\t// https://github.com/argoproj/notifications-engine/pull/265\n\tgithub.com/go-telegram-bot-api/telegram-bot-api/v5 => github.com/OvyFlash/telegram-bot-api/v5 v5.0.0-20240108230938-63e5c59035bf\n\n\tgithub.com/grpc-ecosystem/grpc-gateway => github.com/grpc-ecosystem/grpc-gateway v1.16.0\n\n\t// Avoid CVE-2022-28948\n\tgopkg.in/yaml.v3 => gopkg.in/yaml.v3 v3.0.1\n\n\t// https://github.com/kubernetes/kubernetes/issues/79384#issuecomment-505627280\n\tk8s.io/api => k8s.io/api v0.34.0\n\tk8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.34.0\n\tk8s.io/apimachinery => k8s.io/apimachinery v0.34.2\n\tk8s.io/apiserver => k8s.io/apiserver v0.34.0\n\tk8s.io/cli-runtime => k8s.io/cli-runtime v0.34.0\n\tk8s.io/client-go => k8s.io/client-go v0.34.0\n\tk8s.io/cloud-provider => k8s.io/cloud-provider v0.34.0\n\tk8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.34.0\n\tk8s.io/code-generator => k8s.io/code-generator v0.34.0\n\tk8s.io/component-base => k8s.io/component-base v0.34.0\n\tk8s.io/component-helpers => k8s.io/component-helpers v0.34.0\n\tk8s.io/controller-manager => k8s.io/controller-manager v0.34.0\n\tk8s.io/cri-api => k8s.io/cri-api v0.34.2\n\tk8s.io/cri-client => k8s.io/cri-client v0.34.0\n\tk8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.34.0\n\tk8s.io/dynamic-resource-allocation => k8s.io/dynamic-resource-allocation v0.34.0\n\tk8s.io/endpointslice => k8s.io/endpointslice v0.34.0\n\tk8s.io/externaljwt => k8s.io/externaljwt v0.34.2\n\tk8s.io/kms => k8s.io/kms v0.34.0\n\tk8s.io/kube-aggregator => k8s.io/kube-aggregator v0.34.0\n\tk8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.34.0\n\tk8s.io/kube-proxy => k8s.io/kube-proxy v0.34.0\n\tk8s.io/kube-scheduler => k8s.io/kube-scheduler v0.34.0\n\tk8s.io/kubectl => k8s.io/kubectl v0.34.0\n\tk8s.io/kubelet => k8s.io/kubelet v0.34.0\n\tk8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.33.1\n\tk8s.io/metrics => k8s.io/metrics v0.34.0\n\tk8s.io/mount-utils => k8s.io/mount-utils v0.34.2\n\tk8s.io/pod-security-admission => k8s.io/pod-security-admission v0.34.0\n\tk8s.io/sample-apiserver => k8s.io/sample-apiserver v0.34.0\n\tk8s.io/sample-cli-plugin => k8s.io/sample-cli-plugin v0.34.0\n\tk8s.io/sample-controller => k8s.io/sample-controller v0.34.0\n)\n"
  },
  {
    "path": "go.sum",
    "content": "cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=\ncloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=\ncloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=\ncloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU=\ncloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY=\ncloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc=\ncloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0=\ncloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To=\ncloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4=\ncloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M=\ncloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc=\ncloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk=\ncloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs=\ncloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc=\ncloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY=\ncloud.google.com/go/auth v0.15.0 h1:Ly0u4aA5vG/fsSsxu98qCQBemXtAtJf+95z9HK+cxps=\ncloud.google.com/go/auth v0.15.0/go.mod h1:WJDGqZ1o9E9wKIL+IwStfyn/+s59zl4Bi+1KQNVXLZ8=\ncloud.google.com/go/auth/oauth2adapt v0.2.7 h1:/Lc7xODdqcEw8IrZ9SvwnlLX6j9FHQM74z6cBk9Rw6M=\ncloud.google.com/go/auth/oauth2adapt v0.2.7/go.mod h1:NTbTTzfvPl1Y3V1nPpOgl2w6d/FjO7NNUQaWSox6ZMc=\ncloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=\ncloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE=\ncloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc=\ncloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg=\ncloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc=\ncloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ=\ncloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k=\ncloud.google.com/go/compute/metadata v0.9.0 h1:pDUj4QMoPejqq20dK0Pg2N4yG9zIkYGdBtwLoEkH9Zs=\ncloud.google.com/go/compute/metadata v0.9.0/go.mod h1:E0bWwX5wTnLPedCKqk3pJmVgCBSM6qQI1yTBdEb3C10=\ncloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=\ncloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk=\ncloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=\ncloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw=\ncloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA=\ncloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU=\ncloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw=\ncloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos=\ncloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk=\ncloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=\ncloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=\ncode.gitea.io/sdk/gitea v0.22.1 h1:7K05KjRORyTcTYULQ/AwvlVS6pawLcWyXZcTr7gHFyA=\ncode.gitea.io/sdk/gitea v0.22.1/go.mod h1:yyF5+GhljqvA30sRDreoyHILruNiy4ASufugzYg0VHM=\ncyphar.com/go-pathrs v0.2.1 h1:9nx1vOgwVvX1mNBWDu93+vaceedpbsDqo+XuBGL40b8=\ncyphar.com/go-pathrs v0.2.1/go.mod h1:y8f1EMG7r+hCuFf/rXsKqMJrJAUoADZGNh5/vZPKcGc=\ndario.cat/mergo v1.0.2 h1:85+piFYR1tMbRrLcDwR18y4UKJ3aH1Tbzi24VRW1TK8=\ndario.cat/mergo v1.0.2/go.mod h1:E/hbnu0NxMFBjpMIE34DRGLWqDy0g5FuKDhCb31ngxA=\ndmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=\ngithub.com/42wim/httpsig v1.2.3 h1:xb0YyWhkYj57SPtfSttIobJUPJZB9as1nsfo7KWVcEs=\ngithub.com/42wim/httpsig v1.2.3/go.mod h1:nZq9OlYKDrUBhptd77IHx4/sZZD+IxTBADvAPI9G/EM=\ngithub.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6 h1:He8afgbRMd7mFxO99hRNu+6tazq8nFF9lIwo9JFroBk=\ngithub.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8=\ngithub.com/Azure/azure-sdk-for-go/sdk/azcore v1.20.0 h1:JXg2dwJUmPB9JmtVmdEB16APJ7jurfbY5jnfXpJoRMc=\ngithub.com/Azure/azure-sdk-for-go/sdk/azcore v1.20.0/go.mod h1:YD5h/ldMsG0XiIw7PdyNhLxaM317eFh5yNLccNfGdyw=\ngithub.com/Azure/azure-sdk-for-go/sdk/azidentity v1.13.1 h1:Hk5QBxZQC1jb2Fwj6mpzme37xbCDdNTxU7O9eb5+LB4=\ngithub.com/Azure/azure-sdk-for-go/sdk/azidentity v1.13.1/go.mod h1:IYus9qsFobWIc2YVwe/WPjcnyCkPKtnHAqUYeebc8z0=\ngithub.com/Azure/azure-sdk-for-go/sdk/azidentity/cache v0.3.2 h1:yz1bePFlP5Vws5+8ez6T3HWXPmwOK7Yvq8QxDBD3SKY=\ngithub.com/Azure/azure-sdk-for-go/sdk/azidentity/cache v0.3.2/go.mod h1:Pa9ZNPuoNu/GztvBSKk9J1cDJW6vk/n0zLtV4mgd8N8=\ngithub.com/Azure/azure-sdk-for-go/sdk/internal v1.11.2 h1:9iefClla7iYpfYWdzPCRDozdmndjTm8DXdpCzPajMgA=\ngithub.com/Azure/azure-sdk-for-go/sdk/internal v1.11.2/go.mod h1:XtLgD3ZD34DAaVIIAyG3objl5DynM3CQ/vMcbBNJZGI=\ngithub.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c h1:udKWzYgxTojEKWjV8V+WSxDXJ4NFATAsZjh8iIbsQIg=\ngithub.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E=\ngithub.com/AzureAD/microsoft-authentication-extensions-for-go/cache v0.1.1 h1:WJTmL004Abzc5wDB5VtZG2PJk5ndYDgVacGqfirKxjM=\ngithub.com/AzureAD/microsoft-authentication-extensions-for-go/cache v0.1.1/go.mod h1:tCcJZ0uHAmvjsVYzEFivsRTN00oz5BEsRgQHu5JZ9WE=\ngithub.com/AzureAD/microsoft-authentication-library-for-go v1.6.0 h1:XRzhVemXdgvJqCH0sFfrBUTnUJSBrBf7++ypk+twtRs=\ngithub.com/AzureAD/microsoft-authentication-library-for-go v1.6.0/go.mod h1:HKpQxkWaGLJ+D/5H8QRpyQXA1eKjxkFlOMwck5+33Jk=\ngithub.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=\ngithub.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=\ngithub.com/Jeffail/gabs v1.4.0 h1://5fYRRTq1edjfIrQGvdkcd22pkYUrHZ5YC/H2GJVAo=\ngithub.com/Jeffail/gabs v1.4.0/go.mod h1:6xMvQMK4k33lb7GUUpaAPh6nKMmemQeg5d4gn7/bOXc=\ngithub.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ=\ngithub.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE=\ngithub.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI=\ngithub.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU=\ngithub.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0=\ngithub.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=\ngithub.com/Masterminds/sprig/v3 v3.3.0 h1:mQh0Yrg1XPo6vjYXgtf5OtijNAKJRNcTdOOGZe3tPhs=\ngithub.com/Masterminds/sprig/v3 v3.3.0/go.mod h1:Zy1iXRYNqNLUolqCpL4uhk6SHUMAOSCzdgBfDb35Lz0=\ngithub.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY=\ngithub.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY=\ngithub.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=\ngithub.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c=\ngithub.com/OvyFlash/telegram-bot-api v0.0.0-20241219171906-3f2ca0c14ada h1:5ZtieioZyyfiJsGvjpj3d5Eso/3YjJJhNQ1M8at5U5k=\ngithub.com/OvyFlash/telegram-bot-api v0.0.0-20241219171906-3f2ca0c14ada/go.mod h1:2nRUdsKyWhvezqW/rBGWEQdcTQeTtnbSNd2dgx76WYA=\ngithub.com/PagerDuty/go-pagerduty v1.8.0 h1:MTFqTffIcAervB83U7Bx6HERzLbyaSPL/+oxH3zyluI=\ngithub.com/PagerDuty/go-pagerduty v1.8.0/go.mod h1:nzIeAqyFSJAFkjWKvMzug0JtwDg+V+UoCWjFrfFH5mI=\ngithub.com/ProtonMail/go-crypto v1.4.1 h1:9RfcZHqEQUvP8RzecWEUafnZVtEvrBVL9BiF67IQOfM=\ngithub.com/ProtonMail/go-crypto v1.4.1/go.mod h1:e1OaTyu5SYVrO9gKOEhTc+5UcXtTUa+P3uLudwcgPqo=\ngithub.com/ProtonMail/gopenpgp/v3 v3.4.0 h1:WW0VK+mZjbu5SqhWNm58TYKFxyvduiUHTfyIKs60dgY=\ngithub.com/ProtonMail/gopenpgp/v3 v3.4.0/go.mod h1:bGdV9f6edhmd581wzXsQCTKdH8bXBbyhkgDKPjwPc6U=\ngithub.com/RocketChat/Rocket.Chat.Go.SDK v0.0.0-20240116134246-a8cbe886bab0 h1:ztLQGVQsey3BjCoh0TvHc/iKTQmkio2OmsIxhuu+EeY=\ngithub.com/RocketChat/Rocket.Chat.Go.SDK v0.0.0-20240116134246-a8cbe886bab0/go.mod h1:rjP7sIipbZcagro/6TCk6X0ZeFT2eyudH5+fve/cbBA=\ngithub.com/agext/levenshtein v1.2.2 h1:0S/Yg6LYmFJ5stwQeRp6EeOcCbj7xiqQSdNelsXvaqE=\ngithub.com/agext/levenshtein v1.2.2/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558=\ngithub.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=\ngithub.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=\ngithub.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=\ngithub.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=\ngithub.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=\ngithub.com/alicebob/miniredis/v2 v2.35.0 h1:QwLphYqCEAo1eu1TqPRN2jgVMPBweeQcR21jeqDCONI=\ngithub.com/alicebob/miniredis/v2 v2.35.0/go.mod h1:TcL7YfarKPGDAthEtl5NBeHZfeUQj6OXMm/+iu5cLMM=\ngithub.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8=\ngithub.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4=\ngithub.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=\ngithub.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec=\ngithub.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew1u1fNQOlOtuGxQY=\ngithub.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4=\ngithub.com/appscode/go v0.0.0-20191119085241-0887d8ec2ecc/go.mod h1:OawnOmAL4ZX3YaPdN+8HTNwBveT1jMsqP74moa9XUbE=\ngithub.com/argoproj/argo-cd/v3 v3.3.6 h1:eaWeTkM5EdDHSD3seySuxmbBY38UHjZfRJUPRBccGcY=\ngithub.com/argoproj/argo-cd/v3 v3.3.6/go.mod h1:jNt8U5uib3bZWtKc4c0L9OsvgkYVOA0HtcRppVcp1oM=\ngithub.com/argoproj/gitops-engine v0.7.1-0.20251217140045-5baed5604d2d h1:iUJYrbSvpV9n8vyl1sBt1GceM60HhHfnHxuzcm5apDg=\ngithub.com/argoproj/gitops-engine v0.7.1-0.20251217140045-5baed5604d2d/go.mod h1:PauXVUVcfiTgC+34lDdWzPS101g4NpsUtDAjFBnWf94=\ngithub.com/argoproj/notifications-engine v0.5.1-0.20260119155007-a23b5827d630 h1:naE5KNRTOALjF5nVIGUHrHU5xjlB8QJJiCu+aISIlSs=\ngithub.com/argoproj/notifications-engine v0.5.1-0.20260119155007-a23b5827d630/go.mod h1:d1RazGXWvKRFv9//rg4MRRR7rbvbE7XLgTSMT5fITTE=\ngithub.com/argoproj/pkg v0.13.6 h1:36WPD9MNYECHcO1/R1pj6teYspiK7uMQLCgLGft2abM=\ngithub.com/argoproj/pkg v0.13.6/go.mod h1:I698DoJBKuvNFaixh4vFl2C88cNIT1WS7KCbz5ewyF8=\ngithub.com/argoproj/pkg/v2 v2.0.1 h1:O/gCETzB/3+/hyFL/7d/VM/6pSOIRWIiBOTb2xqAHvc=\ngithub.com/argoproj/pkg/v2 v2.0.1/go.mod h1:sdifF6sUTx9ifs38ZaiNMRJuMpSCBB9GulHfbPgQeRE=\ngithub.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=\ngithub.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=\ngithub.com/aws/aws-sdk-go v1.44.39/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo=\ngithub.com/aws/aws-sdk-go v1.55.7 h1:UJrkFq7es5CShfBwlWAC8DA077vp8PyVbQd3lqLiztE=\ngithub.com/aws/aws-sdk-go v1.55.7/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU=\ngithub.com/aws/aws-sdk-go-v2 v1.36.3 h1:mJoei2CxPutQVxaATCzDUjcZEjVRdpsiiXi2o38yqWM=\ngithub.com/aws/aws-sdk-go-v2 v1.36.3/go.mod h1:LLXuLpgzEbD766Z5ECcRmi8AzSwfZItDtmABVkRLGzg=\ngithub.com/aws/aws-sdk-go-v2/config v1.29.9 h1:Kg+fAYNaJeGXp1vmjtidss8O2uXIsXwaRqsQJKXVr+0=\ngithub.com/aws/aws-sdk-go-v2/config v1.29.9/go.mod h1:oU3jj2O53kgOU4TXq/yipt6ryiooYjlkqqVaZk7gY/U=\ngithub.com/aws/aws-sdk-go-v2/credentials v1.17.62 h1:fvtQY3zFzYJ9CfixuAQ96IxDrBajbBWGqjNTCa79ocU=\ngithub.com/aws/aws-sdk-go-v2/credentials v1.17.62/go.mod h1:ElETBxIQqcxej++Cs8GyPBbgMys5DgQPTwo7cUPDKt8=\ngithub.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30 h1:x793wxmUWVDhshP8WW2mlnXuFrO4cOd3HLBroh1paFw=\ngithub.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30/go.mod h1:Jpne2tDnYiFascUEs2AWHJL9Yp7A5ZVy3TNyxaAjD6M=\ngithub.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34 h1:ZK5jHhnrioRkUNOc+hOgQKlUL5JeC3S6JgLxtQ+Rm0Q=\ngithub.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34/go.mod h1:p4VfIceZokChbA9FzMbRGz5OV+lekcVtHlPKEO0gSZY=\ngithub.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34 h1:SZwFm17ZUNNg5Np0ioo/gq8Mn6u9w19Mri8DnJ15Jf0=\ngithub.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34/go.mod h1:dFZsC0BLo346mvKQLWmoJxT+Sjp+qcVR1tRVHQGOH9Q=\ngithub.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 h1:bIqFDwgGXXN1Kpp99pDOdKMTTb5d2KyU5X/BZxjOkRo=\ngithub.com/aws/aws-sdk-go-v2/internal/ini v1.8.3/go.mod h1:H5O/EsxDWyU+LP/V8i5sm8cxoZgc2fdNR9bxlOFrQTo=\ngithub.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3 h1:eAh2A4b5IzM/lum78bZ590jy36+d/aFLgKF/4Vd1xPE=\ngithub.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3/go.mod h1:0yKJC/kb8sAnmlYa6Zs3QVYqaC8ug2AbnNChv5Ox3uA=\ngithub.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15 h1:dM9/92u2F1JbDaGooxTq18wmmFzbJRfXfVfy96/1CXM=\ngithub.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15/go.mod h1:SwFBy2vjtA0vZbjjaFtfN045boopadnoVPhu4Fv66vY=\ngithub.com/aws/aws-sdk-go-v2/service/sqs v1.38.1 h1:ZtgZeMPJH8+/vNs9vJFFLI0QEzYbcN0p7x1/FFwyROc=\ngithub.com/aws/aws-sdk-go-v2/service/sqs v1.38.1/go.mod h1:Bar4MrRxeqdn6XIh8JGfiXuFRmyrrsZNTJotxEJmWW0=\ngithub.com/aws/aws-sdk-go-v2/service/sso v1.25.1 h1:8JdC7Gr9NROg1Rusk25IcZeTO59zLxsKgE0gkh5O6h0=\ngithub.com/aws/aws-sdk-go-v2/service/sso v1.25.1/go.mod h1:qs4a9T5EMLl/Cajiw2TcbNt2UNo/Hqlyp+GiuG4CFDI=\ngithub.com/aws/aws-sdk-go-v2/service/ssooidc v1.29.1 h1:KwuLovgQPcdjNMfFt9OhUd9a2OwcOKhxfvF4glTzLuA=\ngithub.com/aws/aws-sdk-go-v2/service/ssooidc v1.29.1/go.mod h1:MlYRNmYu/fGPoxBQVvBYr9nyr948aY/WLUvwBMBJubs=\ngithub.com/aws/aws-sdk-go-v2/service/sts v1.33.17 h1:PZV5W8yk4OtH1JAuhV2PXwwO9v5G5Aoj+eMCn4T+1Kc=\ngithub.com/aws/aws-sdk-go-v2/service/sts v1.33.17/go.mod h1:cQnB8CUnxbMU82JvlqjKR2HBOm3fe9pWorWBza6MBJ4=\ngithub.com/aws/smithy-go v1.22.2 h1:6D9hW43xKFrRx/tXXfAlIZc4JI+yQe6snnWcQyxSyLQ=\ngithub.com/aws/smithy-go v1.22.2/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg=\ngithub.com/beevik/ntp v0.2.0/go.mod h1:hIHWr+l3+/clUnF44zdK+CWW7fO8dR5cIylAQ76NRpg=\ngithub.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=\ngithub.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=\ngithub.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=\ngithub.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=\ngithub.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM=\ngithub.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ=\ngithub.com/bmatcuk/doublestar/v4 v4.6.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc=\ngithub.com/bmatcuk/doublestar/v4 v4.9.1 h1:X8jg9rRZmJd4yRy7ZeNDRnM+T3ZfHv15JiBJ/avrEXE=\ngithub.com/bmatcuk/doublestar/v4 v4.9.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc=\ngithub.com/bombsimon/logrusr/v4 v4.1.0 h1:uZNPbwusB0eUXlO8hIUwStE6Lr5bLN6IgYgG+75kuh4=\ngithub.com/bombsimon/logrusr/v4 v4.1.0/go.mod h1:pjfHC5e59CvjTBIU3V3sGhFWFAnsnhOR03TRc6im0l8=\ngithub.com/bradleyfalzon/ghinstallation/v2 v2.17.0 h1:SmbUK/GxpAspRjSQbB6ARvH+ArzlNzTtHydNyXUQ6zg=\ngithub.com/bradleyfalzon/ghinstallation/v2 v2.17.0/go.mod h1:vuD/xvJT9Y+ZVZRv4HQ42cMyPFIYqpc7AbB4Gvt/DlY=\ngithub.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs=\ngithub.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c=\ngithub.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA=\ngithub.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0=\ngithub.com/bufbuild/protocompile v0.14.1 h1:iA73zAf/fyljNjQKwYzUHD6AD4R8KMasmwa/FBatYVw=\ngithub.com/bufbuild/protocompile v0.14.1/go.mod h1:ppVdAIhbr2H8asPk6k4pY7t9zB1OU5DoEw9xY/FUi1c=\ngithub.com/bwmarrin/discordgo v0.19.0/go.mod h1:O9S4p+ofTFwB02em7jkpkV8M3R0/PUVOwN61zSZ0r4Q=\ngithub.com/casbin/casbin/v2 v2.135.0 h1:6BLkMQiGotYyS5yYeWgW19vxqugUlvHFkFiLnLR/bxk=\ngithub.com/casbin/casbin/v2 v2.135.0/go.mod h1:FmcfntdXLTcYXv/hxgNntcRPqAbwOG9xsism0yXT+18=\ngithub.com/casbin/govaluate v1.3.0/go.mod h1:G/UnbIjZk/0uMNaLwZZmFQrR72tYRZWQkO70si/iR7A=\ngithub.com/casbin/govaluate v1.10.0 h1:ffGw51/hYH3w3rZcxO/KcaUIDOLP84w7nsidMVgaDG0=\ngithub.com/casbin/govaluate v1.10.0/go.mod h1:G/UnbIjZk/0uMNaLwZZmFQrR72tYRZWQkO70si/iR7A=\ngithub.com/cenkalti/backoff v2.1.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM=\ngithub.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw=\ngithub.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8=\ngithub.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=\ngithub.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM=\ngithub.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw=\ngithub.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=\ngithub.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=\ngithub.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=\ngithub.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=\ngithub.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=\ngithub.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=\ngithub.com/chai2010/gettext-go v1.0.3 h1:9liNh8t+u26xl5ddmWLmsOsdNLwkdRTg5AG+JnTiM80=\ngithub.com/chai2010/gettext-go v1.0.3/go.mod h1:y+wnP2cHYaVj19NZhYKAwEMH2CI1gNHeQQ+5AjwawxA=\ngithub.com/chainguard-dev/git-urls v1.0.2 h1:pSpT7ifrpc5X55n4aTTm7FFUE+ZQHKiqpiwNkJrVcKQ=\ngithub.com/chainguard-dev/git-urls v1.0.2/go.mod h1:rbGgj10OS7UgZlbzdUQIQpT0k/D4+An04HJY7Ol+Y/o=\ngithub.com/chromedp/cdproto v0.0.0-20230802225258-3cf4e6d46a89/go.mod h1:GKljq0VrfU4D5yc+2qA6OVr8pmO/MBbPEWqWQ/oqGEs=\ngithub.com/chromedp/chromedp v0.9.2/go.mod h1:LkSXJKONWTCHAfQasKFUZI+mxqS4tZqhmtGzzhLsnLs=\ngithub.com/chromedp/sysutil v1.0.0/go.mod h1:kgWmDdq8fTzXYcKIBqIYvRRTnYb9aNS9moAV0xufSww=\ngithub.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=\ngithub.com/chzyer/logex v1.2.1/go.mod h1:JLbx6lG2kDbNRFnfkgvh4eRJRPX1QCoOIWomwysCBrQ=\ngithub.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=\ngithub.com/chzyer/readline v1.5.1/go.mod h1:Eh+b79XXUwfKfcPLepksvw2tcLE/Ct21YObkaSkeBlk=\ngithub.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=\ngithub.com/chzyer/test v1.0.0/go.mod h1:2JlltgoNkt4TW/z9V/IzDdFaMTM2JPIi26O1pF38GC8=\ngithub.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=\ngithub.com/cloudflare/circl v1.6.2 h1:hL7VBpHHKzrV5WTfHCaBsgx/HGbBYlgrwvNXEVDYYsQ=\ngithub.com/cloudflare/circl v1.6.2/go.mod h1:2eXP6Qfat4O/Yhh8BznvKnJ+uzEoTQ6jVKJRn81BiS4=\ngithub.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=\ngithub.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM=\ngithub.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27/go.mod h1:VQx0hjo2oUeQkQUET7wRwradO6f+fN5jzXgB/zROxxE=\ngithub.com/containerd/errdefs v1.0.0 h1:tg5yIfIlQIrxYtu9ajqY42W3lpS19XqdxRQeEwYG8PI=\ngithub.com/containerd/errdefs v1.0.0/go.mod h1:+YBYIdtsnF4Iw6nWZhJcqGSg/dwvV7tyJ/kCkyJ2k+M=\ngithub.com/containerd/errdefs/pkg v0.3.0 h1:9IKJ06FvyNlexW690DXuQNx2KA2cUJXx151Xdx3ZPPE=\ngithub.com/containerd/errdefs/pkg v0.3.0/go.mod h1:NJw6s9HwNuRhnjJhM7pylWwMyAkmCQvQ4GpJHEqRLVk=\ngithub.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I=\ngithub.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo=\ngithub.com/containerd/platforms v0.2.1 h1:zvwtM3rz2YHPQsF2CHYM8+KtB5dvhISiXh5ZpSBQv6A=\ngithub.com/containerd/platforms v0.2.1/go.mod h1:XHCb+2/hzowdiut9rkudds9bE5yJ7npe7dG/wG+uFPw=\ngithub.com/coreos/go-oidc/v3 v3.14.1 h1:9ePWwfdwC4QKRlCXsJGou56adA/owXczOzwKdOumLqk=\ngithub.com/coreos/go-oidc/v3 v3.14.1/go.mod h1:HaZ3szPaZ0e4r6ebqvsLWlk2Tn+aejfmrfah6hnSYEU=\ngithub.com/cpuguy83/dockercfg v0.3.2 h1:DlJTyZGBDlXqUZ2Dk2Q3xHs/FtnooJJVaad2S9GKorA=\ngithub.com/cpuguy83/dockercfg v0.3.2/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc=\ngithub.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=\ngithub.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=\ngithub.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=\ngithub.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s=\ngithub.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE=\ngithub.com/cristalhq/jwt/v5 v5.4.0 h1:Wxi1TocFHaijyV608j7v7B9mPc4ZNjvWT3LKBO0d4QI=\ngithub.com/cristalhq/jwt/v5 v5.4.0/go.mod h1:+b/BzaCWEpFDmXxspJ5h4SdJ1N/45KMjKOetWzmHvDA=\ngithub.com/cyphar/filepath-securejoin v0.6.1 h1:5CeZ1jPXEiYt3+Z6zqprSAgSWiggmpVyciv8syjIpVE=\ngithub.com/cyphar/filepath-securejoin v0.6.1/go.mod h1:A8hd4EnAeyujCJRrICiOWqjS1AX0a9kM5XL+NwKoYSc=\ngithub.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=\ngithub.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=\ngithub.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=\ngithub.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=\ngithub.com/davidmz/go-pageant v1.0.2 h1:bPblRCh5jGU+Uptpz6LgMZGD5hJoOt7otgT454WvHn0=\ngithub.com/davidmz/go-pageant v1.0.2/go.mod h1:P2EDDnMqIwG5Rrp05dTRITj9z2zpGcD9efWSkTNKLIE=\ngithub.com/deckarep/golang-set v1.7.1/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ=\ngithub.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE=\ngithub.com/desertbit/timer v1.0.1 h1:yRpYNn5Vaaj6QXecdLMPMJsW81JLiI1eokUft5nBmeo=\ngithub.com/desertbit/timer v1.0.1/go.mod h1:htRrYeY5V/t4iu1xCJ5XsQvp4xve8QulXXctAzxqcwE=\ngithub.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=\ngithub.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=\ngithub.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk=\ngithub.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=\ngithub.com/dlclark/regexp2 v1.11.5 h1:Q/sSnsKerHeCkc/jSTNq1oCm7KiVgUMZRDUoRu0JQZQ=\ngithub.com/dlclark/regexp2 v1.11.5/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=\ngithub.com/docker/go-connections v0.6.0 h1:LlMG9azAe1TqfR7sO+NJttz1gy6KO7VJBh+pMmjSD94=\ngithub.com/docker/go-connections v0.6.0/go.mod h1:AahvXYshr6JgfUJGdDCs2b5EZG/vmaMAntpSFH5BFKE=\ngithub.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4=\ngithub.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=\ngithub.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=\ngithub.com/ebitengine/purego v0.10.0 h1:QIw4xfpWT6GWTzaW5XEKy3HXoqrJGx1ijYHzTF0/ISU=\ngithub.com/ebitengine/purego v0.10.0/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ=\ngithub.com/elazarl/goproxy v1.7.2 h1:Y2o6urb7Eule09PjlhQRGNsqRfPmYI3KKQLFpCAV3+o=\ngithub.com/elazarl/goproxy v1.7.2/go.mod h1:82vkLNir0ALaW14Rc399OTTjyNREgmdL2cVoIbS6XaE=\ngithub.com/elliotchance/pie/v2 v2.9.1 h1:v7TdC6ZdNZJ1HACofpLXvGKHUk307AjY/bttwDPWKEQ=\ngithub.com/elliotchance/pie/v2 v2.9.1/go.mod h1:18t0dgGFH006g4eVdDtWfgFZPQEgl10IoEO8YWEq3Og=\ngithub.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=\ngithub.com/emicklei/go-restful/v3 v3.12.2 h1:DhwDP0vY3k8ZzE0RunuJy8GhNpPL6zqLkDf9B/a0/xU=\ngithub.com/emicklei/go-restful/v3 v3.12.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=\ngithub.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc=\ngithub.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ=\ngithub.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=\ngithub.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=\ngithub.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=\ngithub.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=\ngithub.com/evanphx/json-patch v5.9.11+incompatible h1:ixHHqfcGvxhWkniF1tWxBHA0yb4Z+d1UQi45df52xW8=\ngithub.com/evanphx/json-patch v5.9.11+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=\ngithub.com/evanphx/json-patch/v5 v5.9.11 h1:/8HVnzMq13/3x9TPvjG08wUGqBTmZBsCWzjTM0wiaDU=\ngithub.com/evanphx/json-patch/v5 v5.9.11/go.mod h1:3j+LviiESTElxA4p3EMKAB9HXj3/XEtnUf6OZxqIQTM=\ngithub.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f h1:Wl78ApPPB2Wvf/TIe2xdyJxTlb6obmF18d8QdkxNDu4=\ngithub.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f/go.mod h1:OSYXu++VVOHnXeitef/D8n/6y4QV8uLHSFXX4NeXMGc=\ngithub.com/expr-lang/expr v1.17.7 h1:Q0xY/e/2aCIp8g9s/LGvMDCC5PxYlvHgDZRQ4y16JX8=\ngithub.com/expr-lang/expr v1.17.7/go.mod h1:8/vRC7+7HBzESEqt5kKpYXxrxkr31SaO8r40VO/1IT4=\ngithub.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64=\ngithub.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg=\ngithub.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0=\ngithub.com/fatih/camelcase v1.0.0 h1:hxNvNX/xYBp0ovncs8WyWZrOrpBNub/JfaMvbURyft8=\ngithub.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc=\ngithub.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=\ngithub.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=\ngithub.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM=\ngithub.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU=\ngithub.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=\ngithub.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=\ngithub.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=\ngithub.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=\ngithub.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=\ngithub.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=\ngithub.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=\ngithub.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k=\ngithub.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=\ngithub.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM=\ngithub.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ=\ngithub.com/gfleury/go-bitbucket-v1 v0.0.0-20240917142304-df385efaac68 h1:iJXWkoIPk3e8RVHhQE/gXfP2TP3OLQ9vVPNSJ+oL6mM=\ngithub.com/gfleury/go-bitbucket-v1 v0.0.0-20240917142304-df385efaac68/go.mod h1:bB7XwdZF40tLVnu9n5A9TjI2ddNZtLYImtwYwmcmnRo=\ngithub.com/gfleury/go-bitbucket-v1/test/bb-mock-server v0.0.0-20230825095122-9bc1711434ab h1:BeG9dDWckFi/p5Gvqq3wTEDXsUV4G6bdvjEHMOT2B8E=\ngithub.com/gfleury/go-bitbucket-v1/test/bb-mock-server v0.0.0-20230825095122-9bc1711434ab/go.mod h1:VssB0kb1cETNaFFC/0mHVCj+7i5TS2xraYq+tl9JLwE=\ngithub.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=\ngithub.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=\ngithub.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=\ngithub.com/gin-gonic/gin v1.6.3 h1:ahKqKTFpO5KTPHxWZjEdPScmYaGtLo8Y4DMHoEsnp14=\ngithub.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M=\ngithub.com/gliderlabs/ssh v0.3.8 h1:a4YXD1V7xMF9g5nTkdfnja3Sxy1PVDCj1Zg4Wb8vY6c=\ngithub.com/gliderlabs/ssh v0.3.8/go.mod h1:xYoytBv1sV0aL3CavoDuJIQNURXkkfPA/wxQ1pL1fAU=\ngithub.com/go-errors/errors v1.5.1 h1:ZwEMSLRCapFLflTpT7NKaAc7ukJ8ZPEjzlxt8rPN8bk=\ngithub.com/go-errors/errors v1.5.1/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og=\ngithub.com/go-fed/httpsig v1.1.0 h1:9M+hb0jkEICD8/cAiNqEB66R87tTINszBRTjwjQzWcI=\ngithub.com/go-fed/httpsig v1.1.0/go.mod h1:RCMrTZvN1bJYtofsG4rd5NaO5obxQ5xBkdiS7xsT7bM=\ngithub.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI=\ngithub.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic=\ngithub.com/go-git/go-billy/v5 v5.6.2 h1:6Q86EsPXMa7c3YZ3aLAQsMA0VlWmy43r6FHqa/UNbRM=\ngithub.com/go-git/go-billy/v5 v5.6.2/go.mod h1:rcFC2rAsp/erv7CMz9GczHcuD0D32fWzH+MJAU+jaUU=\ngithub.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMje31YglSBqCdIqdhKBW8lokaMrL3uTkpGYlE2OOT4=\ngithub.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII=\ngithub.com/go-git/go-git/v5 v5.16.5 h1:mdkuqblwr57kVfXri5TTH+nMFLNUxIj9Z7F5ykFbw5s=\ngithub.com/go-git/go-git/v5 v5.16.5/go.mod h1:QOMLpNf1qxuSY4StA/ArOdfFR2TrKEjJiye2kel2m+M=\ngithub.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=\ngithub.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=\ngithub.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=\ngithub.com/go-jose/go-jose/v4 v4.1.3 h1:CVLmWDhDVRa6Mi/IgCgaopNosCaHz7zrMeF9MlZRkrs=\ngithub.com/go-jose/go-jose/v4 v4.1.3/go.mod h1:x4oUasVrzR7071A4TnHLGSPpNOm2a21K9Kf04k1rs08=\ngithub.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=\ngithub.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=\ngithub.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY=\ngithub.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=\ngithub.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=\ngithub.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=\ngithub.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU=\ngithub.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU=\ngithub.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=\ngithub.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=\ngithub.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=\ngithub.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=\ngithub.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=\ngithub.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=\ngithub.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=\ngithub.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=\ngithub.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=\ngithub.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=\ngithub.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ=\ngithub.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg=\ngithub.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=\ngithub.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=\ngithub.com/go-openapi/analysis v0.24.1 h1:Xp+7Yn/KOnVWYG8d+hPksOYnCYImE3TieBa7rBOesYM=\ngithub.com/go-openapi/analysis v0.24.1/go.mod h1:dU+qxX7QGU1rl7IYhBC8bIfmWQdX4Buoea4TGtxXY84=\ngithub.com/go-openapi/errors v0.22.4 h1:oi2K9mHTOb5DPW2Zjdzs/NIvwi2N3fARKaTJLdNabaM=\ngithub.com/go-openapi/errors v0.22.4/go.mod h1:z9S8ASTUqx7+CP1Q8dD8ewGH/1JWFFLX/2PmAYNQLgk=\ngithub.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs=\ngithub.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY=\ngithub.com/go-openapi/jsonpointer v0.22.1 h1:sHYI1He3b9NqJ4wXLoJDKmUmHkWy/L7rtEo92JUxBNk=\ngithub.com/go-openapi/jsonpointer v0.22.1/go.mod h1:pQT9OsLkfz1yWoMgYFy4x3U5GY5nUlsOn1qSBH5MkCM=\ngithub.com/go-openapi/jsonreference v0.20.1/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k=\ngithub.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k=\ngithub.com/go-openapi/jsonreference v0.21.3 h1:96Dn+MRPa0nYAR8DR1E03SblB5FJvh7W6krPI0Z7qMc=\ngithub.com/go-openapi/jsonreference v0.21.3/go.mod h1:RqkUP0MrLf37HqxZxrIAtTWW4ZJIK1VzduhXYBEeGc4=\ngithub.com/go-openapi/loads v0.23.2 h1:rJXAcP7g1+lWyBHC7iTY+WAF0rprtM+pm8Jxv1uQJp4=\ngithub.com/go-openapi/loads v0.23.2/go.mod h1:IEVw1GfRt/P2Pplkelxzj9BYFajiWOtY2nHZNj4UnWY=\ngithub.com/go-openapi/runtime v0.29.2 h1:UmwSGWNmWQqKm1c2MGgXVpC2FTGwPDQeUsBMufc5Yj0=\ngithub.com/go-openapi/runtime v0.29.2/go.mod h1:biq5kJXRJKBJxTDJXAa00DOTa/anflQPhT0/wmjuy+0=\ngithub.com/go-openapi/spec v0.22.1 h1:beZMa5AVQzRspNjvhe5aG1/XyBSMeX1eEOs7dMoXh/k=\ngithub.com/go-openapi/spec v0.22.1/go.mod h1:c7aeIQT175dVowfp7FeCvXXnjN/MrpaONStibD2WtDA=\ngithub.com/go-openapi/strfmt v0.25.0 h1:7R0RX7mbKLa9EYCTHRcCuIPcaqlyQiWNPTXwClK0saQ=\ngithub.com/go-openapi/strfmt v0.25.0/go.mod h1:nNXct7OzbwrMY9+5tLX4I21pzcmE6ccMGXl3jFdPfn8=\ngithub.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14=\ngithub.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ=\ngithub.com/go-openapi/swag v0.23.1 h1:lpsStH0n2ittzTnbaSloVZLuB5+fvSY/+hnagBjSNZU=\ngithub.com/go-openapi/swag v0.23.1/go.mod h1:STZs8TbRvEQQKUA+JZNAm3EWlgaOBGpyFDqQnDHMef0=\ngithub.com/go-openapi/swag/conv v0.25.1 h1:+9o8YUg6QuqqBM5X6rYL/p1dpWeZRhoIt9x7CCP+he0=\ngithub.com/go-openapi/swag/conv v0.25.1/go.mod h1:Z1mFEGPfyIKPu0806khI3zF+/EUXde+fdeksUl2NiDs=\ngithub.com/go-openapi/swag/fileutils v0.25.1 h1:rSRXapjQequt7kqalKXdcpIegIShhTPXx7yw0kek2uU=\ngithub.com/go-openapi/swag/fileutils v0.25.1/go.mod h1:+NXtt5xNZZqmpIpjqcujqojGFek9/w55b3ecmOdtg8M=\ngithub.com/go-openapi/swag/jsonname v0.25.1 h1:Sgx+qbwa4ej6AomWC6pEfXrA6uP2RkaNjA9BR8a1RJU=\ngithub.com/go-openapi/swag/jsonname v0.25.1/go.mod h1:71Tekow6UOLBD3wS7XhdT98g5J5GR13NOTQ9/6Q11Zo=\ngithub.com/go-openapi/swag/jsonutils v0.25.1 h1:AihLHaD0brrkJoMqEZOBNzTLnk81Kg9cWr+SPtxtgl8=\ngithub.com/go-openapi/swag/jsonutils v0.25.1/go.mod h1:JpEkAjxQXpiaHmRO04N1zE4qbUEg3b7Udll7AMGTNOo=\ngithub.com/go-openapi/swag/jsonutils/fixtures_test v0.25.1 h1:DSQGcdB6G0N9c/KhtpYc71PzzGEIc/fZ1no35x4/XBY=\ngithub.com/go-openapi/swag/jsonutils/fixtures_test v0.25.1/go.mod h1:kjmweouyPwRUEYMSrbAidoLMGeJ5p6zdHi9BgZiqmsg=\ngithub.com/go-openapi/swag/loading v0.25.1 h1:6OruqzjWoJyanZOim58iG2vj934TysYVptyaoXS24kw=\ngithub.com/go-openapi/swag/loading v0.25.1/go.mod h1:xoIe2EG32NOYYbqxvXgPzne989bWvSNoWoyQVWEZicc=\ngithub.com/go-openapi/swag/mangling v0.25.1 h1:XzILnLzhZPZNtmxKaz/2xIGPQsBsvmCjrJOWGNz/ync=\ngithub.com/go-openapi/swag/mangling v0.25.1/go.mod h1:CdiMQ6pnfAgyQGSOIYnZkXvqhnnwOn997uXZMAd/7mQ=\ngithub.com/go-openapi/swag/stringutils v0.25.1 h1:Xasqgjvk30eUe8VKdmyzKtjkVjeiXx1Iz0zDfMNpPbw=\ngithub.com/go-openapi/swag/stringutils v0.25.1/go.mod h1:JLdSAq5169HaiDUbTvArA2yQxmgn4D6h4A+4HqVvAYg=\ngithub.com/go-openapi/swag/typeutils v0.25.1 h1:rD/9HsEQieewNt6/k+JBwkxuAHktFtH3I3ysiFZqukA=\ngithub.com/go-openapi/swag/typeutils v0.25.1/go.mod h1:9McMC/oCdS4BKwk2shEB7x17P6HmMmA6dQRtAkSnNb8=\ngithub.com/go-openapi/swag/yamlutils v0.25.1 h1:mry5ez8joJwzvMbaTGLhw8pXUnhDK91oSJLDPF1bmGk=\ngithub.com/go-openapi/swag/yamlutils v0.25.1/go.mod h1:cm9ywbzncy3y6uPm/97ysW8+wZ09qsks+9RS8fLWKqg=\ngithub.com/go-openapi/testify/v2 v2.0.2 h1:X999g3jeLcoY8qctY/c/Z8iBHTbwLz7R2WXd6Ub6wls=\ngithub.com/go-openapi/testify/v2 v2.0.2/go.mod h1:HCPmvFFnheKK2BuwSA0TbbdxJ3I16pjwMkYkP4Ywn54=\ngithub.com/go-openapi/validate v0.25.1 h1:sSACUI6Jcnbo5IWqbYHgjibrhhmt3vR6lCzKZnmAgBw=\ngithub.com/go-openapi/validate v0.25.1/go.mod h1:RMVyVFYte0gbSTaZ0N4KmTn6u/kClvAFp+mAVfS/DQc=\ngithub.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=\ngithub.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q=\ngithub.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8=\ngithub.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no=\ngithub.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA=\ngithub.com/go-playground/validator/v10 v10.2.0 h1:KgJ0snyC2R9VXYN2rneOtQcw5aHQB1Vv0sFl1UcHBOY=\ngithub.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI=\ngithub.com/go-playground/webhooks/v6 v6.4.0 h1:KLa6y7bD19N48rxJDHM0DpE3T4grV7GxMy1b/aHMWPY=\ngithub.com/go-playground/webhooks/v6 v6.4.0/go.mod h1:5lBxopx+cAJiBI4+kyRbuHrEi+hYRDdRHuRR4Ya5Ums=\ngithub.com/go-redis/cache/v9 v9.0.0 h1:0thdtFo0xJi0/WXbRVu8B066z8OvVymXTJGaXrVWnN0=\ngithub.com/go-redis/cache/v9 v9.0.0/go.mod h1:cMwi1N8ASBOufbIvk7cdXe2PbPjK/WMRL95FFHWsSgI=\ngithub.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=\ngithub.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=\ngithub.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI=\ngithub.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls=\ngithub.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI=\ngithub.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8=\ngithub.com/go-test/deep v1.0.4 h1:u2CU3YKy9I2pmu9pX0eq50wCgjfGIt539SqR7FbHiho=\ngithub.com/go-test/deep v1.0.4/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA=\ngithub.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs=\ngithub.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=\ngithub.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI=\ngithub.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y=\ngithub.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8=\ngithub.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo=\ngithub.com/gobwas/httphead v0.1.0 h1:exrUm0f4YX0L7EBwZHuCF4GDp8aJfVeBrlLQrs6NqWU=\ngithub.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM=\ngithub.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=\ngithub.com/gobwas/pool v0.2.1 h1:xfeeEhW7pwmX8nuLVlqbzVc7udMDrwetjEv+TZIz1og=\ngithub.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=\ngithub.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM=\ngithub.com/gobwas/ws v1.2.1 h1:F2aeBZrm2NDsc7vbovKrWSogd4wvfAxg0FQ89/iqOTk=\ngithub.com/gobwas/ws v1.2.1/go.mod h1:hRKAFb8wOxFROYNsT1bqfWnhX+b5MFeJM9r2ZSwg/KY=\ngithub.com/gogits/go-gogs-client v0.0.0-20210131175652-1d7215cd8d85 h1:04sojTxgYxu1L4Hn7Tgf7UVtIosVa6CuHtvNY+7T1K4=\ngithub.com/gogits/go-gogs-client v0.0.0-20210131175652-1d7215cd8d85/go.mod h1:cY2AIrMgHm6oOHmR7jY+9TtjzSjQ3iG7tURJG3Y6XH0=\ngithub.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=\ngithub.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=\ngithub.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=\ngithub.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=\ngithub.com/golang-jwt/jwt/v4 v4.5.2 h1:YtQM7lnr8iZ+j5q71MGKkNw9Mn7AjHM68uc9g5fXeUI=\ngithub.com/golang-jwt/jwt/v4 v4.5.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=\ngithub.com/golang-jwt/jwt/v5 v5.3.0 h1:pv4AsKCKKZuqlgs5sUmn4x8UlGa0kEVt/puTpKx9vvo=\ngithub.com/golang-jwt/jwt/v5 v5.3.0/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE=\ngithub.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=\ngithub.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=\ngithub.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=\ngithub.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=\ngithub.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=\ngithub.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 h1:f+oWsMOmNPc8JmEHVZIycC7hBoQxHH9pNKQORJNozsQ=\ngithub.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8/go.mod h1:wcDNUvekVysuuOpQKo3191zZyTpiI6se1N1ULghS0sw=\ngithub.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=\ngithub.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=\ngithub.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y=\ngithub.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=\ngithub.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=\ngithub.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=\ngithub.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=\ngithub.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc=\ngithub.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs=\ngithub.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=\ngithub.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=\ngithub.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=\ngithub.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=\ngithub.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=\ngithub.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=\ngithub.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk=\ngithub.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=\ngithub.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=\ngithub.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=\ngithub.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=\ngithub.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=\ngithub.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=\ngithub.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=\ngithub.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=\ngithub.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=\ngithub.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=\ngithub.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=\ngithub.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=\ngithub.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=\ngithub.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=\ngithub.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=\ngithub.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg=\ngithub.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4=\ngithub.com/google/gnostic-models v0.7.0 h1:qwTtogB15McXDaNqTZdzPJRHvaVJlAl+HVQnLmJEJxo=\ngithub.com/google/gnostic-models v0.7.0/go.mod h1:whL5G0m6dmc5cPxKc5bdKdEN3UjI7OUGxBlw57miDrQ=\ngithub.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=\ngithub.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=\ngithub.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=\ngithub.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=\ngithub.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=\ngithub.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=\ngithub.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=\ngithub.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=\ngithub.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=\ngithub.com/google/go-github/v69 v69.2.0 h1:wR+Wi/fN2zdUx9YxSmYE0ktiX9IAR/BeePzeaUUbEHE=\ngithub.com/google/go-github/v69 v69.2.0/go.mod h1:xne4jymxLR6Uj9b7J7PyTpkMYstEMMwGZa0Aehh1azM=\ngithub.com/google/go-github/v75 v75.0.0 h1:k7q8Bvg+W5KxRl9Tjq16a9XEgVY1pwuiG5sIL7435Ic=\ngithub.com/google/go-github/v75 v75.0.0/go.mod h1:H3LUJEA1TCrzuUqtdAQniBNwuKiQIqdGKgBo1/M/uqI=\ngithub.com/google/go-jsonnet v0.21.0 h1:43Bk3K4zMRP/aAZm9Po2uSEjY6ALCkYUVIcz9HLGMvA=\ngithub.com/google/go-jsonnet v0.21.0/go.mod h1:tCGAu8cpUpEZcdGMmdOu37nh8bGgqubhI5v2iSk3KJQ=\ngithub.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=\ngithub.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=\ngithub.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=\ngithub.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=\ngithub.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=\ngithub.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=\ngithub.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=\ngithub.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=\ngithub.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=\ngithub.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=\ngithub.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=\ngithub.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=\ngithub.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=\ngithub.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=\ngithub.com/google/pprof v0.0.0-20240424215950-a892ee059fd6/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw=\ngithub.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo=\ngithub.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144=\ngithub.com/google/pprof v0.0.0-20241029153458-d1b30febd7db h1:097atOisP2aRj7vFgYQBbFN4U4JNXUNYpxael3UzMyo=\ngithub.com/google/pprof v0.0.0-20241029153458-d1b30febd7db/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144=\ngithub.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=\ngithub.com/google/s2a-go v0.1.9 h1:LGD7gtMgezd8a/Xak7mEWL0PjoTQFvpRudN895yqKW0=\ngithub.com/google/s2a-go v0.1.9/go.mod h1:YA0Ei2ZQL3acow2O62kdp9UlnvMmU7kA6Eutn0dXayM=\ngithub.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4=\ngithub.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ=\ngithub.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=\ngithub.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=\ngithub.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=\ngithub.com/google/uuid v1.6.1-0.20241114170450-2d3c2a9cc518 h1:UBg1xk+oAsIVbFuGg6hdfAm7EvCv3EL80vFxJNsslqw=\ngithub.com/google/uuid v1.6.1-0.20241114170450-2d3c2a9cc518/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=\ngithub.com/googleapis/enterprise-certificate-proxy v0.3.4 h1:XYIDZApgAnrN1c855gTgghdIA6Stxb52D5RnLI1SLyw=\ngithub.com/googleapis/enterprise-certificate-proxy v0.3.4/go.mod h1:YKe7cfqYXjKGpGvmSg28/fFvhNzinZQm8DGnaburhGA=\ngithub.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=\ngithub.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=\ngithub.com/googleapis/gax-go/v2 v2.14.1 h1:hb0FFeiPaQskmvakKu5EbCbpntQn48jyHuvrkurSS/Q=\ngithub.com/googleapis/gax-go/v2 v2.14.1/go.mod h1:Hb/NubMaVM88SrNkvl8X/o8XWwDJEPqouaLeN2IUxoA=\ngithub.com/gopackage/ddp v0.0.0-20170117053602-652027933df4 h1:4EZlYQIiyecYJlUbVkFXCXHz1QPhVXcHnQKAzBTPfQo=\ngithub.com/gopackage/ddp v0.0.0-20170117053602-652027933df4/go.mod h1:lEO7XoHJ/xNRBCxrn4h/CEB67h0kW1B0t4ooP2yrjUA=\ngithub.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=\ngithub.com/gorilla/handlers v1.5.2 h1:cLTUSsNkgcwhgRqvCNmdbRWG0A3N4F+M2nWKdScwyEE=\ngithub.com/gorilla/handlers v1.5.2/go.mod h1:dX+xVpaxdSw+q0Qek8SSsl3dfMk3jNddUkMzo0GtH0w=\ngithub.com/gorilla/mux v1.7.4 h1:VuZ8uybHlWmqV03+zRzdwKL4tUnIp1MAQtp1mIFE1bc=\ngithub.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=\ngithub.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=\ngithub.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=\ngithub.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=\ngithub.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 h1:JeSE6pjso5THxAzdVpqr6/geYxZytqFMBCOtn/ujyeo=\ngithub.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674/go.mod h1:r4w70xmWCQKmi1ONH4KIaBptdivuRPyosB9RmPlGEwA=\ngithub.com/gosimple/slug v1.15.0 h1:wRZHsRrRcs6b0XnxMUBM6WK1U1Vg5B0R7VkIf1Xzobo=\ngithub.com/gosimple/slug v1.15.0/go.mod h1:UiRaFH+GEilHstLUmcBgWcI42viBN7mAb818JrYOeFQ=\ngithub.com/gosimple/unidecode v1.0.1 h1:hZzFTMMqSswvf0LBJZCZgThIZrpDHFXux9KeGmn6T/o=\ngithub.com/gosimple/unidecode v1.0.1/go.mod h1:CP0Cr1Y1kogOtx0bJblKzsVWrqYaqfNOnHzpgWw4Awc=\ngithub.com/gregdel/pushover v1.3.1 h1:4bMLITOZ15+Zpi6qqoGqOPuVHCwSUvMCgVnN5Xhilfo=\ngithub.com/gregdel/pushover v1.3.1/go.mod h1:EcaO66Nn1StkpEm1iKtBTV3d2A16SoMsVER1PthX7to=\ngithub.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJrOjhax5N+uePQ0Fh1Z7PheYoUI/0nzkPA=\ngithub.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=\ngithub.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI=\ngithub.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.1.0 h1:QGLs/O40yoNK9vmy4rhUGBVyMf1lISBGtXRpsu/Qu/o=\ngithub.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.1.0/go.mod h1:hM2alZsMUni80N33RBe6J0e423LB+odMj7d3EMP9l20=\ngithub.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.3 h1:B+8ClL/kCQkRiU82d9xajRPKYMrB7E0MbtzWVi1K4ns=\ngithub.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.3/go.mod h1:NbCUVmiS4foBGBHOYlCT25+YmGpJ32dZPi75pGEUpj4=\ngithub.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=\ngithub.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo=\ngithub.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=\ngithub.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=\ngithub.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I=\ngithub.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=\ngithub.com/hashicorp/go-checkpoint v0.5.0 h1:MFYpPZCnQqQTE18jFwSII6eUQrD/oxMFp3mlgcqk5mU=\ngithub.com/hashicorp/go-checkpoint v0.5.0/go.mod h1:7nfLNL10NsxqO4iWuW6tWW0HjZuDrwkBuEQsVcpCOgg=\ngithub.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=\ngithub.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ=\ngithub.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=\ngithub.com/hashicorp/go-cty v1.5.0 h1:EkQ/v+dDNUqnuVpmS5fPqyY71NXVgT5gf32+57xY8g0=\ngithub.com/hashicorp/go-cty v1.5.0/go.mod h1:lFUCG5kd8exDobgSfyj4ONE/dc822kiYMguVKdHGMLM=\ngithub.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k=\ngithub.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M=\ngithub.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=\ngithub.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=\ngithub.com/hashicorp/go-plugin v1.7.0 h1:YghfQH/0QmPNc/AZMTFE3ac8fipZyZECHdDPshfk+mA=\ngithub.com/hashicorp/go-plugin v1.7.0/go.mod h1:BExt6KEaIYx804z8k4gRzRLEvxKVb+kn0NMcihqOqb8=\ngithub.com/hashicorp/go-retryablehttp v0.5.1/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs=\ngithub.com/hashicorp/go-retryablehttp v0.7.8 h1:ylXZWnqa7Lhqpk0L1P1LzDtGcCR0rPVUrx/c8Unxc48=\ngithub.com/hashicorp/go-retryablehttp v0.7.8/go.mod h1:rjiScheydd+CxvumBsIrFKlx3iS0jrZ7LvzFGFmuKbw=\ngithub.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=\ngithub.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8=\ngithub.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=\ngithub.com/hashicorp/go-version v1.8.0 h1:KAkNb1HAiZd1ukkxDFGmokVZe1Xy9HG6NUp+bPle2i4=\ngithub.com/hashicorp/go-version v1.8.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=\ngithub.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=\ngithub.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=\ngithub.com/hashicorp/hc-install v0.9.3 h1:1H4dgmgzxEVwT6E/d/vIL5ORGVKz9twRwDw+qA5Hyho=\ngithub.com/hashicorp/hc-install v0.9.3/go.mod h1:FQlQ5I3I/X409N/J1U4pPeQQz1R3BoV0IysB7aiaQE0=\ngithub.com/hashicorp/hcl/v2 v2.24.0 h1:2QJdZ454DSsYGoaE6QheQZjtKZSUs9Nh2izTWiwQxvE=\ngithub.com/hashicorp/hcl/v2 v2.24.0/go.mod h1:oGoO1FIQYfn/AgyOhlg9qLC6/nOJPX3qGbkZpYAcqfM=\ngithub.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y=\ngithub.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=\ngithub.com/hashicorp/terraform-exec v0.25.0 h1:Bkt6m3VkJqYh+laFMrWIpy9KHYFITpOyzRMNI35rNaY=\ngithub.com/hashicorp/terraform-exec v0.25.0/go.mod h1:dl9IwsCfklDU6I4wq9/StFDp7dNbH/h5AnfS1RmiUl8=\ngithub.com/hashicorp/terraform-json v0.27.2 h1:BwGuzM6iUPqf9JYM/Z4AF1OJ5VVJEEzoKST/tRDBJKU=\ngithub.com/hashicorp/terraform-json v0.27.2/go.mod h1:GzPLJ1PLdUG5xL6xn1OXWIjteQRT2CNT9o/6A9mi9hE=\ngithub.com/hashicorp/terraform-plugin-framework v1.19.0 h1:q0bwyhxAOR3vfdgbk9iplv3MlTv/dhBHTXjQOtQDoBA=\ngithub.com/hashicorp/terraform-plugin-framework v1.19.0/go.mod h1:YRXOBu0jvs7xp4AThBbX4mAzYaMJ1JgtFH//oGKxwLc=\ngithub.com/hashicorp/terraform-plugin-framework-validators v0.19.0 h1:Zz3iGgzxe/1XBkooZCewS0nJAaCFPFPHdNJd8FgE4Ow=\ngithub.com/hashicorp/terraform-plugin-framework-validators v0.19.0/go.mod h1:GBKTNGbGVJohU03dZ7U8wHqc2zYnMUawgCN+gC0itLc=\ngithub.com/hashicorp/terraform-plugin-go v0.31.0 h1:0Fz2r9DQ+kNNl6bx8HRxFd1TfMKUvnrOtvJPmp3Z0q8=\ngithub.com/hashicorp/terraform-plugin-go v0.31.0/go.mod h1:A88bDhd/cW7FnwqxQRz3slT+QY6yzbHKc6AOTtmdeS8=\ngithub.com/hashicorp/terraform-plugin-log v0.10.0 h1:eu2kW6/QBVdN4P3Ju2WiB2W3ObjkAsyfBsL3Wh1fj3g=\ngithub.com/hashicorp/terraform-plugin-log v0.10.0/go.mod h1:/9RR5Cv2aAbrqcTSdNmY1NRHP4E3ekrXRGjqORpXyB0=\ngithub.com/hashicorp/terraform-plugin-mux v0.23.0 h1:YEjYA6kle7vJrVWS+WgyrFoYzUnOCJQ0kwGAJ61X9aE=\ngithub.com/hashicorp/terraform-plugin-mux v0.23.0/go.mod h1:IwuivHNfDVeuDbVvg6fnAYEEEVx881STwJHsl/00UkQ=\ngithub.com/hashicorp/terraform-plugin-sdk/v2 v2.40.0 h1:MKS/2URqeJRwJdbOfcbdsZCq/IRrNkqJNN0GtVIsuGs=\ngithub.com/hashicorp/terraform-plugin-sdk/v2 v2.40.0/go.mod h1:PuG4P97Ju3QXW6c6vRkRadWJbvnEu2Xh+oOuqcYOqX4=\ngithub.com/hashicorp/terraform-plugin-testing v1.15.0 h1:/fimKyl0YgD7aAtJkuuAZjwBASXhCIwWqMbDLnKLMe4=\ngithub.com/hashicorp/terraform-plugin-testing v1.15.0/go.mod h1:bGXMw7bE95EiZhSBV3rM2W8TiffaPTDuLS+HFI/lIYs=\ngithub.com/hashicorp/terraform-registry-address v0.4.0 h1:S1yCGomj30Sao4l5BMPjTGZmCNzuv7/GDTDX99E9gTk=\ngithub.com/hashicorp/terraform-registry-address v0.4.0/go.mod h1:LRS1Ay0+mAiRkUyltGT+UHWkIqTFvigGn/LbMshfflE=\ngithub.com/hashicorp/terraform-svchost v0.1.1 h1:EZZimZ1GxdqFRinZ1tpJwVxxt49xc/S52uzrw4x0jKQ=\ngithub.com/hashicorp/terraform-svchost v0.1.1/go.mod h1:mNsjQfZyf/Jhz35v6/0LWcv26+X7JPS+buii2c9/ctc=\ngithub.com/hashicorp/yamux v0.1.2 h1:XtB8kyFOyHXYVFnwT5C3+Bdo8gArse7j2AQ0DA0Uey8=\ngithub.com/hashicorp/yamux v0.1.2/go.mod h1:C+zze2n6e/7wshOZep2A70/aQU6QBRWJO/G6FT1wIns=\ngithub.com/howeyc/gopass v0.0.0-20170109162249-bf9dde6d0d2c/go.mod h1:lADxMC39cJJqL93Duh1xhAs4I2Zs8mKS89XWXFGp9cs=\ngithub.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=\ngithub.com/huandu/xstrings v1.5.0 h1:2ag3IFq9ZDANvthTwTiqSSZLjDc+BedvHPAp5tJy2TI=\ngithub.com/huandu/xstrings v1.5.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=\ngithub.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=\ngithub.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=\ngithub.com/ianlancetaylor/demangle v0.0.0-20240312041847-bd984b5ce465/go.mod h1:gx7rwoVhcfuVKG5uya9Hs3Sxj7EIvldVofAWIUtGouw=\ngithub.com/improbable-eng/grpc-web v0.15.1-0.20230209220825-1d9bbb09a099 h1:k07oXM8RqIaaSEF09Frr/iRMlwx2qvx6vRo2XuPIeW8=\ngithub.com/improbable-eng/grpc-web v0.15.1-0.20230209220825-1d9bbb09a099/go.mod h1:Vkb7Iy2LTlRGIAubpODgfeKPzu8nsh1gO+vvZAiZrcs=\ngithub.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=\ngithub.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=\ngithub.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=\ngithub.com/itchyny/gojq v0.12.18 h1:gFGHyt/MLbG9n6dqnvlliiya2TaMMh6FFaR2b1H6Drc=\ngithub.com/itchyny/gojq v0.12.18/go.mod h1:4hPoZ/3lN9fDL1D+aK7DY1f39XZpY9+1Xpjz8atrEkg=\ngithub.com/itchyny/timefmt-go v0.1.7 h1:xyftit9Tbw+Dc/huSSPJaEmX1TVL8lw5vxjJLK4GMMA=\ngithub.com/itchyny/timefmt-go v0.1.7/go.mod h1:5E46Q+zj7vbTgWY8o5YkMeYb4I6GeWLFnetPy5oBrAI=\ngithub.com/jarcoal/httpmock v1.4.1 h1:0Ju+VCFuARfFlhVXFc2HxlcQkfB+Xq12/EotHko+x2A=\ngithub.com/jarcoal/httpmock v1.4.1/go.mod h1:ftW1xULwo+j0R0JJkJIIi7UKigZUXCLLanykgjwBXL0=\ngithub.com/jaytaylor/html2text v0.0.0-20190408195923-01ec452cbe43/go.mod h1:CVKlgaMiht+LXvHG173ujK6JUhZXKb2u/BQtjPDIvyk=\ngithub.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A=\ngithub.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo=\ngithub.com/jeremywohl/flatten v1.0.2-0.20211013061545-07e4a09fb8e4 h1:4mRgApcowAtxNLwOQ93jhHMLFgkX2D5yM53mtZSk6Nw=\ngithub.com/jeremywohl/flatten v1.0.2-0.20211013061545-07e4a09fb8e4/go.mod h1:4AmD/VxjWcI5SRB0n6szE2A6s2fsNHDLO0nAlMHgfLQ=\ngithub.com/jhump/protoreflect v1.17.0 h1:qOEr613fac2lOuTgWN4tPAtLL7fUSbuJL5X5XumQh94=\ngithub.com/jhump/protoreflect v1.17.0/go.mod h1:h9+vUUL38jiBzck8ck+6G/aeMX8Z4QUY/NiJPwPNi+8=\ngithub.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=\ngithub.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=\ngithub.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8=\ngithub.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=\ngithub.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg=\ngithub.com/jonboulle/clockwork v0.5.0 h1:Hyh9A8u51kptdkR+cqRpT1EebBwTn1oK9YfGYbdFz6I=\ngithub.com/jonboulle/clockwork v0.5.0/go.mod h1:3mZlmanh0g2NDKO5TWZVJAfofYk64M7XN3SzBPjZF60=\ngithub.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=\ngithub.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=\ngithub.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=\ngithub.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=\ngithub.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=\ngithub.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=\ngithub.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=\ngithub.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=\ngithub.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=\ngithub.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=\ngithub.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=\ngithub.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=\ngithub.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=\ngithub.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=\ngithub.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs=\ngithub.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=\ngithub.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4=\ngithub.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM=\ngithub.com/keybase/go-keychain v0.0.1 h1:way+bWYa6lDppZoZcgMbYsvC7GxljxrskdNInRtuthU=\ngithub.com/keybase/go-keychain v0.0.1/go.mod h1:PdEILRW3i9D8JcdM+FmY6RwkHGnhHxXwkPPMeUgOK1k=\ngithub.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=\ngithub.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=\ngithub.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=\ngithub.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=\ngithub.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=\ngithub.com/klauspost/compress v1.13.5/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=\ngithub.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=\ngithub.com/klauspost/compress v1.18.5 h1:/h1gH5Ce+VWNLSWqPzOVn6XBO+vJbCNGvjoaGBFW2IE=\ngithub.com/klauspost/compress v1.18.5/go.mod h1:cwPg85FWrGar70rWktvGQj8/hthj3wpl0PGDogxkrSQ=\ngithub.com/klauspost/cpuid v1.2.3/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek=\ngithub.com/klauspost/cpuid v1.3.1/go.mod h1:bYW4mA6ZgKPob1/Dlai2LviZJO7KGI3uoWLd42rAQw4=\ngithub.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=\ngithub.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=\ngithub.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=\ngithub.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=\ngithub.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=\ngithub.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk=\ngithub.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=\ngithub.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=\ngithub.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=\ngithub.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=\ngithub.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=\ngithub.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=\ngithub.com/ktrysmt/go-bitbucket v0.9.88 h1:XBjYui83tW2puG7f2GvYSAMMKIPfhpeoLCVfEJx3KVM=\ngithub.com/ktrysmt/go-bitbucket v0.9.88/go.mod h1:fx6zdyKEyiNfR9VW0npWD6ugoSUsp8JLXGyqna8bHkc=\ngithub.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=\ngithub.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=\ngithub.com/ledongthuc/pdf v0.0.0-20220302134840-0c2507a12d80/go.mod h1:imJHygn/1yfhB7XSJJKlFZKl/J+dCPAknuiaGOshXAs=\ngithub.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y=\ngithub.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII=\ngithub.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhnIaL+V+BEER86oLrvS+kWobKpbJuye0=\ngithub.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE=\ngithub.com/lithammer/dedent v1.1.0 h1:VNzHMVCBNG1j0fh3OrsFRkVUwStdDArbgBWoPAffktY=\ngithub.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc=\ngithub.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4=\ngithub.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I=\ngithub.com/lusis/go-slackbot v0.0.0-20180109053408-401027ccfef5/go.mod h1:c2mYKRyMb1BPkO5St0c/ps62L4S0W2NAkaTXj9qEI+0=\ngithub.com/lusis/slack-test v0.0.0-20190426140909-c40012f20018/go.mod h1:sFlOUpQL1YcjhFVXhg1CG8ZASEs/Mf1oVb6H75JL/zg=\ngithub.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE=\ngithub.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=\ngithub.com/mailgun/mailgun-go v2.0.0+incompatible/go.mod h1:NWTyU+O4aczg/nsGhQnvHL6v2n5Gy6Sv5tNDVvC6FbU=\ngithub.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=\ngithub.com/mailru/easyjson v0.9.0 h1:PrnmzHw7262yW8sTBwxi1PdJA3Iw/EKBa8psRf7d9a4=\ngithub.com/mailru/easyjson v0.9.0/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU=\ngithub.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=\ngithub.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=\ngithub.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=\ngithub.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE=\ngithub.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=\ngithub.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=\ngithub.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=\ngithub.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=\ngithub.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=\ngithub.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=\ngithub.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=\ngithub.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=\ngithub.com/microsoft/azure-devops-go-api/azuredevops/v7 v7.1.1-0.20241014080628-3045bdf43455 h1:7rDE4oHmFDgf+4fqnT5vztz7Bmcos1tr17VisCXgs/o=\ngithub.com/microsoft/azure-devops-go-api/azuredevops/v7 v7.1.1-0.20241014080628-3045bdf43455/go.mod h1:mDunUZ1IUJdJIRHvFb+LPBUtxe3AYB5MI6BMXNg8194=\ngithub.com/minio/md5-simd v1.1.0/go.mod h1:XpBqgZULrMYD3R+M28PcmP0CkI7PEMzB3U77ZrKZ0Gw=\ngithub.com/minio/minio-go/v7 v7.0.29/go.mod h1:x81+AX5gHSfCSqw7jxRKHvxUXMlE5uKX0Vb75Xk5yYg=\ngithub.com/minio/sha256-simd v0.1.1/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM=\ngithub.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw=\ngithub.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s=\ngithub.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=\ngithub.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU=\ngithub.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8=\ngithub.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0=\ngithub.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0=\ngithub.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=\ngithub.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=\ngithub.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=\ngithub.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ=\ngithub.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=\ngithub.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0=\ngithub.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo=\ngithub.com/moby/go-archive v0.2.0 h1:zg5QDUM2mi0JIM9fdQZWC7U8+2ZfixfTYoHL7rWUcP8=\ngithub.com/moby/go-archive v0.2.0/go.mod h1:mNeivT14o8xU+5q1YnNrkQVpK+dnNe/K6fHqnTg4qPU=\ngithub.com/moby/moby/api v1.54.1 h1:TqVzuJkOLsgLDDwNLmYqACUuTehOHRGKiPhvH8V3Nn4=\ngithub.com/moby/moby/api v1.54.1/go.mod h1:+RQ6wluLwtYaTd1WnPLykIDPekkuyD/ROWQClE83pzs=\ngithub.com/moby/moby/client v0.4.0 h1:S+2XegzHQrrvTCvF6s5HFzcrywWQmuVnhOXe2kiWjIw=\ngithub.com/moby/moby/client v0.4.0/go.mod h1:QWPbvWchQbxBNdaLSpoKpCdf5E+WxFAgNHogCWDoa7g=\ngithub.com/moby/patternmatcher v0.6.1 h1:qlhtafmr6kgMIJjKJMDmMWq7WLkKIo23hsrpR3x084U=\ngithub.com/moby/patternmatcher v0.6.1/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc=\ngithub.com/moby/spdystream v0.5.0 h1:7r0J1Si3QO/kjRitvSLVVFUjxMEb/YLj6S9FF62JBCU=\ngithub.com/moby/spdystream v0.5.0/go.mod h1:xBAYlnt/ay+11ShkdFKNAG7LsyK/tmNBVvVOwrfMgdI=\ngithub.com/moby/sys/sequential v0.6.0 h1:qrx7XFUd/5DxtqcoH1h438hF5TmOvzC/lspjy7zgvCU=\ngithub.com/moby/sys/sequential v0.6.0/go.mod h1:uyv8EUTrca5PnDsdMGXhZe6CCe8U/UiTWd+lL+7b/Ko=\ngithub.com/moby/sys/user v0.4.0 h1:jhcMKit7SA80hivmFJcbB1vqmw//wU61Zdui2eQXuMs=\ngithub.com/moby/sys/user v0.4.0/go.mod h1:bG+tYYYJgaMtRKgEmuueC0hJEAZWwtIbZTB+85uoHjs=\ngithub.com/moby/sys/userns v0.1.0 h1:tVLXkFOxVu9A64/yh59slHVv9ahO9UIev4JZusOLG/g=\ngithub.com/moby/sys/userns v0.1.0/go.mod h1:IHUYgu/kao6N8YZlp9Cf444ySSvCmDlmzUcYfDHOl28=\ngithub.com/moby/term v0.5.2 h1:6qk3FJAFDs6i/q3W/pQ97SX192qKfZgGjCQqfCJkgzQ=\ngithub.com/moby/term v0.5.2/go.mod h1:d3djjFCrjnB+fl8NJux+EJzu0msscUP+f8it8hPkFLc=\ngithub.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=\ngithub.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=\ngithub.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=\ngithub.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=\ngithub.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=\ngithub.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=\ngithub.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee h1:W5t00kpgFdJifH4BDsTlE89Zl93FEloxaWZfGcifgq8=\ngithub.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=\ngithub.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/2gBQ3RWajuToeY6ZtZTIKv2v7ThUy5KKusIT0yc0=\ngithub.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4=\ngithub.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ=\ngithub.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=\ngithub.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=\ngithub.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=\ngithub.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU=\ngithub.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=\ngithub.com/mwitkow/grpc-proxy v0.0.0-20181017164139-0f1106ef9c76/go.mod h1:x5OoJHDHqxHS801UIuhqGl6QdSAEJvtausosHSdazIo=\ngithub.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus=\ngithub.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw=\ngithub.com/nlopes/slack v0.5.0/go.mod h1:jVI4BBK3lSktibKahxBF74txcK2vyvkza1z/+rRnVAM=\ngithub.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=\ngithub.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=\ngithub.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=\ngithub.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA=\ngithub.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU=\ngithub.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4=\ngithub.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=\ngithub.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=\ngithub.com/oliveagle/jsonpath v0.0.0-20180606110733-2e52cf6e6852/go.mod h1:eqOVx5Vwu4gd2mmMZvVZsgIqNSaW3xxRThUJ0k/TPk4=\ngithub.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=\ngithub.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=\ngithub.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=\ngithub.com/onsi/ginkgo v1.14.1/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY=\ngithub.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=\ngithub.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=\ngithub.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=\ngithub.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c=\ngithub.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU=\ngithub.com/onsi/ginkgo/v2 v2.1.6/go.mod h1:MEH45j8TBi6u9BMogfbp0stKC5cdGjumZj5Y7AG4VIk=\ngithub.com/onsi/ginkgo/v2 v2.3.0/go.mod h1:Eew0uilEqZmIEZr8JrvYlvOM7Rr6xzTmMV8AyFNU9d0=\ngithub.com/onsi/ginkgo/v2 v2.4.0/go.mod h1:iHkDK1fKGcBoEHT5W7YBq4RFWaQulw+caOMkAt4OrFo=\ngithub.com/onsi/ginkgo/v2 v2.5.0/go.mod h1:Luc4sArBICYCS8THh8v3i3i5CuSZO+RaQRaJoeNwomw=\ngithub.com/onsi/ginkgo/v2 v2.7.0/go.mod h1:yjiuMwPokqY1XauOgju45q3sJt6VzQ/Fict1LFVcsAo=\ngithub.com/onsi/ginkgo/v2 v2.8.1/go.mod h1:N1/NbDngAFcSLdyZ+/aYTYGSlq9qMCS/cNKGJjy+csc=\ngithub.com/onsi/ginkgo/v2 v2.9.0/go.mod h1:4xkjoL/tZv4SMWeww56BU5kAt19mVB47gTWxmrTcxyk=\ngithub.com/onsi/ginkgo/v2 v2.9.1/go.mod h1:FEcmzVcCHl+4o9bQZVab+4dC9+j+91t2FHSzmGAPfuo=\ngithub.com/onsi/ginkgo/v2 v2.9.2/go.mod h1:WHcJJG2dIlcCqVfBAwUCrJxSPFb6v4azBwgxeMeDuts=\ngithub.com/onsi/ginkgo/v2 v2.9.5/go.mod h1:tvAoo1QUJwNEU2ITftXTpR7R1RbCzoZUOs3RonqW57k=\ngithub.com/onsi/ginkgo/v2 v2.9.7/go.mod h1:cxrmXWykAwTwhQsJOPfdIDiJ+l2RYq7U8hFU+M/1uw0=\ngithub.com/onsi/ginkgo/v2 v2.11.0/go.mod h1:ZhrRA5XmEE3x3rhlzamx/JJvujdZoJ2uvgI7kR0iZvM=\ngithub.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o=\ngithub.com/onsi/ginkgo/v2 v2.17.1/go.mod h1:llBI3WDLL9Z6taip6f33H76YcWtJv+7R3HigUjbIBOs=\ngithub.com/onsi/ginkgo/v2 v2.17.2/go.mod h1:nP2DPOQoNsQmsVyv5rDA8JkXQoCs6goXIvr/PRJ1eCc=\ngithub.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To=\ngithub.com/onsi/ginkgo/v2 v2.20.1/go.mod h1:lG9ey2Z29hR41WMVthyJBGUBcBhGOtoPF2VFMvBXFCI=\ngithub.com/onsi/ginkgo/v2 v2.21.0/go.mod h1:7Du3c42kxCUegi0IImZ1wUQzMBVecgIHjR1C+NkhLQo=\ngithub.com/onsi/ginkgo/v2 v2.22.0 h1:Yed107/8DjTr0lKCNt7Dn8yQ6ybuDRQoMGrNFKzMfHg=\ngithub.com/onsi/ginkgo/v2 v2.22.0/go.mod h1:7Du3c42kxCUegi0IImZ1wUQzMBVecgIHjR1C+NkhLQo=\ngithub.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=\ngithub.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=\ngithub.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=\ngithub.com/onsi/gomega v1.10.2/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=\ngithub.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=\ngithub.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro=\ngithub.com/onsi/gomega v1.20.1/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo=\ngithub.com/onsi/gomega v1.21.1/go.mod h1:iYAIXgPSaDHak0LCMA+AWBpIKBr8WZicMxnE8luStNc=\ngithub.com/onsi/gomega v1.22.1/go.mod h1:x6n7VNe4hw0vkyYUM4mjIXx3JbLiPaBPNgB7PRQ1tuM=\ngithub.com/onsi/gomega v1.24.0/go.mod h1:Z/NWtiqwBrwUt4/2loMmHL63EDLnYHmVbuBpDr2vQAg=\ngithub.com/onsi/gomega v1.24.1/go.mod h1:3AOiACssS3/MajrniINInwbfOOtfZvplPzuRSmvt1jM=\ngithub.com/onsi/gomega v1.25.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM=\ngithub.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM=\ngithub.com/onsi/gomega v1.27.1/go.mod h1:aHX5xOykVYzWOV4WqQy0sy8BQptgukenXpCXfadcIAw=\ngithub.com/onsi/gomega v1.27.3/go.mod h1:5vG284IBtfDAmDyrK+eGyZmUgUlmi+Wngqo557cZ6Gw=\ngithub.com/onsi/gomega v1.27.4/go.mod h1:riYq/GJKh8hhoM01HN6Vmuy93AarCXCBGpvFDK3q3fQ=\ngithub.com/onsi/gomega v1.27.6/go.mod h1:PIQNjfQwkP3aQAH7lf7j87O/5FiNr+ZR8+ipb+qQlhg=\ngithub.com/onsi/gomega v1.27.7/go.mod h1:1p8OOlwo2iUUDsHnOrjE5UKYJ+e3W8eQ3qSlRahPmr4=\ngithub.com/onsi/gomega v1.27.8/go.mod h1:2J8vzI/s+2shY9XHRApDkdgPo1TKT7P2u6fXeJKFnNQ=\ngithub.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M=\ngithub.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ=\ngithub.com/onsi/gomega v1.33.0/go.mod h1:+925n5YtiFsLzzafLUHzVMBpvvRAzrydIBiSIxjX3wY=\ngithub.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0=\ngithub.com/onsi/gomega v1.34.1/go.mod h1:kU1QgUvBDLXBJq618Xvm2LUX6rSAfRaFRTcdOeDLwwY=\ngithub.com/onsi/gomega v1.34.2/go.mod h1:v1xfxRgk0KIsG+QOdm7p8UosrOzPYRo60fd3B/1Dukc=\ngithub.com/onsi/gomega v1.35.1/go.mod h1:PvZbdDc8J6XJEpDK4HCuRBm8a6Fzp9/DmhC9C7yFlog=\ngithub.com/onsi/gomega v1.36.1 h1:bJDPBO7ibjxcbHMgSCoo4Yj18UWbKDlLwX1x9sybDcw=\ngithub.com/onsi/gomega v1.36.1/go.mod h1:PvZbdDc8J6XJEpDK4HCuRBm8a6Fzp9/DmhC9C7yFlog=\ngithub.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=\ngithub.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=\ngithub.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040=\ngithub.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M=\ngithub.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=\ngithub.com/opsgenie/opsgenie-go-sdk-v2 v1.2.23 h1:EFOD/cRfMeq+PCibHddoRTXu8CTN1m8Oj1Tk6eoz8Dw=\ngithub.com/opsgenie/opsgenie-go-sdk-v2 v1.2.23/go.mod h1:1BK0BG3Mz//zeujilvvu3GJ0jnyZwFdT9XjznoPv6kk=\ngithub.com/orisano/pixelmatch v0.0.0-20220722002657-fb0b55479cde/go.mod h1:nZgzbfBr3hhjoZnS66nKrHmduYNpc34ny7RK4z5/HM0=\ngithub.com/patrickmn/go-cache v2.1.1-0.20191004192108-46f407853014+incompatible h1:IWzUvJ72xMjmrjR9q3H1PF+jwdN0uNQiR2t1BLNalyo=\ngithub.com/patrickmn/go-cache v2.1.1-0.20191004192108-46f407853014+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ=\ngithub.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI=\ngithub.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU=\ngithub.com/pjbgf/sha1cd v0.3.2 h1:a9wb0bp1oC2TGwStyn0Umc/IGKQnEgF0vVaZ8QF8eo4=\ngithub.com/pjbgf/sha1cd v0.3.2/go.mod h1:zQWigSxVmsHEZow5qaLtPYxpcKMMQpa09ixqBxuCS6A=\ngithub.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ=\ngithub.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU=\ngithub.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=\ngithub.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=\ngithub.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=\ngithub.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=\ngithub.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=\ngithub.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=\ngithub.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=\ngithub.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=\ngithub.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU=\ngithub.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=\ngithub.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=\ngithub.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=\ngithub.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M=\ngithub.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0=\ngithub.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY=\ngithub.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o=\ngithub.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg=\ngithub.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=\ngithub.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=\ngithub.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=\ngithub.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=\ngithub.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk=\ngithub.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE=\ngithub.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=\ngithub.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo=\ngithub.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc=\ngithub.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls=\ngithub.com/prometheus/common v0.66.1 h1:h5E0h5/Y8niHc5DlaLlWLArTQI7tMrsfQjHV+d9ZoGs=\ngithub.com/prometheus/common v0.66.1/go.mod h1:gcaUsgf3KfRSwHY4dIMXLPV0K/Wg1oZ8+SbZk/HH/dA=\ngithub.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=\ngithub.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=\ngithub.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=\ngithub.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=\ngithub.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=\ngithub.com/prometheus/procfs v0.16.1 h1:hZ15bTNuirocR6u0JZ6BAHHmwS1p8B4P6MRqxtzMyRg=\ngithub.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is=\ngithub.com/r3labs/diff/v3 v3.0.2 h1:yVuxAY1V6MeM4+HNur92xkS39kB/N+cFi2hMkY06BbA=\ngithub.com/r3labs/diff/v3 v3.0.2/go.mod h1:Cy542hv0BAEmhDYWtGxXRQ4kqRsVIcEjG9gChUlTmkw=\ngithub.com/redis/go-redis/v9 v9.0.0-rc.4/go.mod h1:Vo3EsyWnicKnSKCA7HhgnvnyA74wOA69Cd2Meli5mmA=\ngithub.com/redis/go-redis/v9 v9.8.0 h1:q3nRvjrlge/6UD7eTu/DSg2uYiU2mCL0G/uzBWqhicI=\ngithub.com/redis/go-redis/v9 v9.8.0/go.mod h1:huWgSWd8mW6+m0VPhJjSSQ+d6Nh1VICQ6Q5lHuCH/Iw=\ngithub.com/robfig/cron/v3 v3.0.2-0.20210106135023-bc59245fe10e h1:0xChnl3lhHiXbgSJKgChye0D+DvoItkOdkGcwelDXH0=\ngithub.com/robfig/cron/v3 v3.0.2-0.20210106135023-bc59245fe10e/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro=\ngithub.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=\ngithub.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=\ngithub.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=\ngithub.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=\ngithub.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=\ngithub.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4=\ngithub.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=\ngithub.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=\ngithub.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=\ngithub.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=\ngithub.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA=\ngithub.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU=\ngithub.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ=\ngithub.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=\ngithub.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=\ngithub.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8=\ngithub.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4=\ngithub.com/shirou/gopsutil/v4 v4.26.3 h1:2ESdQt90yU3oXF/CdOlRCJxrP+Am1aBYubTMTfxJ1qc=\ngithub.com/shirou/gopsutil/v4 v4.26.3/go.mod h1:LZ6ewCSkBqUpvSOf+LsTGnRinC6iaNUNMGBtDkJBaLQ=\ngithub.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k=\ngithub.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME=\ngithub.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=\ngithub.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=\ngithub.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=\ngithub.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=\ngithub.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=\ngithub.com/sirupsen/logrus v1.9.4 h1:TsZE7l11zFCLZnZ+teH4Umoq5BhEIfIzfRDZ1Uzql2w=\ngithub.com/sirupsen/logrus v1.9.4/go.mod h1:ftWc9WdOfJ0a92nsE2jF5u5ZwH8Bv2zdeOC42RjbV2g=\ngithub.com/skeema/knownhosts v1.3.1 h1:X2osQ+RAjK76shCbvhHHHVl3ZlgDm8apHEHFqRjnBY8=\ngithub.com/skeema/knownhosts v1.3.1/go.mod h1:r7KTdC8l4uxWRyK2TpQZ/1o5HaSzh06ePQNxPwTcfiY=\ngithub.com/slack-go/slack v0.16.0 h1:khp/WCFv+Hb/B/AJaAwvcxKun0hM6grN0bUZ8xG60P8=\ngithub.com/slack-go/slack v0.16.0/go.mod h1:hlGi5oXA+Gt+yWTPP0plCdRKmjsDxecdHxYQdlMQKOw=\ngithub.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=\ngithub.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=\ngithub.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=\ngithub.com/soheilhy/cmux v0.1.5 h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js=\ngithub.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0=\ngithub.com/sony/sonyflake v1.0.0 h1:MpU6Ro7tfXwgn2l5eluf9xQvQJDROTBImNCfRXn/YeM=\ngithub.com/sony/sonyflake v1.0.0/go.mod h1:Jv3cfhf/UFtolOTTRd3q4Nl6ENqM+KfyZ5PseKfZGF4=\ngithub.com/spf13/cast v1.7.1 h1:cuNEagBQEHWN1FnbGEjCXL2szYEXqfJPbP2HNUaca9Y=\ngithub.com/spf13/cast v1.7.1/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo=\ngithub.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=\ngithub.com/spf13/cobra v1.5.0/go.mod h1:dWXEIy2H428czQCjInthrTRUg7yKbok+2Qi/yBIJoUM=\ngithub.com/spf13/cobra v1.10.2 h1:DMTTonx5m65Ic0GOoRY2c16WCbHxOOw6xxezuLaBpcU=\ngithub.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiTUUS4=\ngithub.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=\ngithub.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=\ngithub.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=\ngithub.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=\ngithub.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk=\ngithub.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=\ngithub.com/ssor/bom v0.0.0-20170718123548-6386211fdfcf/go.mod h1:RJID2RhlZKId02nZ62WenDCkgHFerpIOmW0iT7GKmXM=\ngithub.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=\ngithub.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=\ngithub.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=\ngithub.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=\ngithub.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=\ngithub.com/stretchr/objx v0.5.3 h1:jmXUvGomnU1o3W/V5h2VEradbpJDwGrzugQQvL0POH4=\ngithub.com/stretchr/objx v0.5.3/go.mod h1:rDQraq+vQZU7Fde9LOZLr8Tax6zZvy4kuNKF+QYS+U0=\ngithub.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=\ngithub.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=\ngithub.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=\ngithub.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=\ngithub.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=\ngithub.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=\ngithub.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=\ngithub.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals=\ngithub.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=\ngithub.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=\ngithub.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=\ngithub.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=\ngithub.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=\ngithub.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=\ngithub.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=\ngithub.com/testcontainers/testcontainers-go v0.42.0 h1:He3IhTzTZOygSXLJPMX7n44XtK+qhjat1nI9cneBbUY=\ngithub.com/testcontainers/testcontainers-go v0.42.0/go.mod h1:vZjdY1YmUA1qEForxOIOazfsrdyORJAbhi0bp8plN30=\ngithub.com/testcontainers/testcontainers-go/modules/k3s v0.42.0 h1:bTVmcnYaSHesN6HXXxV/k0+BMkyfo3VBy4w4yRqOIgE=\ngithub.com/testcontainers/testcontainers-go/modules/k3s v0.42.0/go.mod h1:2O8+V4WzMb/bjg/Sez+aYci9LpGUbT5cSz7ildfTIb8=\ngithub.com/tklauser/go-sysconf v0.3.16 h1:frioLaCQSsF5Cy1jgRBrzr6t502KIIwQ0MArYICU0nA=\ngithub.com/tklauser/go-sysconf v0.3.16/go.mod h1:/qNL9xxDhc7tx3HSRsLWNnuzbVfh3e7gh/BmM179nYI=\ngithub.com/tklauser/numcpus v0.11.0 h1:nSTwhKH5e1dMNsCdVBukSZrURJRoHbSEQjdEbY+9RXw=\ngithub.com/tklauser/numcpus v0.11.0/go.mod h1:z+LwcLq54uWZTX0u/bGobaV34u6V7KNlTZejzM6/3MQ=\ngithub.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo=\ngithub.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw=\ngithub.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs=\ngithub.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY=\ngithub.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=\ngithub.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=\ngithub.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo=\ngithub.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ=\ngithub.com/vmihailenco/go-tinylfu v0.2.2 h1:H1eiG6HM36iniK6+21n9LLpzx1G9R3DJa2UjUjbynsI=\ngithub.com/vmihailenco/go-tinylfu v0.2.2/go.mod h1:CutYi2Q9puTxfcolkliPq4npPuofg9N9t8JVrjzwa3Q=\ngithub.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk=\ngithub.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI=\ngithub.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk=\ngithub.com/vmihailenco/msgpack/v5 v5.3.4/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc=\ngithub.com/vmihailenco/msgpack/v5 v5.4.1 h1:cQriyiUvjTwOHg8QZaPihLWeRAAVoCpE00IUPn0Bjt8=\ngithub.com/vmihailenco/msgpack/v5 v5.4.1/go.mod h1:GaZTsDaehaPpQVyxrf5mtQlH+pc21PIudVV/E3rRQok=\ngithub.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g=\ngithub.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds=\ngithub.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=\ngithub.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=\ngithub.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM=\ngithub.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw=\ngithub.com/xlab/treeprint v1.2.0 h1:HzHnuAF1plUN2zGlAFHbSQP2qJ0ZAD3XF5XD7OesXRQ=\ngithub.com/xlab/treeprint v1.2.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0=\ngithub.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=\ngithub.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=\ngithub.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=\ngithub.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=\ngithub.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=\ngithub.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=\ngithub.com/yuin/gopher-lua v1.1.1 h1:kYKnWBjvbNP4XLT3+bPEwAXJx262OhaHDWDVOPjL46M=\ngithub.com/yuin/gopher-lua v1.1.1/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw=\ngithub.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0=\ngithub.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=\ngithub.com/zclconf/go-cty v1.17.0 h1:seZvECve6XX4tmnvRzWtJNHdscMtYEx5R7bnnVyd/d0=\ngithub.com/zclconf/go-cty v1.17.0/go.mod h1:wqFzcImaLTI6A5HfsRwB0nj5n0MRZFwmey8YoFPPs3U=\ngithub.com/zclconf/go-cty-debug v0.0.0-20240509010212-0d6042c53940 h1:4r45xpDWB6ZMSMNJFMOjqrGHynW3DIBuR2H9j0ug+Mo=\ngithub.com/zclconf/go-cty-debug v0.0.0-20240509010212-0d6042c53940/go.mod h1:CmBdvvj3nqzfzJ6nTCIwDTPZ56aVGvDrmztiO5g3qrM=\ngitlab.com/gitlab-org/api/client-go v1.8.1 h1:YQyAh2Gd+NzcbRWWgDIi/pX0wLlm7QEZWtc0FikQRs4=\ngitlab.com/gitlab-org/api/client-go v1.8.1/go.mod h1:tVIvZPcBPFPGYtLZOUIUafaZMmomCS0W81eACbn4Egw=\ngo.mongodb.org/mongo-driver v1.17.6 h1:87JUG1wZfWsr6rIz3ZmpH90rL5tea7O3IHuSwHUpsss=\ngo.mongodb.org/mongo-driver v1.17.6/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ=\ngo.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=\ngo.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=\ngo.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=\ngo.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=\ngo.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=\ngo.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64=\ngo.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y=\ngo.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.63.0 h1:YH4g8lQroajqUwWbq/tr2QX1JFmEXaDLgG+ew9bLMWo=\ngo.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.63.0/go.mod h1:fvPi2qXDqFs8M4B4fmJhE92TyQs9Ydjlg3RvfUp+NbQ=\ngo.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 h1:sbiXRNDSWJOTobXh5HyQKjq6wUC5tNybqjIqDpAY4CU=\ngo.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0/go.mod h1:69uWxva0WgAA/4bu2Yy70SLDBwZXuQ6PbBpbsa5iZrQ=\ngo.opentelemetry.io/otel v1.41.0 h1:YlEwVsGAlCvczDILpUXpIpPSL/VPugt7zHThEMLce1c=\ngo.opentelemetry.io/otel v1.41.0/go.mod h1:Yt4UwgEKeT05QbLwbyHXEwhnjxNO6D8L5PQP51/46dE=\ngo.opentelemetry.io/otel/metric v1.41.0 h1:rFnDcs4gRzBcsO9tS8LCpgR0dxg4aaxWlJxCno7JlTQ=\ngo.opentelemetry.io/otel/metric v1.41.0/go.mod h1:xPvCwd9pU0VN8tPZYzDZV/BMj9CM9vs00GuBjeKhJps=\ngo.opentelemetry.io/otel/sdk v1.40.0 h1:KHW/jUzgo6wsPh9At46+h4upjtccTmuZCFAc9OJ71f8=\ngo.opentelemetry.io/otel/sdk v1.40.0/go.mod h1:Ph7EFdYvxq72Y8Li9q8KebuYUr2KoeyHx0DRMKrYBUE=\ngo.opentelemetry.io/otel/sdk/metric v1.39.0 h1:cXMVVFVgsIf2YL6QkRF4Urbr/aMInf+2WKg+sEJTtB8=\ngo.opentelemetry.io/otel/sdk/metric v1.39.0/go.mod h1:xq9HEVH7qeX69/JnwEfp6fVq5wosJsY1mt4lLfYdVew=\ngo.opentelemetry.io/otel/trace v1.41.0 h1:Vbk2co6bhj8L59ZJ6/xFTskY+tGAbOnCtQGVVa9TIN0=\ngo.opentelemetry.io/otel/trace v1.41.0/go.mod h1:U1NU4ULCoxeDKc09yCWdWe+3QoyweJcISEVa1RBzOis=\ngo.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=\ngo.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=\ngo.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=\ngo.uber.org/mock v0.6.0 h1:hyF9dfmbgIX5EfOdasqLsWD6xqpNZlXblLB/Dbnwv3Y=\ngo.uber.org/mock v0.6.0/go.mod h1:KiVJ4BqZJaMj4svdfmHM0AUx4NJYO8ZNpPnZn1Z+BBU=\ngo.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=\ngo.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=\ngo.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=\ngo.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=\ngo.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=\ngo.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=\ngo.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI=\ngo.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU=\ngo.yaml.in/yaml/v3 v3.0.3/go.mod h1:tBHosrYAkRZjRAOREWbDnBXUf08JOwYq++0QNwQiWzI=\ngo.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=\ngo.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=\ngolang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=\ngolang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=\ngolang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=\ngolang.org/x/crypto v0.0.0-20190422183909-d864b10871cd/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=\ngolang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=\ngolang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=\ngolang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=\ngolang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=\ngolang.org/x/crypto v0.0.0-20201216223049-8b5274cf687f/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=\ngolang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8=\ngolang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=\ngolang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=\ngolang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw=\ngolang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio=\ngolang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw=\ngolang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc=\ngolang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=\ngolang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=\ngolang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg=\ngolang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=\ngolang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=\ngolang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M=\ngolang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=\ngolang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM=\ngolang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M=\ngolang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54=\ngolang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U=\ngolang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc=\ngolang.org/x/crypto v0.48.0 h1:/VRzVqiRSggnhY7gNRxPauEQ5Drw9haKdM0jqfcCFts=\ngolang.org/x/crypto v0.48.0/go.mod h1:r0kV5h3qnFPlQnBSrULhlsRfryS2pmewsg+XfMgkVos=\ngolang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=\ngolang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=\ngolang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=\ngolang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek=\ngolang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY=\ngolang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=\ngolang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=\ngolang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=\ngolang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=\ngolang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=\ngolang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw=\ngolang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY=\ngolang.org/x/exp v0.0.0-20250813145105-42675adae3e6 h1:SbTAbRFnd5kjQXbczszQ0hdk3ctwYf3qBNH9jIsGclE=\ngolang.org/x/exp v0.0.0-20250813145105-42675adae3e6/go.mod h1:4QTo5u+SEIbbKW1RacMZq1YEfOBqeXa19JeshGi+zc4=\ngolang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=\ngolang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=\ngolang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=\ngolang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=\ngolang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=\ngolang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=\ngolang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=\ngolang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=\ngolang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=\ngolang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs=\ngolang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=\ngolang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=\ngolang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=\ngolang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=\ngolang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=\ngolang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=\ngolang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=\ngolang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=\ngolang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=\ngolang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=\ngolang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY=\ngolang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=\ngolang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI=\ngolang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=\ngolang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=\ngolang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=\ngolang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=\ngolang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=\ngolang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=\ngolang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=\ngolang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=\ngolang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=\ngolang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=\ngolang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=\ngolang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=\ngolang.org/x/mod v0.33.0 h1:tHFzIWbBifEmbwtGz65eaWyGiGZatSrT9prnU8DbVL8=\ngolang.org/x/mod v0.33.0/go.mod h1:swjeQEj+6r7fODbD2cqrnje9PnziFuw4bmLbBZFrQ5w=\ngolang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=\ngolang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=\ngolang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=\ngolang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=\ngolang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=\ngolang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=\ngolang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=\ngolang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=\ngolang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=\ngolang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=\ngolang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=\ngolang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=\ngolang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=\ngolang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=\ngolang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=\ngolang.org/x/net v0.0.0-20200904194848-62affa334b73/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=\ngolang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=\ngolang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=\ngolang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=\ngolang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=\ngolang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=\ngolang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=\ngolang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=\ngolang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=\ngolang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=\ngolang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=\ngolang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=\ngolang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=\ngolang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco=\ngolang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=\ngolang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE=\ngolang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws=\ngolang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=\ngolang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=\ngolang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=\ngolang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=\ngolang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA=\ngolang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI=\ngolang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=\ngolang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=\ngolang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U=\ngolang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY=\ngolang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=\ngolang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=\ngolang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8=\ngolang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=\ngolang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE=\ngolang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE=\ngolang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg=\ngolang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU=\ngolang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=\ngolang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o=\ngolang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8=\ngolang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=\ngolang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=\ngolang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=\ngolang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=\ngolang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=\ngolang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/oauth2 v0.27.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8=\ngolang.org/x/oauth2 v0.34.0 h1:hqK/t4AKgbqWkdkcAeI8XLmbK+4m4G5YeQRrmiotGlw=\ngolang.org/x/oauth2 v0.34.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA=\ngolang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=\ngolang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=\ngolang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=\ngolang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=\ngolang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=\ngolang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=\ngolang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4=\ngolang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=\ngolang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=\ngolang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=\ngolang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=\ngolang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=\ngolang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=\ngolang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=\ngolang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=\ngolang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=\ngolang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=\ngolang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=\ngolang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=\ngolang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=\ngolang.org/x/sys v0.42.0 h1:omrd2nAlyT5ESRdCLYdm3+fMfNFE/+Rf4bDIQImRJeo=\ngolang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=\ngolang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE=\ngolang.org/x/telemetry v0.0.0-20240521205824-bda55230c457/go.mod h1:pRgIJT+bRLFKnoM1ldnzKoxTIn14Yxz928LQRYYgIN0=\ngolang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=\ngolang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=\ngolang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=\ngolang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=\ngolang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=\ngolang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA=\ngolang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ=\ngolang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=\ngolang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U=\ngolang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=\ngolang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o=\ngolang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU=\ngolang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU=\ngolang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U=\ngolang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0=\ngolang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY=\ngolang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=\ngolang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58=\ngolang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk=\ngolang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY=\ngolang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0=\ngolang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4=\ngolang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk=\ngolang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M=\ngolang.org/x/term v0.30.0/go.mod h1:NYYFdzHoI5wRh/h5tDMdMqCqPJZEuNqVR5xJLd/n67g=\ngolang.org/x/term v0.40.0 h1:36e4zGLqU4yhjlmxEaagx2KuYbJq3EwY8K943ZsHcvg=\ngolang.org/x/term v0.40.0/go.mod h1:w2P8uVp06p2iyKKuvXIm7N/y0UCRt3UfJTfZ7oOpglM=\ngolang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=\ngolang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=\ngolang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=\ngolang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=\ngolang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=\ngolang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=\ngolang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=\ngolang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=\ngolang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=\ngolang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=\ngolang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=\ngolang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=\ngolang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=\ngolang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=\ngolang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=\ngolang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=\ngolang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=\ngolang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=\ngolang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=\ngolang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI=\ngolang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=\ngolang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=\ngolang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4=\ngolang.org/x/text v0.34.0 h1:oL/Qq0Kdaqxa1KbNeMKwQq0reLCCaFtqu2eNuSeNHbk=\ngolang.org/x/text v0.34.0/go.mod h1:homfLqTYRFyVYemLBFl5GgL/DWEiH5wcsQ5gSh1yziA=\ngolang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=\ngolang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=\ngolang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=\ngolang.org/x/time v0.9.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=\ngolang.org/x/time v0.14.0 h1:MRx4UaLrDotUKUdCIqzPC48t1Y9hANFKIRpNx+Te8PI=\ngolang.org/x/time v0.14.0/go.mod h1:eL/Oa2bBBK0TkX57Fyni+NgnyQQN4LitPmob2Hjnqw4=\ngolang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=\ngolang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=\ngolang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=\ngolang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=\ngolang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=\ngolang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=\ngolang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=\ngolang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=\ngolang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=\ngolang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=\ngolang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=\ngolang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=\ngolang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=\ngolang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=\ngolang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=\ngolang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=\ngolang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8=\ngolang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=\ngolang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=\ngolang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=\ngolang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=\ngolang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=\ngolang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=\ngolang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=\ngolang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=\ngolang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=\ngolang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=\ngolang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E=\ngolang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=\ngolang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA=\ngolang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ=\ngolang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=\ngolang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s=\ngolang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc=\ngolang.org/x/tools v0.9.3/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc=\ngolang.org/x/tools v0.12.0/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM=\ngolang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=\ngolang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0=\ngolang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps=\ngolang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg=\ngolang.org/x/tools v0.21.0/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=\ngolang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=\ngolang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c=\ngolang.org/x/tools v0.23.0/go.mod h1:pnu6ufv6vQkll6szChhK3C3L/ruaIv5eBeztNG8wtsI=\ngolang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ=\ngolang.org/x/tools v0.26.0/go.mod h1:TPVVj70c7JJ3WCazhD8OdXcZg/og+b9+tH/KxylGwH0=\ngolang.org/x/tools v0.41.0 h1:a9b8iMweWG+S0OBnlU36rzLp20z1Rp10w+IY2czHTQc=\ngolang.org/x/tools v0.41.0/go.mod h1:XSY6eDqxVNiYgezAVqqCeihT4j1U2CCsqvH3WhQpnlg=\ngolang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=\ngolang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=\ngolang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=\ngolang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=\ngomodules.xyz/envconfig v1.3.1-0.20190308184047-426f31af0d45 h1:juzzlx91nWAOsHuOVfXZPMXHtJEKouZvY9bBbwlOeYs=\ngomodules.xyz/envconfig v1.3.1-0.20190308184047-426f31af0d45/go.mod h1:41y72mzHT7+jFNgyBpJRrZWuZJcLmLrTpq6iGgOFJMQ=\ngomodules.xyz/notify v0.1.1 h1:1tTuoyswmPvzqPCTEDQK8SZ3ukCxLsonAAwst2+y1a0=\ngomodules.xyz/notify v0.1.1/go.mod h1:QgQyU4xEA/plJcDeT66J2Go2V7U4c0pD9wjo7HfFil4=\ngomodules.xyz/version v0.1.0/go.mod h1:Y8xuV02mL/45psyPKG3NCVOwvAOy6T5Kx0l3rCjKSjU=\ngonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk=\ngonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E=\ngoogle.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=\ngoogle.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=\ngoogle.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=\ngoogle.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=\ngoogle.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=\ngoogle.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=\ngoogle.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=\ngoogle.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=\ngoogle.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=\ngoogle.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=\ngoogle.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=\ngoogle.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=\ngoogle.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=\ngoogle.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=\ngoogle.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM=\ngoogle.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc=\ngoogle.golang.org/api v0.223.0 h1:JUTaWEriXmEy5AhvdMgksGGPEFsYfUKaPEYXd4c3Wvc=\ngoogle.golang.org/api v0.223.0/go.mod h1:C+RS7Z+dDwds2b+zoAk5hN/eSfsiCn0UDrYof/M4d2M=\ngoogle.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=\ngoogle.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=\ngoogle.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=\ngoogle.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=\ngoogle.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=\ngoogle.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=\ngoogle.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM=\ngoogle.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds=\ngoogle.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=\ngoogle.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=\ngoogle.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=\ngoogle.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=\ngoogle.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=\ngoogle.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=\ngoogle.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=\ngoogle.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8=\ngoogle.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=\ngoogle.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=\ngoogle.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=\ngoogle.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=\ngoogle.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=\ngoogle.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=\ngoogle.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA=\ngoogle.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U=\ngoogle.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=\ngoogle.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA=\ngoogle.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY=\ngoogle.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo=\ngoogle.golang.org/genproto/googleapis/api v0.0.0-20251202230838-ff82c1b0f217 h1:fCvbg86sFXwdrl5LgVcTEvNC+2txB5mgROGmRL5mrls=\ngoogle.golang.org/genproto/googleapis/api v0.0.0-20251202230838-ff82c1b0f217/go.mod h1:+rXWjjaukWZun3mLfjmVnQi18E1AsFbDN9QdJ5YXLto=\ngoogle.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217 h1:gRkg/vSppuSQoDjxyiGfN4Upv/h/DQmIR10ZU8dh4Ww=\ngoogle.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217/go.mod h1:7i2o+ce6H/6BluujYR+kqX3GKH+dChPTQU19wjRPiGk=\ngoogle.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=\ngoogle.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=\ngoogle.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=\ngoogle.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=\ngoogle.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=\ngoogle.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=\ngoogle.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=\ngoogle.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=\ngoogle.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60=\ngoogle.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=\ngoogle.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=\ngoogle.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=\ngoogle.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=\ngoogle.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=\ngoogle.golang.org/grpc v1.79.3 h1:sybAEdRIEtvcD68Gx7dmnwjZKlyfuc61Dyo9pGXXkKE=\ngoogle.golang.org/grpc v1.79.3/go.mod h1:KmT0Kjez+0dde/v2j9vzwoAScgEPx/Bw1CYChhHLrHQ=\ngoogle.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=\ngoogle.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=\ngoogle.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=\ngoogle.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=\ngoogle.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=\ngoogle.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=\ngoogle.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=\ngoogle.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=\ngoogle.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=\ngoogle.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=\ngoogle.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=\ngoogle.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=\ngoogle.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=\ngoogle.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=\ngoogle.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=\ngoogle.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=\ngoogle.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=\ngoogle.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=\ngoogle.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE=\ngoogle.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=\ngopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=\ngopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc h1:2gGKlE2+asNV9m7xrywl36YYNnBG5ZQ0r/BOOxqPpmk=\ngopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk=\ngopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=\ngopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=\ngopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=\ngopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=\ngopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=\ngopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=\ngopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4=\ngopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M=\ngopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=\ngopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df h1:n7WqCuqOuCbNr617RXOY0AWRXxgwEyPp2z+p0+hgMuE=\ngopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df/go.mod h1:LRQQ+SO6ZHR7tOkpBDuZnXENFzX8qRjMDMyPD6BRkCw=\ngopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=\ngopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=\ngopkg.in/ini.v1 v1.57.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=\ngopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=\ngopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=\ngopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME=\ngopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=\ngopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=\ngopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=\ngopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=\ngopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=\ngotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q=\ngotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA=\nhonnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=\nhonnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=\nhonnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=\nhonnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=\nhonnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=\nhonnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=\nhonnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=\nk8s.io/api v0.34.0 h1:L+JtP2wDbEYPUeNGbeSa/5GwFtIA662EmT2YSLOkAVE=\nk8s.io/api v0.34.0/go.mod h1:YzgkIzOOlhl9uwWCZNqpw6RJy9L2FK4dlJeayUoydug=\nk8s.io/apiextensions-apiserver v0.34.0 h1:B3hiB32jV7BcyKcMU5fDaDxk882YrJ1KU+ZSkA9Qxoc=\nk8s.io/apiextensions-apiserver v0.34.0/go.mod h1:hLI4GxE1BDBy9adJKxUxCEHBGZtGfIg98Q+JmTD7+g0=\nk8s.io/apimachinery v0.34.2 h1:zQ12Uk3eMHPxrsbUJgNF8bTauTVR2WgqJsTmwTE/NW4=\nk8s.io/apimachinery v0.34.2/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw=\nk8s.io/apiserver v0.34.0 h1:Z51fw1iGMqN7uJ1kEaynf2Aec1Y774PqU+FVWCFV3Jg=\nk8s.io/apiserver v0.34.0/go.mod h1:52ti5YhxAvewmmpVRqlASvaqxt0gKJxvCeW7ZrwgazQ=\nk8s.io/cli-runtime v0.34.0 h1:N2/rUlJg6TMEBgtQ3SDRJwa8XyKUizwjlOknT1mB2Cw=\nk8s.io/cli-runtime v0.34.0/go.mod h1:t/skRecS73Piv+J+FmWIQA2N2/rDjdYSQzEE67LUUs8=\nk8s.io/client-go v0.34.0 h1:YoWv5r7bsBfb0Hs2jh8SOvFbKzzxyNo0nSb0zC19KZo=\nk8s.io/client-go v0.34.0/go.mod h1:ozgMnEKXkRjeMvBZdV1AijMHLTh3pbACPvK7zFR+QQY=\nk8s.io/component-base v0.34.0 h1:bS8Ua3zlJzapklsB1dZgjEJuJEeHjj8yTu1gxE2zQX8=\nk8s.io/component-base v0.34.0/go.mod h1:RSCqUdvIjjrEm81epPcjQ/DS+49fADvGSCkIP3IC6vg=\nk8s.io/component-helpers v0.34.0 h1:5T7P9XGMoUy1JDNKzHf0p/upYbeUf8ZaSf9jbx0QlIo=\nk8s.io/component-helpers v0.34.0/go.mod h1:kaOyl5tdtnymriYcVZg4uwDBe2d1wlIpXyDkt6sVnt4=\nk8s.io/controller-manager v0.34.0 h1:oCHoqS8dcFp7zDSu7HUvTpakq3isSxil3GprGGlJMsE=\nk8s.io/controller-manager v0.34.0/go.mod h1:XFto21U+Mm9BT8r/Jd5E4tHCGtwjKAUFOuDcqaj2VK0=\nk8s.io/gengo/v2 v2.0.0-20250604051438-85fd79dbfd9f/go.mod h1:EJykeLsmFC60UQbYJezXkEsG2FLrt0GPNkU5iK5GWxU=\nk8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y=\nk8s.io/klog/v2 v2.5.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec=\nk8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=\nk8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=\nk8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=\nk8s.io/kube-aggregator v0.34.0 h1:XE4u+HOYkj0g44sblhTtPv+QyIIK7sJxrIlia0731kE=\nk8s.io/kube-aggregator v0.34.0/go.mod h1:GIUqdChXVC448Vp2Wgxf0m6fir7Xt3A2TAZcs2JNG1Y=\nk8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b h1:MloQ9/bdJyIu9lb1PzujOPolHyvO06MXG5TUIj2mNAA=\nk8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b/go.mod h1:UZ2yyWbFTpuhSbFhv24aGNOdoRdJZgsIObGBUaYVsts=\nk8s.io/kubectl v0.34.0 h1:NcXz4TPTaUwhiX4LU+6r6udrlm0NsVnSkP3R9t0dmxs=\nk8s.io/kubectl v0.34.0/go.mod h1:bmd0W5i+HuG7/p5sqicr0Li0rR2iIhXL0oUyLF3OjR4=\nk8s.io/kubernetes v1.34.2 h1:WQdDvYJazkmkwSncgNwGvVtaCt4TYXIU3wSMRgvp3MI=\nk8s.io/kubernetes v1.34.2/go.mod h1:m6pZk6a179pRo2wsTiCPORJ86iOEQmfIzUvtyEF8BwA=\nk8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=\nk8s.io/utils v0.0.0-20250604170112-4c0f3b243397 h1:hwvWFiBzdWw1FhfY1FooPn3kzWuJ8tmbZBHi4zVsl1Y=\nk8s.io/utils v0.0.0-20250604170112-4c0f3b243397/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=\nlayeh.com/gopher-json v0.0.0-20190114024228-97fed8db8427 h1:RZkKxMR3jbQxdCEcglq3j7wY3PRJIopAwBlx1RE71X0=\nlayeh.com/gopher-json v0.0.0-20190114024228-97fed8db8427/go.mod h1:ivKkcY8Zxw5ba0jldhZCYYQfGdb2K6u9tbYK1AwMIBc=\nnhooyr.io/websocket v1.8.7 h1:usjR2uOr/zjjkVMy0lW+PPohFok7PCow5sDjLgX4P4g=\nnhooyr.io/websocket v1.8.7/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0=\noras.land/oras-go/v2 v2.6.0 h1:X4ELRsiGkrbeox69+9tzTu492FMUu7zJQW6eJU+I2oc=\noras.land/oras-go/v2 v2.6.0/go.mod h1:magiQDfG6H1O9APp+rOsvCPcW1GD2MM7vgnKY0Y+u1o=\npgregory.net/rapid v1.2.0 h1:keKAYRcjm+e1F0oAuU5F5+YPAWcyxNNRK2wud503Gnk=\npgregory.net/rapid v1.2.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04=\nrsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=\nrsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=\nrsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=\nsigs.k8s.io/controller-runtime v0.21.0 h1:CYfjpEuicjUecRk+KAeyYh+ouUBn4llGyDYytIGcJS8=\nsigs.k8s.io/controller-runtime v0.21.0/go.mod h1:OSg14+F65eWqIu4DceX7k/+QRAbTTvxeQSNSOQpukWM=\nsigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0=\nsigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE=\nsigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg=\nsigs.k8s.io/kustomize/api v0.20.1 h1:iWP1Ydh3/lmldBnH/S5RXgT98vWYMaTUL1ADcr+Sv7I=\nsigs.k8s.io/kustomize/api v0.20.1/go.mod h1:t6hUFxO+Ph0VxIk1sKp1WS0dOjbPCtLJ4p8aADLwqjM=\nsigs.k8s.io/kustomize/kyaml v0.20.1 h1:PCMnA2mrVbRP3NIB6v9kYCAc38uvFLVs8j/CD567A78=\nsigs.k8s.io/kustomize/kyaml v0.20.1/go.mod h1:0EmkQHRUsJxY8Ug9Niig1pUMSCGHxQ5RklbpV/Ri6po=\nsigs.k8s.io/randfill v0.0.0-20250304075658-069ef1bbf016/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY=\nsigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU=\nsigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY=\nsigs.k8s.io/structured-merge-diff/v6 v6.2.0/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE=\nsigs.k8s.io/structured-merge-diff/v6 v6.3.0/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE=\nsigs.k8s.io/structured-merge-diff/v6 v6.3.1-0.20251003215857-446d8398e19c h1:RCkxmWwPjOw2O1RiDgBgI6tfISvB07jAh+GEztp7TWk=\nsigs.k8s.io/structured-merge-diff/v6 v6.3.1-0.20251003215857-446d8398e19c/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE=\nsigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=\nsigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY=\nsigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs=\nsigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4=\n"
  },
  {
    "path": "internal/diagnostics/diagnostics.go",
    "content": "package diagnostics\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/argoproj-labs/terraform-provider-argocd/internal/features\"\n\t\"github.com/hashicorp/terraform-plugin-framework/diag\"\n)\n\nfunc ArgoCDAPIError(action, resource, id string, err error) diag.Diagnostics {\n\tvar diags diag.Diagnostics\n\n\tdiags.AddError(fmt.Sprintf(\"failed to %s %s %s\", action, resource, id), err.Error())\n\n\treturn diags\n}\n\nfunc Error(summary string, err error) diag.Diagnostics {\n\tvar diags diag.Diagnostics\n\n\tvar detail string\n\n\tif err != nil {\n\t\tdetail = err.Error()\n\t}\n\n\tdiags.AddError(summary, detail)\n\n\treturn diags\n}\n\nfunc FeatureNotSupported(f features.Feature) diag.Diagnostics {\n\tvar diags diag.Diagnostics\n\n\tfc := features.ConstraintsMap[f]\n\n\tdiags.AddError(fmt.Sprintf(\"%s is only supported from ArgoCD %s onwards\", fc.Name, fc.MinVersion.String()), \"\")\n\n\treturn diags\n}\n"
  },
  {
    "path": "internal/features/features.go",
    "content": "package features\n\nimport (\n\t\"github.com/Masterminds/semver/v3\"\n)\n\ntype Feature int64\n\nconst (\n\tExecLogsPolicy Feature = iota\n\tProjectSourceNamespaces\n\tMultipleApplicationSources\n\tApplicationSet\n\tApplicationSetProgressiveSync\n\tManagedNamespaceMetadata\n\tApplicationSetApplicationsSyncPolicy\n\tApplicationSetIgnoreApplicationDifferences\n\tApplicationSetTemplatePatch\n\tApplicationKustomizePatches\n\tProjectDestinationServiceAccounts\n\tProjectFineGrainedPolicy\n\tApplicationSourceName\n\tRepositoryDepth\n)\n\ntype FeatureConstraint struct {\n\t// Name is a human-readable name for the feature.\n\tName string\n\t// MinVersion is the minimum ArgoCD version that supports this feature.\n\tMinVersion *semver.Version\n}\n\nvar ConstraintsMap = map[Feature]FeatureConstraint{\n\tExecLogsPolicy:                             {\"exec/logs RBAC policy\", semver.MustParse(\"2.4.4\")},\n\tProjectSourceNamespaces:                    {\"project source namespaces\", semver.MustParse(\"2.5.0\")},\n\tMultipleApplicationSources:                 {\"multiple application sources\", semver.MustParse(\"2.6.3\")}, // Whilst the feature was introduced in 2.6.0 there was a bug that affects refresh of applications (and hence `wait` within this provider) that was only fixed in https://github.com/argoproj/argo-cd/pull/12576\n\tApplicationSet:                             {\"application sets\", semver.MustParse(\"2.5.0\")},\n\tApplicationSetProgressiveSync:              {\"progressive sync (`strategy`)\", semver.MustParse(\"2.6.0\")},\n\tManagedNamespaceMetadata:                   {\"managed namespace metadata\", semver.MustParse(\"2.6.0\")},\n\tApplicationSetApplicationsSyncPolicy:       {\"application set level application sync policy\", semver.MustParse(\"2.8.0\")},\n\tApplicationSetIgnoreApplicationDifferences: {\"application set ignore application differences\", semver.MustParse(\"2.9.0\")},\n\tApplicationSetTemplatePatch:                {\"application set template patch\", semver.MustParse(\"2.10.0\")},\n\tApplicationKustomizePatches:                {\"application kustomize patches\", semver.MustParse(\"2.9.0\")},\n\tProjectFineGrainedPolicy:                   {\"fine-grained policy in project\", semver.MustParse(\"2.12.0\")},\n\tApplicationSourceName:                      {\"named application sources\", semver.MustParse(\"2.14.0\")},\n\tProjectDestinationServiceAccounts:          {\"project destination service accounts\", semver.MustParse(\"2.13.0\")},\n\tRepositoryDepth:                            {\"repository shallow clone depth\", semver.MustParse(\"3.3.0\")},\n}\n"
  },
  {
    "path": "internal/provider/data_source_application.go",
    "content": "package provider\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/argoproj-labs/terraform-provider-argocd/internal/diagnostics\"\n\t\"github.com/argoproj/argo-cd/v3/pkg/apiclient/application\"\n\t\"github.com/hashicorp/terraform-plugin-framework/datasource\"\n\t\"github.com/hashicorp/terraform-plugin-framework/datasource/schema\"\n\t\"github.com/hashicorp/terraform-plugin-framework/diag\"\n\t\"github.com/hashicorp/terraform-plugin-framework/types\"\n\t\"github.com/hashicorp/terraform-plugin-log/tflog\"\n)\n\n// Ensure provider defined types fully satisfy framework interfaces.\nvar _ datasource.DataSource = &applicationDataSource{}\n\nfunc NewArgoCDApplicationDataSource() datasource.DataSource {\n\treturn &applicationDataSource{}\n}\n\n// applicationDataSource defines the data source implementation.\ntype applicationDataSource struct {\n\tsi *ServerInterface\n}\n\nfunc (d *applicationDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) {\n\tresp.TypeName = req.ProviderTypeName + \"_application\"\n}\n\nfunc (d *applicationDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) {\n\tresp.Schema = schema.Schema{\n\t\tMarkdownDescription: \"Reads an existing ArgoCD application.\",\n\n\t\tAttributes: map[string]schema.Attribute{\n\t\t\t\"id\": schema.StringAttribute{\n\t\t\t\tMarkdownDescription: \"ArgoCD application identifier\",\n\t\t\t\tComputed:            true,\n\t\t\t},\n\t\t\t\"metadata\": objectMetaSchemaAttribute(\"applications.argoproj.io\", true),\n\t\t\t\"spec\":     applicationSpecSchemaAttribute(true, true),\n\t\t\t\"status\":   applicationStatusSchemaAttribute(),\n\t\t},\n\t}\n}\n\nfunc (d *applicationDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) {\n\t// Prevent panic if the provider has not been configured.\n\tif req.ProviderData == nil {\n\t\treturn\n\t}\n\n\tsi, ok := req.ProviderData.(*ServerInterface)\n\tif !ok {\n\t\tresp.Diagnostics.AddError(\n\t\t\t\"Unexpected Provider Data\",\n\t\t\tfmt.Sprintf(\"Expected *ServerInterface, got: %T. Please report this issue to the provider developers.\", req.ProviderData),\n\t\t)\n\n\t\treturn\n\t}\n\n\td.si = si\n}\n\nfunc (d *applicationDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) {\n\tvar data applicationModel\n\n\t// Read Terraform configuration data into the model\n\tresp.Diagnostics.Append(req.Config.Get(ctx, &data)...)\n\n\t// Initialize API clients\n\tresp.Diagnostics.Append(d.si.InitClients(ctx)...)\n\n\t// Check for errors before proceeding\n\tif resp.Diagnostics.HasError() {\n\t\treturn\n\t}\n\n\tid := fmt.Sprintf(\"%s:%s\", data.Metadata.Name.ValueString(), data.Metadata.Namespace.ValueString())\n\tdata.ID = types.StringValue(id)\n\n\t// Read application\n\tresp.Diagnostics.Append(readApplication(ctx, d.si, &data)...)\n\n\ttflog.Trace(ctx, \"read ArgoCD application\")\n\n\t// Save data into Terraform state\n\tresp.Diagnostics.Append(resp.State.Set(ctx, &data)...)\n}\n\nfunc readApplication(ctx context.Context, si *ServerInterface, data *applicationModel) (diags diag.Diagnostics) {\n\tids := strings.Split(data.ID.ValueString(), \":\")\n\tappName := ids[0]\n\tnamespace := ids[1]\n\n\tapps, err := si.ApplicationClient.List(ctx, &application.ApplicationQuery{\n\t\tName:         &appName,\n\t\tAppNamespace: &namespace,\n\t})\n\tif err != nil {\n\t\tif strings.Contains(err.Error(), \"NotFound\") {\n\t\t\tdata.ID = types.StringUnknown()\n\t\t\treturn diags\n\t\t}\n\n\t\tdiags.Append(diagnostics.ArgoCDAPIError(\"read\", \"application\", appName, err)...)\n\n\t\treturn diags\n\t}\n\n\tl := len(apps.Items)\n\n\tswitch {\n\tcase l < 1:\n\t\tdata.ID = types.StringUnknown()\n\t\treturn diags\n\tcase l == 1:\n\t\tbreak\n\tcase l > 1:\n\t\tdiags.AddError(fmt.Sprintf(\"found multiple applications matching name '%s' and namespace '%s'\", appName, namespace), \"\")\n\t\treturn diags\n\t}\n\n\tapp := apps.Items[0]\n\n\tdata.Metadata = newObjectMeta(app.ObjectMeta)\n\tdata.Spec = newApplicationSpec(app.Spec)\n\tdata.Status = newApplicationStatus(app.Status)\n\n\treturn diags\n}\n"
  },
  {
    "path": "internal/provider/data_source_application_test.go",
    "content": "package provider\n\nimport (\n\t\"fmt\"\n\t\"testing\"\n\n\t\"github.com/argoproj-labs/terraform-provider-argocd/internal/features\"\n\t\"github.com/hashicorp/terraform-plugin-testing/helper/resource\"\n)\n\nfunc TestAccArgoCDApplicationDataSource(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck: func() { testAccPreCheck(t); testAccPreCheckFeatureSupported(t, features.MultipleApplicationSources) },\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tExternalProviders: map[string]resource.ExternalProvider{\n\t\t\t\t\t\"argocd\": {\n\t\t\t\t\t\tVersionConstraint: \"~> 5.0\",\n\t\t\t\t\t\tSource:            \"argoproj-labs/argocd\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tConfig: `\nresource \"argocd_project\" \"foo\" {\n\tmetadata {\n\t\tname      = \"foo\"\n\t\tnamespace = \"argocd\"\n\t}\n\n\tspec {\n\t\tdescription       = \"project with source namespace\"\n\t\tsource_repos      = [\"*\"]\n\t\tsource_namespaces = [\"mynamespace-1\"]\n\n\t\tdestination {\n\t\t\tserver    = \"https://kubernetes.default.svc\"\n\t\t\tnamespace = \"mynamespace-1\"\n\t\t}\n\t}\n}\n\nresource \"argocd_application\" \"foo\" {\n\tmetadata {\n\t\tname      = \"foo\"\n\t\tnamespace = \"mynamespace-1\"\n\t\tlabels = {\n\t\t\tacceptance = \"true\"\n\t\t}\n\t}\n\n\tspec {\n\t\tdestination {\n\t\t  server    = \"https://kubernetes.default.svc\"\n\t\t  namespace = \"mynamespace-1\"\n\t\t}\n\n\t\tignore_difference {\n\t\t\tgroup               = \"apps\"\n\t\t\tkind                = \"Deployment\"\n\t\t\tjq_path_expressions = [\".spec.replicas\"]\n\t\t\tjson_pointers       = [\"/spec/replicas\"]\n\t\t}\n\n\t\tinfo {\n\t\t\tname = \"foo\"\n\t\t\tvalue = \"foo\"\n\t\t}\n\n\t\tproject                = argocd_project.foo.metadata[0].name\n\t\trevision_history_limit = 1\n\t\n\t\tsource {\n\t\t\trepo_url        = \"https://opensearch-project.github.io/helm-charts\"\n\t\t\tchart           = \"opensearch\"\n\t\t\ttarget_revision = \"3.0.0\"\n\n\t\t\thelm {\n\t\t\t\tparameter {\n\t\t\t\t\tname = \"replicas\"\n\t\t\t\t\tvalue = \"1\"\n\t\t\t\t}\n\t\n\t\t\t\tparameter {\n\t\t\t\t\tname = \"singleNode\"\n\t\t\t\t\tvalue = \"true\"\n\t\t\t\t}\n\n\t\t\t\tparameter {\n\t\t\t\t\tname = \"persistence.enabled\"\n\t\t\t\t\tvalue = \"false\"\n\t\t\t\t}\n\n\t\t\t\tvalues = <<-EOT\n\t\t\t\t  extraEnvs:\n\t\t\t\t    - name: \"DISABLE_SECURITY_PLUGIN\"\n\t\t\t\t      value: \"true\"\n\t\t\t\tEOT\n\t\t\t}\n\t\t}\n\t\n\t\tsource {\n\t\t\trepo_url        = \"https://github.com/argoproj/argo-cd.git\"\n\t\t\tpath            = \"test/e2e/testdata/guestbook\"\n\t\t\ttarget_revision = \"HEAD\"\n\t\t}\n\n\t\tsync_policy {\n\t\t\tautomated {\n\t\t\t\tallow_empty = true\n\t\t\t\tprune       = true\n\t\t\t\tself_heal   = true\n\t\t\t}\n\n\t\t\tretry {\n\t\t\t\tbackoff {\n\t\t\t\t\tduration     = \"30s\"\n\t\t\t\t\tfactor       = \"2\"\n\t\t\t\t\tmax_duration = \"2m\"\n\t\t\t\t}\n\n\t\t\t\tlimit = \"5\"\n\t\t\t}\n\n\t\t\tsync_options = [\"ApplyOutOfSyncOnly=true\"]\n\t\t}\n\t}\n\n\twait = true\n}\n\t\t\t\t`,\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\"argocd_application.foo\", \"metadata.0.uid\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.foo\", \"metadata.0.name\", \"foo\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.foo\", \"metadata.0.namespace\", \"mynamespace-1\"),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\"argocd_application.foo\", \"metadata.0.labels.%\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.foo\", \"spec.0.destination.0.server\", \"https://kubernetes.default.svc\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.foo\", \"spec.0.destination.0.namespace\", \"mynamespace-1\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.foo\", \"spec.0.ignore_difference.0.group\", \"apps\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.foo\", \"spec.0.ignore_difference.0.kind\", \"Deployment\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.foo\", \"spec.0.ignore_difference.0.jq_path_expressions.0\", \".spec.replicas\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.foo\", \"spec.0.ignore_difference.0.json_pointers.0\", \"/spec/replicas\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.foo\", \"spec.0.info.0.name\", \"foo\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.foo\", \"spec.0.info.0.value\", \"foo\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.foo\", \"spec.0.project\", \"foo\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.foo\", \"spec.0.revision_history_limit\", \"1\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.foo\", \"spec.0.source.0.repo_url\", \"https://opensearch-project.github.io/helm-charts\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.foo\", \"spec.0.source.0.chart\", \"opensearch\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.foo\", \"spec.0.source.0.target_revision\", \"3.0.0\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.foo\", \"spec.0.source.1.repo_url\", \"https://github.com/argoproj/argo-cd.git\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.foo\", \"spec.0.source.1.path\", \"test/e2e/testdata/guestbook\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.foo\", \"spec.0.source.1.target_revision\", \"HEAD\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.foo\", \"spec.0.sync_policy.0.automated.0.allow_empty\", \"true\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.foo\", \"spec.0.sync_policy.0.automated.0.prune\", \"true\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.foo\", \"spec.0.sync_policy.0.automated.0.self_heal\", \"true\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.foo\", \"spec.0.sync_policy.0.retry.0.backoff.0.duration\", \"30s\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.foo\", \"spec.0.sync_policy.0.retry.0.backoff.0.factor\", \"2\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.foo\", \"spec.0.sync_policy.0.retry.0.backoff.0.max_duration\", \"2m\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.foo\", \"spec.0.sync_policy.0.retry.0.limit\", \"5\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.foo\", \"spec.0.sync_policy.0.sync_options.0\", \"ApplyOutOfSyncOnly=true\"),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\t\t\tConfig: `\ndata \"argocd_application\" \"foo\" {\n\tmetadata = {\n\t\tname      = \"foo\"\n\t\tnamespace = \"mynamespace-1\"\n\t}\n}\n\t\t\t\t`,\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\"data.argocd_application.foo\", \"metadata.uid\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.foo\", \"metadata.name\", \"foo\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.foo\", \"metadata.namespace\", \"mynamespace-1\"),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\"data.argocd_application.foo\", \"metadata.labels.%\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.foo\", \"spec.destination.server\", \"https://kubernetes.default.svc\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.foo\", \"spec.destination.namespace\", \"mynamespace-1\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.foo\", \"spec.ignore_differences.0.group\", \"apps\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.foo\", \"spec.ignore_differences.0.kind\", \"Deployment\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.foo\", \"spec.ignore_differences.0.jq_path_expressions.0\", \".spec.replicas\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.foo\", \"spec.ignore_differences.0.json_pointers.0\", \"/spec/replicas\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.foo\", \"spec.info.name\", \"foo\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.foo\", \"spec.info.value\", \"foo\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.foo\", \"spec.project\", \"foo\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.foo\", \"spec.revision_history_limit\", \"1\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.foo\", \"spec.sources.0.repo_url\", \"https://opensearch-project.github.io/helm-charts\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.foo\", \"spec.sources.0.chart\", \"opensearch\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.foo\", \"spec.sources.0.target_revision\", \"3.0.0\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.foo\", \"spec.sources.1.repo_url\", \"https://github.com/argoproj/argo-cd.git\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.foo\", \"spec.sources.1.path\", \"test/e2e/testdata/guestbook\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.foo\", \"spec.sources.1.target_revision\", \"HEAD\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.foo\", \"spec.sync_policy.automated.allow_empty\", \"true\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.foo\", \"spec.sync_policy.automated.prune\", \"true\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.foo\", \"spec.sync_policy.automated.self_heal\", \"true\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.foo\", \"spec.sync_policy.retry.backoff.duration\", \"30s\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.foo\", \"spec.sync_policy.retry.backoff.factor\", \"2\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.foo\", \"spec.sync_policy.retry.backoff.max_duration\", \"2m\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.foo\", \"spec.sync_policy.retry.limit\", \"5\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.foo\", \"spec.sync_policy.sync_options.0\", \"ApplyOutOfSyncOnly=true\"),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\"data.argocd_application.foo\", \"status.conditions.%\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.foo\", \"status.health.status\", \"Healthy\"),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\"data.argocd_application.foo\", \"status.operation_state\"),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\"data.argocd_application.foo\", \"status.reconciled_at\"),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\"data.argocd_application.foo\", \"status.resources.%\"),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\"data.argocd_application.foo\", \"status.summary\"),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\"data.argocd_application.foo\", \"status.sync\"),\n\t\t\t\t),\n\t\t\t\tExpectNonEmptyPlan: true,\n\t\t\t\tPlanOnly:           true,\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplicationDataSource_Directory(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck: func() { testAccPreCheck(t) },\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tExternalProviders: map[string]resource.ExternalProvider{\n\t\t\t\t\t\"argocd\": {\n\t\t\t\t\t\tVersionConstraint: \"~> 5.0\",\n\t\t\t\t\t\tSource:            \"argoproj-labs/argocd\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tConfig: `\nresource \"argocd_application\" \"directory\" {\n\tmetadata {\n\t\tname      = \"directory\"\n\t\tnamespace = \"argocd\"\n\t}\n\n\tspec {\n\t\tdestination {\n\t\t\tserver    = \"https://kubernetes.default.svc\"\n\t\t\tnamespace = \"directory\"\n\t\t}\n\n\t\tsource {\n\t\t\trepo_url        = \"https://github.com/solo-io/gloo\"\n\t\t\tpath            = \"install/helm/gloo\"\n\t\t\ttarget_revision = \"v1.4.2\"\n\n\t\t\tdirectory {\n\t\t\t\tjsonnet {\n\t\t\t\t\text_var {\n\t\t\t\t\t\tname  = \"somename\"\n\t\t\t\t\t\tvalue = \"somevalue\"\n\t\t\t\t\t\tcode  = false\n\t\t\t\t\t}\n\n\t\t\t\t\tlibs = [\"vendor\", \"foo\"]\n\n\t\t\t\t\ttla {\n\t\t\t\t\t\tname  = \"yetanothername\"\n\t\t\t\t\t\tvalue = \"yetanothervalue\"\n\t\t\t\t\t\tcode  = true\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\trecurse = false\n\t\t\t}\n\t\t}\n\t}\n}\n\t\t\t\t`,\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\"argocd_application.directory\", \"metadata.0.uid\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.directory\", \"spec.0.source.0.directory.0.jsonnet.0.ext_var.0.name\", \"somename\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.directory\", \"spec.0.source.0.directory.0.jsonnet.0.ext_var.0.value\", \"somevalue\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.directory\", \"spec.0.source.0.directory.0.jsonnet.0.ext_var.0.code\", \"false\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.directory\", \"spec.0.source.0.directory.0.jsonnet.0.libs.0\", \"vendor\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.directory\", \"spec.0.source.0.directory.0.jsonnet.0.tla.0.name\", \"yetanothername\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.directory\", \"spec.0.source.0.directory.0.jsonnet.0.tla.0.value\", \"yetanothervalue\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.directory\", \"spec.0.source.0.directory.0.jsonnet.0.tla.0.code\", \"true\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.directory\", \"spec.0.source.0.directory.0.recurse\", \"false\"),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\t\t\tConfig: `\ndata \"argocd_application\" \"directory\" {\n\tmetadata = {\n\t\tname = \"directory\"\n\t}\n}\n\t\t\t\t`,\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\"data.argocd_application.directory\", \"metadata.uid\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.directory\", \"spec.sources.0.directory.jsonnet.0.name\", \"image.tag\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.directory\", \"spec.sources.0.directory.jsonnet.ext_vars.0.name\", \"somename\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.directory\", \"spec.sources.0.directory.jsonnet.ext_vars.0.value\", \"somevalue\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.directory\", \"spec.sources.0.directory.jsonnet.ext_vars.0.code\", \"false\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.directory\", \"spec.sources.0.directory.jsonnet.libs.0\", \"vendor\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.directory\", \"spec.sources.0.directory.jsonnet.tlas.0.name\", \"yetanothername\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.directory\", \"spec.sources.0.directory.jsonnet.tlas.0.value\", \"yetanothervalue\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.directory\", \"spec.sources.0.directory.jsonnet.tlas.0.code\", \"true\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.directory\", \"spec.sources.0.directory.recurse\", \"false\"),\n\t\t\t\t),\n\t\t\t\tExpectNonEmptyPlan: true,\n\t\t\t\tPlanOnly:           true,\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplicationDataSource_Helm(t *testing.T) {\n\thelmValues := `\ningress:\n  enabled: true\n  path: /\n  hosts:\n    - mydomain.example.com\n  annotations:\n    kubernetes.io/ingress.class: nginx\n    kubernetes.io/tls-acme: \"true\"\n  labels: {}\n  tls:\n    - secretName: mydomain-tls\n      hosts:\n        - mydomain.example.com\n`\n\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck: func() { testAccPreCheck(t) },\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tExternalProviders: map[string]resource.ExternalProvider{\n\t\t\t\t\t\"argocd\": {\n\t\t\t\t\t\tVersionConstraint: \"~> 5.0\",\n\t\t\t\t\t\tSource:            \"argoproj-labs/argocd\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tConfig: fmt.Sprintf(`\nresource \"argocd_application\" \"helm\" {\n\tmetadata {\n\t\tname      = \"helm\"\n\t\tnamespace = \"argocd\"\n\t}\n\n\tspec {\n\t\tdestination {\n\t\t\tserver    = \"https://kubernetes.default.svc\"\n\t\t\tnamespace = \"helm\"\n\t\t}\n\n\t\tsource {\n\t\t\trepo_url        = \"https://kubernetes-sigs.github.io/descheduler\"\n\t\t\tchart           = \"descheduler\"\n\t\t\ttarget_revision = \"0.33.0\"\n\t\t\t\n\t\t\thelm {\n\t\t\t\tignore_missing_value_files = true\n\n\t\t\t\t# file_parameter {\n\t\t\t\t# \tname = \"foo\"\n\t\t\t\t# \tpath = \"values.yaml\"\n\t\t\t\t# }\n\n\t\t\t\tparameter {\n\t\t\t\t\tforce_string = true\n\t\t\t\t\tname         = \"image.tag\"\n\t\t\t\t\tvalue        = \"6.2.5\"\n\t\t\t\t}\n\n\t\t\t\tpass_credentials = true\n\t\t\t\trelease_name     = \"testing\"\n\t\t\t\tskip_crds        = true\n\t\t\t\tvalue_files      = [\"values.yaml\"]\n\t\t\t\tvalues = <<EOT\n%s\nEOT\n\t\t\t}\n\t\t}\n\t}\n}\n\t\t\t\t`, helmValues),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\"argocd_application.helm\", \"metadata.0.uid\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.helm\", \"metadata.0.name\", \"helm\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.helm\", \"metadata.0.namespace\", \"argocd\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.helm\", \"spec.0.destination.0.server\", \"https://kubernetes.default.svc\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.helm\", \"spec.0.destination.0.namespace\", \"helm\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.helm\", \"spec.0.source.0.repo_url\", \"https://kubernetes-sigs.github.io/descheduler\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.helm\", \"spec.0.source.0.chart\", \"descheduler\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.helm\", \"spec.0.source.0.target_revision\", \"0.33.0\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.helm\", \"spec.0.source.0.helm.0.ignore_missing_value_files\", \"true\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.helm\", \"spec.0.source.0.helm.0.parameter.0.force_string\", \"true\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.helm\", \"spec.0.source.0.helm.0.parameter.0.name\", \"image.tag\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.helm\", \"spec.0.source.0.helm.0.parameter.0.value\", \"6.2.5\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.helm\", \"spec.0.source.0.helm.0.pass_credentials\", \"true\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.helm\", \"spec.0.source.0.helm.0.release_name\", \"testing\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.helm\", \"spec.0.source.0.helm.0.skip_crds\", \"true\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.helm\", \"spec.0.source.0.helm.0.value_files.0\", \"values.yaml\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.helm\", \"spec.0.source.0.helm.0.values\", helmValues+\"\\n\"),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\t\t\tConfig: `\ndata \"argocd_application\" \"helm\" {\n\tmetadata = {\n\t\tname = \"helm\"\n\t}\n}\n\t\t\t\t`,\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\"data.argocd_application.helm\", \"metadata.uid\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.helm\", \"metadata.name\", \"helm\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.helm\", \"metadata.namespace\", \"argocd\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.helm\", \"spec.destination.server\", \"https://kubernetes.default.svc\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.helm\", \"spec.destination.namespace\", \"helm\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.helm\", \"spec.sources.0.repo_url\", \"https://kubernetes-sigs.github.io/descheduler\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.helm\", \"spec.sources.0.chart\", \"descheduler\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.helm\", \"spec.sources.0.target_revision\", \"0.33.0\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.helm\", \"spec.sources.0.helm.ignore_missing_value_files\", \"true\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.helm\", \"spec.sources.0.helm.parameters.0.force_string\", \"true\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.helm\", \"spec.sources.0.helm.parameters.0.name\", \"image.tag\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.helm\", \"spec.sources.0.helm.parameters.0.value\", \"6.2.5\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.helm\", \"spec.sources.0.helm.pass_credentials\", \"true\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.helm\", \"spec.sources.0.helm.release_name\", \"testing\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.helm\", \"spec.sources.0.helm.skip_crds\", \"true\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.helm\", \"spec.sources.0.helm.value_files.0\", \"values.yaml\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.helm\", \"spec.sources.0.helm.values\", helmValues+\"\\n\"),\n\t\t\t\t),\n\t\t\t\tExpectNonEmptyPlan: true,\n\t\t\t\tPlanOnly:           true,\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDApplicationDataSource_Kustomize(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck: func() { testAccPreCheck(t) },\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tExternalProviders: map[string]resource.ExternalProvider{\n\t\t\t\t\t\"argocd\": {\n\t\t\t\t\t\tVersionConstraint: \"~> 5.0\",\n\t\t\t\t\t\tSource:            \"argoproj-labs/argocd\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tConfig: `\nresource \"argocd_application\" \"kustomize\" {\n\tmetadata {\n\t\tname      = \"kustomize\"\n\t\tnamespace = \"argocd\"\n\t}\n\n\tspec {\n\t\tdestination {\n\t\t\tserver    = \"https://kubernetes.default.svc\"\n\t\t\tnamespace = \"kustomize\"\n\t\t}\n\n\t\tsource {\n\t\t\trepo_url        = \"https://github.com/kubernetes-sigs/kustomize\"\n\t\t\tpath            = \"examples/helloWorld\"\n\t\t\ttarget_revision = \"release-kustomize-v3.7\"\n\n\t\t\tkustomize {\n\t\t\t\tcommon_annotations = {\n\t\t\t\t\t\"this.is.a.common\" = \"anno-tation\"\n\t\t\t\t}\n\n\t\t\t\tcommon_labels = {\n\t\t\t\t\t\"another.io/one\" = \"true\" \n\t\t\t\t}\n\n\t\t\t\timages      = [\"hashicorp/terraform:light\"]\n\t\t\t\tname_prefix = \"foo-\"\n\t\t\t\tname_suffix = \"-bar\"\n\t\t\t\t# version     = \"v4.5.7\"\n\t\t\t}\n\t\t}\n\t}\n}\n\t\t\t\t`,\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\"argocd_application.kustomize\", \"metadata.0.uid\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.kustomize\", \"metadata.0.name\", \"kustomize\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.kustomize\", \"metadata.0.namespace\", \"argocd\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.kustomize\", \"spec.0.destination.0.server\", \"https://kubernetes.default.svc\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.kustomize\", \"spec.0.destination.0.namespace\", \"kustomize\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.kustomize\", \"spec.0.source.0.repo_url\", \"https://github.com/kubernetes-sigs/kustomize\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.kustomize\", \"spec.0.source.0.path\", \"examples/helloWorld\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.kustomize\", \"spec.0.source.0.target_revision\", \"release-kustomize-v3.7\"),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\"argocd_application.kustomize\", \"spec.0.source.0.kustomize.0.common_annotations.%\"),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\"argocd_application.kustomize\", \"spec.0.source.0.kustomize.0.common_labels.%\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.kustomize\", \"spec.0.source.0.kustomize.0.images.0\", \"hashicorp/terraform:light\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.kustomize\", \"spec.0.source.0.kustomize.0.name_prefix\", \"foo-\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.kustomize\", \"spec.0.source.0.kustomize.0.name_suffix\", \"-bar\"),\n\t\t\t\t\t// resource.TestCheckResourceAttr(\"argocd_application.kustomize\", \"spec.0.source.0.kustomize.0.version\", \"v4.5.7\"),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\t\t\tConfig: `\ndata \"argocd_application\" \"kustomize\" {\n\tmetadata = {\n\t\tname = \"kustomize\"\n\t}\n}\n\t\t\t\t`,\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\"data.argocd_application.kustomize\", \"metadata.uid\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.kustomize\", \"metadata.name\", \"kustomize\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.kustomize\", \"metadata.namespace\", \"argocd\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.kustomize\", \"spec.destination.server\", \"https://kubernetes.default.svc\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.kustomize\", \"spec.destination.namespace\", \"kustomize\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.kustomize\", \"spec.sources.0.repo_url\", \"https://github.com/kubernetes-sigs/kustomize\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.kustomize\", \"spec.sources.0.path\", \"examples/helloWorld\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"data.argocd_application.kustomize\", \"spec.sources.0.target_revision\", \"release-kustomize-v3.7\"),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\"argocd_application.kustomize\", \"spec.0.source.0.kustomize.common_annotations.%\"),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\"argocd_application.kustomize\", \"spec.0.source.0.kustomize.common_labels.%\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.kustomize\", \"spec.0.source.0.kustomize.images.0\", \"hashicorp/terraform:light\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.kustomize\", \"spec.0.source.0.kustomize.name_prefix\", \"foo-\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_application.kustomize\", \"spec.0.source.0.kustomize.name_suffix\", \"-bar\"),\n\t\t\t\t\t// resource.TestCheckResourceAttr(\"argocd_application.kustomize\", \"spec.0.source.0.kustomize.version\", \"v4.5.7\"),\n\t\t\t\t),\n\t\t\t\tExpectNonEmptyPlan: true,\n\t\t\t\tPlanOnly:           true,\n\t\t\t},\n\t\t},\n\t})\n}\n"
  },
  {
    "path": "internal/provider/model_application.go",
    "content": "package provider\n\nimport (\n\t\"github.com/argoproj-labs/terraform-provider-argocd/internal/utils\"\n\t\"github.com/argoproj-labs/terraform-provider-argocd/internal/validators\"\n\t\"github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1\"\n\t\"github.com/elliotchance/pie/v2\"\n\t\"github.com/hashicorp/terraform-plugin-framework/resource/schema\"\n\t\"github.com/hashicorp/terraform-plugin-framework/resource/schema/stringdefault\"\n\t\"github.com/hashicorp/terraform-plugin-framework/schema/validator\"\n\t\"github.com/hashicorp/terraform-plugin-framework/types\"\n\t\"github.com/hashicorp/terraform-plugin-framework/types/basetypes\"\n)\n\ntype applicationModel struct {\n\tID       types.String       `tfsdk:\"id\"`\n\tMetadata objectMeta         `tfsdk:\"metadata\"`\n\tSpec     *applicationSpec   `tfsdk:\"spec\"`\n\tStatus   *applicationStatus `tfsdk:\"status\"`\n}\n\ntype applicationSpec struct {\n\tDestination          applicationDestination                 `tfsdk:\"destination\"`\n\tIgnoreDifferences    []applicationResourceIgnoreDifferences `tfsdk:\"ignore_differences\"`\n\tInfos                []applicationInfo                      `tfsdk:\"infos\"`\n\tProject              types.String                           `tfsdk:\"project\"`\n\tRevisionHistoryLimit types.Int64                            `tfsdk:\"revision_history_limit\"`\n\tSources              []applicationSource                    `tfsdk:\"sources\"`\n\tSyncPolicy           *applicationSyncPolicy                 `tfsdk:\"sync_policy\"`\n}\n\nfunc applicationSpecSchemaAttribute(allOptional, computed bool) schema.Attribute {\n\treturn schema.SingleNestedAttribute{\n\t\tMarkdownDescription: \"The application specification.\",\n\t\tComputed:            computed,\n\t\tRequired:            !computed,\n\t\tAttributes: map[string]schema.Attribute{\n\t\t\t\"destination\":        applicationDestinationSchemaAttribute(computed),\n\t\t\t\"ignore_differences\": applicationResourceIgnoreDifferencesSchemaAttribute(computed),\n\t\t\t\"infos\":              applicationInfoSchemaAttribute(computed),\n\t\t\t\"project\": schema.StringAttribute{\n\t\t\t\tComputed:            computed,\n\t\t\t\tOptional:            !computed,\n\t\t\t\tMarkdownDescription: \"The project the application belongs to. Defaults to `default`.\",\n\t\t\t\tDefault:             stringdefault.StaticString(\"default\"),\n\t\t\t},\n\t\t\t\"revision_history_limit\": schema.Int64Attribute{\n\t\t\t\tMarkdownDescription: \"Limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10.\",\n\t\t\t\tComputed:            computed,\n\t\t\t\tOptional:            !computed,\n\t\t\t},\n\t\t\t\"sources\":     applicationSourcesSchemaAttribute(allOptional, computed),\n\t\t\t\"sync_policy\": applicationSyncPolicySchemaAttribute(computed),\n\t\t},\n\t}\n}\n\nfunc newApplicationSpec(as v1alpha1.ApplicationSpec) *applicationSpec {\n\tm := &applicationSpec{\n\t\tDestination:          newApplicationDestination(as.Destination),\n\t\tIgnoreDifferences:    newApplicationResourceIgnoreDifferences(as.IgnoreDifferences),\n\t\tInfos:                newApplicationInfos(as.Info),\n\t\tProject:              types.StringValue(as.Project),\n\t\tRevisionHistoryLimit: utils.OptionalInt64(as.RevisionHistoryLimit),\n\t\tSyncPolicy:           newApplicationSyncPolicy(as.SyncPolicy),\n\t}\n\n\tif as.Source != nil {\n\t\tm.Sources = append(m.Sources, newApplicationSource(*as.Source))\n\t}\n\n\tfor _, v := range as.Sources {\n\t\tm.Sources = append(m.Sources, newApplicationSource(v))\n\t}\n\n\treturn m\n}\n\ntype applicationDestination struct {\n\tServer    types.String `tfsdk:\"server\"`\n\tNamespace types.String `tfsdk:\"namespace\"`\n\tName      types.String `tfsdk:\"name\"`\n}\n\nfunc applicationDestinationSchemaAttribute(computed bool) schema.Attribute {\n\treturn schema.SingleNestedAttribute{\n\t\tMarkdownDescription: \"Reference to the Kubernetes server and namespace in which the application will be deployed.\",\n\t\tComputed:            computed,\n\t\tRequired:            !computed,\n\t\tAttributes: map[string]schema.Attribute{\n\t\t\t\"server\": schema.StringAttribute{\n\t\t\t\tMarkdownDescription: \"URL of the target cluster and must be set to the Kubernetes control plane API.\",\n\t\t\t\tComputed:            computed,\n\t\t\t\tOptional:            !computed,\n\t\t\t},\n\t\t\t\"namespace\": schema.StringAttribute{\n\t\t\t\tMarkdownDescription: \"Target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace.\",\n\t\t\t\tComputed:            computed,\n\t\t\t\tOptional:            !computed,\n\t\t\t},\n\t\t\t\"name\": schema.StringAttribute{\n\t\t\t\tMarkdownDescription: \"Name of the target cluster. Can be used instead of `server`.\",\n\t\t\t\tComputed:            computed,\n\t\t\t\tOptional:            !computed,\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc newApplicationDestination(ad v1alpha1.ApplicationDestination) applicationDestination {\n\treturn applicationDestination{\n\t\tName:      types.StringValue(ad.Name),\n\t\tNamespace: types.StringValue(ad.Namespace),\n\t\tServer:    types.StringValue(ad.Server),\n\t}\n}\n\ntype applicationResourceIgnoreDifferences struct {\n\tGroup             types.String   `tfsdk:\"group\"`\n\tKind              types.String   `tfsdk:\"kind\"`\n\tName              types.String   `tfsdk:\"name\"`\n\tNamespace         types.String   `tfsdk:\"namespace\"`\n\tJsonPointers      []types.String `tfsdk:\"json_pointers\"`\n\tJQPathExpressions []types.String `tfsdk:\"jq_path_expressions\"`\n}\n\nfunc applicationResourceIgnoreDifferencesSchemaAttribute(computed bool) schema.Attribute {\n\treturn schema.ListNestedAttribute{\n\t\tMarkdownDescription: \"Resources and their fields which should be ignored during comparison. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration.\",\n\t\tComputed:            computed,\n\t\tOptional:            !computed,\n\t\tNestedObject: schema.NestedAttributeObject{\n\t\t\tAttributes: map[string]schema.Attribute{\n\t\t\t\t\"group\": schema.StringAttribute{\n\t\t\t\t\tMarkdownDescription: \"The Kubernetes resource Group to match for.\",\n\t\t\t\t\tComputed:            computed,\n\t\t\t\t\tOptional:            !computed,\n\t\t\t\t},\n\t\t\t\t\"kind\": schema.StringAttribute{\n\t\t\t\t\tMarkdownDescription: \"The Kubernetes resource Kind to match for.\",\n\t\t\t\t\tComputed:            computed,\n\t\t\t\t\tOptional:            !computed,\n\t\t\t\t},\n\t\t\t\t\"name\": schema.StringAttribute{\n\t\t\t\t\tMarkdownDescription: \"The Kubernetes resource Name to match for.\",\n\t\t\t\t\tComputed:            computed,\n\t\t\t\t\tOptional:            !computed,\n\t\t\t\t},\n\t\t\t\t\"namespace\": schema.StringAttribute{\n\t\t\t\t\tMarkdownDescription: \"The Kubernetes resource Namespace to match for.\",\n\t\t\t\t\tComputed:            computed,\n\t\t\t\t\tOptional:            !computed,\n\t\t\t\t},\n\t\t\t\t\"json_pointers\": schema.SetAttribute{\n\t\t\t\t\tMarkdownDescription: \"List of JSONPaths strings targeting the field(s) to ignore.\",\n\t\t\t\t\tComputed:            computed,\n\t\t\t\t\tOptional:            !computed,\n\t\t\t\t\tElementType:         types.StringType,\n\t\t\t\t},\n\t\t\t\t\"jq_path_expressions\": schema.SetAttribute{\n\t\t\t\t\tMarkdownDescription: \"List of JQ path expression strings targeting the field(s) to ignore.\",\n\t\t\t\t\tComputed:            computed,\n\t\t\t\t\tOptional:            !computed,\n\t\t\t\t\tElementType:         types.StringType,\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc newApplicationResourceIgnoreDifferences(diffs []v1alpha1.ResourceIgnoreDifferences) []applicationResourceIgnoreDifferences {\n\tif diffs == nil {\n\t\treturn nil\n\t}\n\n\tds := make([]applicationResourceIgnoreDifferences, len(diffs))\n\tfor i, v := range diffs {\n\t\tds[i] = applicationResourceIgnoreDifferences{\n\t\t\tGroup:             types.StringValue(v.Group),\n\t\t\tKind:              types.StringValue(v.Kind),\n\t\t\tName:              types.StringValue(v.Name),\n\t\t\tNamespace:         types.StringValue(v.Namespace),\n\t\t\tJsonPointers:      pie.Map(v.JSONPointers, types.StringValue),\n\t\t\tJQPathExpressions: pie.Map(v.JQPathExpressions, types.StringValue),\n\t\t}\n\t}\n\n\treturn ds\n}\n\ntype applicationInfo struct {\n\tName  types.String `tfsdk:\"name\"`\n\tValue types.String `tfsdk:\"value\"`\n}\n\nfunc applicationInfoSchemaAttribute(computed bool) schema.Attribute {\n\treturn schema.ListNestedAttribute{\n\t\tMarkdownDescription: \"List of information (URLs, email addresses, and plain text) that relates to the application.\",\n\t\tComputed:            computed,\n\t\tOptional:            !computed,\n\t\tNestedObject: schema.NestedAttributeObject{\n\t\t\tAttributes: map[string]schema.Attribute{\n\t\t\t\t\"name\": schema.StringAttribute{\n\t\t\t\t\tMarkdownDescription: \"Name of the information.\",\n\t\t\t\t\tComputed:            computed,\n\t\t\t\t\tOptional:            !computed,\n\t\t\t\t},\n\t\t\t\t\"value\": schema.StringAttribute{\n\t\t\t\t\tMarkdownDescription: \"Value of the information.\",\n\t\t\t\t\tComputed:            computed,\n\t\t\t\t\tOptional:            !computed,\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc newApplicationInfos(infos []v1alpha1.Info) []applicationInfo {\n\tif infos == nil {\n\t\treturn nil\n\t}\n\n\tis := make([]applicationInfo, len(infos))\n\tfor i, v := range infos {\n\t\tis[i] = applicationInfo{\n\t\t\tName:  types.StringValue(v.Name),\n\t\t\tValue: types.StringValue(v.Value),\n\t\t}\n\t}\n\n\treturn is\n}\n\ntype applicationSource struct {\n\tChart          types.String                `tfsdk:\"chart\"`\n\tDirectory      *applicationSourceDirectory `tfsdk:\"directory\"`\n\tHelm           *applicationSourceHelm      `tfsdk:\"helm\"`\n\tKustomize      *applicationSourceKustomize `tfsdk:\"kustomize\"`\n\tName           types.String                `tfsdk:\"name\"`\n\tPath           types.String                `tfsdk:\"path\"`\n\tPlugin         *applicationSourcePlugin    `tfsdk:\"plugin\"`\n\tRef            types.String                `tfsdk:\"ref\"`\n\tRepoURL        types.String                `tfsdk:\"repo_url\"`\n\tTargetRevision types.String                `tfsdk:\"target_revision\"`\n}\n\nfunc applicationSourcesSchemaAttribute(allOptional, computed bool) schema.Attribute {\n\treturn schema.ListNestedAttribute{\n\t\tMarkdownDescription: \"Location of the application's manifests or chart.\",\n\t\tComputed:            computed,\n\t\tRequired:            !computed,\n\t\tNestedObject: schema.NestedAttributeObject{\n\t\t\tAttributes: map[string]schema.Attribute{\n\t\t\t\t\"chart\": schema.StringAttribute{\n\t\t\t\t\tMarkdownDescription: \"Helm chart name. Must be specified for applications sourced from a Helm repo.\",\n\t\t\t\t\tComputed:            computed,\n\t\t\t\t\tOptional:            !computed,\n\t\t\t\t},\n\t\t\t\t\"directory\": applicationSourceDirectorySchemaAttribute(computed),\n\t\t\t\t\"helm\":      applicationSourceHelmSchemaAttribute(computed),\n\t\t\t\t\"kustomize\": applicationSourceKustomizeSchemaAttribute(computed),\n\t\t\t\t\"name\": schema.StringAttribute{\n\t\t\t\t\tMarkdownDescription: \"Name is used to refer to a source and is displayed in the UI. It is supported in multi-source Applications since version 2.14\",\n\t\t\t\t\tComputed:            computed,\n\t\t\t\t\tOptional:            !computed,\n\t\t\t\t},\n\t\t\t\t\"path\": schema.StringAttribute{\n\t\t\t\t\tMarkdownDescription: \"Directory path within the repository. Only valid for applications sourced from Git.\",\n\t\t\t\t\tComputed:            computed,\n\t\t\t\t\tOptional:            !computed,\n\t\t\t\t\tDefault:             stringdefault.StaticString(\".\"),\n\t\t\t\t},\n\t\t\t\t\"plugin\": applicationSourcePluginSchemaAttribute(computed),\n\t\t\t\t\"ref\": schema.StringAttribute{\n\t\t\t\t\tMarkdownDescription: \"Reference to another `source` within defined sources. See associated documentation on [Helm value files from external Git repository](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository) regarding combining `ref` with `path` and/or `chart`.\",\n\t\t\t\t\tComputed:            computed,\n\t\t\t\t\tOptional:            !computed,\n\t\t\t\t},\n\t\t\t\t\"repo_url\": schema.StringAttribute{\n\t\t\t\t\tMarkdownDescription: \"URL to the repository (Git or Helm) that contains the application manifests.\",\n\t\t\t\t\tOptional:            allOptional && !computed,\n\t\t\t\t\tRequired:            !allOptional && !computed,\n\t\t\t\t\tComputed:            computed,\n\t\t\t\t},\n\t\t\t\t\"target_revision\": schema.StringAttribute{\n\t\t\t\t\tMarkdownDescription: \"Revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.\",\n\t\t\t\t\tComputed:            computed,\n\t\t\t\t\tOptional:            !computed,\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc newApplicationSource(as v1alpha1.ApplicationSource) applicationSource {\n\treturn applicationSource{\n\t\tChart:          types.StringValue(as.Chart),\n\t\tDirectory:      newApplicationSourceDirectory(as.Directory),\n\t\tHelm:           newApplicationSourceHelm(as.Helm),\n\t\tKustomize:      newApplicationSourceKustomize(as.Kustomize),\n\t\tName:           types.StringValue(as.Name),\n\t\tPath:           types.StringValue(as.Path),\n\t\tPlugin:         newApplicationSourcePlugin(as.Plugin),\n\t\tRef:            types.StringValue(as.Ref),\n\t\tRepoURL:        types.StringValue(as.RepoURL),\n\t\tTargetRevision: types.StringValue(as.TargetRevision),\n\t}\n}\n\ntype applicationSourceDirectory struct {\n\tExclude types.String             `tfsdk:\"exclude\"`\n\tJsonnet applicationSourceJsonnet `tfsdk:\"jsonnet\"`\n\tInclude types.String             `tfsdk:\"include\"`\n\tRecurse types.Bool               `tfsdk:\"recurse\"`\n}\n\nfunc applicationSourceDirectorySchemaAttribute(computed bool) schema.Attribute {\n\treturn schema.SingleNestedAttribute{\n\t\tMarkdownDescription: \"Path/directory specific options.\",\n\t\tComputed:            computed,\n\t\tOptional:            !computed,\n\t\t// TODO: This isn't used at present but we will need to migrate it if we\n\t\t// migrate the ArgoCD application resource.\n\t\t//\n\t\t// DiffSuppressFunc: func(k,\n\t\t// oldValue, newValue string, d *schema.ResourceData) bool {\n\t\t//  // Avoid drift when recurse is explicitly set to false\n\t\t//  // Also ignore the directory node if both recurse & jsonnet are not set or ignored\n\t\t//  if k == \"spec.0.source.0.directory.0.recurse\" && oldValue == \"\" && newValue == \"false\" {\n\t\t//      return true\n\t\t//  }\n\t\t//  if k == \"spec.0.source.0.directory.#\" {\n\t\t//      _, hasRecurse := d.GetOk(\"spec.0.source.0.directory.0.recurse\")\n\t\t//      _, hasJsonnet := d.GetOk(\"spec.0.source.0.directory.0.jsonnet\")\n\n\t\t// \t\tif !hasJsonnet && !hasRecurse {\n\t\t// \t\t\treturn true\n\t\t// \t\t}\n\t\t// \t}\n\t\t// \treturn false\n\t\t// },\n\t\tAttributes: map[string]schema.Attribute{\n\t\t\t\"exclude\": schema.StringAttribute{\n\t\t\t\tMarkdownDescription: \"Glob pattern to match paths against that should be explicitly excluded from being used during manifest generation. This takes precedence over the `include` field. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'\",\n\t\t\t\tComputed:            computed,\n\t\t\t\tOptional:            !computed,\n\t\t\t},\n\t\t\t\"include\": schema.StringAttribute{\n\t\t\t\tMarkdownDescription: \"Glob pattern to match paths against that should be explicitly included during manifest generation. If this field is set, only matching manifests will be included. To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'\",\n\t\t\t\tComputed:            computed,\n\t\t\t\tOptional:            !computed,\n\t\t\t},\n\t\t\t\"jsonnet\": applicationSourceJsonnetSchemaAttribute(computed),\n\t\t\t\"recurse\": schema.BoolAttribute{\n\t\t\t\tMarkdownDescription: \"Whether to scan a directory recursively for manifests.\",\n\t\t\t\tComputed:            computed,\n\t\t\t\tOptional:            !computed,\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc newApplicationSourceDirectory(ad *v1alpha1.ApplicationSourceDirectory) *applicationSourceDirectory {\n\tif ad == nil {\n\t\treturn nil\n\t}\n\n\treturn &applicationSourceDirectory{\n\t\tExclude: types.StringValue(ad.Exclude),\n\t\tJsonnet: newApplicationSourceJsonnet(ad.Jsonnet),\n\t\tInclude: types.StringValue(ad.Include),\n\t\tRecurse: types.BoolValue(ad.Recurse),\n\t}\n}\n\ntype applicationSourceJsonnet struct {\n\tExtVars []applicationJsonnetVar `tfsdk:\"ext_vars\"`\n\tLibs    []types.String          `tfsdk:\"libs\"`\n\tTLAs    []applicationJsonnetVar `tfsdk:\"tlas\"`\n}\n\nfunc applicationSourceJsonnetSchemaAttribute(computed bool) schema.Attribute {\n\treturn schema.SingleNestedAttribute{\n\t\tMarkdownDescription: \"Jsonnet specific options.\",\n\t\tComputed:            computed,\n\t\tOptional:            !computed,\n\t\tAttributes: map[string]schema.Attribute{\n\t\t\t\"ext_vars\": schema.ListNestedAttribute{\n\t\t\t\tMarkdownDescription: \"List of Jsonnet External Variables.\",\n\t\t\t\tComputed:            computed,\n\t\t\t\tOptional:            !computed,\n\t\t\t\tNestedObject:        applicationJsonnetVarSchemaNestedAttributeObject(computed),\n\t\t\t},\n\t\t\t\"libs\": schema.ListAttribute{\n\t\t\t\tMarkdownDescription: \"Additional library search dirs.\",\n\t\t\t\tComputed:            computed,\n\t\t\t\tOptional:            !computed,\n\t\t\t\tElementType:         types.StringType,\n\t\t\t},\n\t\t\t\"tlas\": schema.ListNestedAttribute{\n\t\t\t\tMarkdownDescription: \"List of Jsonnet Top-level Arguments\",\n\t\t\t\tComputed:            computed,\n\t\t\t\tOptional:            !computed,\n\t\t\t\tNestedObject:        applicationJsonnetVarSchemaNestedAttributeObject(computed),\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc newApplicationSourceJsonnet(asj v1alpha1.ApplicationSourceJsonnet) applicationSourceJsonnet {\n\treturn applicationSourceJsonnet{\n\t\tExtVars: newApplicationJsonnetVars(asj.ExtVars),\n\t\tLibs:    pie.Map(asj.Libs, types.StringValue),\n\t\tTLAs:    newApplicationJsonnetVars(asj.TLAs),\n\t}\n}\n\ntype applicationJsonnetVar struct {\n\tCode  types.Bool   `tfsdk:\"code\"`\n\tName  types.String `tfsdk:\"name\"`\n\tValue types.String `tfsdk:\"value\"`\n}\n\nfunc applicationJsonnetVarSchemaNestedAttributeObject(computed bool) schema.NestedAttributeObject {\n\treturn schema.NestedAttributeObject{\n\t\tAttributes: map[string]schema.Attribute{\n\t\t\t\"name\": schema.StringAttribute{\n\t\t\t\tMarkdownDescription: \"Name of Jsonnet variable.\",\n\t\t\t\tComputed:            computed,\n\t\t\t\tOptional:            !computed,\n\t\t\t},\n\t\t\t\"value\": schema.StringAttribute{\n\t\t\t\tMarkdownDescription: \"Value of Jsonnet variable.\",\n\t\t\t\tComputed:            computed,\n\t\t\t\tOptional:            !computed,\n\t\t\t},\n\t\t\t\"code\": schema.BoolAttribute{\n\t\t\t\tMarkdownDescription: \"Determines whether the variable should be evaluated as jsonnet code or treated as string.\",\n\t\t\t\tComputed:            computed,\n\t\t\t\tOptional:            !computed,\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc newApplicationJsonnetVars(jvs []v1alpha1.JsonnetVar) []applicationJsonnetVar {\n\tif jvs == nil {\n\t\treturn nil\n\t}\n\n\tvs := make([]applicationJsonnetVar, len(jvs))\n\tfor i, v := range jvs {\n\t\tvs[i] = applicationJsonnetVar{\n\t\t\tCode:  types.BoolValue(v.Code),\n\t\t\tName:  types.StringValue(v.Name),\n\t\t\tValue: types.StringValue(v.Value),\n\t\t}\n\t}\n\n\treturn vs\n}\n\ntype applicationSourceHelm struct {\n\tFileParameters          []applicationHelmFileParameter `tfsdk:\"file_parameters\"`\n\tIgnoreMissingValueFiles types.Bool                     `tfsdk:\"ignore_missing_value_files\"`\n\tParameters              []applicationHelmParameter     `tfsdk:\"parameters\"`\n\tPassCredentials         types.Bool                     `tfsdk:\"pass_credentials\"`\n\tReleaseName             types.String                   `tfsdk:\"release_name\"`\n\tSkipCRDs                types.Bool                     `tfsdk:\"skip_crds\"`\n\tSkipSchemaValidation    types.Bool                     `tfsdk:\"skip_schema_validation\"`\n\tValueFiles              []types.String                 `tfsdk:\"value_files\"`\n\tValues                  types.String                   `tfsdk:\"values\"`\n}\n\nfunc applicationSourceHelmSchemaAttribute(computed bool) schema.Attribute {\n\treturn schema.SingleNestedAttribute{\n\t\tMarkdownDescription: \"Helm specific options.\",\n\t\tComputed:            computed,\n\t\tOptional:            !computed,\n\t\tAttributes: map[string]schema.Attribute{\n\t\t\t\"file_parameters\": applicationHelmFileParameterSchemaAttribute(computed),\n\t\t\t\"ignore_missing_value_files\": schema.BoolAttribute{\n\t\t\t\tMarkdownDescription: \"Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.\",\n\t\t\t\tComputed:            computed,\n\t\t\t\tOptional:            !computed,\n\t\t\t},\n\t\t\t\"parameters\": applicationHelmParameterSchemaAttribute(computed),\n\t\t\t\"release_name\": schema.StringAttribute{\n\t\t\t\tMarkdownDescription: \"Helm release name. If omitted it will use the application name.\",\n\t\t\t\tComputed:            computed,\n\t\t\t\tOptional:            !computed,\n\t\t\t},\n\t\t\t\"skip_crds\": schema.BoolAttribute{\n\t\t\t\tMarkdownDescription: \"Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).\",\n\t\t\t\tComputed:            computed,\n\t\t\t\tOptional:            !computed,\n\t\t\t},\n\t\t\t\"skip_schema_validation\": schema.BoolAttribute{\n\t\t\t\tMarkdownDescription: \"Whether to skip the schema validation step (Helm's [--skip-schema-validation](https://helm.sh/docs/helm/helm_template/)).\",\n\t\t\t\tComputed:            computed,\n\t\t\t\tOptional:            !computed,\n\t\t\t},\n\t\t\t\"pass_credentials\": schema.BoolAttribute{\n\t\t\t\tMarkdownDescription: \"If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.\",\n\t\t\t\tComputed:            computed,\n\t\t\t\tOptional:            !computed,\n\t\t\t},\n\t\t\t\"values\": schema.StringAttribute{\n\t\t\t\tMarkdownDescription: \"Helm values to be passed to 'helm template', typically defined as a Attribute.\",\n\t\t\t\tComputed:            computed,\n\t\t\t\tOptional:            !computed,\n\t\t\t},\n\t\t\t\"value_files\": schema.ListAttribute{\n\t\t\t\tMarkdownDescription: \"List of Helm value files to use when generating a template.\",\n\t\t\t\tComputed:            computed,\n\t\t\t\tOptional:            !computed,\n\t\t\t\tElementType:         types.StringType,\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc newApplicationSourceHelm(ash *v1alpha1.ApplicationSourceHelm) *applicationSourceHelm {\n\tif ash == nil {\n\t\treturn nil\n\t}\n\n\treturn &applicationSourceHelm{\n\t\tFileParameters:          newApplicationSourceHelmFileParameters(ash.FileParameters),\n\t\tIgnoreMissingValueFiles: types.BoolValue(ash.IgnoreMissingValueFiles),\n\t\tParameters:              newApplicationSourceHelmParameters(ash.Parameters),\n\t\tPassCredentials:         types.BoolValue(ash.PassCredentials),\n\t\tReleaseName:             types.StringValue(ash.ReleaseName),\n\t\tSkipCRDs:                types.BoolValue(ash.SkipCrds),\n\t\tSkipSchemaValidation:    types.BoolValue(ash.SkipSchemaValidation),\n\t\tValueFiles:              pie.Map(ash.ValueFiles, types.StringValue),\n\t\tValues:                  types.StringValue(ash.Values),\n\t}\n}\n\ntype applicationHelmFileParameter struct {\n\tName types.String `tfsdk:\"name\"`\n\tPath types.String `tfsdk:\"path\"`\n}\n\nfunc applicationHelmFileParameterSchemaAttribute(computed bool) schema.Attribute {\n\treturn schema.ListNestedAttribute{\n\t\tMarkdownDescription: \"File parameters for the helm template.\",\n\t\tComputed:            computed,\n\t\tOptional:            !computed,\n\t\tNestedObject: schema.NestedAttributeObject{\n\t\t\tAttributes: map[string]schema.Attribute{\n\t\t\t\t\"name\": schema.StringAttribute{\n\t\t\t\t\tMarkdownDescription: \"Name of the Helm parameters.\",\n\t\t\t\t\tRequired:            !computed,\n\t\t\t\t\tComputed:            computed,\n\t\t\t\t},\n\t\t\t\t\"path\": schema.StringAttribute{\n\t\t\t\t\tMarkdownDescription: \"Path to the file containing the values for the Helm parameters.\",\n\t\t\t\t\tRequired:            !computed,\n\t\t\t\t\tComputed:            computed,\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc newApplicationSourceHelmFileParameters(hfps []v1alpha1.HelmFileParameter) []applicationHelmFileParameter {\n\tif hfps == nil {\n\t\treturn nil\n\t}\n\n\tfps := make([]applicationHelmFileParameter, len(hfps))\n\tfor i, v := range hfps {\n\t\tfps[i] = applicationHelmFileParameter{\n\t\t\tName: types.StringValue(v.Name),\n\t\t\tPath: types.StringValue(v.Path),\n\t\t}\n\t}\n\n\treturn fps\n}\n\ntype applicationHelmParameter struct {\n\tForceString types.Bool   `tfsdk:\"force_string\"`\n\tName        types.String `tfsdk:\"name\"`\n\tValue       types.String `tfsdk:\"value\"`\n}\n\nfunc applicationHelmParameterSchemaAttribute(computed bool) schema.Attribute {\n\treturn schema.ListNestedAttribute{\n\t\tMarkdownDescription: \"Helm parameters which are passed to the helm template command upon manifest generation.\",\n\t\tComputed:            computed,\n\t\tOptional:            !computed,\n\t\tNestedObject: schema.NestedAttributeObject{\n\t\t\tAttributes: map[string]schema.Attribute{\n\t\t\t\t\"name\": schema.StringAttribute{\n\t\t\t\t\tMarkdownDescription: \"Name of the Helm parameters.\",\n\t\t\t\t\tComputed:            computed,\n\t\t\t\t\tOptional:            !computed,\n\t\t\t\t},\n\t\t\t\t\"value\": schema.StringAttribute{\n\t\t\t\t\tMarkdownDescription: \"Value of the Helm parameters.\",\n\t\t\t\t\tComputed:            computed,\n\t\t\t\t\tOptional:            !computed,\n\t\t\t\t},\n\t\t\t\t\"force_string\": schema.BoolAttribute{\n\t\t\t\t\tMarkdownDescription: \"Determines whether to tell Helm to interpret booleans and numbers as strings.\",\n\t\t\t\t\tComputed:            computed,\n\t\t\t\t\tOptional:            !computed,\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc newApplicationSourceHelmParameters(hps []v1alpha1.HelmParameter) []applicationHelmParameter {\n\tif hps == nil {\n\t\treturn nil\n\t}\n\n\tps := make([]applicationHelmParameter, len(hps))\n\tfor i, v := range hps {\n\t\tps[i] = applicationHelmParameter{\n\t\t\tForceString: types.BoolValue(v.ForceString),\n\t\t\tName:        types.StringValue(v.Name),\n\t\t\tValue:       types.StringValue(v.Value),\n\t\t}\n\t}\n\n\treturn ps\n}\n\ntype applicationSourceKustomize struct {\n\tCommonAnnotations map[string]types.String `tfsdk:\"common_annotations\"`\n\tCommonLabels      map[string]types.String `tfsdk:\"common_labels\"`\n\tImages            []types.String          `tfsdk:\"images\"`\n\tNamePrefix        types.String            `tfsdk:\"name_prefix\"`\n\tNameSuffix        types.String            `tfsdk:\"name_suffix\"`\n\tVersion           types.String            `tfsdk:\"version\"`\n}\n\nfunc applicationSourceKustomizeSchemaAttribute(computed bool) schema.Attribute {\n\treturn schema.SingleNestedAttribute{\n\t\tMarkdownDescription: \"Kustomize specific options.\",\n\t\tComputed:            computed,\n\t\tOptional:            !computed,\n\t\tAttributes: map[string]schema.Attribute{\n\t\t\t\"name_prefix\": schema.StringAttribute{\n\t\t\t\tMarkdownDescription: \"Prefix appended to resources for Kustomize apps.\",\n\t\t\t\tComputed:            computed,\n\t\t\t\tOptional:            !computed,\n\t\t\t},\n\t\t\t\"name_suffix\": schema.StringAttribute{\n\t\t\t\tMarkdownDescription: \"Suffix appended to resources for Kustomize apps.\",\n\t\t\t\tComputed:            computed,\n\t\t\t\tOptional:            !computed,\n\t\t\t},\n\t\t\t\"version\": schema.StringAttribute{\n\t\t\t\tMarkdownDescription: \"Version of Kustomize to use for rendering manifests.\",\n\t\t\t\tComputed:            computed,\n\t\t\t\tOptional:            !computed,\n\t\t\t},\n\t\t\t\"images\": schema.SetAttribute{\n\t\t\t\tMarkdownDescription: \"List of Kustomize image override specifications.\",\n\t\t\t\tComputed:            computed,\n\t\t\t\tOptional:            !computed,\n\t\t\t\tElementType:         types.StringType,\n\t\t\t},\n\t\t\t\"common_labels\": schema.MapAttribute{\n\t\t\t\tMarkdownDescription: \"List of additional labels to add to rendered manifests.\",\n\t\t\t\tComputed:            computed,\n\t\t\t\tOptional:            !computed,\n\t\t\t\tElementType:         types.StringType,\n\t\t\t\tValidators: []validator.Map{\n\t\t\t\t\tvalidators.MetadataLabels(),\n\t\t\t\t},\n\t\t\t},\n\t\t\t\"common_annotations\": schema.MapAttribute{\n\t\t\t\tMarkdownDescription: \"List of additional annotations to add to rendered manifests.\",\n\t\t\t\tComputed:            computed,\n\t\t\t\tOptional:            !computed,\n\t\t\t\tElementType:         types.StringType,\n\t\t\t\tValidators: []validator.Map{\n\t\t\t\t\tvalidators.MetadataAnnotations(),\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc newApplicationSourceKustomize(ask *v1alpha1.ApplicationSourceKustomize) *applicationSourceKustomize {\n\tif ask == nil {\n\t\treturn nil\n\t}\n\n\tk := &applicationSourceKustomize{\n\t\tCommonAnnotations: utils.MapMap(ask.CommonAnnotations, types.StringValue),\n\t\tCommonLabels:      utils.MapMap(ask.CommonLabels, types.StringValue),\n\t\tNamePrefix:        types.StringValue(ask.NamePrefix),\n\t\tNameSuffix:        types.StringValue(ask.NameSuffix),\n\t\tVersion:           types.StringValue(ask.Version),\n\t}\n\n\tif ask.Images != nil {\n\t\tk.Images = make([]basetypes.StringValue, len(ask.Images))\n\t\tfor i, v := range ask.Images {\n\t\t\tk.Images[i] = types.StringValue(string(v))\n\t\t}\n\t}\n\n\treturn k\n}\n\ntype applicationSourcePlugin struct {\n\tEnv        []applicationEnvEntry              `tfsdk:\"env\"`\n\tName       types.String                       `tfsdk:\"name\"`\n\tParameters []applicationSourcePluginParameter `tfsdk:\"parameters\"`\n}\n\nfunc applicationSourcePluginSchemaAttribute(computed bool) schema.Attribute {\n\treturn schema.SingleNestedAttribute{\n\t\tMarkdownDescription: \"Config management plugin specific options.\",\n\t\tComputed:            computed,\n\t\tOptional:            !computed,\n\t\tAttributes: map[string]schema.Attribute{\n\t\t\t\"env\": applicationEnvEntriesSchemaAttribute(computed),\n\t\t\t\"name\": schema.StringAttribute{\n\t\t\t\tMarkdownDescription: \"Name of the plugin. Only set the plugin name if the plugin is defined in `argocd-cm`. If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the Application according to the plugin's discovery rules.\",\n\t\t\t\tComputed:            computed,\n\t\t\t\tOptional:            !computed,\n\t\t\t},\n\t\t\t\"parameters\": applicationSourcePluginParametersSchemaAttribute(computed),\n\t\t},\n\t}\n}\n\nfunc newApplicationSourcePlugin(asp *v1alpha1.ApplicationSourcePlugin) *applicationSourcePlugin {\n\tif asp == nil {\n\t\treturn nil\n\t}\n\n\treturn &applicationSourcePlugin{\n\t\tEnv:        newApplicationEnvEntries(asp.Env),\n\t\tName:       types.StringValue(asp.Name),\n\t\tParameters: newApplicationSourcePluginParameters(asp.Parameters),\n\t}\n}\n\ntype applicationEnvEntry struct {\n\tName  types.String `tfsdk:\"name\"`\n\tValue types.String `tfsdk:\"value\"`\n}\n\nfunc applicationEnvEntriesSchemaAttribute(computed bool) schema.Attribute {\n\treturn schema.ListNestedAttribute{\n\t\tMarkdownDescription: \"Environment variables passed to the plugin.\",\n\t\tComputed:            computed,\n\t\tOptional:            !computed,\n\t\tNestedObject: schema.NestedAttributeObject{\n\t\t\tAttributes: map[string]schema.Attribute{\n\t\t\t\t\"name\": schema.StringAttribute{\n\t\t\t\t\tMarkdownDescription: \"Name of the environment variable.\",\n\t\t\t\t\tComputed:            computed,\n\t\t\t\t\tOptional:            !computed,\n\t\t\t\t},\n\t\t\t\t\"value\": schema.StringAttribute{\n\t\t\t\t\tMarkdownDescription: \"Value of the environment variable.\",\n\t\t\t\t\tComputed:            computed,\n\t\t\t\t\tOptional:            !computed,\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc newApplicationEnvEntries(ees []*v1alpha1.EnvEntry) []applicationEnvEntry {\n\tif ees == nil {\n\t\treturn nil\n\t}\n\n\tvar es []applicationEnvEntry\n\n\tfor _, v := range ees {\n\t\tif v == nil {\n\t\t\tcontinue\n\t\t}\n\n\t\tes = append(es, applicationEnvEntry{\n\t\t\tName:  types.StringValue(v.Name),\n\t\t\tValue: types.StringValue(v.Value),\n\t\t})\n\t}\n\n\treturn es\n}\n\ntype applicationSourcePluginParameter struct {\n\tArray  []types.String          `tfsdk:\"array\"`\n\tMap    map[string]types.String `tfsdk:\"map\"`\n\tName   types.String            `tfsdk:\"name\"`\n\tString types.String            `tfsdk:\"string\"`\n}\n\nfunc applicationSourcePluginParametersSchemaAttribute(computed bool) schema.Attribute {\n\treturn schema.ListNestedAttribute{\n\t\tMarkdownDescription: \"Parameters to supply to config management plugin.\",\n\t\tComputed:            computed,\n\t\tOptional:            !computed,\n\t\tNestedObject: schema.NestedAttributeObject{\n\t\t\tAttributes: map[string]schema.Attribute{\n\t\t\t\t\"array\": schema.ListAttribute{\n\t\t\t\t\tMarkdownDescription: \"Value of an array type parameters.\",\n\t\t\t\t\tComputed:            computed,\n\t\t\t\t\tOptional:            !computed,\n\t\t\t\t\tElementType:         types.StringType,\n\t\t\t\t},\n\t\t\t\t\"name\": schema.StringAttribute{\n\t\t\t\t\tMarkdownDescription: \"Name identifying a parameters.\",\n\t\t\t\t\tComputed:            computed,\n\t\t\t\t\tOptional:            !computed,\n\t\t\t\t},\n\t\t\t\t\"map\": schema.MapAttribute{\n\t\t\t\t\tMarkdownDescription: \"Value of a map type parameters.\",\n\t\t\t\t\tComputed:            computed,\n\t\t\t\t\tOptional:            !computed,\n\t\t\t\t\tElementType:         types.StringType,\n\t\t\t\t},\n\t\t\t\t\"string\": schema.StringAttribute{\n\t\t\t\t\tMarkdownDescription: \"Value of a string type parameters.\",\n\t\t\t\t\tComputed:            computed,\n\t\t\t\t\tOptional:            !computed,\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc newApplicationSourcePluginParameters(aspps v1alpha1.ApplicationSourcePluginParameters) []applicationSourcePluginParameter {\n\tif aspps == nil {\n\t\treturn nil\n\t}\n\n\tpps := make([]applicationSourcePluginParameter, len(aspps))\n\n\tfor i, v := range aspps {\n\t\tpps[i] = applicationSourcePluginParameter{\n\t\t\tArray:  pie.Map(v.Array, types.StringValue),\n\t\t\tMap:    utils.MapMap(v.Map, types.StringValue),\n\t\t\tName:   types.StringValue(v.Name),\n\t\t\tString: utils.OptionalString(v.String_),\n\t\t}\n\t}\n\n\treturn pps\n}\n\ntype applicationSyncPolicy struct {\n\tAutomated   *applicationSyncPolicyAutomated `tfsdk:\"automated\"`\n\tRetry       *applicationRetryStrategy       `tfsdk:\"retry\"`\n\tSyncOptions []types.String                  `tfsdk:\"sync_options\"`\n}\n\nfunc applicationSyncPolicySchemaAttribute(computed bool) schema.Attribute {\n\treturn schema.SingleNestedAttribute{\n\t\tMarkdownDescription: \"Controls when and how a sync will be performed.\",\n\t\tComputed:            computed,\n\t\tOptional:            !computed,\n\t\tAttributes: map[string]schema.Attribute{\n\t\t\t\"automated\": applicationSyncPolicyAutomatedSchemaAttribute(computed),\n\t\t\t\"retry\":     applicationRetryStrategySchemaAttribute(computed),\n\t\t\t\"sync_options\": schema.SetAttribute{\n\t\t\t\tMarkdownDescription: \"List of sync options. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/.\",\n\t\t\t\tComputed:            computed,\n\t\t\t\tOptional:            !computed,\n\t\t\t\tElementType:         types.StringType,\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc newApplicationSyncPolicy(sp *v1alpha1.SyncPolicy) *applicationSyncPolicy {\n\tif sp == nil {\n\t\treturn nil\n\t}\n\n\treturn &applicationSyncPolicy{\n\t\tAutomated:   newApplicationSyncPolicyAutomated(sp.Automated),\n\t\tRetry:       newApplicationRetryStrategy(sp.Retry),\n\t\tSyncOptions: pie.Map(sp.SyncOptions, types.StringValue),\n\t}\n}\n\ntype applicationSyncPolicyAutomated struct {\n\tAllowEmpty types.Bool `tfsdk:\"allow_empty\"`\n\tPrune      types.Bool `tfsdk:\"prune\"`\n\tSelfHeal   types.Bool `tfsdk:\"self_heal\"`\n}\n\nfunc applicationSyncPolicyAutomatedSchemaAttribute(computed bool) schema.Attribute {\n\treturn schema.SingleNestedAttribute{\n\t\tMarkdownDescription: \"Whether to automatically keep an application synced to the target revision.\",\n\t\tComputed:            computed,\n\t\tOptional:            !computed,\n\t\tAttributes: map[string]schema.Attribute{\n\t\t\t\"allow_empty\": schema.BoolAttribute{\n\t\t\t\tMarkdownDescription: \"Allows apps have zero live resources.\",\n\t\t\t\tComputed:            computed,\n\t\t\t\tOptional:            !computed,\n\t\t\t},\n\t\t\t\"prune\": schema.BoolAttribute{\n\t\t\t\tMarkdownDescription: \"Whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync.\",\n\t\t\t\tComputed:            computed,\n\t\t\t\tOptional:            !computed,\n\t\t\t},\n\t\t\t\"self_heal\": schema.BoolAttribute{\n\t\t\t\tMarkdownDescription: \"Whether to revert resources back to their desired state upon modification in the cluster.\",\n\t\t\t\tComputed:            computed,\n\t\t\t\tOptional:            !computed,\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc newApplicationSyncPolicyAutomated(spa *v1alpha1.SyncPolicyAutomated) *applicationSyncPolicyAutomated {\n\tif spa == nil {\n\t\treturn nil\n\t}\n\n\treturn &applicationSyncPolicyAutomated{\n\t\tAllowEmpty: types.BoolValue(spa.AllowEmpty),\n\t\tPrune:      types.BoolValue(spa.Prune),\n\t\tSelfHeal:   types.BoolValue(spa.SelfHeal),\n\t}\n}\n\ntype applicationRetryStrategy struct {\n\tLimit   types.Int64         `tfsdk:\"limit\"`\n\tBackoff *applicationBackoff `tfsdk:\"backoff\"`\n}\n\nfunc applicationRetryStrategySchemaAttribute(computed bool) schema.Attribute {\n\treturn schema.SingleNestedAttribute{\n\t\tMarkdownDescription: \"Controls failed sync retry behavior.\",\n\t\tComputed:            computed,\n\t\tOptional:            !computed,\n\t\tAttributes: map[string]schema.Attribute{\n\t\t\t\"backoff\": applicationBackoffSchemaAttribute(computed),\n\t\t\t\"limit\": schema.Int64Attribute{\n\t\t\t\tMarkdownDescription: \"Maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.\",\n\t\t\t\tComputed:            computed,\n\t\t\t\tOptional:            !computed,\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc newApplicationRetryStrategy(rs *v1alpha1.RetryStrategy) *applicationRetryStrategy {\n\tif rs == nil {\n\t\treturn nil\n\t}\n\n\treturn &applicationRetryStrategy{\n\t\tBackoff: newApplicationBackoff(rs.Backoff),\n\t\tLimit:   types.Int64Value(rs.Limit),\n\t}\n}\n\ntype applicationBackoff struct {\n\tDuration    types.String `tfsdk:\"duration\"`\n\tFactor      types.Int64  `tfsdk:\"factor\"`\n\tMaxDuration types.String `tfsdk:\"max_duration\"`\n}\n\nfunc applicationBackoffSchemaAttribute(computed bool) schema.Attribute {\n\treturn schema.SingleNestedAttribute{\n\t\tMarkdownDescription: \"Controls how to backoff on subsequent retries of failed syncs.\",\n\t\tComputed:            computed,\n\t\tOptional:            !computed,\n\t\tAttributes: map[string]schema.Attribute{\n\t\t\t\"duration\": schema.StringAttribute{\n\t\t\t\tMarkdownDescription: \"Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\",\n\t\t\t\tComputed:            computed,\n\t\t\t\tOptional:            !computed,\n\t\t\t},\n\t\t\t\"factor\": schema.Int64Attribute{\n\t\t\t\tMarkdownDescription: \"Factor to multiply the base duration after each failed retry.\",\n\t\t\t\tComputed:            computed,\n\t\t\t\tOptional:            !computed,\n\t\t\t},\n\t\t\t\"max_duration\": schema.StringAttribute{\n\t\t\t\tMarkdownDescription: \"Maximum amount of time allowed for the backoff strategy. Default unit is seconds, but could also be a duration (e.g. `2m`, `1h`), as a string.\",\n\t\t\t\tComputed:            computed,\n\t\t\t\tOptional:            !computed,\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc newApplicationBackoff(b *v1alpha1.Backoff) *applicationBackoff {\n\tif b == nil {\n\t\treturn nil\n\t}\n\n\treturn &applicationBackoff{\n\t\tDuration:    types.StringValue(b.Duration),\n\t\tFactor:      utils.OptionalInt64(b.Factor),\n\t\tMaxDuration: types.StringValue(b.MaxDuration),\n\t}\n}\n\ntype applicationStatus struct {\n\tConditions     []applicationCondition      `tfsdk:\"conditions\"`\n\tHealth         applicationHealthStatus     `tfsdk:\"health\"`\n\tOperationState *applicationOperationState  `tfsdk:\"operation_state\"`\n\tReconciledAt   types.String                `tfsdk:\"reconciled_at\"`\n\tResources      []applicationResourceStatus `tfsdk:\"resources\"`\n\tSummary        applicationSummary          `tfsdk:\"summary\"`\n\tSync           applicationSyncStatus       `tfsdk:\"sync\"`\n}\n\nfunc applicationStatusSchemaAttribute() schema.Attribute {\n\treturn schema.SingleNestedAttribute{\n\t\tMarkdownDescription: \"Status information for the application.\",\n\t\tComputed:            true,\n\t\tAttributes: map[string]schema.Attribute{\n\t\t\t\"conditions\":      applicationConditionSchemaAttribute(),\n\t\t\t\"health\":          applicationHealthStatusSchemaAttribute(),\n\t\t\t\"operation_state\": applicationOperationStateSchemaAttribute(),\n\t\t\t\"reconciled_at\": schema.StringAttribute{\n\t\t\t\tMarkdownDescription: \"When the application state was reconciled using the latest git version.\",\n\t\t\t\tComputed:            true,\n\t\t\t},\n\t\t\t\"resources\": applicationResourceStatusSchemaAttribute(),\n\t\t\t\"summary\":   applicationSummarySchemaAttribute(),\n\t\t\t\"sync\":      applicationSyncStatusSchemaAttribute(),\n\t\t},\n\t}\n}\n\nfunc newApplicationStatus(as v1alpha1.ApplicationStatus) *applicationStatus {\n\treturn &applicationStatus{\n\t\tConditions:     newApplicationConditions(as.Conditions),\n\t\tHealth:         *newApplicationHealthStatus(&as.Health),\n\t\tOperationState: newApplicationOperationState(as.OperationState),\n\t\tReconciledAt:   types.StringValue(as.ReconciledAt.String()),\n\t\tResources:      newApplicationResourceStatuses(as.Resources),\n\t\tSummary:        newApplicationSummary(as.Summary),\n\t\tSync:           newApplicationSyncStatus(as.Sync),\n\t}\n}\n\ntype applicationCondition struct {\n\tMessage            types.String `tfsdk:\"message\"`\n\tLastTransitionTime types.String `tfsdk:\"last_transition_time\"`\n\tType               types.String `tfsdk:\"type\"`\n}\n\nfunc applicationConditionSchemaAttribute() schema.Attribute {\n\treturn schema.ListNestedAttribute{\n\t\tMarkdownDescription: \"List of currently observed application conditions.\",\n\t\tComputed:            true,\n\t\tNestedObject: schema.NestedAttributeObject{\n\t\t\tAttributes: map[string]schema.Attribute{\n\t\t\t\t\"message\": schema.StringAttribute{\n\t\t\t\t\tMarkdownDescription: \"Human-readable message indicating details about condition.\",\n\t\t\t\t\tComputed:            true,\n\t\t\t\t},\n\t\t\t\t\"last_transition_time\": schema.StringAttribute{\n\t\t\t\t\tMarkdownDescription: \"The time the condition was last observed.\",\n\t\t\t\t\tComputed:            true,\n\t\t\t\t},\n\t\t\t\t\"type\": schema.StringAttribute{\n\t\t\t\t\tMarkdownDescription: \"Application condition type.\",\n\t\t\t\t\tComputed:            true,\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc newApplicationConditions(acs []v1alpha1.ApplicationCondition) []applicationCondition {\n\tif acs == nil {\n\t\treturn nil\n\t}\n\n\tcs := make([]applicationCondition, len(acs))\n\n\tfor i, v := range acs {\n\t\tcs[i] = applicationCondition{\n\t\t\tLastTransitionTime: utils.OptionalTimeString(v.LastTransitionTime),\n\t\t\tMessage:            types.StringValue(v.Message),\n\t\t\tType:               types.StringValue(v.Type),\n\t\t}\n\t}\n\n\treturn cs\n}\n\ntype applicationHealthStatus struct {\n\tMessage types.String `tfsdk:\"message\"`\n\tStatus  types.String `tfsdk:\"status\"`\n}\n\nfunc applicationHealthStatusSchemaAttribute() schema.Attribute {\n\treturn schema.SingleNestedAttribute{\n\t\tMarkdownDescription: \"Application's current health status.\",\n\t\tComputed:            true,\n\t\tAttributes:          applicationHealthStatusSchemaAttributes(),\n\t}\n}\n\nfunc applicationHealthStatusSchemaAttributes() map[string]schema.Attribute {\n\treturn map[string]schema.Attribute{\n\t\t\"message\": schema.StringAttribute{\n\t\t\tMarkdownDescription: \"Human-readable informational message describing the health status.\",\n\t\t\tComputed:            true,\n\t\t},\n\t\t\"status\": schema.StringAttribute{\n\t\t\tMarkdownDescription: \"Status code of the application or resource.\",\n\t\t\tComputed:            true,\n\t\t},\n\t}\n}\n\nfunc newHealthStatus(hs *v1alpha1.HealthStatus) *applicationHealthStatus {\n\tif hs == nil {\n\t\treturn nil\n\t}\n\n\treturn &applicationHealthStatus{\n\t\tMessage: types.StringValue(hs.Message),\n\t\tStatus:  types.StringValue(string(hs.Status)),\n\t}\n}\n\nfunc newApplicationHealthStatus(hs *v1alpha1.AppHealthStatus) *applicationHealthStatus {\n\tif hs == nil {\n\t\treturn nil\n\t}\n\n\treturn &applicationHealthStatus{\n\t\tStatus: types.StringValue(string(hs.Status)),\n\t}\n}\n\ntype applicationOperationState struct {\n\tFinishedAt types.String `tfsdk:\"finished_at\"`\n\tMessage    types.String `tfsdk:\"message\"`\n\tPhase      types.String `tfsdk:\"phase\"`\n\tRetryCount types.Int64  `tfsdk:\"retry_count\"`\n\tStartedAt  types.String `tfsdk:\"started_at\"`\n}\n\nfunc applicationOperationStateSchemaAttribute() schema.Attribute {\n\treturn schema.SingleNestedAttribute{\n\t\tMarkdownDescription: \"Information about any ongoing operations, such as a sync.\",\n\t\tComputed:            true,\n\t\tAttributes: map[string]schema.Attribute{\n\t\t\t\"finished_at\": schema.StringAttribute{\n\t\t\t\tMarkdownDescription: \"Time of operation completion.\",\n\t\t\t\tComputed:            true,\n\t\t\t},\n\t\t\t\"message\": schema.StringAttribute{\n\t\t\t\tMarkdownDescription: \"Any pertinent messages when attempting to perform operation (typically errors).\",\n\t\t\t\tComputed:            true,\n\t\t\t},\n\t\t\t\"phase\": schema.StringAttribute{\n\t\t\t\tMarkdownDescription: \"The current phase of the operation.\",\n\t\t\t\tComputed:            true,\n\t\t\t},\n\t\t\t\"retry_count\": schema.Int64Attribute{\n\t\t\t\tMarkdownDescription: \"Count of operation retries.\",\n\t\t\t\tComputed:            true,\n\t\t\t},\n\t\t\t\"started_at\": schema.StringAttribute{\n\t\t\t\tMarkdownDescription: \"Time of operation start.\",\n\t\t\t\tComputed:            true,\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc newApplicationOperationState(os *v1alpha1.OperationState) *applicationOperationState {\n\tif os == nil {\n\t\treturn nil\n\t}\n\n\treturn &applicationOperationState{\n\t\tFinishedAt: utils.OptionalTimeString(os.FinishedAt),\n\t\tMessage:    types.StringValue(os.Message),\n\t\tPhase:      types.StringValue(string(os.Phase)),\n\t\tRetryCount: types.Int64Value(os.RetryCount),\n\t\tStartedAt:  types.StringValue(os.StartedAt.String()),\n\t}\n}\n\ntype applicationResourceStatus struct {\n\tGroup           types.String             `tfsdk:\"group\"`\n\tHealth          *applicationHealthStatus `tfsdk:\"health\"`\n\tHook            types.Bool               `tfsdk:\"hook\"`\n\tKind            types.String             `tfsdk:\"kind\"`\n\tName            types.String             `tfsdk:\"name\"`\n\tNamespace       types.String             `tfsdk:\"namespace\"`\n\tRequiresPruning types.Bool               `tfsdk:\"requires_pruning\"`\n\tStatus          types.String             `tfsdk:\"status\"`\n\tSyncWave        types.Int64              `tfsdk:\"sync_wave\"`\n\tVersion         types.String             `tfsdk:\"version\"`\n}\n\nfunc applicationResourceStatusSchemaAttribute() schema.Attribute {\n\treturn schema.ListNestedAttribute{\n\t\tMarkdownDescription: \"List of Kubernetes resources managed by this application.\",\n\t\tComputed:            true,\n\t\tNestedObject: schema.NestedAttributeObject{\n\t\t\tAttributes: map[string]schema.Attribute{\n\t\t\t\t\"group\": schema.StringAttribute{\n\t\t\t\t\tMarkdownDescription: \"The Kubernetes resource Group.\",\n\t\t\t\t\tComputed:            true,\n\t\t\t\t},\n\t\t\t\t\"health\": schema.SingleNestedAttribute{\n\t\t\t\t\tMarkdownDescription: \"Resource health status.\",\n\t\t\t\t\tComputed:            true,\n\t\t\t\t\tAttributes:          applicationHealthStatusSchemaAttributes(),\n\t\t\t\t},\n\t\t\t\t\"kind\": schema.StringAttribute{\n\t\t\t\t\tMarkdownDescription: \"The Kubernetes resource Kind.\",\n\t\t\t\t\tComputed:            true,\n\t\t\t\t},\n\t\t\t\t\"hook\": schema.BoolAttribute{\n\t\t\t\t\tMarkdownDescription: \"Indicates whether or not this resource has a hook annotation.\",\n\t\t\t\t\tComputed:            true,\n\t\t\t\t},\n\t\t\t\t\"name\": schema.StringAttribute{\n\t\t\t\t\tMarkdownDescription: \"The Kubernetes resource Name.\",\n\t\t\t\t\tComputed:            true,\n\t\t\t\t},\n\t\t\t\t\"namespace\": schema.StringAttribute{\n\t\t\t\t\tMarkdownDescription: \"The Kubernetes resource Namespace.\",\n\t\t\t\t\tComputed:            true,\n\t\t\t\t},\n\t\t\t\t\"requires_pruning\": schema.BoolAttribute{\n\t\t\t\t\tMarkdownDescription: \"Indicates if the resources requires pruning or not.\",\n\t\t\t\t\tComputed:            true,\n\t\t\t\t},\n\t\t\t\t\"status\": schema.StringAttribute{\n\t\t\t\t\tMarkdownDescription: \"Resource sync status.\",\n\t\t\t\t\tComputed:            true,\n\t\t\t\t},\n\t\t\t\t\"sync_wave\": schema.Int64Attribute{\n\t\t\t\t\tMarkdownDescription: \"Sync wave.\",\n\t\t\t\t\tComputed:            true,\n\t\t\t\t},\n\t\t\t\t\"version\": schema.StringAttribute{\n\t\t\t\t\tMarkdownDescription: \"The Kubernetes resource Version.\",\n\t\t\t\t\tComputed:            true,\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc newApplicationResourceStatuses(rss []v1alpha1.ResourceStatus) []applicationResourceStatus {\n\tif rss == nil {\n\t\treturn nil\n\t}\n\n\trs := make([]applicationResourceStatus, len(rss))\n\n\tfor i, v := range rss {\n\t\trs[i] = applicationResourceStatus{\n\t\t\tGroup:           types.StringValue(v.Group),\n\t\t\tHealth:          newHealthStatus(v.Health),\n\t\t\tHook:            types.BoolValue(v.Hook),\n\t\t\tKind:            types.StringValue(v.Kind),\n\t\t\tName:            types.StringValue(v.Name),\n\t\t\tNamespace:       types.StringValue(v.Namespace),\n\t\t\tRequiresPruning: types.BoolValue(v.RequiresPruning),\n\t\t\tStatus:          types.StringValue(string(v.Status)),\n\t\t\tSyncWave:        types.Int64Value(v.SyncWave),\n\t\t\tVersion:         types.StringValue(v.Version),\n\t\t}\n\t}\n\n\treturn rs\n}\n\ntype applicationSummary struct {\n\tExternalURLs []types.String `tfsdk:\"external_urls\"`\n\tImages       []types.String `tfsdk:\"images\"`\n}\n\nfunc applicationSummarySchemaAttribute() schema.Attribute {\n\treturn schema.SingleNestedAttribute{\n\t\tMarkdownDescription: \"List of URLs and container images used by this application.\",\n\t\tComputed:            true,\n\t\tAttributes: map[string]schema.Attribute{\n\t\t\t\"external_urls\": schema.ListAttribute{\n\t\t\t\tMarkdownDescription: \"All external URLs of application child resources.\",\n\t\t\t\tComputed:            true,\n\t\t\t\tElementType:         types.StringType,\n\t\t\t},\n\t\t\t\"images\": schema.ListAttribute{\n\t\t\t\tMarkdownDescription: \"All images of application child resources.\",\n\t\t\t\tComputed:            true,\n\t\t\t\tElementType:         types.StringType,\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc newApplicationSummary(as v1alpha1.ApplicationSummary) applicationSummary {\n\treturn applicationSummary{\n\t\tExternalURLs: pie.Map(as.ExternalURLs, types.StringValue),\n\t\tImages:       pie.Map(as.Images, types.StringValue),\n\t}\n}\n\ntype applicationSyncStatus struct {\n\tRevisions []types.String `tfsdk:\"revisions\"`\n\tStatus    types.String   `tfsdk:\"status\"`\n}\n\nfunc applicationSyncStatusSchemaAttribute() schema.Attribute {\n\treturn schema.SingleNestedAttribute{\n\t\tMarkdownDescription: \"Application's current sync status\",\n\t\tComputed:            true,\n\t\tAttributes: map[string]schema.Attribute{\n\t\t\t\"revisions\": schema.ListAttribute{\n\t\t\t\tMarkdownDescription: \"Information about the revision(s) the comparison has been performed to.\",\n\t\t\t\tComputed:            true,\n\t\t\t\tElementType:         types.StringType,\n\t\t\t},\n\t\t\t\"status\": schema.StringAttribute{\n\t\t\t\tMarkdownDescription: \"Sync state of the comparison.\",\n\t\t\t\tComputed:            true,\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc newApplicationSyncStatus(ss v1alpha1.SyncStatus) applicationSyncStatus {\n\tass := applicationSyncStatus{\n\t\tStatus: types.StringValue(string(ss.Status)),\n\t}\n\n\tif ss.Revision != \"\" {\n\t\tass.Revisions = append(ass.Revisions, types.StringValue(ss.Revision))\n\t}\n\n\tif len(ss.Revisions) > 0 {\n\t\tass.Revisions = append(ass.Revisions, pie.Map(ss.Revisions, types.StringValue)...)\n\t}\n\n\treturn ass\n}\n"
  },
  {
    "path": "internal/provider/model_gpg_key.go",
    "content": "package provider\n\nimport (\n\tcustomtypes \"github.com/argoproj-labs/terraform-provider-argocd/internal/types\"\n\t\"github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1\"\n\t\"github.com/hashicorp/terraform-plugin-framework/resource/schema\"\n\t\"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier\"\n\t\"github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier\"\n\t\"github.com/hashicorp/terraform-plugin-framework/types\"\n)\n\ntype gpgKeyModel struct {\n\tID          types.String             `tfsdk:\"id\"`\n\tPublicKey   customtypes.PGPPublicKey `tfsdk:\"public_key\"`\n\tFingerprint types.String             `tfsdk:\"fingerprint\"`\n\tOwner       types.String             `tfsdk:\"owner\"`\n\tSubType     types.String             `tfsdk:\"sub_type\"`\n\tTrust       types.String             `tfsdk:\"trust\"`\n}\n\nfunc gpgKeySchemaAttributes() map[string]schema.Attribute {\n\treturn map[string]schema.Attribute{\n\t\t\"public_key\": schema.StringAttribute{\n\t\t\tMarkdownDescription: \"Raw key data of the GPG key to create\",\n\t\t\tCustomType:          customtypes.PGPPublicKeyType,\n\t\t\tRequired:            true,\n\t\t\tPlanModifiers: []planmodifier.String{\n\t\t\t\tstringplanmodifier.RequiresReplace(),\n\t\t\t},\n\t\t},\n\t\t\"fingerprint\": schema.StringAttribute{\n\t\t\tMarkdownDescription: \"Fingerprint is the fingerprint of the key\",\n\t\t\tComputed:            true,\n\t\t},\n\t\t\"id\": schema.StringAttribute{\n\t\t\tMarkdownDescription: \"GPG key identifier\",\n\t\t\tComputed:            true,\n\t\t},\n\t\t\"owner\": schema.StringAttribute{\n\t\t\tMarkdownDescription: \"Owner holds the owner identification, e.g. a name and e-mail address\",\n\t\t\tComputed:            true,\n\t\t},\n\t\t\"sub_type\": schema.StringAttribute{\n\t\t\tMarkdownDescription: \"SubType holds the key's sub type (e.g. rsa4096)\",\n\t\t\tComputed:            true,\n\t\t},\n\t\t\"trust\": schema.StringAttribute{\n\t\t\tMarkdownDescription: \"Trust holds the level of trust assigned to this key\",\n\t\t\tComputed:            true,\n\t\t},\n\t}\n}\n\nfunc newGPGKey(k *v1alpha1.GnuPGPublicKey) *gpgKeyModel {\n\treturn &gpgKeyModel{\n\t\tFingerprint: types.StringValue(k.Fingerprint),\n\t\tID:          types.StringValue(k.KeyID),\n\t\tOwner:       types.StringValue(k.Owner),\n\t\tPublicKey:   customtypes.PGPPublicKeyValue(k.KeyData),\n\t\tSubType:     types.StringValue(k.SubType),\n\t\tTrust:       types.StringValue(k.Trust),\n\t}\n}\n"
  },
  {
    "path": "internal/provider/model_metadata.go",
    "content": "package provider\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/argoproj-labs/terraform-provider-argocd/internal/utils\"\n\t\"github.com/argoproj-labs/terraform-provider-argocd/internal/validators\"\n\t\"github.com/hashicorp/terraform-plugin-framework-validators/listvalidator\"\n\t\"github.com/hashicorp/terraform-plugin-framework/resource/schema\"\n\t\"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier\"\n\t\"github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier\"\n\t\"github.com/hashicorp/terraform-plugin-framework/schema/validator\"\n\t\"github.com/hashicorp/terraform-plugin-framework/types\"\n\n\tmetav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\"\n)\n\ntype objectMeta struct {\n\tName            types.String            `tfsdk:\"name\"`\n\tNamespace       types.String            `tfsdk:\"namespace\"`\n\tAnnotations     map[string]types.String `tfsdk:\"annotations\"`\n\tLabels          map[string]types.String `tfsdk:\"labels\"`\n\tGeneration      types.Int64             `tfsdk:\"generation\"`\n\tResourceVersion types.String            `tfsdk:\"resource_version\"`\n\tUID             types.String            `tfsdk:\"uid\"`\n}\n\nfunc objectMetaSchemaAttribute(objectName string, computed bool) schema.Attribute {\n\treturn schema.SingleNestedAttribute{\n\t\tMarkdownDescription: \"Standard Kubernetes object metadata. For more info see the [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata).\",\n\t\tRequired:            true,\n\t\tAttributes: map[string]schema.Attribute{\n\t\t\t\"name\": schema.StringAttribute{\n\t\t\t\tMarkdownDescription: fmt.Sprintf(\"Name of the %s, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\", objectName),\n\t\t\t\tRequired:            true,\n\t\t\t\tPlanModifiers: []planmodifier.String{\n\t\t\t\t\tstringplanmodifier.RequiresReplace(),\n\t\t\t\t},\n\t\t\t\tValidators: []validator.String{\n\t\t\t\t\tvalidators.IsDNSSubdomain(),\n\t\t\t\t},\n\t\t\t},\n\t\t\t\"namespace\": schema.StringAttribute{\n\t\t\t\tMarkdownDescription: fmt.Sprintf(\"Namespace of the %s, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/\", objectName),\n\t\t\t\tOptional:            true,\n\t\t\t\tComputed:            computed,\n\t\t\t\tPlanModifiers: []planmodifier.String{\n\t\t\t\t\tstringplanmodifier.RequiresReplace(),\n\t\t\t\t},\n\t\t\t\tValidators: []validator.String{\n\t\t\t\t\tvalidators.IsDNSSubdomain(),\n\t\t\t\t},\n\t\t\t},\n\t\t\t\"annotations\": schema.MapAttribute{\n\t\t\t\tMarkdownDescription: fmt.Sprintf(\"An unstructured key value map stored with the %s that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/\", objectName),\n\t\t\t\tComputed:            computed,\n\t\t\t\tOptional:            !computed,\n\t\t\t\tElementType:         types.StringType,\n\t\t\t\tValidators: []validator.Map{\n\t\t\t\t\tvalidators.MetadataAnnotations(),\n\t\t\t\t},\n\t\t\t},\n\t\t\t\"labels\": schema.MapAttribute{\n\t\t\t\tMarkdownDescription: fmt.Sprintf(\"Map of string keys and values that can be used to organize and categorize (scope and select) the %s. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels\", objectName),\n\t\t\t\tComputed:            computed,\n\t\t\t\tOptional:            !computed,\n\t\t\t\tElementType:         types.StringType,\n\t\t\t\tValidators: []validator.Map{\n\t\t\t\t\tvalidators.MetadataLabels(),\n\t\t\t\t},\n\t\t\t},\n\t\t\t\"generation\": schema.Int64Attribute{\n\t\t\t\tMarkdownDescription: \"A sequence number representing a specific generation of the desired state.\",\n\t\t\t\tComputed:            true,\n\t\t\t\tPlanModifiers: []planmodifier.Int64{\n\t\t\t\t\tUseUnknownOnUpdateInt64(),\n\t\t\t\t},\n\t\t\t},\n\t\t\t\"resource_version\": schema.StringAttribute{\n\t\t\t\tMarkdownDescription: fmt.Sprintf(\"An opaque value that represents the internal version of this %s that can be used by clients to determine when the %s has changed. Read more: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency\", objectName, objectName),\n\t\t\t\tComputed:            true,\n\t\t\t\tPlanModifiers: []planmodifier.String{\n\t\t\t\t\tUseUnknownOnUpdateString(),\n\t\t\t\t},\n\t\t\t},\n\t\t\t\"uid\": schema.StringAttribute{\n\t\t\t\tMarkdownDescription: fmt.Sprintf(\"The unique in time and space value for this %s. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids\", objectName),\n\t\t\t\tComputed:            true,\n\t\t\t\tPlanModifiers: []planmodifier.String{\n\t\t\t\t\tstringplanmodifier.UseStateForUnknown(),\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc objectMetaSchemaListBlock(objectName string) schema.Block {\n\treturn schema.ListNestedBlock{\n\t\tMarkdownDescription: \"Standard Kubernetes object metadata. For more info see the [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata).\",\n\t\tValidators: []validator.List{\n\t\t\tlistvalidator.IsRequired(),\n\t\t\tlistvalidator.SizeAtLeast(1),\n\t\t\tlistvalidator.SizeAtMost(1),\n\t\t},\n\t\tNestedObject: schema.NestedBlockObject{\n\t\t\tAttributes: map[string]schema.Attribute{\n\t\t\t\t\"name\": schema.StringAttribute{\n\t\t\t\t\tMarkdownDescription: fmt.Sprintf(\"Name of the %s, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\", objectName),\n\t\t\t\t\tRequired:            true,\n\t\t\t\t\tPlanModifiers: []planmodifier.String{\n\t\t\t\t\t\tstringplanmodifier.RequiresReplace(),\n\t\t\t\t\t},\n\t\t\t\t\tValidators: []validator.String{\n\t\t\t\t\t\tvalidators.IsDNSSubdomain(),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"namespace\": schema.StringAttribute{\n\t\t\t\t\tMarkdownDescription: fmt.Sprintf(\"Namespace of the %s, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/\", objectName),\n\t\t\t\t\tOptional:            true,\n\t\t\t\t\tComputed:            true,\n\t\t\t\t\tPlanModifiers: []planmodifier.String{\n\t\t\t\t\t\tstringplanmodifier.RequiresReplace(),\n\t\t\t\t\t},\n\t\t\t\t\tValidators: []validator.String{\n\t\t\t\t\t\tvalidators.IsDNSSubdomain(),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"annotations\": schema.MapAttribute{\n\t\t\t\t\tMarkdownDescription: fmt.Sprintf(\"An unstructured key value map stored with the %s that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/\", objectName),\n\t\t\t\t\tOptional:            true,\n\t\t\t\t\tElementType:         types.StringType,\n\t\t\t\t\tValidators: []validator.Map{\n\t\t\t\t\t\tvalidators.MetadataAnnotations(),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"labels\": schema.MapAttribute{\n\t\t\t\t\tMarkdownDescription: fmt.Sprintf(\"Map of string keys and values that can be used to organize and categorize (scope and select) the %s. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels\", objectName),\n\t\t\t\t\tOptional:            true,\n\t\t\t\t\tElementType:         types.StringType,\n\t\t\t\t\tValidators: []validator.Map{\n\t\t\t\t\t\tvalidators.MetadataLabels(),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"generation\": schema.Int64Attribute{\n\t\t\t\t\tMarkdownDescription: \"A sequence number representing a specific generation of the desired state.\",\n\t\t\t\t\tComputed:            true,\n\t\t\t\t\tPlanModifiers: []planmodifier.Int64{\n\t\t\t\t\t\tUseUnknownOnUpdateInt64(),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"resource_version\": schema.StringAttribute{\n\t\t\t\t\tMarkdownDescription: fmt.Sprintf(\"An opaque value that represents the internal version of this %s that can be used by clients to determine when the %s has changed. Read more: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency\", objectName, objectName),\n\t\t\t\t\tComputed:            true,\n\t\t\t\t\tPlanModifiers: []planmodifier.String{\n\t\t\t\t\t\tUseUnknownOnUpdateString(),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"uid\": schema.StringAttribute{\n\t\t\t\t\tMarkdownDescription: fmt.Sprintf(\"The unique in time and space value for this %s. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids\", objectName),\n\t\t\t\t\tComputed:            true,\n\t\t\t\t\tPlanModifiers: []planmodifier.String{\n\t\t\t\t\t\tstringplanmodifier.UseStateForUnknown(),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc newObjectMeta(om metav1.ObjectMeta) objectMeta {\n\tobj := objectMeta{\n\t\tAnnotations:     utils.MapMap(om.Annotations, types.StringValue),\n\t\tLabels:          utils.MapMap(om.Labels, types.StringValue),\n\t\tGeneration:      types.Int64Value(om.Generation),\n\t\tName:            types.StringValue(om.Name),\n\t\tResourceVersion: types.StringValue(om.ResourceVersion),\n\t}\n\n\t// Handle namespace\n\tif om.Namespace != \"\" {\n\t\tobj.Namespace = types.StringValue(om.Namespace)\n\t} else {\n\t\tobj.Namespace = types.StringNull()\n\t}\n\n\t// Handle UID\n\tif string(om.UID) != \"\" {\n\t\tobj.UID = types.StringValue(string(om.UID))\n\t} else {\n\t\tobj.UID = types.StringNull()\n\t}\n\n\treturn obj\n}\n"
  },
  {
    "path": "internal/provider/model_project.go",
    "content": "package provider\n\nimport (\n\t\"github.com/argoproj-labs/terraform-provider-argocd/internal/validators\"\n\t\"github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1\"\n\t\"github.com/hashicorp/terraform-plugin-framework-validators/listvalidator\"\n\t\"github.com/hashicorp/terraform-plugin-framework/resource/schema\"\n\t\"github.com/hashicorp/terraform-plugin-framework/resource/schema/stringdefault\"\n\t\"github.com/hashicorp/terraform-plugin-framework/schema/validator\"\n\t\"github.com/hashicorp/terraform-plugin-framework/types\"\n)\n\ntype projectModel struct {\n\tID       types.String       `tfsdk:\"id\"`\n\tMetadata []objectMeta       `tfsdk:\"metadata\"`\n\tSpec     []projectSpecModel `tfsdk:\"spec\"`\n}\n\ntype projectSpecModel struct {\n\tClusterResourceBlacklist   []groupKindModel                 `tfsdk:\"cluster_resource_blacklist\"`\n\tClusterResourceWhitelist   []groupKindModel                 `tfsdk:\"cluster_resource_whitelist\"`\n\tDescription                types.String                     `tfsdk:\"description\"`\n\tDestination                []destinationModel               `tfsdk:\"destination\"`\n\tDestinationServiceAccount  []destinationServiceAccountModel `tfsdk:\"destination_service_account\"`\n\tNamespaceResourceBlacklist []groupKindModel                 `tfsdk:\"namespace_resource_blacklist\"`\n\tNamespaceResourceWhitelist []groupKindModel                 `tfsdk:\"namespace_resource_whitelist\"`\n\tOrphanedResources          []orphanedResourcesModel         `tfsdk:\"orphaned_resources\"`\n\tRole                       []projectRoleModel               `tfsdk:\"role\"`\n\tSourceRepos                []types.String                   `tfsdk:\"source_repos\"`\n\tSourceNamespaces           []types.String                   `tfsdk:\"source_namespaces\"`\n\tSignatureKeys              []types.String                   `tfsdk:\"signature_keys\"`\n\tSyncWindow                 []syncWindowModel                `tfsdk:\"sync_window\"`\n}\n\ntype groupKindModel struct {\n\tGroup types.String `tfsdk:\"group\"`\n\tKind  types.String `tfsdk:\"kind\"`\n}\n\ntype destinationModel struct {\n\tServer    types.String `tfsdk:\"server\"`\n\tNamespace types.String `tfsdk:\"namespace\"`\n\tName      types.String `tfsdk:\"name\"`\n}\n\ntype destinationServiceAccountModel struct {\n\tDefaultServiceAccount types.String `tfsdk:\"default_service_account\"`\n\tNamespace             types.String `tfsdk:\"namespace\"`\n\tServer                types.String `tfsdk:\"server\"`\n}\n\ntype orphanedResourcesModel struct {\n\tWarn   types.Bool                     `tfsdk:\"warn\"`\n\tIgnore []orphanedResourcesIgnoreModel `tfsdk:\"ignore\"`\n}\n\ntype orphanedResourcesIgnoreModel struct {\n\tGroup types.String `tfsdk:\"group\"`\n\tKind  types.String `tfsdk:\"kind\"`\n\tName  types.String `tfsdk:\"name\"`\n}\n\ntype projectRoleModel struct {\n\tDescription types.String    `tfsdk:\"description\"`\n\tGroups      []types.String  `tfsdk:\"groups\"`\n\tName        types.String    `tfsdk:\"name\"`\n\tPolicies    []types.String  `tfsdk:\"policies\"`\n\tJwtTokens   []jwtTokenModel `tfsdk:\"jwt_tokens\"`\n}\n\ntype jwtTokenModel struct {\n\tID  types.String `tfsdk:\"id\"`\n\tIat types.Int64  `tfsdk:\"iat\"`\n\tExp types.Int64  `tfsdk:\"exp\"`\n}\n\ntype syncWindowModel struct {\n\tApplications   []types.String `tfsdk:\"applications\"`\n\tClusters       []types.String `tfsdk:\"clusters\"`\n\tDuration       types.String   `tfsdk:\"duration\"`\n\tKind           types.String   `tfsdk:\"kind\"`\n\tManualSync     types.Bool     `tfsdk:\"manual_sync\"`\n\tNamespaces     []types.String `tfsdk:\"namespaces\"`\n\tSchedule       types.String   `tfsdk:\"schedule\"`\n\tTimezone       types.String   `tfsdk:\"timezone\"`\n\tUseAndOperator types.Bool     `tfsdk:\"use_and_operator\"`\n}\n\nfunc projectSchemaBlocks() map[string]schema.Block {\n\treturn map[string]schema.Block{\n\t\t\"metadata\": objectMetaSchemaListBlock(\"appproject\"),\n\t\t\"spec\": schema.ListNestedBlock{\n\t\t\tDescription: \"ArgoCD AppProject spec.\",\n\t\t\tValidators: []validator.List{\n\t\t\t\tlistvalidator.IsRequired(),\n\t\t\t\tlistvalidator.SizeAtLeast(1),\n\t\t\t\tlistvalidator.SizeAtMost(1),\n\t\t\t},\n\t\t\tNestedObject: schema.NestedBlockObject{\n\t\t\t\tAttributes: projectSpecSchemaAttributesOnly(),\n\t\t\t\tBlocks:     projectSpecSchemaBlocks(),\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc projectSpecSchemaBlocks() map[string]schema.Block {\n\treturn map[string]schema.Block{\n\t\t\"destination\": schema.SetNestedBlock{\n\t\t\tDescription: \"Destinations available for deployment.\",\n\t\t\tNestedObject: schema.NestedBlockObject{\n\t\t\t\tAttributes: map[string]schema.Attribute{\n\t\t\t\t\t\"server\": schema.StringAttribute{\n\t\t\t\t\t\tDescription: \"URL of the target cluster and must be set to the Kubernetes control plane API.\",\n\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t},\n\t\t\t\t\t\"namespace\": schema.StringAttribute{\n\t\t\t\t\t\tDescription: \"Target namespace for applications' resources.\",\n\t\t\t\t\t\tRequired:    true,\n\t\t\t\t\t},\n\t\t\t\t\t\"name\": schema.StringAttribute{\n\t\t\t\t\t\tDescription: \"Name of the destination cluster which can be used instead of server.\",\n\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t\"cluster_resource_blacklist\": schema.SetNestedBlock{\n\t\t\tDescription: \"Blacklisted cluster level resources.\",\n\t\t\tNestedObject: schema.NestedBlockObject{\n\t\t\t\tAttributes: map[string]schema.Attribute{\n\t\t\t\t\t\"group\": schema.StringAttribute{\n\t\t\t\t\t\tDescription: \"The Kubernetes resource Group to match for.\",\n\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\tValidators: []validator.String{\n\t\t\t\t\t\t\tvalidators.GroupNameValidator(),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t\"kind\": schema.StringAttribute{\n\t\t\t\t\t\tDescription: \"The Kubernetes resource Kind to match for.\",\n\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t\"cluster_resource_whitelist\": schema.SetNestedBlock{\n\t\t\tDescription: \"Whitelisted cluster level resources.\",\n\t\t\tNestedObject: schema.NestedBlockObject{\n\t\t\t\tAttributes: map[string]schema.Attribute{\n\t\t\t\t\t\"group\": schema.StringAttribute{\n\t\t\t\t\t\tDescription: \"The Kubernetes resource Group to match for.\",\n\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\tValidators: []validator.String{\n\t\t\t\t\t\t\tvalidators.GroupNameValidator(),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t\"kind\": schema.StringAttribute{\n\t\t\t\t\t\tDescription: \"The Kubernetes resource Kind to match for.\",\n\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t\"namespace_resource_blacklist\": schema.SetNestedBlock{\n\t\t\tDescription: \"Blacklisted namespace level resources.\",\n\t\t\tNestedObject: schema.NestedBlockObject{\n\t\t\t\tAttributes: map[string]schema.Attribute{\n\t\t\t\t\t\"group\": schema.StringAttribute{\n\t\t\t\t\t\tDescription: \"The Kubernetes resource Group to match for.\",\n\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\tValidators: []validator.String{\n\t\t\t\t\t\t\tvalidators.GroupNameValidator(),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t\"kind\": schema.StringAttribute{\n\t\t\t\t\t\tDescription: \"The Kubernetes resource Kind to match for.\",\n\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t\"namespace_resource_whitelist\": schema.SetNestedBlock{\n\t\t\tDescription: \"Whitelisted namespace level resources.\",\n\t\t\tNestedObject: schema.NestedBlockObject{\n\t\t\t\tAttributes: map[string]schema.Attribute{\n\t\t\t\t\t\"group\": schema.StringAttribute{\n\t\t\t\t\t\tDescription: \"The Kubernetes resource Group to match for.\",\n\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\tValidators: []validator.String{\n\t\t\t\t\t\t\tvalidators.GroupNameValidator(),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t\"kind\": schema.StringAttribute{\n\t\t\t\t\t\tDescription: \"The Kubernetes resource Kind to match for.\",\n\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t\"orphaned_resources\": schema.SetNestedBlock{\n\t\t\tDescription: \"Configuration for orphaned resources tracking.\",\n\t\t\tNestedObject: schema.NestedBlockObject{\n\t\t\t\tAttributes: map[string]schema.Attribute{\n\t\t\t\t\t\"warn\": schema.BoolAttribute{\n\t\t\t\t\t\tDescription: \"Whether a warning condition should be created for apps which have orphaned resources.\",\n\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tBlocks: map[string]schema.Block{\n\t\t\t\t\t\"ignore\": schema.SetNestedBlock{\n\t\t\t\t\t\tDescription: \"List of resources to ignore during orphaned resources detection.\",\n\t\t\t\t\t\tNestedObject: schema.NestedBlockObject{\n\t\t\t\t\t\t\tAttributes: map[string]schema.Attribute{\n\t\t\t\t\t\t\t\t\"group\": schema.StringAttribute{\n\t\t\t\t\t\t\t\t\tDescription: \"The Kubernetes resource Group to match for.\",\n\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\tValidators: []validator.String{\n\t\t\t\t\t\t\t\t\t\tvalidators.GroupNameValidator(),\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"kind\": schema.StringAttribute{\n\t\t\t\t\t\t\t\t\tDescription: \"The Kubernetes resource Kind to match for.\",\n\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"name\": schema.StringAttribute{\n\t\t\t\t\t\t\t\t\tDescription: \"The Kubernetes resource name to match for.\",\n\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t\"role\": schema.SetNestedBlock{\n\t\t\tDescription: \"Project roles.\",\n\t\t\tNestedObject: schema.NestedBlockObject{\n\t\t\t\tAttributes: map[string]schema.Attribute{\n\t\t\t\t\t\"name\": schema.StringAttribute{\n\t\t\t\t\t\tDescription: \"The name of the role.\",\n\t\t\t\t\t\tRequired:    true,\n\t\t\t\t\t},\n\t\t\t\t\t\"description\": schema.StringAttribute{\n\t\t\t\t\t\tDescription: \"Description of the role.\",\n\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t},\n\t\t\t\t\t\"policies\": schema.ListAttribute{\n\t\t\t\t\t\tDescription: \"List of casbin formatted strings that define access policies for the role in the project. For more information, see the [ArgoCD RBAC reference](https://argoproj.github.io/argo-cd/operator-manual/rbac/#rbac-permission-structure).\",\n\t\t\t\t\t\tRequired:    true,\n\t\t\t\t\t\tElementType: types.StringType,\n\t\t\t\t\t},\n\t\t\t\t\t\"groups\": schema.ListAttribute{\n\t\t\t\t\t\tDescription: \"List of OIDC group claims bound to this role.\",\n\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\tElementType: types.StringType,\n\t\t\t\t\t},\n\t\t\t\t\t\"jwt_tokens\": schema.SetNestedAttribute{\n\t\t\t\t\t\tDescription: \"List of JWT tokens issued for this role.\",\n\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\tNestedObject: schema.NestedAttributeObject{\n\t\t\t\t\t\t\tAttributes: map[string]schema.Attribute{\n\t\t\t\t\t\t\t\t\"iat\": schema.Int64Attribute{\n\t\t\t\t\t\t\t\t\tDescription: \"Token issued at (timestamp).\",\n\t\t\t\t\t\t\t\t\tRequired:    true,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"id\": schema.StringAttribute{\n\t\t\t\t\t\t\t\t\tDescription: \"Token identifier.\",\n\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"exp\": schema.Int64Attribute{\n\t\t\t\t\t\t\t\t\tDescription: \"Token expiration (timestamp).\",\n\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t\"destination_service_account\": schema.SetNestedBlock{\n\t\t\tDescription: \"Service accounts to be impersonated for the application sync operation for each destination.\",\n\t\t\tNestedObject: schema.NestedBlockObject{\n\t\t\t\tAttributes: map[string]schema.Attribute{\n\t\t\t\t\t\"default_service_account\": schema.StringAttribute{\n\t\t\t\t\t\tDescription: \"Used for impersonation during the sync operation\",\n\t\t\t\t\t\tRequired:    true,\n\t\t\t\t\t},\n\t\t\t\t\t\"namespace\": schema.StringAttribute{\n\t\t\t\t\t\tDescription: \"Specifies the target namespace for the application's resources.\",\n\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t},\n\t\t\t\t\t\"server\": schema.StringAttribute{\n\t\t\t\t\t\tDescription: \"Specifies the URL of the target cluster's Kubernetes control plane API.\",\n\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t\"sync_window\": schema.SetNestedBlock{\n\t\t\tDescription: \"Controls when sync operations are allowed for the project.\",\n\t\t\tNestedObject: schema.NestedBlockObject{\n\t\t\t\tAttributes: map[string]schema.Attribute{\n\t\t\t\t\t\"use_and_operator\": schema.BoolAttribute{\n\t\t\t\t\t\tDescription: \"Defines if the AND operator should be used among the various conditions for the sync window.\",\n\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t},\n\t\t\t\t\t\"kind\": schema.StringAttribute{\n\t\t\t\t\t\tDescription: \"Defines if the window allows or blocks syncs, allowed values are `allow` or `deny`.\",\n\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\tValidators: []validator.String{\n\t\t\t\t\t\t\tvalidators.SyncWindowKindValidator(),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t\"applications\": schema.ListAttribute{\n\t\t\t\t\t\tDescription: \"List of applications that the window will apply to.\",\n\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\tElementType: types.StringType,\n\t\t\t\t\t},\n\t\t\t\t\t\"namespaces\": schema.ListAttribute{\n\t\t\t\t\t\tDescription: \"List of namespaces that the window will apply to.\",\n\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\tElementType: types.StringType,\n\t\t\t\t\t},\n\t\t\t\t\t\"clusters\": schema.ListAttribute{\n\t\t\t\t\t\tDescription: \" List of clusters that the window will apply to.\",\n\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\tElementType: types.StringType,\n\t\t\t\t\t},\n\t\t\t\t\t\"manual_sync\": schema.BoolAttribute{\n\t\t\t\t\t\tDescription: \"Enables manual syncs when they would otherwise be blocked.\",\n\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t},\n\t\t\t\t\t\"schedule\": schema.StringAttribute{\n\t\t\t\t\t\tDescription: \"Time the window will begin, specified in cron format.\",\n\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\tValidators: []validator.String{\n\t\t\t\t\t\t\tvalidators.SyncWindowScheduleValidator(),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t\"duration\": schema.StringAttribute{\n\t\t\t\t\t\tDescription: \"Amount of time the sync window will be open.\",\n\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\tValidators: []validator.String{\n\t\t\t\t\t\t\tvalidators.DurationValidator(),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t\"timezone\": schema.StringAttribute{\n\t\t\t\t\t\tDescription: \"Timezone that the schedule will be evaluated in.\",\n\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\tComputed:    true,\n\t\t\t\t\t\tDefault:     stringdefault.StaticString(\"UTC\"),\n\t\t\t\t\t\tValidators: []validator.String{\n\t\t\t\t\t\t\tvalidators.SyncWindowTimezoneValidator(),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc projectSpecSchemaAttributesOnly() map[string]schema.Attribute {\n\treturn map[string]schema.Attribute{\n\t\t\"description\": schema.StringAttribute{\n\t\t\tDescription: \"Project description.\",\n\t\t\tOptional:    true,\n\t\t},\n\t\t\"source_repos\": schema.ListAttribute{\n\t\t\tDescription: \"List of repositories from which applications may be created.\",\n\t\t\tOptional:    true,\n\t\t\tElementType: types.StringType,\n\t\t},\n\t\t\"source_namespaces\": schema.SetAttribute{\n\t\t\tDescription: \"List of source namespaces for applications.\",\n\t\t\tOptional:    true,\n\t\t\tElementType: types.StringType,\n\t\t},\n\t\t\"signature_keys\": schema.SetAttribute{\n\t\t\tDescription: \"Signature keys for verifying the integrity of applications.\",\n\t\t\tOptional:    true,\n\t\t\tElementType: types.StringType,\n\t\t},\n\t}\n}\n\nfunc newProject(project *v1alpha1.AppProject) *projectModel {\n\tp := &projectModel{\n\t\tMetadata: []objectMeta{newObjectMeta(project.ObjectMeta)},\n\t\tSpec:     []projectSpecModel{newProjectSpec(&project.Spec)},\n\t}\n\n\treturn p\n}\n\nfunc newProjectSpec(spec *v1alpha1.AppProjectSpec) projectSpecModel {\n\tps := projectSpecModel{\n\t\tDescription: types.StringValue(spec.Description),\n\t}\n\n\tif spec.Description != \"\" {\n\t\tps.Description = types.StringValue(spec.Description)\n\t} else {\n\t\tps.Description = types.StringNull()\n\t}\n\n\t// Convert source repos\n\t// Check for non-nil to distinguish between unset (nil) and explicitly empty ([])\n\t// This fixes issue #788 where empty lists were incorrectly converted to null\n\tif spec.SourceRepos != nil {\n\t\tps.SourceRepos = make([]types.String, len(spec.SourceRepos))\n\t\tfor i, repo := range spec.SourceRepos {\n\t\t\tps.SourceRepos[i] = types.StringValue(repo)\n\t\t}\n\t}\n\n\t// Convert signature keys\n\t// Check for non-nil to distinguish between unset (nil) and explicitly empty ([])\n\tif spec.SignatureKeys != nil {\n\t\tps.SignatureKeys = make([]types.String, len(spec.SignatureKeys))\n\t\tfor i, key := range spec.SignatureKeys {\n\t\t\tps.SignatureKeys[i] = types.StringValue(key.KeyID)\n\t\t}\n\t}\n\n\t// Convert source namespaces\n\t// Check for non-nil to distinguish between unset (nil) and explicitly empty ([])\n\tif spec.SourceNamespaces != nil {\n\t\tps.SourceNamespaces = make([]types.String, len(spec.SourceNamespaces))\n\t\tfor i, ns := range spec.SourceNamespaces {\n\t\t\tps.SourceNamespaces[i] = types.StringValue(ns)\n\t\t}\n\t}\n\n\t// Convert cluster resource blacklist\n\tif len(spec.ClusterResourceBlacklist) > 0 {\n\t\tps.ClusterResourceBlacklist = make([]groupKindModel, len(spec.ClusterResourceBlacklist))\n\t\tfor i, gk := range spec.ClusterResourceBlacklist {\n\t\t\tps.ClusterResourceBlacklist[i] = groupKindModel{\n\t\t\t\tGroup: types.StringValue(gk.Group),\n\t\t\t\tKind:  types.StringValue(gk.Kind),\n\t\t\t}\n\t\t}\n\t}\n\n\t// Convert cluster resource whitelist\n\tif len(spec.ClusterResourceWhitelist) > 0 {\n\t\tps.ClusterResourceWhitelist = make([]groupKindModel, len(spec.ClusterResourceWhitelist))\n\t\tfor i, gk := range spec.ClusterResourceWhitelist {\n\t\t\tps.ClusterResourceWhitelist[i] = groupKindModel{\n\t\t\t\tGroup: types.StringValue(gk.Group),\n\t\t\t\tKind:  types.StringValue(gk.Kind),\n\t\t\t}\n\t\t}\n\t}\n\n\t// Convert namespace resource blacklist\n\tif len(spec.NamespaceResourceBlacklist) > 0 {\n\t\tps.NamespaceResourceBlacklist = make([]groupKindModel, len(spec.NamespaceResourceBlacklist))\n\t\tfor i, gk := range spec.NamespaceResourceBlacklist {\n\t\t\tps.NamespaceResourceBlacklist[i] = groupKindModel{\n\t\t\t\tGroup: types.StringValue(gk.Group),\n\t\t\t\tKind:  types.StringValue(gk.Kind),\n\t\t\t}\n\t\t}\n\t}\n\n\t// Convert namespace resource whitelist\n\tif len(spec.NamespaceResourceWhitelist) > 0 {\n\t\tps.NamespaceResourceWhitelist = make([]groupKindModel, len(spec.NamespaceResourceWhitelist))\n\t\tfor i, gk := range spec.NamespaceResourceWhitelist {\n\t\t\tps.NamespaceResourceWhitelist[i] = groupKindModel{\n\t\t\t\tGroup: types.StringValue(gk.Group),\n\t\t\t\tKind:  types.StringValue(gk.Kind),\n\t\t\t}\n\t\t}\n\t}\n\n\t// Convert destinations\n\tif len(spec.Destinations) > 0 {\n\t\tps.Destination = make([]destinationModel, len(spec.Destinations))\n\n\t\tfor i, dest := range spec.Destinations {\n\t\t\td := destinationModel{\n\t\t\t\tNamespace: types.StringValue(dest.Namespace),\n\t\t\t}\n\t\t\tif dest.Server != \"\" {\n\t\t\t\td.Server = types.StringValue(dest.Server)\n\t\t\t} else {\n\t\t\t\td.Server = types.StringNull()\n\t\t\t}\n\n\t\t\tif dest.Name != \"\" {\n\t\t\t\td.Name = types.StringValue(dest.Name)\n\t\t\t} else {\n\t\t\t\td.Name = types.StringNull()\n\t\t\t}\n\n\t\t\tps.Destination[i] = d\n\t\t}\n\t}\n\n\t// Convert destination service accounts\n\tif len(spec.DestinationServiceAccounts) > 0 {\n\t\tps.DestinationServiceAccount = make([]destinationServiceAccountModel, len(spec.DestinationServiceAccounts))\n\t\tfor i, dsa := range spec.DestinationServiceAccounts {\n\t\t\tps.DestinationServiceAccount[i] = destinationServiceAccountModel{\n\t\t\t\tDefaultServiceAccount: types.StringValue(dsa.DefaultServiceAccount),\n\t\t\t\tNamespace:             types.StringValue(dsa.Namespace),\n\t\t\t\tServer:                types.StringValue(dsa.Server),\n\t\t\t}\n\t\t}\n\t}\n\n\t// Convert orphaned resources\n\tif spec.OrphanedResources != nil {\n\t\tor := orphanedResourcesModel{\n\t\t\tWarn: types.BoolPointerValue(spec.OrphanedResources.Warn),\n\t\t}\n\t\tif len(spec.OrphanedResources.Ignore) > 0 {\n\t\t\tor.Ignore = make([]orphanedResourcesIgnoreModel, len(spec.OrphanedResources.Ignore))\n\t\t\tfor i, ignore := range spec.OrphanedResources.Ignore {\n\t\t\t\tor.Ignore[i] = orphanedResourcesIgnoreModel{\n\t\t\t\t\tGroup: types.StringValue(ignore.Group),\n\t\t\t\t\tKind:  types.StringValue(ignore.Kind),\n\t\t\t\t\tName:  types.StringValue(ignore.Name),\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tps.OrphanedResources = []orphanedResourcesModel{or}\n\t}\n\n\t// Convert roles\n\tif len(spec.Roles) > 0 {\n\t\tps.Role = make([]projectRoleModel, len(spec.Roles))\n\n\t\tfor i, role := range spec.Roles {\n\t\t\tpr := projectRoleModel{\n\t\t\t\tName: types.StringValue(role.Name),\n\t\t\t}\n\n\t\t\t// Handle description\n\t\t\tif role.Description != \"\" {\n\t\t\t\tpr.Description = types.StringValue(role.Description)\n\t\t\t} else {\n\t\t\t\tpr.Description = types.StringNull()\n\t\t\t}\n\n\t\t\t// Handle policies\n\t\t\tif len(role.Policies) > 0 {\n\t\t\t\tpr.Policies = make([]types.String, len(role.Policies))\n\t\t\t\tfor j, policy := range role.Policies {\n\t\t\t\t\tpr.Policies[j] = types.StringValue(policy)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Handle groups\n\t\t\tif role.Groups != nil {\n\t\t\t\tpr.Groups = make([]types.String, len(role.Groups))\n\t\t\t\tfor j, group := range role.Groups {\n\t\t\t\t\tpr.Groups[j] = types.StringValue(group)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// JWT tokens are not managed by the project resource - they are managed by argocd_project_token resources\n\t\t\t// So we explicitly set them to nil to avoid conflicts and ensure they don't appear in state\n\t\t\tpr.JwtTokens = nil\n\n\t\t\tps.Role[i] = pr\n\t\t}\n\t}\n\n\t// Convert sync windows\n\tif len(spec.SyncWindows) > 0 {\n\t\tps.SyncWindow = make([]syncWindowModel, len(spec.SyncWindows))\n\n\t\tfor i, sw := range spec.SyncWindows {\n\t\t\tswm := syncWindowModel{\n\t\t\t\tDuration:       types.StringValue(sw.Duration),\n\t\t\t\tKind:           types.StringValue(sw.Kind),\n\t\t\t\tManualSync:     types.BoolValue(sw.ManualSync),\n\t\t\t\tSchedule:       types.StringValue(sw.Schedule),\n\t\t\t\tTimezone:       types.StringValue(\"UTC\"), // Default\n\t\t\t\tUseAndOperator: types.BoolValue(sw.UseAndOperator),\n\t\t\t}\n\n\t\t\tif sw.TimeZone != \"\" {\n\t\t\t\tswm.Timezone = types.StringValue(sw.TimeZone)\n\t\t\t}\n\n\t\t\tif sw.Applications != nil {\n\t\t\t\tswm.Applications = make([]types.String, len(sw.Applications))\n\t\t\t\tfor j, app := range sw.Applications {\n\t\t\t\t\tswm.Applications[j] = types.StringValue(app)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif sw.Clusters != nil {\n\t\t\t\tswm.Clusters = make([]types.String, len(sw.Clusters))\n\t\t\t\tfor j, cluster := range sw.Clusters {\n\t\t\t\t\tswm.Clusters[j] = types.StringValue(cluster)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif sw.Namespaces != nil {\n\t\t\t\tswm.Namespaces = make([]types.String, len(sw.Namespaces))\n\t\t\t\tfor j, ns := range sw.Namespaces {\n\t\t\t\t\tswm.Namespaces[j] = types.StringValue(ns)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tps.SyncWindow[i] = swm\n\t\t}\n\t}\n\n\treturn ps\n}\n"
  },
  {
    "path": "internal/provider/model_project_token.go",
    "content": "package provider\n\nimport (\n\t\"github.com/argoproj-labs/terraform-provider-argocd/internal/validators\"\n\t\"github.com/hashicorp/terraform-plugin-framework/resource/schema\"\n\t\"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier\"\n\t\"github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier\"\n\t\"github.com/hashicorp/terraform-plugin-framework/schema/validator\"\n\t\"github.com/hashicorp/terraform-plugin-framework/types\"\n)\n\ntype projectTokenModel struct {\n\tID          types.String `tfsdk:\"id\"`\n\tProject     types.String `tfsdk:\"project\"`\n\tRole        types.String `tfsdk:\"role\"`\n\tExpiresIn   types.String `tfsdk:\"expires_in\"`\n\tRenewAfter  types.String `tfsdk:\"renew_after\"`\n\tRenewBefore types.String `tfsdk:\"renew_before\"`\n\tDescription types.String `tfsdk:\"description\"`\n\tJWT         types.String `tfsdk:\"jwt\"`\n\tIssuedAt    types.String `tfsdk:\"issued_at\"`\n\tExpiresAt   types.String `tfsdk:\"expires_at\"`\n}\n\nfunc projectTokenSchemaAttributes() map[string]schema.Attribute {\n\treturn map[string]schema.Attribute{\n\t\t\"id\": schema.StringAttribute{\n\t\t\tDescription: \"Token identifier\",\n\t\t\tComputed:    true,\n\t\t\tPlanModifiers: []planmodifier.String{\n\t\t\t\tstringplanmodifier.UseStateForUnknown(),\n\t\t\t},\n\t\t},\n\t\t\"project\": schema.StringAttribute{\n\t\t\tDescription: \"The project associated with the token.\",\n\t\t\tRequired:    true,\n\t\t\tPlanModifiers: []planmodifier.String{\n\t\t\t\tstringplanmodifier.RequiresReplace(),\n\t\t\t},\n\t\t},\n\t\t\"role\": schema.StringAttribute{\n\t\t\tDescription: \"The name of the role in the project associated with the token.\",\n\t\t\tRequired:    true,\n\t\t\tPlanModifiers: []planmodifier.String{\n\t\t\t\tstringplanmodifier.RequiresReplace(),\n\t\t\t},\n\t\t},\n\t\t\"expires_in\": schema.StringAttribute{\n\t\t\tDescription: \"Duration before the token will expire. Valid time units are `ns`, `us` (or `µs`), `ms`, `s`, `m`, `h`. E.g. `30m`, `12h`. Default: No expiration.\",\n\t\t\tOptional:    true,\n\t\t\tPlanModifiers: []planmodifier.String{\n\t\t\t\tstringplanmodifier.RequiresReplace(),\n\t\t\t},\n\t\t\tValidators: []validator.String{\n\t\t\t\tvalidators.DurationValidator(),\n\t\t\t},\n\t\t},\n\t\t\"renew_after\": schema.StringAttribute{\n\t\t\tDescription: \"Duration to control token silent regeneration based on token age. Valid time units are `ns`, `us` (or `µs`), `ms`, `s`, `m`, `h`. If set, then the token will be regenerated if it is older than `renew_after`. I.e. if `currentDate - issued_at > renew_after`.\",\n\t\t\tOptional:    true,\n\t\t\tValidators: []validator.String{\n\t\t\t\tvalidators.DurationValidator(),\n\t\t\t},\n\t\t},\n\t\t\"renew_before\": schema.StringAttribute{\n\t\t\tDescription: \"Duration to control token silent regeneration based on remaining token lifetime. If `expires_in` is set, Terraform will regenerate the token if `expires_at - currentDate < renew_before`. Valid time units are `ns`, `us` (or `µs`), `ms`, `s`, `m`, `h`.\",\n\t\t\tOptional:    true,\n\t\t\tValidators: []validator.String{\n\t\t\t\tvalidators.DurationValidator(),\n\t\t\t},\n\t\t},\n\t\t\"description\": schema.StringAttribute{\n\t\t\tDescription: \"Description of the token.\",\n\t\t\tOptional:    true,\n\t\t\tPlanModifiers: []planmodifier.String{\n\t\t\t\tstringplanmodifier.RequiresReplace(),\n\t\t\t},\n\t\t},\n\t\t\"jwt\": schema.StringAttribute{\n\t\t\tDescription: \"The raw JWT.\",\n\t\t\tComputed:    true,\n\t\t\tSensitive:   true,\n\t\t},\n\t\t\"issued_at\": schema.StringAttribute{\n\t\t\tDescription: \"Unix timestamp at which the token was issued.\",\n\t\t\tComputed:    true,\n\t\t\tPlanModifiers: []planmodifier.String{\n\t\t\t\tstringplanmodifier.RequiresReplace(),\n\t\t\t},\n\t\t},\n\t\t\"expires_at\": schema.StringAttribute{\n\t\t\tDescription: \"If `expires_in` is set, Unix timestamp upon which the token will expire.\",\n\t\t\tComputed:    true,\n\t\t\tPlanModifiers: []planmodifier.String{\n\t\t\t\tstringplanmodifier.RequiresReplace(),\n\t\t\t},\n\t\t},\n\t}\n}\n"
  },
  {
    "path": "internal/provider/model_provider.go",
    "content": "package provider\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"fmt\"\n\t\"net/url\"\n\n\t\"github.com/argoproj-labs/terraform-provider-argocd/internal/diagnostics\"\n\t\"github.com/argoproj/argo-cd/v3/cmd/argocd/commands/headless\"\n\t\"github.com/argoproj/argo-cd/v3/pkg/apiclient\"\n\t\"github.com/argoproj/argo-cd/v3/pkg/apiclient/session\"\n\t\"github.com/argoproj/argo-cd/v3/util/io\"\n\t\"github.com/argoproj/argo-cd/v3/util/localconfig\"\n\t\"github.com/hashicorp/terraform-plugin-framework/diag\"\n\t\"github.com/hashicorp/terraform-plugin-framework/types\"\n\tapimachineryschema \"k8s.io/apimachinery/pkg/runtime/schema\"\n\t\"k8s.io/apimachinery/pkg/util/runtime\"\n\t\"k8s.io/client-go/rest\"\n\t\"k8s.io/client-go/tools/clientcmd\"\n\t\"k8s.io/client-go/tools/clientcmd/api\"\n)\n\ntype ArgoCDProviderConfig struct {\n\t// Configuration for standard login using either with username/password or auth_token\n\tAuthToken types.String `tfsdk:\"auth_token\"`\n\tUsername  types.String `tfsdk:\"username\"`\n\tPassword  types.String `tfsdk:\"password\"`\n\n\t// When using standard login either server address or port forwarding must be used\n\tServerAddr               types.String `tfsdk:\"server_addr\"`\n\tPortForward              types.Bool   `tfsdk:\"port_forward\"`\n\tPortForwardWithNamespace types.String `tfsdk:\"port_forward_with_namespace\"`\n\tKubernetes               []Kubernetes `tfsdk:\"kubernetes\"`\n\n\t// Run ArgoCD API server locally\n\tCore types.Bool `tfsdk:\"core\"`\n\n\t// Login using credentials from local ArgoCD config file\n\tUseLocalConfig types.Bool   `tfsdk:\"use_local_config\"`\n\tConfigPath     types.String `tfsdk:\"config_path\"`\n\tContext        types.String `tfsdk:\"context\"`\n\n\t// Other configuration\n\tCertFile        types.String `tfsdk:\"cert_file\"`\n\tClientCertFile  types.String `tfsdk:\"client_cert_file\"`\n\tClientCertKey   types.String `tfsdk:\"client_cert_key\"`\n\tGRPCWeb         types.Bool   `tfsdk:\"grpc_web\"`\n\tGRPCWebRootPath types.String `tfsdk:\"grpc_web_root_path\"`\n\tHeaders         types.Set    `tfsdk:\"headers\"`\n\tInsecure        types.Bool   `tfsdk:\"insecure\"`\n\tPlainText       types.Bool   `tfsdk:\"plain_text\"`\n\tUserAgent       types.String `tfsdk:\"user_agent\"`\n}\n\nfunc (p ArgoCDProviderConfig) getApiClientOptions(ctx context.Context) (*apiclient.ClientOptions, diag.Diagnostics) {\n\tvar diags diag.Diagnostics\n\n\topts := &apiclient.ClientOptions{\n\t\tAuthToken:            getDefaultString(p.AuthToken, \"ARGOCD_AUTH_TOKEN\"),\n\t\tCertFile:             p.CertFile.ValueString(),\n\t\tClientCertFile:       p.ClientCertFile.ValueString(),\n\t\tClientCertKeyFile:    p.ClientCertKey.ValueString(),\n\t\tGRPCWeb:              p.GRPCWeb.ValueBool(),\n\t\tGRPCWebRootPath:      p.GRPCWebRootPath.ValueString(),\n\t\tInsecure:             getDefaultBool(ctx, p.Insecure, \"ARGOCD_INSECURE\"),\n\t\tPlainText:            p.PlainText.ValueBool(),\n\t\tPortForward:          p.PortForward.ValueBool(),\n\t\tPortForwardNamespace: p.PortForwardWithNamespace.ValueString(),\n\t\tServerAddr:           getDefaultString(p.ServerAddr, \"ARGOCD_SERVER\"),\n\t\tUserAgent:            p.Username.ValueString(),\n\t}\n\n\tif !p.Headers.IsNull() {\n\t\tvar h []string\n\n\t\tdiags.Append(p.Headers.ElementsAs(ctx, &h, false)...)\n\n\t\topts.Headers = h\n\t}\n\n\tcoreEnabled, d := p.setCoreOpts(opts)\n\n\tdiags.Append(d...)\n\n\tlocalConfigEnabled, d := p.setLocalConfigOpts(opts)\n\n\tdiags.Append(d...)\n\n\tportForwardingEnabled, d := p.setPortForwardingOpts(ctx, opts)\n\n\tdiags.Append(d...)\n\n\tusername := getDefaultString(p.Username, \"ARGOCD_AUTH_USERNAME\")\n\tpassword := getDefaultString(p.Password, \"ARGOCD_AUTH_PASSWORD\")\n\n\tusernameAndPasswordSet := username != \"\" && password != \"\"\n\n\tswitch {\n\t// Provider configuration errors\n\tcase !coreEnabled && !portForwardingEnabled && !localConfigEnabled && opts.ServerAddr == \"\":\n\t\tdiags.Append(diagnostics.Error(\"invalid provider configuration: one of `core,port_forward,port_forward_with_namespace,use_local_config,server_addr` must be specified\", nil)...)\n\tcase portForwardingEnabled && opts.AuthToken == \"\" && !usernameAndPasswordSet:\n\t\tdiags.Append(diagnostics.Error(\"invalid provider configuration: either `username/password` or `auth_token` must be specified when port forwarding is enabled\", nil)...)\n\tcase opts.ServerAddr != \"\" && !coreEnabled && opts.AuthToken == \"\" && !usernameAndPasswordSet:\n\t\tdiags.Append(diagnostics.Error(\"invalid provider configuration: either `username/password` or `auth_token` must be specified if `server_addr` is specified\", nil)...)\n\t}\n\n\tif diags.HasError() {\n\t\treturn nil, diags\n\t}\n\n\tswitch {\n\t// Handle \"special\" configuration use-cases\n\tcase coreEnabled:\n\t\t// HACK: `headless.StartLocalServer` manipulates this global variable\n\t\t// when starting the local server without checking it's length/contents\n\t\t// which leads to a panic if called multiple times. So, we need to\n\t\t// ensure we \"reset\" it before calling the method.\n\t\tif runtimeErrorHandlers == nil {\n\t\t\truntimeErrorHandlers = runtime.ErrorHandlers\n\t\t} else {\n\t\t\truntime.ErrorHandlers = runtimeErrorHandlers\n\t\t}\n\n\t\t_, err := headless.MaybeStartLocalServer(ctx, opts, \"\", nil, nil, nil)\n\t\tif err != nil {\n\t\t\tdiags.Append(diagnostics.Error(\"failed to start local server\", err)...)\n\t\t\treturn nil, diags\n\t\t}\n\tcase opts.ServerAddr != \"\" && opts.AuthToken == \"\" && usernameAndPasswordSet:\n\t\tapiClient, err := apiclient.NewClient(opts)\n\t\tif err != nil {\n\t\t\tdiags.Append(diagnostics.Error(\"failed to create new API client\", err)...)\n\t\t\treturn nil, diags\n\t\t}\n\n\t\tcloser, sc, err := apiClient.NewSessionClient()\n\t\tif err != nil {\n\t\t\tdiags.Append(diagnostics.Error(\"failed to create new session client\", err)...)\n\t\t\treturn nil, diags\n\t\t}\n\n\t\tdefer io.Close(closer)\n\n\t\tsessionOpts := session.SessionCreateRequest{\n\t\t\tUsername: username,\n\t\t\tPassword: password,\n\t\t}\n\n\t\tresp, err := sc.Create(ctx, &sessionOpts)\n\t\tif err != nil {\n\t\t\tdiags.Append(diagnostics.Error(\"failed to create new session\", err)...)\n\t\t\treturn nil, diags\n\t\t}\n\n\t\topts.AuthToken = resp.Token\n\t}\n\n\treturn opts, diags\n}\n\nfunc (p ArgoCDProviderConfig) setCoreOpts(opts *apiclient.ClientOptions) (bool, diag.Diagnostics) {\n\tvar diags diag.Diagnostics\n\n\tcoreEnabled := p.Core.ValueBool()\n\tif coreEnabled {\n\t\tif opts.ServerAddr != \"\" {\n\t\t\tdiags.AddWarning(\"`server_addr` is ignored by the provider and overwritten when `core = true`.\", \"\")\n\t\t}\n\n\t\topts.ServerAddr = \"kubernetes\"\n\t\topts.Core = true\n\n\t\tif !p.Username.IsNull() {\n\t\t\tdiags.AddWarning(\"`username` is ignored when `core = true`.\", \"\")\n\t\t}\n\t}\n\n\treturn coreEnabled, diags\n}\n\nfunc (p ArgoCDProviderConfig) setLocalConfigOpts(opts *apiclient.ClientOptions) (bool, diag.Diagnostics) {\n\tvar diags diag.Diagnostics\n\n\tuseLocalConfig := p.UseLocalConfig.ValueBool()\n\tswitch useLocalConfig {\n\tcase true:\n\t\tif opts.ServerAddr != \"\" {\n\t\t\tdiags.AddWarning(\"setting `server_addr` alongside `use_local_config = true` is unnecessary and not recommended as this will overwrite the address retrieved from the local ArgoCD context.\", \"\")\n\t\t}\n\n\t\tif !p.Username.IsNull() {\n\t\t\tdiags.AddWarning(\"`username` is ignored when `use_local_config = true`.\", \"\")\n\t\t}\n\n\t\topts.Context = getDefaultString(p.Context, \"ARGOCD_CONTEXT\")\n\n\t\tcp := getDefaultString(p.ConfigPath, \"ARGOCD_CONFIG_PATH\")\n\n\t\tif cp != \"\" {\n\t\t\topts.ConfigPath = p.ConfigPath.ValueString()\n\t\t\tbreak\n\t\t}\n\n\t\tcp, err := localconfig.DefaultLocalConfigPath()\n\t\tif err == nil {\n\t\t\topts.ConfigPath = cp\n\t\t\tbreak\n\t\t}\n\n\t\tdiags.Append(diagnostics.Error(\"failed to find default ArgoCD config path\", err)...)\n\tcase false:\n\t\t// Log warnings if explicit configuration has been provided for local config when `use_local_config` is not enabled.\n\t\tif !p.ConfigPath.IsNull() {\n\t\t\tdiags.AddWarning(\"`config_path` is ignored by provider unless `use_local_config = true`.\", \"\")\n\t\t}\n\n\t\tif !p.Context.IsNull() {\n\t\t\tdiags.AddWarning(\"`context` is ignored by provider unless `use_local_config = true`.\", \"\")\n\t\t}\n\t}\n\n\treturn useLocalConfig, diags\n}\n\nfunc (p ArgoCDProviderConfig) setPortForwardingOpts(ctx context.Context, opts *apiclient.ClientOptions) (bool, diag.Diagnostics) {\n\tvar diags diag.Diagnostics\n\n\tportForwardingEnabled := opts.PortForward || opts.PortForwardNamespace != \"\"\n\tswitch portForwardingEnabled {\n\tcase true:\n\t\tif opts.ServerAddr != \"\" {\n\t\t\tdiags.AddWarning(\"`server_addr` is ignored by the provider and overwritten when port forwarding is enabled.\", \"\")\n\t\t}\n\n\t\topts.ServerAddr = \"localhost\" // will be overwritten by ArgoCD module when we initialize the API client but needs to be set here to ensure we\n\t\topts.ServerName = \"argocd-server\"\n\n\t\tif opts.PortForwardNamespace == \"\" {\n\t\t\topts.PortForwardNamespace = \"argocd\"\n\t\t}\n\n\t\tif p.Kubernetes == nil {\n\t\t\tbreak\n\t\t}\n\n\t\tk := p.Kubernetes[0]\n\t\topts.KubeOverrides = &clientcmd.ConfigOverrides{\n\t\t\tAuthInfo: api.AuthInfo{\n\t\t\t\tClientCertificateData: bytes.NewBufferString(getDefaultString(k.ClientCertificate, \"KUBE_CLIENT_CERT_DATA\")).Bytes(),\n\t\t\t\tUsername:              getDefaultString(k.Username, \"KUBE_USER\"),\n\t\t\t\tPassword:              getDefaultString(k.Password, \"KUBE_PASSWORD\"),\n\t\t\t\tClientKeyData:         bytes.NewBufferString(getDefaultString(k.ClientKey, \"KUBE_CLIENT_KEY_DATA\")).Bytes(),\n\t\t\t\tToken:                 getDefaultString(k.Token, \"KUBE_TOKEN\"),\n\t\t\t},\n\t\t\tClusterInfo: api.Cluster{\n\t\t\t\tInsecureSkipTLSVerify:    getDefaultBool(ctx, k.Insecure, \"KUBE_INSECURE\"),\n\t\t\t\tCertificateAuthorityData: bytes.NewBufferString(getDefaultString(k.ClusterCACertificate, \"KUBE_CLUSTER_CA_CERT_DATA\")).Bytes(),\n\t\t\t},\n\t\t\tCurrentContext: getDefaultString(k.ConfigContext, \"KUBE_CTX\"),\n\t\t\tContext: api.Context{\n\t\t\t\tAuthInfo: getDefaultString(k.ConfigContextAuthInfo, \"KUBE_CTX_AUTH_INFO\"),\n\t\t\t\tCluster:  getDefaultString(k.ConfigContextCluster, \"KUBE_CTX_CLUSTER\"),\n\t\t\t},\n\t\t}\n\n\t\th := getDefaultString(k.Host, \"KUBE_HOST\")\n\t\tif h != \"\" {\n\t\t\t// Server has to be the complete address of the Kubernetes cluster (scheme://hostname:port), not just the hostname,\n\t\t\t// because `overrides` are processed too late to be taken into account by `defaultServerUrlFor()`.\n\t\t\t// This basically replicates what defaultServerUrlFor() does with config but for overrides,\n\t\t\t// see https://github.com/Kubernetes/client-go/blob/v12.0.0/rest/url_utils.go#L85-L87\n\t\t\thasCA := len(opts.KubeOverrides.ClusterInfo.CertificateAuthorityData) != 0\n\t\t\thasCert := len(opts.KubeOverrides.AuthInfo.ClientCertificateData) != 0\n\t\t\tdefaultTLS := hasCA || hasCert || opts.KubeOverrides.ClusterInfo.InsecureSkipTLSVerify\n\n\t\t\tvar host *url.URL\n\n\t\t\thost, _, err := rest.DefaultServerURL(h, \"\", apimachineryschema.GroupVersion{}, defaultTLS)\n\t\t\tif err == nil {\n\t\t\t\topts.KubeOverrides.ClusterInfo.Server = host.String()\n\t\t\t} else {\n\t\t\t\tdiags.Append(diagnostics.Error(fmt.Sprintf(\"failed to extract default server URL for host %s\", h), err)...)\n\t\t\t}\n\t\t}\n\n\t\tif k.Exec == nil {\n\t\t\tbreak\n\t\t}\n\n\t\te := k.Exec[0]\n\t\texec := &api.ExecConfig{\n\t\t\tInteractiveMode: api.IfAvailableExecInteractiveMode,\n\t\t\tAPIVersion:      e.APIVersion.ValueString(),\n\t\t\tCommand:         e.Command.ValueString(),\n\t\t}\n\n\t\tvar a []string\n\n\t\tdiags.Append(e.Args.ElementsAs(ctx, &a, false)...)\n\t\texec.Args = a\n\n\t\tvar env map[string]string\n\n\t\tdiags.Append(e.Env.ElementsAs(ctx, &env, false)...)\n\n\t\tfor k, v := range env {\n\t\t\texec.Env = append(exec.Env, api.ExecEnvVar{Name: k, Value: v})\n\t\t}\n\n\t\topts.KubeOverrides.AuthInfo.Exec = exec\n\tcase false:\n\t\tif p.Kubernetes != nil {\n\t\t\tdiags.AddWarning(\"`Kubernetes` configuration block is ignored by provider unless `port_forward` or `port_forward_with_namespace` are configured.\", \"\")\n\t\t}\n\t}\n\n\treturn portForwardingEnabled, diags\n}\n\ntype Kubernetes struct {\n\tHost                  types.String     `tfsdk:\"host\"`\n\tUsername              types.String     `tfsdk:\"username\"`\n\tPassword              types.String     `tfsdk:\"password\"`\n\tInsecure              types.Bool       `tfsdk:\"insecure\"`\n\tClientCertificate     types.String     `tfsdk:\"client_certificate\"`\n\tClientKey             types.String     `tfsdk:\"client_key\"`\n\tClusterCACertificate  types.String     `tfsdk:\"cluster_ca_certificate\"`\n\tConfigContext         types.String     `tfsdk:\"config_context\"`\n\tConfigContextAuthInfo types.String     `tfsdk:\"config_context_auth_info\"`\n\tConfigContextCluster  types.String     `tfsdk:\"config_context_cluster\"`\n\tToken                 types.String     `tfsdk:\"token\"`\n\tExec                  []KubernetesExec `tfsdk:\"exec\"`\n}\n\ntype KubernetesExec struct {\n\tAPIVersion types.String `tfsdk:\"api_version\"`\n\tCommand    types.String `tfsdk:\"command\"`\n\tEnv        types.Map    `tfsdk:\"env\"`\n\tArgs       types.List   `tfsdk:\"args\"`\n}\n"
  },
  {
    "path": "internal/provider/model_repository.go",
    "content": "package provider\n\nimport (\n\t\"strconv\"\n\n\t\"github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1\"\n\t\"github.com/hashicorp/terraform-plugin-framework-validators/int64validator\"\n\t\"github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator\"\n\t\"github.com/hashicorp/terraform-plugin-framework/resource/schema\"\n\t\"github.com/hashicorp/terraform-plugin-framework/resource/schema/booldefault\"\n\t\"github.com/hashicorp/terraform-plugin-framework/resource/schema/int64default\"\n\t\"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier\"\n\t\"github.com/hashicorp/terraform-plugin-framework/resource/schema/stringdefault\"\n\t\"github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier\"\n\t\"github.com/hashicorp/terraform-plugin-framework/schema/validator\"\n\t\"github.com/hashicorp/terraform-plugin-framework/types\"\n)\n\ntype repositoryModel struct {\n\tID                         types.String `tfsdk:\"id\"`\n\tRepo                       types.String `tfsdk:\"repo\"`\n\tName                       types.String `tfsdk:\"name\"`\n\tType                       types.String `tfsdk:\"type\"`\n\tProject                    types.String `tfsdk:\"project\"`\n\tUseAzureWorkloadIdentity   types.Bool   `tfsdk:\"use_azure_workload_identity\"`\n\tUsername                   types.String `tfsdk:\"username\"`\n\tPassword                   types.String `tfsdk:\"password\"`\n\tSSHPrivateKey              types.String `tfsdk:\"ssh_private_key\"`\n\tTLSClientCertData          types.String `tfsdk:\"tls_client_cert_data\"`\n\tTLSClientCertKey           types.String `tfsdk:\"tls_client_cert_key\"`\n\tEnableLFS                  types.Bool   `tfsdk:\"enable_lfs\"`\n\tEnableOCI                  types.Bool   `tfsdk:\"enable_oci\"`\n\tInsecure                   types.Bool   `tfsdk:\"insecure\"`\n\tInheritedCreds             types.Bool   `tfsdk:\"inherited_creds\"`\n\tConnectionStateStatus      types.String `tfsdk:\"connection_state_status\"`\n\tGitHubAppID                types.String `tfsdk:\"githubapp_id\"`\n\tGitHubAppInstallationID    types.String `tfsdk:\"githubapp_installation_id\"`\n\tGitHubAppEnterpriseBaseURL types.String `tfsdk:\"githubapp_enterprise_base_url\"`\n\tGitHubAppPrivateKey        types.String `tfsdk:\"githubapp_private_key\"`\n\tBearerToken                types.String `tfsdk:\"bearer_token\"`\n\tProxy                      types.String `tfsdk:\"proxy\"`\n\tNoProxy                    types.String `tfsdk:\"no_proxy\"`\n\tDepth                      types.Int64  `tfsdk:\"depth\"`\n}\n\nfunc repositorySchemaAttributes() map[string]schema.Attribute {\n\treturn map[string]schema.Attribute{\n\t\t\"id\": schema.StringAttribute{\n\t\t\tMarkdownDescription: \"Repository identifier\",\n\t\t\tComputed:            true,\n\t\t},\n\t\t\"repo\": schema.StringAttribute{\n\t\t\tMarkdownDescription: \"URL of the repository.\",\n\t\t\tRequired:            true,\n\t\t\tPlanModifiers: []planmodifier.String{\n\t\t\t\tstringplanmodifier.RequiresReplace(),\n\t\t\t},\n\t\t},\n\t\t\"name\": schema.StringAttribute{\n\t\t\tMarkdownDescription: \"Name to be used for this repo. Only used with Helm repos.\",\n\t\t\tOptional:            true,\n\t\t},\n\t\t\"type\": schema.StringAttribute{\n\t\t\tMarkdownDescription: \"Type of the repo. Can be either `git`, `helm` or `oci`. `git` is assumed if empty or absent.\",\n\t\t\tOptional:            true,\n\t\t\tComputed:            true,\n\t\t\tDefault:             stringdefault.StaticString(\"git\"),\n\t\t\tValidators: []validator.String{\n\t\t\t\tstringvalidator.OneOf(\"git\", \"helm\", \"oci\"),\n\t\t\t},\n\t\t},\n\t\t\"project\": schema.StringAttribute{\n\t\t\tMarkdownDescription: \"The project name, in case the repository is project scoped.\",\n\t\t\tOptional:            true,\n\t\t\tPlanModifiers: []planmodifier.String{\n\t\t\t\tstringplanmodifier.RequiresReplace(),\n\t\t\t},\n\t\t},\n\t\t\"use_azure_workload_identity\": schema.BoolAttribute{\n\t\t\tMarkdownDescription: \"Whether `Azure-Workload-identity` should be enabled for this repository.\",\n\t\t\tOptional:            true,\n\t\t\tComputed:            true,\n\t\t\tDefault:             booldefault.StaticBool(false),\n\t\t},\n\t\t\"username\": schema.StringAttribute{\n\t\t\tMarkdownDescription: \"Username used for authenticating at the remote repository.\",\n\t\t\tOptional:            true,\n\t\t},\n\t\t\"password\": schema.StringAttribute{\n\t\t\tMarkdownDescription: \"Password or PAT used for authenticating at the remote repository.\",\n\t\t\tOptional:            true,\n\t\t\tSensitive:           true,\n\t\t},\n\t\t\"bearer_token\": schema.StringAttribute{\n\t\t\tMarkdownDescription: \"BearerToken contains the bearer token used for Git BitBucket Data Center auth at the repo server\",\n\t\t\tOptional:            true,\n\t\t\tSensitive:           true,\n\t\t},\n\t\t\"ssh_private_key\": schema.StringAttribute{\n\t\t\tMarkdownDescription: \"PEM data for authenticating at the repo server. Only used with Git repos.\",\n\t\t\tOptional:            true,\n\t\t\tSensitive:           true,\n\t\t},\n\t\t\"tls_client_cert_data\": schema.StringAttribute{\n\t\t\tMarkdownDescription: \"TLS client certificate in PEM format for authenticating at the repo server.\",\n\t\t\tOptional:            true,\n\t\t},\n\t\t\"tls_client_cert_key\": schema.StringAttribute{\n\t\t\tMarkdownDescription: \"TLS client certificate private key in PEM format for authenticating at the repo server.\",\n\t\t\tOptional:            true,\n\t\t\tSensitive:           true,\n\t\t},\n\t\t\"enable_lfs\": schema.BoolAttribute{\n\t\t\tMarkdownDescription: \"Whether `git-lfs` support should be enabled for this repository.\",\n\t\t\tOptional:            true,\n\t\t\tComputed:            true,\n\t\t\tDefault:             booldefault.StaticBool(false),\n\t\t},\n\t\t\"enable_oci\": schema.BoolAttribute{\n\t\t\tMarkdownDescription: \"Whether `helm-oci` support should be enabled for this repository.\",\n\t\t\tOptional:            true,\n\t\t\tComputed:            true,\n\t\t\tDefault:             booldefault.StaticBool(false),\n\t\t},\n\t\t\"insecure\": schema.BoolAttribute{\n\t\t\tMarkdownDescription: \"Whether the connection to the repository ignores any errors when verifying TLS certificates or SSH host keys.\",\n\t\t\tOptional:            true,\n\t\t\tComputed:            true,\n\t\t\tDefault:             booldefault.StaticBool(false),\n\t\t},\n\t\t\"inherited_creds\": schema.BoolAttribute{\n\t\t\tMarkdownDescription: \"Whether credentials were inherited from a credential set.\",\n\t\t\tComputed:            true,\n\t\t},\n\t\t\"connection_state_status\": schema.StringAttribute{\n\t\t\tMarkdownDescription: \"Contains information about the current state of connection to the repository server.\",\n\t\t\tComputed:            true,\n\t\t},\n\t\t\"githubapp_id\": schema.StringAttribute{\n\t\t\tMarkdownDescription: \"ID of the GitHub app used to access the repo.\",\n\t\t\tOptional:            true,\n\t\t\tComputed:            true,\n\t\t},\n\t\t\"githubapp_installation_id\": schema.StringAttribute{\n\t\t\tMarkdownDescription: \"The installation ID of the GitHub App used to access the repo.\",\n\t\t\tOptional:            true,\n\t\t\tComputed:            true,\n\t\t},\n\t\t\"githubapp_enterprise_base_url\": schema.StringAttribute{\n\t\t\tMarkdownDescription: \"GitHub API URL for GitHub app authentication.\",\n\t\t\tOptional:            true,\n\t\t\tComputed:            true,\n\t\t},\n\t\t\"githubapp_private_key\": schema.StringAttribute{\n\t\t\tMarkdownDescription: \"Private key data (PEM) for authentication via GitHub app.\",\n\t\t\tOptional:            true,\n\t\t\tSensitive:           true,\n\t\t},\n\t\t\"proxy\": schema.StringAttribute{\n\t\t\tMarkdownDescription: \"HTTP/HTTPS proxy to access the repository.\",\n\t\t\tOptional:            true,\n\t\t},\n\t\t\"no_proxy\": schema.StringAttribute{\n\t\t\tMarkdownDescription: \"Comma-separated list of hostnames that should be excluded from proxying.\",\n\t\t\tOptional:            true,\n\t\t},\n\t\t\"depth\": schema.Int64Attribute{\n\t\t\tMarkdownDescription: \"Depth specifies the depth for [shallow clones](https://argo-cd.readthedocs.io/en/stable/operator-manual/high_availability/#shallow-clone). A value of `0` means a full clone (the default). Shallow clone depths (`> 0`) are only supported from ArgoCD 3.3.0 onwards.\",\n\t\t\tOptional:            true,\n\t\t\tComputed:            true,\n\t\t\tDefault:             int64default.StaticInt64(0),\n\t\t\tValidators: []validator.Int64{\n\t\t\t\tint64validator.AtLeast(0),\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc (m *repositoryModel) toAPIModel() (*v1alpha1.Repository, error) {\n\trepo := &v1alpha1.Repository{\n\t\tRepo:                       m.Repo.ValueString(),\n\t\tName:                       m.Name.ValueString(),\n\t\tType:                       m.Type.ValueString(),\n\t\tProject:                    m.Project.ValueString(),\n\t\tUseAzureWorkloadIdentity:   m.UseAzureWorkloadIdentity.ValueBool(),\n\t\tUsername:                   m.Username.ValueString(),\n\t\tPassword:                   m.Password.ValueString(),\n\t\tBearerToken:                m.BearerToken.ValueString(),\n\t\tSSHPrivateKey:              m.SSHPrivateKey.ValueString(),\n\t\tTLSClientCertData:          m.TLSClientCertData.ValueString(),\n\t\tTLSClientCertKey:           m.TLSClientCertKey.ValueString(),\n\t\tEnableLFS:                  m.EnableLFS.ValueBool(),\n\t\tEnableOCI:                  m.EnableOCI.ValueBool(),\n\t\tInsecure:                   m.Insecure.ValueBool(),\n\t\tInheritedCreds:             m.InheritedCreds.ValueBool(),\n\t\tGitHubAppEnterpriseBaseURL: m.GitHubAppEnterpriseBaseURL.ValueString(),\n\t\tGithubAppPrivateKey:        m.GitHubAppPrivateKey.ValueString(),\n\t\tProxy:                      m.Proxy.ValueString(),\n\t\tNoProxy:                    m.NoProxy.ValueString(),\n\t\tDepth:                      m.Depth.ValueInt64(),\n\t}\n\n\t// Handle GitHub App ID conversion\n\tif !m.GitHubAppID.IsNull() && !m.GitHubAppID.IsUnknown() {\n\t\tid, err := strconv.ParseInt(m.GitHubAppID.ValueString(), 10, 64)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\trepo.GithubAppId = id\n\t}\n\n\t// Handle GitHub App Installation ID conversion\n\tif !m.GitHubAppInstallationID.IsNull() && !m.GitHubAppInstallationID.IsUnknown() {\n\t\tid, err := strconv.ParseInt(m.GitHubAppInstallationID.ValueString(), 10, 64)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\trepo.GithubAppInstallationId = id\n\t}\n\n\treturn repo, nil\n}\n\nfunc (m *repositoryModel) updateFromAPI(repo *v1alpha1.Repository) *repositoryModel {\n\t// Generate ID using \"|\" separator for project-scoped repos\n\tif repo.Project != \"\" {\n\t\tm.ID = types.StringValue(repo.Repo + \"|\" + repo.Project)\n\t} else {\n\t\tm.ID = types.StringValue(repo.Repo)\n\t}\n\n\tm.Repo = types.StringValue(repo.Repo)\n\tm.Type = types.StringValue(repo.Type)\n\tm.UseAzureWorkloadIdentity = types.BoolValue(repo.UseAzureWorkloadIdentity)\n\tm.EnableLFS = types.BoolValue(repo.EnableLFS)\n\tm.EnableOCI = types.BoolValue(repo.EnableOCI)\n\tm.Insecure = types.BoolValue(repo.Insecure)\n\tm.InheritedCreds = types.BoolValue(repo.InheritedCreds)\n\n\tif repo.Depth > 0 {\n\t\tm.Depth = types.Int64Value(repo.Depth)\n\t} else if m.Depth.IsUnknown() || m.Depth.IsNull() {\n\t\tm.Depth = types.Int64Value(0)\n\t}\n\n\tif repo.Name != \"\" {\n\t\tm.Name = types.StringValue(repo.Name)\n\t}\n\n\t// Handle connection state status\n\tif repo.ConnectionState.Status != \"\" {\n\t\tm.ConnectionStateStatus = types.StringValue(repo.ConnectionState.Status)\n\t}\n\n\tif repo.Project != \"\" {\n\t\tm.Project = types.StringValue(repo.Project)\n\t}\n\n\t// Handle username based on inheritance\n\tif !repo.InheritedCreds {\n\t\tif repo.Username != \"\" {\n\t\t\tm.Username = types.StringValue(repo.Username)\n\t\t}\n\t}\n\n\tif repo.GitHubAppEnterpriseBaseURL != \"\" {\n\t\tm.GitHubAppEnterpriseBaseURL = types.StringValue(repo.GitHubAppEnterpriseBaseURL)\n\t} else if m.GitHubAppEnterpriseBaseURL.IsUnknown() {\n\t\t// If unknown and API didn't return a value, set to null\n\t\tm.GitHubAppEnterpriseBaseURL = types.StringNull()\n\t}\n\n\tif repo.GithubAppId > 0 {\n\t\tm.GitHubAppID = types.StringValue(strconv.FormatInt(repo.GithubAppId, 10))\n\t} else if m.GitHubAppID.IsUnknown() {\n\t\t// If unknown and API didn't return a value, set to null\n\t\tm.GitHubAppID = types.StringNull()\n\t}\n\n\t// Handle GitHub App Installation ID conversion\n\tif repo.GithubAppInstallationId > 0 {\n\t\tm.GitHubAppInstallationID = types.StringValue(strconv.FormatInt(repo.GithubAppInstallationId, 10))\n\t} else if m.GitHubAppInstallationID.IsUnknown() {\n\t\t// If unknown and API didn't return a value, set to null\n\t\tm.GitHubAppInstallationID = types.StringNull()\n\t}\n\n\t// Handle proxy settings\n\tif repo.Proxy != \"\" {\n\t\tm.Proxy = types.StringValue(repo.Proxy)\n\t} else if m.Proxy.IsUnknown() {\n\t\tm.Proxy = types.StringNull()\n\t}\n\n\tif repo.NoProxy != \"\" {\n\t\tm.NoProxy = types.StringValue(repo.NoProxy)\n\t} else if m.NoProxy.IsUnknown() {\n\t\tm.NoProxy = types.StringNull()\n\t}\n\n\treturn m\n}\n"
  },
  {
    "path": "internal/provider/model_repository_certificate.go",
    "content": "package provider\n\nimport (\n\t\"github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1\"\n\t\"github.com/hashicorp/terraform-plugin-framework/resource/schema\"\n\t\"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier\"\n\t\"github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier\"\n\t\"github.com/hashicorp/terraform-plugin-framework/types\"\n)\n\ntype repositoryCertificateModel struct {\n\tID    types.String                      `tfsdk:\"id\"`\n\tSSH   []repositoryCertificateSSHModel   `tfsdk:\"ssh\"`\n\tHTTPS []repositoryCertificateHTTPSModel `tfsdk:\"https\"`\n}\n\ntype repositoryCertificateSSHModel struct {\n\tServerName  types.String `tfsdk:\"server_name\"`\n\tCertSubType types.String `tfsdk:\"cert_subtype\"`\n\tCertData    types.String `tfsdk:\"cert_data\"`\n\tCertInfo    types.String `tfsdk:\"cert_info\"`\n}\n\ntype repositoryCertificateHTTPSModel struct {\n\tServerName  types.String `tfsdk:\"server_name\"`\n\tCertData    types.String `tfsdk:\"cert_data\"`\n\tCertSubType types.String `tfsdk:\"cert_subtype\"`\n\tCertInfo    types.String `tfsdk:\"cert_info\"`\n}\n\nfunc repositoryCertificateSchemaAttributes() map[string]schema.Attribute {\n\treturn map[string]schema.Attribute{\n\t\t\"id\": schema.StringAttribute{\n\t\t\tMarkdownDescription: \"Repository certificate identifier\",\n\t\t\tComputed:            true,\n\t\t},\n\t}\n}\n\nfunc repositoryCertificateSchemaBlocks() map[string]schema.Block {\n\treturn map[string]schema.Block{\n\t\t\"ssh\": schema.ListNestedBlock{\n\t\t\tMarkdownDescription: \"SSH certificate configuration\",\n\t\t\tNestedObject: schema.NestedBlockObject{\n\t\t\t\tAttributes: map[string]schema.Attribute{\n\t\t\t\t\t\"server_name\": schema.StringAttribute{\n\t\t\t\t\t\tMarkdownDescription: \"DNS name of the server this certificate is intended for\",\n\t\t\t\t\t\tRequired:            true,\n\t\t\t\t\t\tPlanModifiers: []planmodifier.String{\n\t\t\t\t\t\t\tstringplanmodifier.RequiresReplace(),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t\"cert_subtype\": schema.StringAttribute{\n\t\t\t\t\t\tMarkdownDescription: \"The sub type of the cert, i.e. `ssh-rsa`\",\n\t\t\t\t\t\tRequired:            true,\n\t\t\t\t\t\tPlanModifiers: []planmodifier.String{\n\t\t\t\t\t\t\tstringplanmodifier.RequiresReplace(),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t\"cert_data\": schema.StringAttribute{\n\t\t\t\t\t\tMarkdownDescription: \"The actual certificate data, dependent on the certificate type\",\n\t\t\t\t\t\tRequired:            true,\n\t\t\t\t\t\tPlanModifiers: []planmodifier.String{\n\t\t\t\t\t\t\tstringplanmodifier.RequiresReplace(),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t\"cert_info\": schema.StringAttribute{\n\t\t\t\t\t\tMarkdownDescription: \"Additional certificate info, dependent on the certificate type (e.g. SSH fingerprint, X509 CommonName)\",\n\t\t\t\t\t\tComputed:            true,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t\"https\": schema.ListNestedBlock{\n\t\t\tMarkdownDescription: \"HTTPS certificate configuration\",\n\t\t\tNestedObject: schema.NestedBlockObject{\n\t\t\t\tAttributes: map[string]schema.Attribute{\n\t\t\t\t\t\"server_name\": schema.StringAttribute{\n\t\t\t\t\t\tMarkdownDescription: \"DNS name of the server this certificate is intended for\",\n\t\t\t\t\t\tRequired:            true,\n\t\t\t\t\t\tPlanModifiers: []planmodifier.String{\n\t\t\t\t\t\t\tstringplanmodifier.RequiresReplace(),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t\"cert_data\": schema.StringAttribute{\n\t\t\t\t\t\tMarkdownDescription: \"The actual certificate data, dependent on the certificate type\",\n\t\t\t\t\t\tRequired:            true,\n\t\t\t\t\t\tPlanModifiers: []planmodifier.String{\n\t\t\t\t\t\t\tstringplanmodifier.RequiresReplace(),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t\"cert_subtype\": schema.StringAttribute{\n\t\t\t\t\t\tMarkdownDescription: \"The sub type of the cert, i.e. `ssh-rsa`\",\n\t\t\t\t\t\tComputed:            true,\n\t\t\t\t\t},\n\t\t\t\t\t\"cert_info\": schema.StringAttribute{\n\t\t\t\t\t\tMarkdownDescription: \"Additional certificate info, dependent on the certificate type (e.g. SSH fingerprint, X509 CommonName)\",\n\t\t\t\t\t\tComputed:            true,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc (m *repositoryCertificateModel) toAPIModel() *v1alpha1.RepositoryCertificate {\n\tcert := &v1alpha1.RepositoryCertificate{}\n\n\tif len(m.SSH) > 0 {\n\t\tssh := m.SSH[0]\n\t\tcert.CertType = \"ssh\"\n\t\tcert.ServerName = ssh.ServerName.ValueString()\n\t\tcert.CertSubType = ssh.CertSubType.ValueString()\n\t\tcert.CertData = []byte(ssh.CertData.ValueString())\n\t} else if len(m.HTTPS) > 0 {\n\t\thttps := m.HTTPS[0]\n\t\tcert.CertType = \"https\"\n\t\tcert.ServerName = https.ServerName.ValueString()\n\t\tcert.CertData = []byte(https.CertData.ValueString())\n\t}\n\n\treturn cert\n}\n\nfunc (m *repositoryCertificateModel) generateID() string {\n\tif len(m.SSH) > 0 {\n\t\tssh := m.SSH[0]\n\t\treturn \"ssh/\" + ssh.CertSubType.ValueString() + \"/\" + ssh.ServerName.ValueString()\n\t} else if len(m.HTTPS) > 0 {\n\t\thttps := m.HTTPS[0]\n\t\treturn \"https/\" + https.ServerName.ValueString()\n\t}\n\n\treturn \"\"\n}\n"
  },
  {
    "path": "internal/provider/model_repository_credentials.go",
    "content": "package provider\n\nimport (\n\t\"strconv\"\n\n\t\"github.com/argoproj-labs/terraform-provider-argocd/internal/validators\"\n\t\"github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1\"\n\t\"github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator\"\n\t\"github.com/hashicorp/terraform-plugin-framework/resource/schema\"\n\t\"github.com/hashicorp/terraform-plugin-framework/resource/schema/booldefault\"\n\t\"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier\"\n\t\"github.com/hashicorp/terraform-plugin-framework/resource/schema/stringdefault\"\n\t\"github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier\"\n\t\"github.com/hashicorp/terraform-plugin-framework/schema/validator\"\n\t\"github.com/hashicorp/terraform-plugin-framework/types\"\n)\n\ntype repositoryCredentialsModel struct {\n\tID                         types.String `tfsdk:\"id\"`\n\tURL                        types.String `tfsdk:\"url\"`\n\tUseAzureWorkloadIdentity   types.Bool   `tfsdk:\"use_azure_workload_identity\"`\n\tType                       types.String `tfsdk:\"type\"`\n\tUsername                   types.String `tfsdk:\"username\"`\n\tPassword                   types.String `tfsdk:\"password\"`\n\tSSHPrivateKey              types.String `tfsdk:\"ssh_private_key\"`\n\tTLSClientCertData          types.String `tfsdk:\"tls_client_cert_data\"`\n\tTLSClientCertKey           types.String `tfsdk:\"tls_client_cert_key\"`\n\tEnableOCI                  types.Bool   `tfsdk:\"enable_oci\"`\n\tGitHubAppID                types.String `tfsdk:\"githubapp_id\"`\n\tGitHubAppInstallationID    types.String `tfsdk:\"githubapp_installation_id\"`\n\tGitHubAppEnterpriseBaseURL types.String `tfsdk:\"githubapp_enterprise_base_url\"`\n\tGitHubAppPrivateKey        types.String `tfsdk:\"githubapp_private_key\"`\n}\n\nfunc repositoryCredentialsSchemaAttributes() map[string]schema.Attribute {\n\treturn map[string]schema.Attribute{\n\t\t\"id\": schema.StringAttribute{\n\t\t\tMarkdownDescription: \"Repository credentials identifier\",\n\t\t\tComputed:            true,\n\t\t},\n\t\t\"url\": schema.StringAttribute{\n\t\t\tMarkdownDescription: \"URL that these credentials match to\",\n\t\t\tRequired:            true,\n\t\t\tPlanModifiers: []planmodifier.String{\n\t\t\t\tstringplanmodifier.RequiresReplace(),\n\t\t\t},\n\t\t},\n\t\t\"type\": schema.StringAttribute{\n\t\t\tMarkdownDescription: \"Type of the repository credentials. Can be either `git`, `oci` or `helm`. `git` is assumed if empty or absent.\",\n\t\t\tOptional:            true,\n\t\t\tComputed:            true,\n\t\t\tDefault:             stringdefault.StaticString(\"git\"),\n\t\t\tValidators: []validator.String{\n\t\t\t\tstringvalidator.OneOf(\"git\", \"helm\", \"oci\"),\n\t\t\t},\n\t\t},\n\t\t\"username\": schema.StringAttribute{\n\t\t\tMarkdownDescription: \"Username for authenticating at the repo server\",\n\t\t\tOptional:            true,\n\t\t},\n\t\t\"password\": schema.StringAttribute{\n\t\t\tMarkdownDescription: \"Password for authenticating at the repo server\",\n\t\t\tOptional:            true,\n\t\t\tSensitive:           true,\n\t\t},\n\t\t\"ssh_private_key\": schema.StringAttribute{\n\t\t\tMarkdownDescription: \"Private key data for authenticating at the repo server using SSH (only Git repos)\",\n\t\t\tOptional:            true,\n\t\t\tSensitive:           true,\n\t\t\tValidators: []validator.String{\n\t\t\t\tvalidators.SSHPrivateKey(),\n\t\t\t},\n\t\t},\n\t\t\"tls_client_cert_data\": schema.StringAttribute{\n\t\t\tMarkdownDescription: \"TLS client cert data for authenticating at the repo server\",\n\t\t\tOptional:            true,\n\t\t},\n\t\t\"tls_client_cert_key\": schema.StringAttribute{\n\t\t\tMarkdownDescription: \"TLS client cert key for authenticating at the repo server\",\n\t\t\tOptional:            true,\n\t\t\tSensitive:           true,\n\t\t},\n\t\t\"enable_oci\": schema.BoolAttribute{\n\t\t\tMarkdownDescription: \"Whether `helm-oci` support should be enabled for this repo. Can only be set to `true` when `type` is `helm`.\",\n\t\t\tOptional:            true,\n\t\t\tComputed:            true,\n\t\t\tDefault:             booldefault.StaticBool(false),\n\t\t\tValidators: []validator.Bool{\n\t\t\t\tvalidators.EnableOCIRequiresHelmType(),\n\t\t\t},\n\t\t},\n\t\t\"use_azure_workload_identity\": schema.BoolAttribute{\n\t\t\tMarkdownDescription: \"Whether `Azure-Workload-identity` should be enabled for this repository.\",\n\t\t\tOptional:            true,\n\t\t\tComputed:            true,\n\t\t\tDefault:             booldefault.StaticBool(false),\n\t\t},\n\t\t\"githubapp_id\": schema.StringAttribute{\n\t\t\tMarkdownDescription: \"GitHub App ID of the app used to access the repo for GitHub app authentication\",\n\t\t\tOptional:            true,\n\t\t\tValidators: []validator.String{\n\t\t\t\tvalidators.PositiveInteger(),\n\t\t\t},\n\t\t},\n\t\t\"githubapp_installation_id\": schema.StringAttribute{\n\t\t\tMarkdownDescription: \"ID of the installed GitHub App for GitHub app authentication\",\n\t\t\tOptional:            true,\n\t\t\tValidators: []validator.String{\n\t\t\t\tvalidators.PositiveInteger(),\n\t\t\t},\n\t\t},\n\t\t\"githubapp_enterprise_base_url\": schema.StringAttribute{\n\t\t\tMarkdownDescription: \"GitHub API URL for GitHub app authentication\",\n\t\t\tOptional:            true,\n\t\t},\n\t\t\"githubapp_private_key\": schema.StringAttribute{\n\t\t\tMarkdownDescription: \"Private key data (PEM) for authentication via GitHub app\",\n\t\t\tOptional:            true,\n\t\t\tSensitive:           true,\n\t\t\tValidators: []validator.String{\n\t\t\t\tvalidators.SSHPrivateKey(),\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc (m *repositoryCredentialsModel) toAPIModel() (*v1alpha1.RepoCreds, error) {\n\tcreds := &v1alpha1.RepoCreds{\n\t\tURL:                        m.URL.ValueString(),\n\t\tUseAzureWorkloadIdentity:   m.UseAzureWorkloadIdentity.ValueBool(),\n\t\tType:                       m.Type.ValueString(),\n\t\tUsername:                   m.Username.ValueString(),\n\t\tPassword:                   m.Password.ValueString(),\n\t\tSSHPrivateKey:              m.SSHPrivateKey.ValueString(),\n\t\tTLSClientCertData:          m.TLSClientCertData.ValueString(),\n\t\tTLSClientCertKey:           m.TLSClientCertKey.ValueString(),\n\t\tEnableOCI:                  m.EnableOCI.ValueBool(),\n\t\tGitHubAppEnterpriseBaseURL: m.GitHubAppEnterpriseBaseURL.ValueString(),\n\t\tGithubAppPrivateKey:        m.GitHubAppPrivateKey.ValueString(),\n\t}\n\n\t// Handle GitHub App ID conversion\n\tif !m.GitHubAppID.IsNull() && !m.GitHubAppID.IsUnknown() {\n\t\tid, err := strconv.ParseInt(m.GitHubAppID.ValueString(), 10, 64)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tcreds.GithubAppId = id\n\t}\n\n\t// Handle GitHub App Installation ID conversion\n\tif !m.GitHubAppInstallationID.IsNull() && !m.GitHubAppInstallationID.IsUnknown() {\n\t\tid, err := strconv.ParseInt(m.GitHubAppInstallationID.ValueString(), 10, 64)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tcreds.GithubAppInstallationId = id\n\t}\n\n\treturn creds, nil\n}\n"
  },
  {
    "path": "internal/provider/planmodifiers.go",
    "content": "package provider\n\nimport (\n\t\"context\"\n\n\t\"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier\"\n\t\"github.com/hashicorp/terraform-plugin-framework/types\"\n)\n\n// UseUnknownOnUpdate returns a plan modifier that sets the value to unknown\n// whenever the resource is being updated. This is useful for computed fields like\n// resource_version and generation that change on every Kubernetes API call.\n//\n// Unlike UseStateForUnknown which preserves the prior state value, this modifier\n// marks the value as unknown during updates so that Terraform accepts any value\n// returned by the provider after apply.\n//\n// Fixes: https://github.com/argoproj-labs/terraform-provider-argocd/issues/807\nfunc UseUnknownOnUpdateString() planmodifier.String {\n\treturn useUnknownOnUpdateStringModifier{}\n}\n\ntype useUnknownOnUpdateStringModifier struct{}\n\nfunc (m useUnknownOnUpdateStringModifier) Description(_ context.Context) string {\n\treturn \"Sets the value to unknown during updates since server-managed fields change on every API call.\"\n}\n\nfunc (m useUnknownOnUpdateStringModifier) MarkdownDescription(_ context.Context) string {\n\treturn \"Sets the value to unknown during updates since server-managed fields change on every API call.\"\n}\n\nfunc (m useUnknownOnUpdateStringModifier) PlanModifyString(_ context.Context, req planmodifier.StringRequest, resp *planmodifier.StringResponse) {\n\t// If there's no state (create), leave as unknown (default behavior)\n\tif req.State.Raw.IsNull() {\n\t\treturn\n\t}\n\n\t// If the plan is being destroyed, no need to modify\n\tif req.Plan.Raw.IsNull() {\n\t\treturn\n\t}\n\n\t// This is an update - check if any values in the resource are changing\n\t// by comparing the full plan to the full state using Equal\n\tif !req.Plan.Raw.Equal(req.State.Raw) {\n\t\t// Resource is being modified, mark as unknown so any value is accepted\n\t\tresp.PlanValue = types.StringUnknown()\n\t\treturn\n\t}\n\n\t// No change to the resource, preserve the state value\n\tresp.PlanValue = req.StateValue\n}\n\n// UseUnknownOnUpdateInt64 returns a plan modifier for Int64 attributes\n// that sets the value to unknown whenever the resource is being updated.\nfunc UseUnknownOnUpdateInt64() planmodifier.Int64 {\n\treturn useUnknownOnUpdateInt64Modifier{}\n}\n\ntype useUnknownOnUpdateInt64Modifier struct{}\n\nfunc (m useUnknownOnUpdateInt64Modifier) Description(_ context.Context) string {\n\treturn \"Sets the value to unknown during updates since server-managed fields change on every API call.\"\n}\n\nfunc (m useUnknownOnUpdateInt64Modifier) MarkdownDescription(_ context.Context) string {\n\treturn \"Sets the value to unknown during updates since server-managed fields change on every API call.\"\n}\n\nfunc (m useUnknownOnUpdateInt64Modifier) PlanModifyInt64(_ context.Context, req planmodifier.Int64Request, resp *planmodifier.Int64Response) {\n\t// If there's no state (create), leave as unknown (default behavior)\n\tif req.State.Raw.IsNull() {\n\t\treturn\n\t}\n\n\t// If the plan is being destroyed, no need to modify\n\tif req.Plan.Raw.IsNull() {\n\t\treturn\n\t}\n\n\t// This is an update - check if any values in the resource are changing\n\tif !req.Plan.Raw.Equal(req.State.Raw) {\n\t\t// Resource is being modified, mark as unknown so any value is accepted\n\t\tresp.PlanValue = types.Int64Unknown()\n\t\treturn\n\t}\n\n\t// No change to the resource, preserve the state value\n\tresp.PlanValue = req.StateValue\n}\n"
  },
  {
    "path": "internal/provider/provider.go",
    "content": "package provider\n\nimport (\n\t\"context\"\n\n\t\"github.com/hashicorp/terraform-plugin-framework-validators/listvalidator\"\n\t\"github.com/hashicorp/terraform-plugin-framework-validators/providervalidator\"\n\t\"github.com/hashicorp/terraform-plugin-framework/datasource\"\n\t\"github.com/hashicorp/terraform-plugin-framework/path\"\n\t\"github.com/hashicorp/terraform-plugin-framework/provider\"\n\t\"github.com/hashicorp/terraform-plugin-framework/provider/schema\"\n\t\"github.com/hashicorp/terraform-plugin-framework/resource\"\n\t\"github.com/hashicorp/terraform-plugin-framework/schema/validator\"\n\t\"github.com/hashicorp/terraform-plugin-framework/types\"\n)\n\n// Ensure ArgoCDProvider satisfies various provider interfaces.\nvar _ provider.Provider = (*ArgoCDProvider)(nil)\n\ntype ArgoCDProvider struct {\n\t// version is set to the provider version on release, \"dev\" when the\n\t// provider is built and ran locally, and \"test\" when running acceptance\n\t// testing.\n\tversion string\n}\n\nfunc New(version string) provider.Provider {\n\treturn &ArgoCDProvider{\n\t\tversion: version,\n\t}\n}\n\nfunc (p *ArgoCDProvider) Metadata(_ context.Context, _ provider.MetadataRequest, resp *provider.MetadataResponse) {\n\tresp.TypeName = \"argocd\"\n}\n\nfunc (p *ArgoCDProvider) Schema(ctx context.Context, req provider.SchemaRequest, resp *provider.SchemaResponse) {\n\tresp.Schema = schema.Schema{\n\t\tAttributes: map[string]schema.Attribute{\n\t\t\t\"auth_token\": schema.StringAttribute{\n\t\t\t\tDescription: \"ArgoCD authentication token, takes precedence over `username`/`password`. Can be set through the `ARGOCD_AUTH_TOKEN` environment variable.\",\n\t\t\t\tOptional:    true,\n\t\t\t\tSensitive:   true,\n\t\t\t},\n\t\t\t\"username\": schema.StringAttribute{\n\t\t\t\tDescription: \"Authentication username. Can be set through the `ARGOCD_AUTH_USERNAME` environment variable.\",\n\t\t\t\tOptional:    true,\n\t\t\t},\n\t\t\t\"password\": schema.StringAttribute{\n\t\t\t\tDescription: \"Authentication password. Can be set through the `ARGOCD_AUTH_PASSWORD` environment variable.\",\n\t\t\t\tOptional:    true,\n\t\t\t\tSensitive:   true,\n\t\t\t},\n\t\t\t\"core\": schema.BoolAttribute{\n\t\t\t\tDescription: \"Configure direct access using Kubernetes API server.\\n\\n  \" +\n\t\t\t\t\t\"**Warning**: this feature works by starting a local ArgoCD API server that talks directly to the Kubernetes API using the **current context \" +\n\t\t\t\t\t\"in the default kubeconfig** (`~/.kube/config`). This behavior cannot be overridden using either environment variables or the `kubernetes` block \" +\n\t\t\t\t\t\"in the provider configuration at present).\\n\\n  If the server fails to start (e.g. your kubeconfig is misconfigured) then the provider will \" +\n\t\t\t\t\t\"fail as a result of the `argocd` module forcing it to exit and no logs will be available to help you debug this. The error message will be \" +\n\t\t\t\t\t\"similar to\\n  > `The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ReadResource call. The plugin logs may \" +\n\t\t\t\t\t\"contain more details.`\\n\\n  To debug this, you will need to login via the ArgoCD CLI using `argocd login --core` and then running an operation. \" +\n\t\t\t\t\t\"E.g. `argocd app list`.\",\n\t\t\t\tOptional: true,\n\t\t\t},\n\t\t\t\"server_addr\": schema.StringAttribute{\n\t\t\t\tDescription: \"ArgoCD server address with port. Can be set through the `ARGOCD_SERVER` environment variable.\",\n\t\t\t\tOptional:    true,\n\t\t\t},\n\t\t\t\"port_forward\": schema.BoolAttribute{\n\t\t\t\tDescription: \"Connect to a random argocd-server port using port forwarding.\",\n\t\t\t\tOptional:    true,\n\t\t\t},\n\t\t\t\"port_forward_with_namespace\": schema.StringAttribute{\n\t\t\t\tDescription: \"Namespace name which should be used for port forwarding.\",\n\t\t\t\tOptional:    true,\n\t\t\t},\n\t\t\t\"use_local_config\": schema.BoolAttribute{\n\t\t\t\tDescription: \"Use the authentication settings found in the local config file. Useful when you have previously logged in using SSO. Conflicts with `auth_token`, `username` and `password`.\",\n\t\t\t\tOptional:    true,\n\t\t\t},\n\t\t\t\"config_path\": schema.StringAttribute{\n\t\t\t\tDescription: \"Override the default config path of `$HOME/.config/argocd/config`. Only relevant when `use_local_config`. Can be set through the `ARGOCD_CONFIG_PATH` environment variable.\",\n\t\t\t\tOptional:    true,\n\t\t\t},\n\t\t\t\"context\": schema.StringAttribute{\n\t\t\t\tDescription: \"Context to choose when using a local ArgoCD config file. Only relevant when `use_local_config`. Can be set through `ARGOCD_CONTEXT` environment variable.\",\n\t\t\t\tOptional:    true,\n\t\t\t},\n\t\t\t\"cert_file\": schema.StringAttribute{\n\t\t\t\tDescription: \"Additional root CA certificates file to add to the client TLS connection pool.\",\n\t\t\t\tOptional:    true,\n\t\t\t},\n\t\t\t\"client_cert_file\": schema.StringAttribute{\n\t\t\t\tDescription: \"Client certificate.\",\n\t\t\t\tOptional:    true,\n\t\t\t},\n\t\t\t\"client_cert_key\": schema.StringAttribute{\n\t\t\t\tDescription: \"Client certificate key.\",\n\t\t\t\tOptional:    true,\n\t\t\t},\n\t\t\t\"grpc_web\": schema.BoolAttribute{\n\t\t\t\tDescription: \"Whether to use gRPC web proxy client. Useful if Argo CD server is behind proxy which does not support HTTP2.\",\n\t\t\t\tOptional:    true,\n\t\t\t},\n\t\t\t\"grpc_web_root_path\": schema.StringAttribute{\n\t\t\t\tDescription: \"Use the gRPC web proxy client and set the web root, e.g. `argo-cd`. Useful if the Argo CD server is behind a proxy at a non-root path.\",\n\t\t\t\tOptional:    true,\n\t\t\t},\n\t\t\t\"headers\": schema.SetAttribute{\n\t\t\t\tDescription: \"Additional headers to add to each request to the ArgoCD server.\",\n\t\t\t\tElementType: types.StringType,\n\t\t\t\tOptional:    true,\n\t\t\t},\n\t\t\t\"insecure\": schema.BoolAttribute{\n\t\t\t\tDescription: \"Whether to skip TLS server certificate. Can be set through the `ARGOCD_INSECURE` environment variable.\",\n\t\t\t\tOptional:    true,\n\t\t\t},\n\t\t\t\"plain_text\": schema.BoolAttribute{\n\t\t\t\tDescription: \"Whether to initiate an unencrypted connection to ArgoCD server.\",\n\t\t\t\tOptional:    true,\n\t\t\t},\n\t\t\t\"user_agent\": schema.StringAttribute{\n\t\t\t\tDescription: \"User-Agent request header override.\",\n\t\t\t\tOptional:    true,\n\t\t\t},\n\t\t},\n\t\tBlocks: map[string]schema.Block{\n\t\t\t\"kubernetes\": schema.ListNestedBlock{\n\t\t\t\tValidators: []validator.List{\n\t\t\t\t\tlistvalidator.SizeAtMost(1),\n\t\t\t\t},\n\t\t\t\tDescription: \"Kubernetes configuration overrides.  Only relevant when `port_forward = true` or `port_forward_with_namespace = \\\"foo\\\"`. The kubeconfig file that is used can be overridden using the [`KUBECONFIG` environment variable](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#the-kubeconfig-environment-variable)).\",\n\t\t\t\tNestedObject: schema.NestedBlockObject{\n\t\t\t\t\tAttributes: map[string]schema.Attribute{\n\t\t\t\t\t\t\"host\": schema.StringAttribute{\n\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\tDescription: \"The hostname (in form of URI) of the Kubernetes API. Can be sourced from `KUBE_HOST`.\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"username\": schema.StringAttribute{\n\t\t\t\t\t\t\tDescription: \"The username to use for HTTP basic authentication when accessing the Kubernetes API. Can be sourced from `KUBE_USER`.\",\n\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"password\": schema.StringAttribute{\n\t\t\t\t\t\t\tDescription: \"The password to use for HTTP basic authentication when accessing the Kubernetes API. Can be sourced from `KUBE_PASSWORD`.\",\n\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\tSensitive:   true,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"insecure\": schema.BoolAttribute{\n\t\t\t\t\t\t\tDescription: \"Whether server should be accessed without verifying the TLS certificate. Can be sourced from `KUBE_INSECURE`.\",\n\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"client_certificate\": schema.StringAttribute{\n\t\t\t\t\t\t\tDescription: \"PEM-encoded client certificate for TLS authentication. Can be sourced from `KUBE_CLIENT_CERT_DATA`.\",\n\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"client_key\": schema.StringAttribute{\n\t\t\t\t\t\t\tDescription: \"PEM-encoded client certificate key for TLS authentication. Can be sourced from `KUBE_CLIENT_KEY_DATA`.\",\n\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\tSensitive:   true,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"cluster_ca_certificate\": schema.StringAttribute{\n\t\t\t\t\t\t\tDescription: \"PEM-encoded root certificates bundle for TLS authentication. Can be sourced from `KUBE_CLUSTER_CA_CERT_DATA`.\",\n\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"config_context\": schema.StringAttribute{\n\t\t\t\t\t\t\tDescription: \"Context to choose from the config file. Can be sourced from `KUBE_CTX`.\",\n\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"config_context_auth_info\": schema.StringAttribute{\n\t\t\t\t\t\t\tDescription: \"\",\n\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"config_context_cluster\": schema.StringAttribute{\n\t\t\t\t\t\t\tDescription: \"\",\n\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"token\": schema.StringAttribute{\n\t\t\t\t\t\t\tDescription: \"Token to authenticate an service account. Can be sourced from `KUBE_TOKEN`.\",\n\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\tSensitive:   true,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tBlocks: map[string]schema.Block{\n\t\t\t\t\t\t\"exec\": schema.ListNestedBlock{\n\t\t\t\t\t\t\tValidators: []validator.List{\n\t\t\t\t\t\t\t\tlistvalidator.SizeAtMost(1),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tDescription: \"Configuration block to use an [exec-based credential plugin](https://kubernetes.io/docs/reference/access-authn-authz/authentication/#client-go-credential-plugins), e.g. call an external command to receive user credentials.\",\n\t\t\t\t\t\t\tNestedObject: schema.NestedBlockObject{\n\t\t\t\t\t\t\t\tAttributes: map[string]schema.Attribute{\n\t\t\t\t\t\t\t\t\t\"api_version\": schema.StringAttribute{\n\t\t\t\t\t\t\t\t\t\tDescription: \"API version to use when decoding the ExecCredentials resource, e.g. `client.authentication.k8s.io/v1beta1`.\",\n\t\t\t\t\t\t\t\t\t\tRequired:    true,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"command\": schema.StringAttribute{\n\t\t\t\t\t\t\t\t\t\tDescription: \"Command to execute.\",\n\t\t\t\t\t\t\t\t\t\tRequired:    true,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"env\": schema.MapAttribute{\n\t\t\t\t\t\t\t\t\t\tDescription: \"List of arguments to pass when executing the plugin.\",\n\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\tElementType: types.StringType,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"args\": schema.ListAttribute{\n\t\t\t\t\t\t\t\t\t\tDescription: \"Map of environment variables to set when executing the plugin.\",\n\t\t\t\t\t\t\t\t\t\tOptional:    true,\n\t\t\t\t\t\t\t\t\t\tElementType: types.StringType,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc (p *ArgoCDProvider) ConfigValidators(ctx context.Context) []provider.ConfigValidator {\n\treturn []provider.ConfigValidator{\n\t\t// Don't mix/match different mechanisms used to determine which server to speak to (i.e. how ArgoCD API server is exposed or whether to expose it locally)\n\t\tprovidervalidator.Conflicting(\n\t\t\tpath.MatchRoot(\"port_forward\"),\n\t\t\tpath.MatchRoot(\"port_forward_with_namespace\"),\n\t\t\tpath.MatchRoot(\"server_addr\"),\n\t\t\tpath.MatchRoot(\"use_local_config\"),\n\t\t\tpath.MatchRoot(\"core\"),\n\t\t),\n\t\t// Don't mix/match different authentication mechanisms\n\t\tprovidervalidator.Conflicting(\n\t\t\tpath.MatchRoot(\"auth_token\"),\n\t\t\tpath.MatchRoot(\"password\"),\n\t\t\tpath.MatchRoot(\"use_local_config\"),\n\t\t\tpath.MatchRoot(\"core\"),\n\t\t),\n\t}\n}\n\nfunc (p *ArgoCDProvider) Configure(ctx context.Context, req provider.ConfigureRequest, resp *provider.ConfigureResponse) {\n\tvar config ArgoCDProviderConfig\n\n\t// Read configuration into model\n\tresp.Diagnostics.Append(req.Config.Get(ctx, &config)...)\n\n\tif resp.Diagnostics.HasError() {\n\t\treturn\n\t}\n\n\tserver := NewServerInterface(config)\n\n\tresp.DataSourceData = server\n\tresp.ResourceData = server\n}\n\nfunc (p *ArgoCDProvider) Resources(context.Context) []func() resource.Resource {\n\treturn []func() resource.Resource{\n\t\tNewGPGKeyResource,\n\t\tNewRepositoryResource,\n\t\tNewRepositoryCertificateResource,\n\t\tNewRepositoryCredentialsResource,\n\t\tNewProjectResource,\n\t\tNewProjectTokenResource,\n\t}\n}\n\nfunc (p *ArgoCDProvider) DataSources(context.Context) []func() datasource.DataSource {\n\treturn []func() datasource.DataSource{\n\t\tNewArgoCDApplicationDataSource,\n\t}\n}\n"
  },
  {
    "path": "internal/provider/provider_test.go",
    "content": "package provider\n\nimport (\n\t\"context\"\n\t\"os\"\n\t\"testing\"\n\n\t\"github.com/Masterminds/semver/v3\"\n\t\"github.com/argoproj-labs/terraform-provider-argocd/argocd\"\n\t\"github.com/argoproj-labs/terraform-provider-argocd/internal/features\"\n\t\"github.com/argoproj-labs/terraform-provider-argocd/internal/testhelpers\"\n\t\"github.com/hashicorp/terraform-plugin-framework/providerserver\"\n\t\"github.com/hashicorp/terraform-plugin-go/tfprotov6\"\n\t\"github.com/hashicorp/terraform-plugin-mux/tf5to6server\"\n\t\"github.com/hashicorp/terraform-plugin-mux/tf6muxserver\"\n\t\"github.com/hashicorp/terraform-plugin-testing/helper/resource\"\n)\n\n// testAccProtoV6ProviderFactories are used to instantiate a provider during\n// acceptance testing. The factory function will be invoked for every Terraform\n// CLI command executed to create a provider server to which the CLI can\n// reattach.\nvar testAccProtoV6ProviderFactories = map[string]func() (tfprotov6.ProviderServer, error){\n\t\"argocd\": func() (tfprotov6.ProviderServer, error) {\n\t\tctx := context.Background()\n\n\t\tupgradedSdkServer, err := tf5to6server.UpgradeServer(\n\t\t\tctx,\n\t\t\targocd.Provider().GRPCProvider,\n\t\t)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tproviders := []func() tfprotov6.ProviderServer{\n\t\t\tproviderserver.NewProtocol6(New(\"test\")),\n\t\t\tfunc() tfprotov6.ProviderServer {\n\t\t\t\treturn upgradedSdkServer\n\t\t\t},\n\t\t}\n\n\t\tmuxServer, err := tf6muxserver.NewMuxServer(ctx, providers...)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\treturn muxServer.ProviderServer(), nil\n\t},\n}\n\nfunc TestMain(m *testing.M) {\n\ttesthelpers.TestMain(m)\n}\n\nfunc TestProvider_headers(t *testing.T) {\n\tt.Parallel()\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: `\n\t\t\t\t\tprovider \"argocd\" {\n\t\t\t\t\t\theaders = [\n\t\t\t\t\t\t\t\"Hello: HiThere\",\n\t\t\t\t\t\t]\n\t\t\t\t\t}`,\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc testAccPreCheck(t *testing.T) {\n\tif v := os.Getenv(\"ARGOCD_AUTH_USERNAME\"); v == \"\" {\n\t\tt.Fatal(\"ARGOCD_AUTH_USERNAME must be set for acceptance tests\")\n\t}\n\n\tif v := os.Getenv(\"ARGOCD_AUTH_PASSWORD\"); v == \"\" {\n\t\tt.Fatal(\"ARGOCD_AUTH_PASSWORD must be set for acceptance tests\")\n\t}\n\n\tif v := os.Getenv(\"ARGOCD_SERVER\"); v == \"\" {\n\t\tt.Fatal(\"ARGOCD_SERVER must be set for acceptance tests\")\n\t}\n\n\tif v := os.Getenv(\"ARGOCD_INSECURE\"); v == \"\" {\n\t\tt.Fatal(\"ARGOCD_INSECURE should be set for acceptance tests\")\n\t}\n}\n\n// Skip test if feature is not supported\nfunc testAccPreCheckFeatureSupported(t *testing.T, feature features.Feature) {\n\tv := os.Getenv(\"ARGOCD_VERSION\")\n\tif v == \"\" {\n\t\tt.Skip(\"ARGOCD_VERSION must be set set for feature supported acceptance tests\")\n\t}\n\n\tserverVersion, err := semver.NewVersion(v)\n\tif err != nil {\n\t\tt.Fatalf(\"could not parse ARGOCD_VERSION as semantic version: %s\", v)\n\t}\n\n\tfc, ok := features.ConstraintsMap[feature]\n\tif !ok {\n\t\tt.Fatal(\"feature constraint is not handled by the provider\")\n\t}\n\n\tif i := fc.MinVersion.Compare(serverVersion); i == 1 {\n\t\tt.Skipf(\"version %s does not support feature\", v)\n\t}\n}\n\n// Skip test if feature IS supported (for testing version gate errors)\nfunc testAccPreCheckFeatureNotSupported(t *testing.T, feature features.Feature) {\n\tv := os.Getenv(\"ARGOCD_VERSION\")\n\tif v == \"\" {\n\t\tt.Skip(\"ARGOCD_VERSION must be set for feature not supported acceptance tests\")\n\t}\n\n\tserverVersion, err := semver.NewVersion(v)\n\tif err != nil {\n\t\tt.Fatalf(\"could not parse ARGOCD_VERSION as semantic version: %s\", v)\n\t}\n\n\tfc, ok := features.ConstraintsMap[feature]\n\tif !ok {\n\t\tt.Fatal(\"feature constraint is not handled by the provider\")\n\t}\n\n\tif i := fc.MinVersion.Compare(serverVersion); i != 1 {\n\t\tt.Skipf(\"version %s already supports feature, skipping\", v)\n\t}\n}\n"
  },
  {
    "path": "internal/provider/resource_gpg_key.go",
    "content": "package provider\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/argoproj-labs/terraform-provider-argocd/internal/diagnostics\"\n\t\"github.com/argoproj-labs/terraform-provider-argocd/internal/sync\"\n\t\"github.com/argoproj/argo-cd/v3/pkg/apiclient/gpgkey\"\n\t\"github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1\"\n\t\"github.com/hashicorp/terraform-plugin-framework/diag\"\n\t\"github.com/hashicorp/terraform-plugin-framework/path\"\n\t\"github.com/hashicorp/terraform-plugin-framework/resource\"\n\t\"github.com/hashicorp/terraform-plugin-framework/resource/schema\"\n\t\"github.com/hashicorp/terraform-plugin-log/tflog\"\n)\n\n// Ensure provider defined types fully satisfy framework interfaces.\nvar _ resource.Resource = &gpgKeyResource{}\n\nfunc NewGPGKeyResource() resource.Resource {\n\treturn &gpgKeyResource{}\n}\n\n// gpgKeyResource defines the resource implementation.\ntype gpgKeyResource struct {\n\tsi *ServerInterface\n}\n\nfunc (r *gpgKeyResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse) {\n\tresp.TypeName = req.ProviderTypeName + \"_gpg_key\"\n}\n\nfunc (r *gpgKeyResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) {\n\tresp.Schema = schema.Schema{\n\t\tMarkdownDescription: \"Manages [GPG keys](https://argo-cd.readthedocs.io/en/stable/user-guide/gpg-verification/) within ArgoCD.\",\n\t\tAttributes:          gpgKeySchemaAttributes(),\n\t}\n}\n\nfunc (r *gpgKeyResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse) {\n\t// Prevent panic if the provider has not been configured.\n\tif req.ProviderData == nil {\n\t\treturn\n\t}\n\n\tsi, ok := req.ProviderData.(*ServerInterface)\n\tif !ok {\n\t\tresp.Diagnostics.AddError(\n\t\t\t\"Unexpected Provider Data Type\",\n\t\t\tfmt.Sprintf(\"Expected *ServerInterface, got: %T. Please report this issue to the provider developers.\", req.ProviderData),\n\t\t)\n\n\t\treturn\n\t}\n\n\tr.si = si\n}\n\nfunc (r *gpgKeyResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse) {\n\tvar data gpgKeyModel\n\n\t// Read Terraform configuration data into the model\n\tresp.Diagnostics.Append(req.Plan.Get(ctx, &data)...)\n\n\t// Initialize API clients\n\tresp.Diagnostics.Append(r.si.InitClients(ctx)...)\n\n\t// Check for errors before proceeding\n\tif resp.Diagnostics.HasError() {\n\t\treturn\n\t}\n\n\t// Create GPG key\n\tsync.GPGKeysMutex.Lock()\n\n\tkeys, err := r.si.GPGKeysClient.Create(ctx, &gpgkey.GnuPGPublicKeyCreateRequest{\n\t\tPublickey: &v1alpha1.GnuPGPublicKey{KeyData: data.PublicKey.String()},\n\t})\n\n\tsync.GPGKeysMutex.Unlock()\n\n\tif err != nil {\n\t\tresp.Diagnostics.Append(diagnostics.ArgoCDAPIError(\"create\", \"GPG key\", \"\", err)...)\n\t\treturn\n\t}\n\n\tif keys.Created == nil || len(keys.Created.Items) == 0 {\n\t\tresp.Diagnostics.AddError(\"unexpected response when creating ArgoCD GPG Key - no keys created\", \"\")\n\t\treturn\n\t}\n\n\ttflog.Trace(ctx, fmt.Sprintf(\"created GPG key %s\", keys.Created.Items[0].KeyID))\n\n\t// Parse response and store state\n\tresp.Diagnostics.Append(resp.State.Set(ctx, newGPGKey(&keys.Created.Items[0]))...)\n}\n\nfunc (r *gpgKeyResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) {\n\tvar data gpgKeyModel\n\n\t// Read Terraform prior state data into the model\n\tresp.Diagnostics.Append(req.State.Get(ctx, &data)...)\n\n\t// Initialize API clients\n\tresp.Diagnostics.Append(r.si.InitClients(ctx)...)\n\n\t// Check for errors before proceeding\n\tif resp.Diagnostics.HasError() {\n\t\treturn\n\t}\n\n\t// Read key from API\n\tkey, diags := readGPGKey(ctx, r.si, data.ID.ValueString())\n\tresp.Diagnostics.Append(diags...)\n\n\t// Save updated data into Terraform state\n\tresp.Diagnostics.Append(resp.State.Set(ctx, key)...)\n}\n\nfunc (r *gpgKeyResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) {\n\tvar data gpgKeyModel\n\n\t// Read Terraform prior state data into the model\n\tresp.Diagnostics.Append(req.State.Get(ctx, &data)...)\n\n\t// Initialize API clients\n\tresp.Diagnostics.Append(r.si.InitClients(ctx)...)\n\n\t// Check for errors before proceeding\n\tif resp.Diagnostics.HasError() {\n\t\treturn\n\t}\n\n\t// In general, this resource will be recreated rather than updated. However,\n\t// `Update` will be called on the first apply after an import so we need to\n\t// ensure that we set the state of the computed data by reading the key from\n\t// the API.\n\tkey, diags := readGPGKey(ctx, r.si, data.ID.ValueString())\n\tresp.Diagnostics.Append(diags...)\n\n\t// Save updated data into Terraform state\n\tresp.Diagnostics.Append(resp.State.Set(ctx, key)...)\n}\n\nfunc (r *gpgKeyResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) {\n\tvar data gpgKeyModel\n\n\t// Read Terraform prior state data into the model\n\tresp.Diagnostics.Append(req.State.Get(ctx, &data)...)\n\n\t// Initialize API clients\n\tresp.Diagnostics.Append(r.si.InitClients(ctx)...)\n\n\t// Check for errors before proceeding\n\tif resp.Diagnostics.HasError() {\n\t\treturn\n\t}\n\n\tsync.GPGKeysMutex.Lock()\n\n\t_, err := r.si.GPGKeysClient.Delete(ctx, &gpgkey.GnuPGPublicKeyQuery{\n\t\tKeyID: data.ID.ValueString(),\n\t})\n\n\tsync.GPGKeysMutex.Unlock()\n\n\tif err != nil && !strings.Contains(err.Error(), \"NotFound\") {\n\t\tresp.Diagnostics.Append(diagnostics.ArgoCDAPIError(\"delete\", \"GPG key\", data.ID.ValueString(), err)...)\n\t\treturn\n\t}\n\n\ttflog.Trace(ctx, fmt.Sprintf(\"deleted GPG key %s\", data.ID.ValueString()))\n}\n\nfunc (r *gpgKeyResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) {\n\tresource.ImportStatePassthroughID(ctx, path.Root(\"id\"), req, resp)\n}\n\nfunc readGPGKey(ctx context.Context, si *ServerInterface, id string) (*gpgKeyModel, diag.Diagnostics) {\n\tvar diags diag.Diagnostics\n\n\tsync.GPGKeysMutex.RLock()\n\n\tk, err := si.GPGKeysClient.Get(ctx, &gpgkey.GnuPGPublicKeyQuery{\n\t\tKeyID: id,\n\t})\n\n\tsync.GPGKeysMutex.RUnlock()\n\n\tif err != nil {\n\t\tif !strings.Contains(err.Error(), \"NotFound\") {\n\t\t\tdiags.Append(diagnostics.ArgoCDAPIError(\"read\", \"GPG key\", id, err)...)\n\t\t}\n\n\t\treturn nil, diags\n\t}\n\n\treturn newGPGKey(k), diags\n}\n"
  },
  {
    "path": "internal/provider/resource_gpg_key_test.go",
    "content": "package provider\n\nimport (\n\t\"regexp\"\n\t\"testing\"\n\n\t\"github.com/hashicorp/terraform-plugin-testing/helper/resource\"\n)\n\nfunc TestAccArgoCDGPGKeyResource(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t// Create and Read testing\n\t\t\t{\n\t\t\t\tConfig: `\nresource \"argocd_gpg_key\" \"this\" {\n\tpublic_key = chomp(\n<<-EOF\n-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQINBGSJdlcBEACnza+KvWLyKWUHJPhgs//HRL0EEmA/EcFKioBlrgPNYf/O7hNg\nKT3NDaNrD26pr+bOb4mfaqNNS9no8b9EP3C7Co3Wf2d4xpJ5/hlpIm3V652S5daZ\nI7ylVT8QOrhaqEnHH2hEcOfDaqjrYfrx3qiI8v7DmV6jfGi1tDUUgfJwiOyZk4q1\njiPo5k4+XNp9mCtUAGyidLFcUqQ9XbHKgBwgAoxtIKNSbdPCGhsjgTHHhzswMH/Z\nDhhtcraqrfOhoP9lI4/zyCS+B9OfUy7BS/1SqWKIgdsjFIR+zHIOI69lh77+ZAVE\nMVYJBdFke5/g/tTPaQGuBqaIJ3d/Mi/ZlbTsoBcq5qam73uh7fcgBV5la6NeuNcR\ntvKMVl4DlnkJS8LBtElLEeHEylTCdNltrUFwshDKDBtq6ilTKCK14R6g4lkn8VcE\n9xx7Mhdh77tp66FRZ6ge1E8EUEFwEeFhp240KRyaA5U1/kAarn8083zZ7d4+QObp\nL4KMqgrwLaxyPLgu0J/f946qLewV7XsbZRXE1jQa9Z7W5TEoJwjcC79DXe1wChc6\ncBfCtluDsnklwvldpKTEZU0q/hKE6Zt7NjLUyExV+5guoHllxoVxx7sh+jtKm/J+\n5gh+B3xOTDxRV2XYIx1TM6U1iLxAqchzFec8dfkuTbs/5f++PrddvZfiUQARAQAB\ntD1BcmdvQ0QgVGVycmFmb3JtIFByb3ZpZGVyIDxmYWtldXNlckB1c2Vycy5ub3Jl\ncGx5LmdpdGh1Yi5jb20+iQJOBBMBCgA4FiEEvK9bNlncXDhFAk6kmtkpVUAdOI0F\nAmSJdlcCGwMFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQmtkpVUAdOI2FdA//\nYuFYsX6SUVgI4l68ZHE34jLTWU5R2ujB6luErcguAlLyDtrD3melva3V/ETc69/1\n5o7Ayn3a7uz5lCEvUSLsCN+V2o3EjrA81pt8Zs+Z9WYeZE5F5DnKzq81PObdASB7\nPo2X0qLqqKIhpQxc/E7m26xmePCf82H36gtvPiEVmVA5yduk1lLG3aZtNIRCa4VK\ngmDjR8Se+OZeAw7JQCOeJB9/Y8oQ8nVkj1SWNIICaUwIXHtrj7r1z6XTDAEkGeBg\nHXW8IEhZDE1Nq3vQtZvgwftEoPT/Ff+8DwvL1JUov2ObQDolallzKaiiVfGZhPJZ\n4PMtEPEmSL9QWJAG5jiBVC3BdVZtXBNkC1HqTCXwZc/wzp5O9MmMXmCrUFr4FfHu\nIZ560MNpp/SrtUrOahLmvuG0B+Ze96e2nm5ap5wkCDaQouOIqM7Lj+FGq64cu2B/\noSsl7joBZQUYXv8meNOQssm6jArRLG2oFoiEdRqzd2/RjvvJliLN9OCNvV43f38h\n8Ep8RDi9RiHhSKvwrvDD9x/JRm6zQUetjrctmjdIYp8k129LrD0Qr9ULXfphZdrv\nxga7/lyQLmukLu7Mxwp+ss2bY/wjT8mlT5P55kBpXXyYILhLsUESCHG6D8/Ov+vv\nOoZS+BSfe/0vc1aTfDKxj5wAx27a6z5o25X27feEl3U=\n=kqkH\n-----END PGP PUBLIC KEY BLOCK-----\nEOF\n)\n}\n\t\t\t\t`,\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_gpg_key.this\", \"id\", \"9AD92955401D388D\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_gpg_key.this\", \"fingerprint\", \"BCAF5B3659DC5C3845024EA49AD92955401D388D\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_gpg_key.this\", \"owner\", \"ArgoCD Terraform Provider <fakeuser@users.noreply.github.com>\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_gpg_key.this\", \"sub_type\", \"rsa4096\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_gpg_key.this\", \"trust\", \"unknown\"),\n\t\t\t\t),\n\t\t\t},\n\t\t\t// ImportState testing\n\t\t\t{\n\t\t\t\tResourceName:      \"argocd_gpg_key.this\",\n\t\t\t\tImportState:       true,\n\t\t\t\tImportStateVerify: true,\n\t\t\t},\n\t\t\t// Update (i.e. recreate)\n\t\t\t{\n\t\t\t\tConfig: `\nresource \"argocd_gpg_key\" \"this\" {\n\tpublic_key = <<EOF\n-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQINBGSJpQYBEADIy7tAUiB7m5D159KphRN+E+5gc735v6wCqQz2IDpy1pvYpMeK\n5N2MATUam6KAzRDTrfAPY4ztyFMTvzH3MuXZKgRFo/diUcYsT+lORRVgGELJQ4Jc\nnC52vr5LmiLpTf4BQg8Er8dsCrLwPHUuUENbSigPPXtltIxYlkWRVutXcGKMuqNY\ntYz8/UmT19dwsM5ZVyVbFfugymLP/ig2TT7s+oYIbTicoZZLtTXAP7oARK9NB23e\nbOJUCsBJxyqGRor0AJ5pnkH18MYqWnrmEZrhkrsYdOS39+JWheadM1/w1v3CcDHa\nprFiaWtuJovTTfa4NZi8982MV9IXAe1q/vTIjTWZDWNjyQhSASucNmHPwynczwTX\nEnhqJn2G5STk+qnOcxEbcCcUx7eUEHPfHf1S+ubP9pjOCZhvwRiBNDxZAagp+Owj\n9jC7m+AtCZ+qEoMKWMfm8KDmwt+1frfUSa4kMH6IX8OgLj1fcRSa0lGicuPf8N8z\n1oEf2MvIg/Ey/vZGuj8nC/gafJuPOiwbLhSwXzPrXtdwvKjerGjJXFmxrBT2vVVc\nUHUIPxktY5DAzwz3g2HKItNTuuK7fBwiT4a4XdkZweEU9ay3LeG10tnjbMianHhw\nw0tQame9/fN4x/2UQGdwraOBWHlKtODcCdkGwh4OJGi/ONU0dRf4pjDfXwARAQAB\ntD1BcmdvQ0QgVGVycmFmb3JtIFByb3ZpZGVyIDxmYWtldXNlckB1c2Vycy5ub3Jl\ncGx5LmdpdGh1Yi5jb20+iQJOBBMBCgA4FiEEkIF5sfPAA3XyA8qv4a1Re5E3tjUF\nAmSJpQYCGwMFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQ4a1Re5E3tjWIdRAA\nll5uXni1Q8U+su5HkSt8sam46VJfXXDm1SGNZDXNDWEzUY+LXhtirpHMIAZH4sms\nqph36okx+nrX7GowAP3NRYPgYibtP4Fbc1m19VmVxWNd7l7nr3k0apgsT+69tPRe\n2ZwjFuLJeQJknGQnbPkPB22mvyG7zJv9JrVgo7nsYeIufoeCzFl2sx5c1uQS5NW3\nD+eJP5s1ZmZj7fm/d8J1R/TX9Da527VUG1Q25bOuOxFoLpHMCNT0ABySLTOawCGU\n4I3AURp1sHH78hT/X4gzwnADUPoVN6PfkUbkkVRoL88jpyI4AHIOJBKF/RwoC+AS\nM3R7utv7JctVE3SkbWH0/4ihbV2mnYQWXSCgMLrJ4MT7pe4EvnZ4rHkZLEQxkGmR\nMriiEvnqv4lhReygXw8bsciWm2KpqwxmJ2Vas7fMiIi//aAgzxLrC0cQCdc29KeV\npQS7vdV1OFghoL0y16OQ/ZIAdrmm11zKCl/iDxueOdxIuD2qKT+YKDVySOO4HPGD\n3JRmebwT2CNmK09T8dp06LDovVUNvc7reBQ7aFsjhtvnzedoKhOuoIHyZVfMWklv\nPtP70LwbQoVm073lQUsXiARC5UTA/RdqDgVrpgWtk6rs/uKHxkiOg20eMRGPaPV1\nsrrz5Qn8Ao4EGwXUs1Qg5yhCecqErcaSyaVNri7Jx2k=\n=falI\n-----END PGP PUBLIC KEY BLOCK-----\nEOF\n}\n\t\t\t\t`,\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_gpg_key.this\", \"id\", \"E1AD517B9137B635\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_gpg_key.this\", \"fingerprint\", \"908179B1F3C00375F203CAAFE1AD517B9137B635\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_gpg_key.this\", \"owner\", \"ArgoCD Terraform Provider <fakeuser@users.noreply.github.com>\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_gpg_key.this\", \"sub_type\", \"rsa4096\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_gpg_key.this\", \"trust\", \"unknown\"),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDGPGKeyResource_Invalid_NotAGPGKey(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: `\nresource \"argocd_gpg_key\" \"invalid\" {\n\tpublic_key = \"invalid\"\n}\n\t\t\t\t`,\n\t\t\t\tExpectError: regexp.MustCompile(\"Invalid PGP Public Key\"),\n\t\t\t},\n\t\t},\n\t})\n}\n"
  },
  {
    "path": "internal/provider/resource_project.go",
    "content": "package provider\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/argoproj-labs/terraform-provider-argocd/internal/diagnostics\"\n\t\"github.com/argoproj-labs/terraform-provider-argocd/internal/features\"\n\targocdSync \"github.com/argoproj-labs/terraform-provider-argocd/internal/sync\"\n\t\"github.com/argoproj/argo-cd/v3/pkg/apiclient/project\"\n\t\"github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1\"\n\t\"github.com/hashicorp/terraform-plugin-framework/diag\"\n\t\"github.com/hashicorp/terraform-plugin-framework/resource\"\n\t\"github.com/hashicorp/terraform-plugin-framework/resource/schema\"\n\t\"github.com/hashicorp/terraform-plugin-framework/types\"\n\t\"github.com/hashicorp/terraform-plugin-log/tflog\"\n\tmetav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\"\n)\n\n// Ensure provider defined types fully satisfy framework interfaces.\nvar _ resource.Resource = &projectResource{}\n\nfunc NewProjectResource() resource.Resource {\n\treturn &projectResource{}\n}\n\ntype projectResource struct {\n\tsi *ServerInterface\n}\n\nfunc (r *projectResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse) {\n\tresp.TypeName = req.ProviderTypeName + \"_project\"\n}\n\nfunc (r *projectResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) {\n\tresp.Schema = schema.Schema{\n\t\tMarkdownDescription: \"Manages [projects](https://argo-cd.readthedocs.io/en/stable/user-guide/projects/) within ArgoCD.\",\n\t\tVersion:             2,\n\t\tAttributes: map[string]schema.Attribute{\n\t\t\t\"id\": schema.StringAttribute{\n\t\t\t\tDescription: \"Project identifier\",\n\t\t\t\tComputed:    true,\n\t\t\t},\n\t\t},\n\t\tBlocks: projectSchemaBlocks(),\n\t}\n}\n\nfunc (r *projectResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse) {\n\t// Prevent panic if the provider has not been configured.\n\tif req.ProviderData == nil {\n\t\treturn\n\t}\n\n\tsi, ok := req.ProviderData.(*ServerInterface)\n\tif !ok {\n\t\tresp.Diagnostics.AddError(\n\t\t\t\"Unexpected Provider Data Type\",\n\t\t\tfmt.Sprintf(\"Expected *ServerInterface, got: %T. Please report this issue to the provider developers.\", req.ProviderData),\n\t\t)\n\n\t\treturn\n\t}\n\n\tr.si = si\n}\n\nfunc (r *projectResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse) {\n\tvar data projectModel\n\n\t// Read Terraform configuration data into the model\n\tresp.Diagnostics.Append(req.Plan.Get(ctx, &data)...)\n\n\t// Initialize API clients\n\tresp.Diagnostics.Append(r.si.InitClients(ctx)...)\n\n\t// Check for errors before proceeding\n\tif resp.Diagnostics.HasError() {\n\t\treturn\n\t}\n\n\t// Validate that spec list is not empty\n\tif len(data.Spec) == 0 {\n\t\tresp.Diagnostics.AddError(\n\t\t\t\"Invalid Configuration\",\n\t\t\t\"spec block is required but not provided\",\n\t\t)\n\n\t\treturn\n\t}\n\n\t// Convert model to ArgoCD project\n\tobjectMeta, spec, diags := expandProject(ctx, &data)\n\tresp.Diagnostics.Append(diags...)\n\n\tif resp.Diagnostics.HasError() {\n\t\treturn\n\t}\n\n\tprojectName := objectMeta.Name\n\n\tmodel := data.Spec[0]\n\n\t// Check feature support\n\tif !r.si.IsFeatureSupported(features.ProjectSourceNamespaces) && len(model.SourceNamespaces) > 0 {\n\t\tresp.Diagnostics.Append(diagnostics.FeatureNotSupported(features.ProjectSourceNamespaces)...)\n\t\treturn\n\t}\n\n\tif !r.si.IsFeatureSupported(features.ProjectDestinationServiceAccounts) && len(model.DestinationServiceAccount) > 0 {\n\t\tresp.Diagnostics.Append(diagnostics.FeatureNotSupported(features.ProjectDestinationServiceAccounts)...)\n\t\treturn\n\t}\n\n\t// Get or create project mutex safely\n\tprojectMutex := argocdSync.GetProjectMutex(projectName)\n\tprojectMutex.Lock()\n\tdefer projectMutex.Unlock()\n\n\t// Check if project already exists\n\tp, err := r.si.ProjectClient.Get(ctx, &project.ProjectQuery{\n\t\tName: projectName,\n\t})\n\tif err != nil && !strings.Contains(err.Error(), \"NotFound\") {\n\t\tresp.Diagnostics.Append(diagnostics.ArgoCDAPIError(\"get\", \"project\", projectName, err)...)\n\t\treturn\n\t} else if p != nil {\n\t\tswitch p.DeletionTimestamp {\n\t\tcase nil:\n\t\tdefault:\n\t\t\t// Pre-existing project is still in Kubernetes soft deletion queue\n\t\t\tif p.DeletionGracePeriodSeconds != nil {\n\t\t\t\ttime.Sleep(time.Duration(*p.DeletionGracePeriodSeconds) * time.Second)\n\t\t\t}\n\t\t}\n\t}\n\n\t// Create project\n\tp, err = r.si.ProjectClient.Create(ctx, &project.ProjectCreateRequest{\n\t\tProject: &v1alpha1.AppProject{\n\t\t\tObjectMeta: objectMeta,\n\t\t\tSpec:       spec,\n\t\t},\n\t\tUpsert: false,\n\t})\n\n\tif err != nil {\n\t\tresp.Diagnostics.Append(diagnostics.ArgoCDAPIError(\"create\", \"project\", projectName, err)...)\n\t\treturn\n\t} else if p == nil {\n\t\tresp.Diagnostics.AddError(\n\t\t\t\"Project Creation Failed\",\n\t\t\tfmt.Sprintf(\"project %s could not be created: unknown reason\", projectName),\n\t\t)\n\n\t\treturn\n\t}\n\n\ttflog.Trace(ctx, fmt.Sprintf(\"created project %s\", projectName))\n\n\t// Parse response and store state\n\tprojectData := newProject(p)\n\tprojectData.ID = types.StringValue(projectName)\n\n\t// Preserve empty lists from plan that ArgoCD might have normalized to null (issue #788)\n\tpreserveEmptyLists(&data.Spec[0], &projectData.Spec[0])\n\n\tresp.Diagnostics.Append(resp.State.Set(ctx, projectData)...)\n}\n\n// preserveEmptyLists applies preservation logic to ensure empty lists and null values from the source\n// are not lost when the ArgoCD API normalizes them.\nfunc preserveEmptyLists(sourceModel, apiModel *projectSpecModel) {\n\t// Preserve top-level empty lists\n\tif sourceModel.SourceRepos != nil && len(sourceModel.SourceRepos) == 0 && apiModel.SourceRepos == nil {\n\t\tapiModel.SourceRepos = make([]types.String, 0)\n\t}\n\tif sourceModel.SignatureKeys != nil && len(sourceModel.SignatureKeys) == 0 && apiModel.SignatureKeys == nil {\n\t\tapiModel.SignatureKeys = make([]types.String, 0)\n\t}\n\tif sourceModel.SourceNamespaces != nil && len(sourceModel.SourceNamespaces) == 0 && apiModel.SourceNamespaces == nil {\n\t\tapiModel.SourceNamespaces = make([]types.String, 0)\n\t}\n\n\t// Preserve empty groups lists in roles\n\tfor i := range apiModel.Role {\n\t\tapiRole := &apiModel.Role[i]\n\t\tfor j := range sourceModel.Role {\n\t\t\tsourceRole := &sourceModel.Role[j]\n\t\t\tif apiRole.Name.Equal(sourceRole.Name) {\n\t\t\t\tif sourceRole.Groups != nil && len(sourceRole.Groups) == 0 && apiRole.Groups == nil {\n\t\t\t\t\tapiRole.Groups = make([]types.String, 0)\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\t// Preserve empty lists and null values in sync windows (match by identifying fields since sync_window is a Set)\n\tfor i := range apiModel.SyncWindow {\n\t\tapiSync := &apiModel.SyncWindow[i]\n\t\tfor j := range sourceModel.SyncWindow {\n\t\t\tsourceSync := &sourceModel.SyncWindow[j]\n\t\t\t// Match sync windows by their identifying fields\n\t\t\tif apiSync.Kind.Equal(sourceSync.Kind) &&\n\t\t\t\tapiSync.Schedule.Equal(sourceSync.Schedule) &&\n\t\t\t\tapiSync.Duration.Equal(sourceSync.Duration) {\n\t\t\t\tif sourceSync.Applications != nil && len(sourceSync.Applications) == 0 && apiSync.Applications == nil {\n\t\t\t\t\tapiSync.Applications = make([]types.String, 0)\n\t\t\t\t}\n\t\t\t\tif sourceSync.Clusters != nil && len(sourceSync.Clusters) == 0 && apiSync.Clusters == nil {\n\t\t\t\t\tapiSync.Clusters = make([]types.String, 0)\n\t\t\t\t}\n\t\t\t\tif sourceSync.Namespaces != nil && len(sourceSync.Namespaces) == 0 && apiSync.Namespaces == nil {\n\t\t\t\t\tapiSync.Namespaces = make([]types.String, 0)\n\t\t\t\t}\n\t\t\t\t// Preserve null for manual_sync if it wasn't specified in source (issue #788)\n\t\t\t\t// API returns false (zero value) but source has null when not specified\n\t\t\t\tif sourceSync.ManualSync.IsNull() && apiSync.ManualSync.Equal(types.BoolValue(false)) {\n\t\t\t\t\tapiSync.ManualSync = types.BoolNull()\n\t\t\t\t}\n\n\t\t\t\tif sourceSync.UseAndOperator.IsNull() && apiSync.UseAndOperator.Equal(types.BoolValue(false)) {\n\t\t\t\t\tapiSync.UseAndOperator = types.BoolNull()\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunc (r *projectResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) {\n\tvar data projectModel\n\n\t// Read Terraform prior state data into the model\n\tresp.Diagnostics.Append(req.State.Get(ctx, &data)...)\n\n\t// Check for errors before proceeding\n\tif resp.Diagnostics.HasError() {\n\t\treturn\n\t}\n\n\tprojectName := data.Metadata[0].Name.ValueString()\n\n\t// Get or create project mutex safely\n\tprojectMutex := argocdSync.GetProjectMutex(projectName)\n\tprojectMutex.RLock()\n\tdefer projectMutex.RUnlock()\n\n\tr.readUnsafe(ctx, data, nil, projectName, resp)\n}\n\nfunc (r *projectResource) readUnsafe(ctx context.Context, data projectModel, plan *projectModel, projectName string, resp *resource.ReadResponse) {\n\t// Initialize API clients\n\tresp.Diagnostics.Append(r.si.InitClients(ctx)...)\n\n\t// Check for errors before proceeding\n\tif resp.Diagnostics.HasError() {\n\t\treturn\n\t}\n\n\t// Validate that metadata list is not empty\n\tif len(data.Metadata) == 0 {\n\t\tresp.Diagnostics.AddError(\n\t\t\t\"Invalid State\",\n\t\t\t\"metadata block is missing from state\",\n\t\t)\n\n\t\treturn\n\t}\n\n\tp, err := r.si.ProjectClient.Get(ctx, &project.ProjectQuery{\n\t\tName: projectName,\n\t})\n\tif err != nil {\n\t\tif strings.Contains(err.Error(), \"NotFound\") {\n\t\t\tresp.State.RemoveResource(ctx)\n\t\t\treturn\n\t\t}\n\n\t\tresp.Diagnostics.Append(diagnostics.ArgoCDAPIError(\"read\", \"project\", projectName, err)...)\n\n\t\treturn\n\t}\n\n\t// Save updated data into Terraform state\n\tapiData := newProject(p)\n\tapiData.ID = types.StringValue(projectName)\n\n\t// Preserve empty lists from prior state/plan that ArgoCD might have normalized to null (issue #788)\n\t// Use plan if provided (during Update), otherwise use prior state (during Read)\n\tif len(data.Spec) > 0 {\n\t\tsourceModel := &data.Spec[0]\n\t\tif plan != nil && len(plan.Spec) > 0 {\n\t\t\tsourceModel = &plan.Spec[0]\n\t\t}\n\t\tpreserveEmptyLists(sourceModel, &apiData.Spec[0])\n\t}\n\n\tresp.Diagnostics.Append(resp.State.Set(ctx, apiData)...)\n}\n\nfunc (r *projectResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) {\n\tvar data projectModel\n\n\t// Read Terraform plan data into the model\n\tresp.Diagnostics.Append(req.Plan.Get(ctx, &data)...)\n\n\t// Initialize API clients\n\tresp.Diagnostics.Append(r.si.InitClients(ctx)...)\n\n\t// Check for errors before proceeding\n\tif resp.Diagnostics.HasError() {\n\t\treturn\n\t}\n\n\t// Validate that spec list is not empty\n\tif len(data.Spec) == 0 {\n\t\tresp.Diagnostics.AddError(\n\t\t\t\"Invalid Configuration\",\n\t\t\t\"spec block is required but not provided\",\n\t\t)\n\n\t\treturn\n\t}\n\n\t// Convert model to ArgoCD project\n\tobjectMeta, spec, diags := expandProject(ctx, &data)\n\tresp.Diagnostics.Append(diags...)\n\n\tif resp.Diagnostics.HasError() {\n\t\treturn\n\t}\n\n\tprojectName := objectMeta.Name\n\n\t// Check feature support\n\tif !r.si.IsFeatureSupported(features.ProjectSourceNamespaces) && len(data.Spec[0].SourceNamespaces) > 0 {\n\t\tresp.Diagnostics.Append(diagnostics.FeatureNotSupported(features.ProjectSourceNamespaces)...)\n\t\treturn\n\t}\n\n\tif !r.si.IsFeatureSupported(features.ProjectDestinationServiceAccounts) && len(data.Spec[0].DestinationServiceAccount) > 0 {\n\t\tresp.Diagnostics.Append(diagnostics.FeatureNotSupported(features.ProjectDestinationServiceAccounts)...)\n\t\treturn\n\t}\n\n\t// Get or create project mutex safely\n\tprojectMutex := argocdSync.GetProjectMutex(projectName)\n\tprojectMutex.Lock()\n\tdefer projectMutex.Unlock()\n\n\t// Get current project\n\tp, err := r.si.ProjectClient.Get(ctx, &project.ProjectQuery{\n\t\tName: projectName,\n\t})\n\tif err != nil {\n\t\tresp.Diagnostics.Append(diagnostics.ArgoCDAPIError(\"get\", \"project\", projectName, err)...)\n\t\treturn\n\t}\n\n\t// Preserve preexisting JWTs for managed roles\n\troles := expandProjectRoles(ctx, data.Spec[0].Role)\n\tfor _, r := range roles {\n\t\tvar pr *v1alpha1.ProjectRole\n\n\t\tvar i int\n\n\t\tpr, i, err = p.GetRoleByName(r.Name)\n\t\tif err != nil {\n\t\t\t// i == -1 means the role does not exist and was recently added\n\t\t\tif i != -1 {\n\t\t\t\tresp.Diagnostics.AddError(\n\t\t\t\t\t\"Project Role Retrieval Failed\",\n\t\t\t\t\tfmt.Sprintf(\"project role %s could not be retrieved: %s\", r.Name, err.Error()),\n\t\t\t\t)\n\n\t\t\t\treturn\n\t\t\t}\n\t\t} else {\n\t\t\t// Only preserve preexisting JWTs for managed roles if we found an existing matching project\n\t\t\tspec.Roles[i].JWTTokens = pr.JWTTokens\n\t\t}\n\t}\n\n\t// Update project\n\tprojectRequest := &project.ProjectUpdateRequest{\n\t\tProject: &v1alpha1.AppProject{\n\t\t\tObjectMeta: objectMeta,\n\t\t\tSpec:       spec,\n\t\t},\n\t}\n\n\t// Kubernetes API requires providing the up-to-date correct ResourceVersion for updates\n\tprojectRequest.Project.ResourceVersion = p.ResourceVersion\n\n\t_, err = r.si.ProjectClient.Update(ctx, projectRequest)\n\tif err != nil {\n\t\tresp.Diagnostics.Append(diagnostics.ArgoCDAPIError(\"update\", \"project\", projectName, err)...)\n\t\treturn\n\t}\n\n\ttflog.Trace(ctx, fmt.Sprintf(\"updated project %s\", projectName))\n\n\t// Read updated resource with plan context for proper empty list preservation\n\treadReq := resource.ReadRequest{State: req.State}\n\treadResp := resource.ReadResponse{State: resp.State, Diagnostics: resp.Diagnostics}\n\n\tvar updatedData projectModel\n\n\t// Read Terraform state data into the model\n\tresp.Diagnostics.Append(readReq.State.Get(ctx, &updatedData)...)\n\n\t// Pass plan to readUnsafe so it uses the plan (not old state) for preservation\n\tr.readUnsafe(ctx, updatedData, &data, projectName, &readResp)\n\n\tresp.State = readResp.State\n\tresp.Diagnostics = readResp.Diagnostics\n}\n\nfunc (r *projectResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) {\n\tvar data projectModel\n\n\t// Read Terraform prior state data into the model\n\tresp.Diagnostics.Append(req.State.Get(ctx, &data)...)\n\n\t// Initialize API clients\n\tresp.Diagnostics.Append(r.si.InitClients(ctx)...)\n\n\t// Check for errors before proceeding\n\tif resp.Diagnostics.HasError() {\n\t\treturn\n\t}\n\n\t// Validate that metadata list is not empty\n\tif len(data.Metadata) == 0 {\n\t\tresp.Diagnostics.AddError(\n\t\t\t\"Invalid State\",\n\t\t\t\"metadata block is missing from state\",\n\t\t)\n\n\t\treturn\n\t}\n\n\tprojectName := data.Metadata[0].Name.ValueString()\n\n\t// Get or create project mutex safely\n\tprojectMutex := argocdSync.GetProjectMutex(projectName)\n\tprojectMutex.Lock()\n\tdefer projectMutex.Unlock()\n\n\t_, err := r.si.ProjectClient.Delete(ctx, &project.ProjectQuery{Name: projectName})\n\n\tif err != nil && !strings.Contains(err.Error(), \"NotFound\") {\n\t\tresp.Diagnostics.Append(diagnostics.ArgoCDAPIError(\"delete\", \"project\", projectName, err)...)\n\t\treturn\n\t}\n\n\ttflog.Trace(ctx, fmt.Sprintf(\"deleted project %s\", projectName))\n}\n\nfunc (r *projectResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) {\n\t// Initialize API clients\n\tresp.Diagnostics.Append(r.si.InitClients(ctx)...)\n\n\tif resp.Diagnostics.HasError() {\n\t\treturn\n\t}\n\n\t// Try to get the project from ArgoCD to verify it exists\n\tp, err := r.si.ProjectClient.Get(ctx, &project.ProjectQuery{\n\t\tName: req.ID,\n\t})\n\tif err != nil {\n\t\tif strings.Contains(err.Error(), \"NotFound\") {\n\t\t\tresp.Diagnostics.AddError(\n\t\t\t\t\"Cannot import non-existent remote object\",\n\t\t\t\tfmt.Sprintf(\"Project %s does not exist in ArgoCD\", req.ID),\n\t\t\t)\n\n\t\t\treturn\n\t\t}\n\n\t\tresp.Diagnostics.Append(diagnostics.ArgoCDAPIError(\"get\", \"project\", req.ID, err)...)\n\n\t\treturn\n\t}\n\n\t// If project exists, populate the state with the full project data\n\tprojectData := newProject(p)\n\tprojectData.ID = types.StringValue(req.ID)\n\tresp.Diagnostics.Append(resp.State.Set(ctx, projectData)...)\n}\n\n// expandProject converts the Terraform model to ArgoCD API types\nfunc expandProject(ctx context.Context, data *projectModel) (metav1.ObjectMeta, v1alpha1.AppProjectSpec, diag.Diagnostics) {\n\tvar diags diag.Diagnostics\n\n\t// Validate that metadata list is not empty\n\tif len(data.Metadata) == 0 {\n\t\tdiags.AddError(\n\t\t\t\"Invalid Configuration\",\n\t\t\t\"metadata block is required but not provided\",\n\t\t)\n\n\t\treturn metav1.ObjectMeta{}, v1alpha1.AppProjectSpec{}, diags\n\t}\n\n\t// Validate that spec list is not empty\n\tif len(data.Spec) == 0 {\n\t\tdiags.AddError(\n\t\t\t\"Invalid Configuration\",\n\t\t\t\"spec block is required but not provided\",\n\t\t)\n\n\t\treturn metav1.ObjectMeta{}, v1alpha1.AppProjectSpec{}, diags\n\t}\n\n\tobjectMeta := metav1.ObjectMeta{\n\t\tName:      data.Metadata[0].Name.ValueString(),\n\t\tNamespace: data.Metadata[0].Namespace.ValueString(),\n\t}\n\n\tif len(data.Metadata[0].Labels) > 0 {\n\t\tlabels := make(map[string]string)\n\t\tfor k, v := range data.Metadata[0].Labels {\n\t\t\tlabels[k] = v.ValueString()\n\t\t}\n\n\t\tobjectMeta.Labels = labels\n\t}\n\n\tif len(data.Metadata[0].Annotations) > 0 {\n\t\tannotations := make(map[string]string)\n\t\tfor k, v := range data.Metadata[0].Annotations {\n\t\t\tannotations[k] = v.ValueString()\n\t\t}\n\n\t\tobjectMeta.Annotations = annotations\n\t}\n\n\tspec := v1alpha1.AppProjectSpec{}\n\n\tif !data.Spec[0].Description.IsNull() {\n\t\tspec.Description = data.Spec[0].Description.ValueString()\n\t}\n\n\t// Convert source repos\n\t// Initialize to empty slice if set (even if empty) to maintain empty list vs null distinction\n\t// This fixes issue #788 where empty lists were incorrectly converted to null\n\tif data.Spec[0].SourceRepos != nil {\n\t\tspec.SourceRepos = make([]string, 0, len(data.Spec[0].SourceRepos))\n\t\tfor _, repo := range data.Spec[0].SourceRepos {\n\t\t\tspec.SourceRepos = append(spec.SourceRepos, repo.ValueString())\n\t\t}\n\t}\n\n\t// Convert signature keys\n\t// Initialize to empty slice if set (even if empty) to maintain empty list vs null distinction\n\tif data.Spec[0].SignatureKeys != nil {\n\t\tspec.SignatureKeys = make([]v1alpha1.SignatureKey, 0, len(data.Spec[0].SignatureKeys))\n\t\tfor _, key := range data.Spec[0].SignatureKeys {\n\t\t\tspec.SignatureKeys = append(spec.SignatureKeys, v1alpha1.SignatureKey{KeyID: key.ValueString()})\n\t\t}\n\t}\n\n\t// Convert source namespaces\n\t// Initialize to empty slice if set (even if empty) to maintain empty list vs null distinction\n\tif data.Spec[0].SourceNamespaces != nil {\n\t\tspec.SourceNamespaces = make([]string, 0, len(data.Spec[0].SourceNamespaces))\n\t\tfor _, ns := range data.Spec[0].SourceNamespaces {\n\t\t\tspec.SourceNamespaces = append(spec.SourceNamespaces, ns.ValueString())\n\t\t}\n\t}\n\n\t// Convert destinations\n\tfor _, dest := range data.Spec[0].Destination {\n\t\td := v1alpha1.ApplicationDestination{\n\t\t\tNamespace: dest.Namespace.ValueString(),\n\t\t}\n\t\tif !dest.Server.IsNull() {\n\t\t\td.Server = dest.Server.ValueString()\n\t\t}\n\n\t\tif !dest.Name.IsNull() {\n\t\t\td.Name = dest.Name.ValueString()\n\t\t}\n\n\t\tspec.Destinations = append(spec.Destinations, d)\n\t}\n\n\t// Convert destination service accounts\n\tfor _, dsa := range data.Spec[0].DestinationServiceAccount {\n\t\td := v1alpha1.ApplicationDestinationServiceAccount{\n\t\t\tDefaultServiceAccount: dsa.DefaultServiceAccount.ValueString(),\n\t\t\tServer:                dsa.Server.ValueString(),\n\t\t}\n\t\tif !dsa.Namespace.IsNull() {\n\t\t\td.Namespace = dsa.Namespace.ValueString()\n\t\t}\n\n\t\tspec.DestinationServiceAccounts = append(spec.DestinationServiceAccounts, d)\n\t}\n\n\t// Convert cluster resource blacklist\n\tfor _, gk := range data.Spec[0].ClusterResourceBlacklist {\n\t\tspec.ClusterResourceBlacklist = append(spec.ClusterResourceBlacklist, v1alpha1.ClusterResourceRestrictionItem{\n\t\t\tGroup: gk.Group.ValueString(),\n\t\t\tKind:  gk.Kind.ValueString(),\n\t\t})\n\t}\n\n\t// Convert cluster resource whitelist\n\tfor _, gk := range data.Spec[0].ClusterResourceWhitelist {\n\t\tspec.ClusterResourceWhitelist = append(spec.ClusterResourceWhitelist, v1alpha1.ClusterResourceRestrictionItem{\n\t\t\tGroup: gk.Group.ValueString(),\n\t\t\tKind:  gk.Kind.ValueString(),\n\t\t})\n\t}\n\n\t// Convert namespace resource blacklist\n\tfor _, gk := range data.Spec[0].NamespaceResourceBlacklist {\n\t\tspec.NamespaceResourceBlacklist = append(spec.NamespaceResourceBlacklist, metav1.GroupKind{\n\t\t\tGroup: gk.Group.ValueString(),\n\t\t\tKind:  gk.Kind.ValueString(),\n\t\t})\n\t}\n\n\t// Convert namespace resource whitelist\n\tfor _, gk := range data.Spec[0].NamespaceResourceWhitelist {\n\t\tspec.NamespaceResourceWhitelist = append(spec.NamespaceResourceWhitelist, metav1.GroupKind{\n\t\t\tGroup: gk.Group.ValueString(),\n\t\t\tKind:  gk.Kind.ValueString(),\n\t\t})\n\t}\n\n\t// Convert orphaned resources\n\tif len(data.Spec[0].OrphanedResources) > 0 {\n\t\tor := data.Spec[0].OrphanedResources[0]\n\t\tspec.OrphanedResources = &v1alpha1.OrphanedResourcesMonitorSettings{}\n\n\t\tif !or.Warn.IsNull() {\n\t\t\tspec.OrphanedResources.Warn = or.Warn.ValueBoolPointer()\n\t\t}\n\n\t\tfor _, ignore := range or.Ignore {\n\t\t\ti := v1alpha1.OrphanedResourceKey{\n\t\t\t\tGroup: ignore.Group.ValueString(),\n\t\t\t\tKind:  ignore.Kind.ValueString(),\n\t\t\t}\n\t\t\tif !ignore.Name.IsNull() {\n\t\t\t\ti.Name = ignore.Name.ValueString()\n\t\t\t}\n\n\t\t\tspec.OrphanedResources.Ignore = append(spec.OrphanedResources.Ignore, i)\n\t\t}\n\t}\n\n\t// Convert roles\n\tspec.Roles = expandProjectRoles(ctx, data.Spec[0].Role)\n\n\t// Convert sync windows\n\tfor _, sw := range data.Spec[0].SyncWindow {\n\t\twindow := v1alpha1.SyncWindow{}\n\t\tif !sw.UseAndOperator.IsNull() {\n\t\t\twindow.UseAndOperator = sw.UseAndOperator.ValueBool()\n\t\t}\n\n\t\tif !sw.Duration.IsNull() {\n\t\t\twindow.Duration = sw.Duration.ValueString()\n\t\t}\n\n\t\tif !sw.Kind.IsNull() {\n\t\t\twindow.Kind = sw.Kind.ValueString()\n\t\t}\n\n\t\tif !sw.ManualSync.IsNull() {\n\t\t\twindow.ManualSync = sw.ManualSync.ValueBool()\n\t\t}\n\n\t\tif !sw.Schedule.IsNull() {\n\t\t\twindow.Schedule = sw.Schedule.ValueString()\n\t\t}\n\n\t\tif !sw.Timezone.IsNull() {\n\t\t\twindow.TimeZone = sw.Timezone.ValueString()\n\t\t}\n\n\t\t// Initialize to empty slice if set (even if empty) to maintain empty list vs null distinction\n\t\t// This fixes issue #788 where empty lists were incorrectly converted to null\n\t\tif sw.Applications != nil {\n\t\t\twindow.Applications = make([]string, 0, len(sw.Applications))\n\t\t\tfor _, app := range sw.Applications {\n\t\t\t\twindow.Applications = append(window.Applications, app.ValueString())\n\t\t\t}\n\t\t}\n\n\t\tif sw.Clusters != nil {\n\t\t\twindow.Clusters = make([]string, 0, len(sw.Clusters))\n\t\t\tfor _, cluster := range sw.Clusters {\n\t\t\t\twindow.Clusters = append(window.Clusters, cluster.ValueString())\n\t\t\t}\n\t\t}\n\n\t\tif sw.Namespaces != nil {\n\t\t\twindow.Namespaces = make([]string, 0, len(sw.Namespaces))\n\t\t\tfor _, ns := range sw.Namespaces {\n\t\t\t\twindow.Namespaces = append(window.Namespaces, ns.ValueString())\n\t\t\t}\n\t\t}\n\n\t\tspec.SyncWindows = append(spec.SyncWindows, &window)\n\t}\n\n\treturn objectMeta, spec, diags\n}\n\n// expandProjectRoles converts project role models to ArgoCD API types\nfunc expandProjectRoles(_ context.Context, roles []projectRoleModel) []v1alpha1.ProjectRole {\n\tvar result []v1alpha1.ProjectRole\n\n\tfor _, role := range roles {\n\t\tpr := v1alpha1.ProjectRole{\n\t\t\tName: role.Name.ValueString(),\n\t\t}\n\n\t\tif !role.Description.IsNull() {\n\t\t\tpr.Description = role.Description.ValueString()\n\t\t}\n\n\t\tfor _, policy := range role.Policies {\n\t\t\tpr.Policies = append(pr.Policies, policy.ValueString())\n\t\t}\n\n\t\t// Groups is optional - initialize to empty slice if set to maintain empty list vs null distinction\n\t\t// This fixes issue #788 where empty lists were incorrectly converted to null\n\t\tif role.Groups != nil {\n\t\t\tpr.Groups = make([]string, 0, len(role.Groups))\n\t\t\tfor _, group := range role.Groups {\n\t\t\t\tpr.Groups = append(pr.Groups, group.ValueString())\n\t\t\t}\n\t\t}\n\n\t\tresult = append(result, pr)\n\t}\n\n\treturn result\n}\n"
  },
  {
    "path": "internal/provider/resource_project_test.go",
    "content": "package provider\n\nimport (\n\t\"fmt\"\n\t\"regexp\"\n\t\"testing\"\n\n\t\"github.com/argoproj-labs/terraform-provider-argocd/internal/features\"\n\t\"github.com/hashicorp/terraform-plugin-testing/helper/acctest\"\n\t\"github.com/hashicorp/terraform-plugin-testing/helper/resource\"\n\t\"github.com/hashicorp/terraform-plugin-testing/plancheck\"\n)\n\nfunc TestAccArgoCDProject(t *testing.T) {\n\tname := acctest.RandomWithPrefix(\"test-acc\")\n\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDProjectPolicyError(\n\t\t\t\t\t\"test-acc-\" + acctest.RandString(10),\n\t\t\t\t),\n\t\t\t\tExpectError: regexp.MustCompile(\"invalid policy rule\"),\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDProjectRoleNameError(\n\t\t\t\t\t\"test-acc-\" + acctest.RandString(10),\n\t\t\t\t),\n\t\t\t\tExpectError: regexp.MustCompile(\"invalid role name\"),\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDProjectSyncWindowKindError(\n\t\t\t\t\t\"test-acc-\" + acctest.RandString(10),\n\t\t\t\t),\n\t\t\t\tExpectError: regexp.MustCompile(\"mismatch: can only be allow or deny\"),\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDProjectSyncWindowDurationError(\n\t\t\t\t\t\"test-acc-\" + acctest.RandString(10),\n\t\t\t\t),\n\t\t\t\tExpectError: regexp.MustCompile(\"cannot parse duration\"),\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDProjectSyncWindowScheduleError(\n\t\t\t\t\t\"test-acc-\" + acctest.RandString(10),\n\t\t\t\t),\n\t\t\t\tExpectError: regexp.MustCompile(\"cannot parse schedule\"),\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDProjectSyncWindowTimezoneError(\n\t\t\t\t\t\"test-acc-\" + acctest.RandString(10),\n\t\t\t\t),\n\t\t\t\tExpectError: regexp.MustCompile(\"cannot parse timezone\"),\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDProjectSimple(name),\n\t\t\t\tCheck: resource.TestCheckResourceAttrSet(\n\t\t\t\t\t\"argocd_project.simple\",\n\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:      \"argocd_project.simple\",\n\t\t\t\tImportState:       true,\n\t\t\t\tImportStateVerify: true,\n\t\t\t},\n\t\t\t// Check with the same name for rapid project recreation robustness\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDProjectSimple(name),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_project.simple\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\t// TODO: check all possible attributes\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDProjectSimpleWithoutOrphaned(name),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_project.simple\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t\t// TODO: check all possible attributes\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDProjectSimpleWithEmptyOrphaned(name),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_project.simple\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t\t// TODO: check all possible attributes\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDProject_tokensCoexistence(t *testing.T) {\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDProjectCoexistenceWithTokenResource(\n\t\t\t\t\t\"test-acc-\"+acctest.RandString(10),\n\t\t\t\t\t4,\n\t\t\t\t),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_project.coexistence\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckNoResourceAttr(\n\t\t\t\t\t\t\"argocd_project.coexistence\",\n\t\t\t\t\t\t\"spec.0.role.0.jwt_tokens\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_project_token.coexistence_testrole_exp\",\n\t\t\t\t\t\t\"issued_at\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_project_token.multiple.0\",\n\t\t\t\t\t\t\"issued_at\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_project_token.multiple.1\",\n\t\t\t\t\t\t\"issued_at\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_project_token.multiple.2\",\n\t\t\t\t\t\t\"issued_at\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_project_token.multiple.3\",\n\t\t\t\t\t\t\"issued_at\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDProjectUpdateAddRole(t *testing.T) {\n\tname := acctest.RandomWithPrefix(\"test-acc\")\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDProjectSimpleWithoutRole(name),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_project.simple\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:      \"argocd_project.simple\",\n\t\t\t\tImportState:       true,\n\t\t\t\tImportStateVerify: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDProjectSimpleWithRole(name),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_project.simple\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDProjectWithClustersRepositoriesRolePolicy(t *testing.T) {\n\tname := acctest.RandomWithPrefix(\"test-acc\")\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDProjectWithClustersRepositoriesRolePolicy(name),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_project.simple\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:      \"argocd_project.simple\",\n\t\t\t\tImportState:       true,\n\t\t\t\tImportStateVerify: true,\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDProjectWithLogsExecRolePolicy(t *testing.T) {\n\tname := acctest.RandomWithPrefix(\"test-acc\")\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t); testAccPreCheckFeatureSupported(t, features.ExecLogsPolicy) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDProjectWithExecLogsRolePolicy(name),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_project.simple\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:      \"argocd_project.simple\",\n\t\t\t\tImportState:       true,\n\t\t\t\tImportStateVerify: true,\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDProjectWithSourceNamespaces(t *testing.T) {\n\tname := acctest.RandomWithPrefix(\"test-acc\")\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t); testAccPreCheckFeatureSupported(t, features.ProjectSourceNamespaces) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDProjectWithSourceNamespaces(name),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_project.simple\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:      \"argocd_project.simple\",\n\t\t\t\tImportState:       true,\n\t\t\t\tImportStateVerify: true,\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDProjectWithDestinationServiceAccounts(t *testing.T) {\n\tname := acctest.RandomWithPrefix(\"test-acc\")\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck: func() {\n\t\t\ttestAccPreCheck(t)\n\t\t\ttestAccPreCheckFeatureSupported(t, features.ProjectDestinationServiceAccounts)\n\t\t},\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDProjectWithDestinationServiceAccounts(name),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_project.simple\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project.simple\",\n\t\t\t\t\t\t\"spec.0.destination_service_account.0.default_service_account\",\n\t\t\t\t\t\t\"default\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project.simple\",\n\t\t\t\t\t\t\"spec.0.destination_service_account.1.default_service_account\",\n\t\t\t\t\t\t\"foo\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:      \"argocd_project.simple\",\n\t\t\t\tImportState:       true,\n\t\t\t\tImportStateVerify: true,\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDProjectWithFineGrainedPolicy(t *testing.T) {\n\tname := acctest.RandomWithPrefix(\"test-acc\")\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t); testAccPreCheckFeatureSupported(t, features.ProjectFineGrainedPolicy) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDProjectWithFineGrainedPolicy(name),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_project.fine_grained_policy\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project.fine_grained_policy\",\n\t\t\t\t\t\t\"spec.0.role.0.policies.#\",\n\t\t\t\t\t\t\"2\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDProjectWithAppsInAnyNSPolicy(t *testing.T) {\n\tname := acctest.RandomWithPrefix(\"test-acc\")\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t); testAccPreCheckFeatureSupported(t, features.ProjectFineGrainedPolicy) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDProjectWithAppsInAnyNSPolicy(name),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_project.app_in_any_ns_policy\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project.app_in_any_ns_policy\",\n\t\t\t\t\t\t\"spec.0.role.0.policies.#\",\n\t\t\t\t\t\t\"2\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc testAccArgoCDProjectSimple(name string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_project\" \"simple\" {\n  metadata {\n    name      = \"%s\"\n    namespace = \"argocd\"\n    labels = {\n      acceptance = \"true\"\n    }\n    annotations = {\n      \"this.is.a.really.long.nested.key\" = \"yes, really!\"\n    }\n  }\n\n  spec {\n    description  = \"simple\"\n    source_repos = [\"*\"]\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"foo\"\n    }\n    cluster_resource_whitelist {\n      group = \"rbac.authorization.k8s.io\"\n      kind  = \"ClusterRoleBinding\"\n    }\n    cluster_resource_whitelist {\n      group = \"rbac.authorization.k8s.io\"\n      kind  = \"ClusterRole\"\n    }\n    cluster_resource_whitelist {\n      group = \"\"\n      kind  = \"Namespace\"\n    }\n    cluster_resource_blacklist {\n      group = \"\"\n      kind  = \"ResourceQuota\"\n    }\n    cluster_resource_blacklist {\n      group = \"*\"\n      kind  = \"*\"\n    }\n    namespace_resource_blacklist {\n      group = \"networking.k8s.io\"\n      kind  = \"Ingress\"\n    }\n    namespace_resource_whitelist {\n      group = \"*\"\n      kind  = \"*\"\n    }\n    orphaned_resources {\n      warn = true\n      ignore {\n        group = \"apps/v1\"\n        kind  = \"Deployment\"\n        name  = \"ignored1\"\n      }\n      ignore {\n        group = \"apps/v1\"\n        kind  = \"Deployment\"\n        name  = \"ignored2\"\n      }\n    }\n    sync_window {\n      kind = \"allow\"\n      applications = [\"api-*\"]\n      clusters = [\"*\"]\n      namespaces = [\"*\"]\n      duration = \"3600s\"\n      schedule = \"10 1 * * *\"\n      manual_sync = true\n\t  use_and_operator = false\n    }\n    sync_window {\n      kind = \"deny\"\n      applications = [\"foo\"]\n      clusters = [\"in-cluster\"]\n      namespaces = [\"default\"]\n      duration = \"12h\"\n      schedule = \"22 1 5 * *\"\n      manual_sync = false\n      timezone = \"Europe/London\"\n\t  use_and_operator = false\n    }\n    signature_keys = [\n      \"4AEE18F83AFDEB23\",\n      \"07E34825A909B250\"\n    ]\n  }\n}\n\t`, name)\n}\n\nfunc testAccArgoCDProjectSimpleWithoutOrphaned(name string) string {\n\treturn fmt.Sprintf(`\n  resource \"argocd_project\" \"simple\" {\n    metadata {\n      name      = \"%s\"\n      namespace = \"argocd\"\n      labels = {\n        acceptance = \"true\"\n      }\n      annotations = {\n        \"this.is.a.really.long.nested.key\" = \"yes, really!\"\n      }\n    }\n  \n    spec {\n      description  = \"simple project\"\n      source_repos = [\"*\"]\n  \n      destination {\n        name      = \"anothercluster\"\n        namespace = \"bar\"\n      }\n    }\n  }\n\t`, name)\n}\n\nfunc testAccArgoCDProjectSimpleWithEmptyOrphaned(name string) string {\n\treturn fmt.Sprintf(`\n  resource \"argocd_project\" \"simple\" {\n    metadata {\n      name      = \"%s\"\n      namespace = \"argocd\"\n      labels = {\n        acceptance = \"true\"\n      }\n      annotations = {\n        \"this.is.a.really.long.nested.key\" = \"yes, really!\"\n      }\n    }\n  \n    spec {\n      description  = \"simple project\"\n      source_repos = [\"*\"]\n  \n      destination {\n        name      = \"anothercluster\"\n        namespace = \"bar\"\n      }\n      orphaned_resources { }\n    }\n  }\n\t`, name)\n}\n\nfunc testAccArgoCDProjectCoexistenceWithTokenResource(name string, count int) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_project\" \"coexistence\" {\n  metadata {\n    name        = \"%s\"\n    namespace   = \"argocd\"\n  }\n\n  spec {\n    description = \"coexistence\"\n    destination {\n\t   server    = \"https://kubernetes.default.svc\"\n\t   namespace = \"*\"\n    }\n    source_repos = [\"*\"]\n    role {\n      name = \"testrole\"\n      policies = [\n        \"p, proj:%s:testrole, applications, override, %s/foo, allow\",\n      ]\n    }\n  }\n}\n\nresource \"argocd_project_token\" \"multiple\" {\n  count   = %d\n  project = argocd_project.coexistence.metadata.0.name\n  role    = \"testrole\"\n}\nresource \"argocd_project_token\" \"coexistence_testrole_exp\" {\n  project    = argocd_project.coexistence.metadata.0.name\n  role       = \"testrole\"\n  expires_in = \"264h\"\n}\n\t`, name, name, name, count)\n}\n\nfunc testAccArgoCDProjectPolicyError(name string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_project\" \"failure\" {\n  metadata {\n    name        = \"%s\"\n    namespace   = \"argocd\"\n  }\n\n  spec {\n    description = \"expected policy failures\"\n    destination {\n\t   server    = \"https://kubernetes.default.svc\"\n\t   namespace = \"*\"\n    }\n    source_repos = [\"*\"]\n    role {\n      name = \"incorrect-policy\"\n      policies = [\n        \"p, proj:%s:bar, applicat, foo, %s/*, whatever\",\n      ]\n    }\n  }\n}\n\t`, name, name, name)\n}\n\nfunc testAccArgoCDProjectRoleNameError(name string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_project\" \"failure\" {\n  metadata {\n    name        = \"%s\"\n    namespace   = \"argocd\"\n  }\n\n  spec {\n    description = \"expected role name failure\"\n    destination {\n\t   server    = \"https://kubernetes.default.svc\"\n\t   namespace = \"*\"\n    }\n    source_repos = [\"*\"]\n    role {\n      name = \"incorrect role name\"\n      policies = [\n        \"p, proj:%s:testrole, applications, override, %s/foo, allow\",\n      ]\n    }\n  }\n}\n\t`, name, name, name)\n}\n\nfunc testAccArgoCDProjectSyncWindowScheduleError(name string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_project\" \"failure\" {\n  metadata {\n    name        = \"%s\"\n    namespace   = \"argocd\"\n  }\n\n  spec {\n    description = \"expected policy failures\"\n    destination {\n\t   server    = \"https://kubernetes.default.svc\"\n\t   namespace = \"*\"\n    }\n    source_repos = [\"*\"]\n    role {\n      name = \"incorrect-syncwindow\"\n      policies = [\n        \"p, proj:%s:testrole, applications, override, %s/foo, allow\",\n      ]\n    }\n\tsync_window {\n      kind = \"allow\"\n      applications = [\"api-*\"]\n      clusters = [\"*\"]\n      namespaces = [\"*\"]\n      duration = \"3600s\"\n      schedule = \"10 1 * * * 5\"\n      manual_sync = true\n    }\n  }\n}\n\t`, name, name, name)\n}\n\nfunc testAccArgoCDProjectSyncWindowDurationError(name string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_project\" \"failure\" {\n  metadata {\n    name        = \"%s\"\n    namespace   = \"argocd\"\n  }\n\n  spec {\n    description = \"expected duration failure\"\n    destination {\n\t   server    = \"https://kubernetes.default.svc\"\n\t   namespace = \"*\"\n    }\n    source_repos = [\"*\"]\n    role {\n      name = \"incorrect-syncwindow\"\n      policies = [\n        \"p, proj:%s:testrole, applications, override, %s/foo, allow\",\n      ]\n    }\n\tsync_window {\n      kind = \"allow\"\n      applications = [\"api-*\"]\n      clusters = [\"*\"]\n      namespaces = [\"*\"]\n      duration = \"123\"\n      schedule = \"10 1 * * *\"\n      manual_sync = true\n    }\n  }\n}\n\t`, name, name, name)\n}\n\nfunc testAccArgoCDProjectSyncWindowKindError(name string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_project\" \"failure\" {\n  metadata {\n    name        = \"%s\"\n    namespace   = \"argocd\"\n  }\n\n  spec {\n    description = \"expected kind failure\"\n    destination {\n\t   server    = \"https://kubernetes.default.svc\"\n\t   namespace = \"*\"\n    }\n    source_repos = [\"*\"]\n    role {\n      name = \"incorrect-syncwindow\"\n      policies = [\n        \"p, proj:%s:testrole, applications, override, %s/foo, allow\",\n      ]\n    }\n\tsync_window {\n      kind = \"whatever\"\n      applications = [\"api-*\"]\n      clusters = [\"*\"]\n      namespaces = [\"*\"]\n      duration = \"600s\"\n      schedule = \"10 1 * * *\"\n      manual_sync = true\n    }\n  }\n}\n\t`, name, name, name)\n}\n\nfunc testAccArgoCDProjectSimpleWithoutRole(name string) string {\n\treturn fmt.Sprintf(`\n  resource \"argocd_project\" \"simple\" {\n    metadata {\n      name      = \"%s\"\n      namespace = \"argocd\"\n      labels = {\n        acceptance = \"true\"\n      }\n      annotations = {\n        \"this.is.a.really.long.nested.key\" = \"yes, really!\"\n      }\n    }\n  \n    spec {\n      description  = \"simple project\"\n      source_repos = [\"*\"]\n  \n      destination {\n        name      = \"anothercluster\"\n        namespace = \"bar\"\n      }\n      orphaned_resources {\n        warn = true\n        ignore {\n          group = \"apps/v1\"\n          kind  = \"Deployment\"\n          name  = \"ignored1\"\n        }\n      }\n    }\n  }\n\t`, name)\n}\n\nfunc testAccArgoCDProjectSimpleWithRole(name string) string {\n\treturn fmt.Sprintf(`\n  resource \"argocd_project\" \"simple\" {\n    metadata {\n      name      = \"%s\"\n      namespace = \"argocd\"\n      labels = {\n        acceptance = \"true\"\n      }\n      annotations = {\n        \"this.is.a.really.long.nested.key\" = \"yes, really!\"\n      }\n    }\n  \n    spec {\n      description  = \"simple project\"\n      source_repos = [\"*\"]\n  \n      destination {\n        name      = \"anothercluster\"\n        namespace = \"bar\"\n      }\n      orphaned_resources {\n        warn = true\n        ignore {\n          group = \"apps/v1\"\n          kind  = \"Deployment\"\n          name  = \"ignored1\"\n        }\n      }\n      role {\n        name = \"anotherrole\"\n        policies = [\n          \"p, proj:%s:anotherrole, applications, get, %s/*, allow\",\n          \"p, proj:%s:anotherrole, applications, sync, %s/*, deny\",\n        ]\n      }\n    }\n  }\n\t`, name, name, name, name, name)\n}\n\nfunc testAccArgoCDProjectWithClustersRepositoriesRolePolicy(name string) string {\n\treturn fmt.Sprintf(`\n  resource \"argocd_project\" \"simple\" {\n    metadata {\n      name      = \"%[1]s\"\n      namespace = \"argocd\"\n      labels = {\n        acceptance = \"true\"\n      }\n      annotations = {\n        \"this.is.a.really.long.nested.key\" = \"yes, really!\"\n      }\n    }\n  \n    spec {\n      description  = \"simple project\"\n      source_repos = [\"*\"]\n  \n      destination {\n        name      = \"anothercluster\"\n        namespace = \"bar\"\n      }\n      orphaned_resources {\n        warn = true\n        ignore {\n          group = \"apps/v1\"\n          kind  = \"Deployment\"\n          name  = \"ignored1\"\n        }\n      }\n      role {\n        name = \"admin\"\n        policies = [\n          \"p, proj:%[1]s:admin, clusters, get, %[1]s/*, allow\",\n          \"p, proj:%[1]s:admin, repositories, get, %[1]s/*, allow\",\n        ]\n      }\n    }\n  }\n\t`, name)\n}\n\nfunc testAccArgoCDProjectWithExecLogsRolePolicy(name string) string {\n\treturn fmt.Sprintf(`\n  resource \"argocd_project\" \"simple\" {\n    metadata {\n      name      = \"%[1]s\"\n      namespace = \"argocd\"\n      labels = {\n        acceptance = \"true\"\n      }\n      annotations = {\n        \"this.is.a.really.long.nested.key\" = \"yes, really!\"\n      }\n    }\n  \n    spec {\n      description  = \"simple project\"\n      source_repos = [\"*\"]\n  \n      destination {\n        name      = \"anothercluster\"\n        namespace = \"bar\"\n      }\n      orphaned_resources {\n        warn = true\n        ignore {\n          group = \"apps/v1\"\n          kind  = \"Deployment\"\n          name  = \"ignored1\"\n        }\n      }\n      role {\n        name = \"admin\"\n        policies = [\n          \"p, proj:%[1]s:admin, exec, create, %[1]s/*, allow\",\n          \"p, proj:%[1]s:admin, logs, get, %[1]s/*, allow\",\n        ]\n      }\n    }\n  }\n\t`, name)\n}\n\nfunc testAccArgoCDProjectWithSourceNamespaces(name string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_project\" \"simple\" {\n  metadata {\n    name      = \"%s\"\n    namespace = \"argocd\"\n    labels = {\n      acceptance = \"true\"\n    }\n    annotations = {\n      \"this.is.a.really.long.nested.key\" = \"yes, really!\"\n    }\n  }\n\n  spec {\n    description  = \"simple project\"\n    source_repos = [\"*\"]\n    source_namespaces = [\"*\"]\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"foo\"\n    }\n    orphaned_resources {\n      warn = true\n      ignore {\n        group = \"apps/v1\"\n        kind  = \"Deployment\"\n        name  = \"ignored1\"\n      }\n    }\n  }\n}\n\t`, name)\n}\n\nfunc testAccArgoCDProjectSyncWindowTimezoneError(name string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_project\" \"failure\" {\n  metadata {\n    name        = \"%s\"\n    namespace   = \"argocd\"\n  }\n\n  spec {\n    description = \"expected timezone failure\"\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"*\"\n    }\n    source_repos = [\"*\"]\n    role {\n      name = \"incorrect-syncwindow\"\n      policies = [\n      \"p, proj:%s:testrole, applications, override, %s/foo, allow\",\n      ]\n    }\n    sync_window {\n      kind = \"allow\"\n      applications = [\"api-*\"]\n      clusters = [\"*\"]\n      namespaces = [\"*\"]\n      duration = \"1h\"\n      schedule = \"10 1 * * *\"\n      manual_sync = true\n      timezone = \"invalid\"\n    }\n  }\n}\n  `, name, name, name)\n}\n\nfunc testAccArgoCDProjectWithDestinationServiceAccounts(name string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_project\" \"simple\" {\n  metadata {\n    name      = \"%s\"\n    namespace = \"argocd\"\n    labels = {\n      acceptance = \"true\"\n    }\n    annotations = {\n      \"this.is.a.really.long.nested.key\" = \"yes, really!\"\n    }\n  }\n\n  spec {\n    description  = \"simple\"\n    source_repos = [\"*\"]\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"foo\"\n    }\n    destination_service_account {\n      default_service_account = \"default\"\n      namespace = \"default\"\n      server = \"https://kubernetes.default.svc\"\n    }\n    destination_service_account {\n      default_service_account = \"foo\"\n      namespace = \"foo\"\n      server = \"https://kubernetes.default.svc\"\n    }\n  }\n}\n  `, name)\n}\n\n// TestAccArgoCDProject_MetadataFieldsConsistency tests consistency of metadata fields\nfunc TestAccArgoCDProject_MetadataFieldsConsistency(t *testing.T) {\n\tname := acctest.RandString(10)\n\tconfig := fmt.Sprintf(`\nresource \"argocd_project\" \"metadata_consistency\" {\n  metadata {\n    name      = \"%[1]s\"\n    namespace = \"argocd\"\n    labels = {\n      acceptance = \"true\"\n      environment = \"test\"\n    }\n    annotations = {\n      \"this.is.a.really.long.nested.key\" = \"yes, really!\"\n      \"description\" = \"test project\"\n    }\n  }\n\n  spec {\n    description  = \"test project for metadata consistency\"\n    source_repos = [\"*\"]\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n  }\n}\n`, name)\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project.metadata_consistency\",\n\t\t\t\t\t\t\"metadata.0.name\",\n\t\t\t\t\t\tname,\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project.metadata_consistency\",\n\t\t\t\t\t\t\"metadata.0.labels.acceptance\",\n\t\t\t\t\t\t\"true\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project.metadata_consistency\",\n\t\t\t\t\t\t\"metadata.0.labels.environment\",\n\t\t\t\t\t\t\"test\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project.metadata_consistency\",\n\t\t\t\t\t\t\"metadata.0.annotations.this.is.a.really.long.nested.key\",\n\t\t\t\t\t\t\"yes, really!\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Apply the same configuration again to test for consistency\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project.metadata_consistency\",\n\t\t\t\t\t\t\"metadata.0.name\",\n\t\t\t\t\t\tname,\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project.metadata_consistency\",\n\t\t\t\t\t\t\"metadata.0.labels.acceptance\",\n\t\t\t\t\t\t\"true\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project.metadata_consistency\",\n\t\t\t\t\t\t\"metadata.0.labels.environment\",\n\t\t\t\t\t\t\"test\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project.metadata_consistency\",\n\t\t\t\t\t\t\"metadata.0.annotations.this.is.a.really.long.nested.key\",\n\t\t\t\t\t\t\"yes, really!\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\n// TestAccArgoCDProject_RolesConsistency tests consistency of role fields\nfunc TestAccArgoCDProject_RolesConsistency(t *testing.T) {\n\tname := acctest.RandString(10)\n\tconfig := fmt.Sprintf(`\nresource \"argocd_project\" \"roles_consistency\" {\n  metadata {\n    name      = \"%[1]s\"\n    namespace = \"argocd\"\n  }\n\n  spec {\n    description  = \"test project with roles\"\n    source_repos = [\"*\"]\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n\n    role {\n      name = \"admin\"\n      policies = [\n        \"p, proj:%[1]s:admin, applications, get, %[1]s/*, allow\",\n        \"p, proj:%[1]s:admin, applications, sync, %[1]s/*, allow\",\n      ]\n      groups = [\"admin-group\", \"ops-group\"]\n    }\n    role {\n      name = \"read-only\"\n      policies = [\n        \"p, proj:%[1]s:read-only, applications, get, %[1]s/*, allow\",\n      ]\n      groups = [\"dev-group\"]\n    }\n  }\n}\n`, name)\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project.roles_consistency\",\n\t\t\t\t\t\t\"spec.0.role.0.name\",\n\t\t\t\t\t\t\"admin\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project.roles_consistency\",\n\t\t\t\t\t\t\"spec.0.role.0.policies.#\",\n\t\t\t\t\t\t\"2\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project.roles_consistency\",\n\t\t\t\t\t\t\"spec.0.role.0.groups.#\",\n\t\t\t\t\t\t\"2\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project.roles_consistency\",\n\t\t\t\t\t\t\"spec.0.role.1.name\",\n\t\t\t\t\t\t\"read-only\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Apply the same configuration again to test for consistency\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project.roles_consistency\",\n\t\t\t\t\t\t\"spec.0.role.0.name\",\n\t\t\t\t\t\t\"admin\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project.roles_consistency\",\n\t\t\t\t\t\t\"spec.0.role.0.policies.#\",\n\t\t\t\t\t\t\"2\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project.roles_consistency\",\n\t\t\t\t\t\t\"spec.0.role.0.groups.#\",\n\t\t\t\t\t\t\"2\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project.roles_consistency\",\n\t\t\t\t\t\t\"spec.0.role.1.name\",\n\t\t\t\t\t\t\"read-only\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\n// TestAccArgoCDProject_SyncWindowsConsistency tests consistency of sync window fields\nfunc TestAccArgoCDProject_SyncWindowsConsistency(t *testing.T) {\n\tname := acctest.RandString(10)\n\tconfig := fmt.Sprintf(`\nresource \"argocd_project\" \"sync_windows_consistency\" {\n  metadata {\n    name      = \"%[1]s\"\n    namespace = \"argocd\"\n  }\n\n  spec {\n    description  = \"test project with sync windows\"\n    source_repos = [\"*\"]\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n\n    sync_window {\n      kind = \"allow\"\n      applications = [\"api-*\"]\n      clusters = [\"*\"]\n      namespaces = [\"*\"]\n      duration = \"3600s\"\n      schedule = \"10 1 * * *\"\n      manual_sync = true\n    }\n    sync_window {\n      use_and_operator = true\n      kind = \"deny\"\n      applications = [\"foo\", \"bar\"]\n      clusters = [\"in-cluster\"]\n      namespaces = [\"default\"]\n      duration = \"12h\"\n      schedule = \"22 1 5 * *\"\n      manual_sync = false\n      timezone = \"Europe/London\"\n    }\n  }\n}\n`, name)\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project.sync_windows_consistency\",\n\t\t\t\t\t\t\"spec.0.sync_window.0.kind\",\n\t\t\t\t\t\t\"allow\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project.sync_windows_consistency\",\n\t\t\t\t\t\t\"spec.0.sync_window.0.duration\",\n\t\t\t\t\t\t\"3600s\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project.sync_windows_consistency\",\n\t\t\t\t\t\t\"spec.0.sync_window.0.manual_sync\",\n\t\t\t\t\t\t\"true\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project.sync_windows_consistency\",\n\t\t\t\t\t\t\"spec.0.sync_window.1.use_and_operator\",\n\t\t\t\t\t\t\"true\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project.sync_windows_consistency\",\n\t\t\t\t\t\t\"spec.0.sync_window.1.timezone\",\n\t\t\t\t\t\t\"Europe/London\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Apply the same configuration again to test for consistency\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project.sync_windows_consistency\",\n\t\t\t\t\t\t\"spec.0.sync_window.0.kind\",\n\t\t\t\t\t\t\"allow\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project.sync_windows_consistency\",\n\t\t\t\t\t\t\"spec.0.sync_window.0.duration\",\n\t\t\t\t\t\t\"3600s\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project.sync_windows_consistency\",\n\t\t\t\t\t\t\"spec.0.sync_window.0.manual_sync\",\n\t\t\t\t\t\t\"true\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project.sync_windows_consistency\",\n\t\t\t\t\t\t\"spec.0.sync_window.1.use_and_operator\",\n\t\t\t\t\t\t\"true\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project.sync_windows_consistency\",\n\t\t\t\t\t\t\"spec.0.sync_window.1.timezone\",\n\t\t\t\t\t\t\"Europe/London\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\n// TestAccArgoCDProject_OrphanedResourcesConsistency tests consistency of orphaned resources\nfunc TestAccArgoCDProject_OrphanedResourcesConsistency(t *testing.T) {\n\tname := acctest.RandString(10)\n\tconfig := fmt.Sprintf(`\nresource \"argocd_project\" \"orphaned_resources_consistency\" {\n  metadata {\n    name      = \"%[1]s\"\n    namespace = \"argocd\"\n  }\n\n  spec {\n    description  = \"test project with orphaned resources\"\n    source_repos = [\"*\"]\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n\n    orphaned_resources {\n      warn = true\n      ignore {\n        group = \"apps/v1\"\n        kind  = \"Deployment\"\n        name  = \"ignored1\"\n      }\n      ignore {\n        group = \"apps/v1\"\n        kind  = \"Deployment\"\n        name  = \"ignored2\"\n      }\n    }\n  }\n}\n`, name)\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project.orphaned_resources_consistency\",\n\t\t\t\t\t\t\"spec.0.orphaned_resources.0.warn\",\n\t\t\t\t\t\t\"true\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project.orphaned_resources_consistency\",\n\t\t\t\t\t\t\"spec.0.orphaned_resources.0.ignore.#\",\n\t\t\t\t\t\t\"2\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project.orphaned_resources_consistency\",\n\t\t\t\t\t\t\"spec.0.orphaned_resources.0.ignore.0.name\",\n\t\t\t\t\t\t\"ignored1\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Apply the same configuration again to test for consistency\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project.orphaned_resources_consistency\",\n\t\t\t\t\t\t\"spec.0.orphaned_resources.0.warn\",\n\t\t\t\t\t\t\"true\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project.orphaned_resources_consistency\",\n\t\t\t\t\t\t\"spec.0.orphaned_resources.0.ignore.#\",\n\t\t\t\t\t\t\"2\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project.orphaned_resources_consistency\",\n\t\t\t\t\t\t\"spec.0.orphaned_resources.0.ignore.0.name\",\n\t\t\t\t\t\t\"ignored1\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc testAccArgoCDProjectWithFineGrainedPolicy(name string) string {\n\treturn fmt.Sprintf(`\n  resource \"argocd_project\" \"fine_grained_policy\" {\n    metadata {\n      name      = \"%[1]s\"\n      namespace = \"argocd\"\n      labels = {\n        acceptance = \"true\"\n      }\n    }\n\n    spec {\n      description  = \"simple project with fine-grained policies\"\n      source_repos = [\"*\"]\n\n      destination {\n        server    = \"https://kubernetes.default.svc\"\n        namespace = \"default\"\n      }\n\n      role {\n        name = \"fine-grained\"\n        policies = [\n          \"p, proj:%[1]s:fine-grained, applications, update/*, %[1]s/*, allow\",\n          \"p, proj:%[1]s:fine-grained, applications, delete/*/Pod/*/*, %[1]s/*, allow\",\n        ]\n      }\n    }\n  }\n\t`, name)\n}\n\nfunc testAccArgoCDProjectWithAppsInAnyNSPolicy(name string) string {\n\treturn fmt.Sprintf(`\n  resource \"argocd_project\" \"app_in_any_ns_policy\" {\n    metadata {\n      name      = \"%[1]s\"\n      namespace = \"argocd\"\n      labels = {\n        acceptance = \"true\"\n      }\n    }\n\n    spec {\n      description  = \"simple project with multi-ns policy\"\n      source_repos = [\"*\"]\n\n      destination {\n        server    = \"https://kubernetes.default.svc\"\n        namespace = \"default\"\n      }\n\n      role {\n        name = \"multi-ns\"\n        policies = [\n          \"p, proj:%[1]s:multi-ns, applications, update/*, %[1]s/*/multi-ns, allow\",\n          \"p, proj:%[1]s:multi-ns, applications, delete/*/Pod/default/*, %[1]s/*, allow\",\n        ]\n      }\n    }\n  }\n\t`, name)\n}\n\n// TestAccArgoCDProject_ProviderUpgradeStateMigration tests that resources created with the\n// old SDK-based provider (v7.12.0) can be successfully read and managed by the new\n// framework-based provider. This ensures backward compatibility when upgrading the provider.\nfunc TestAccArgoCDProject_ProviderUpgradeStateMigration(t *testing.T) {\n\tname := acctest.RandomWithPrefix(\"test-acc-migrate\")\n\tconfig := testAccArgoCDProjectForStateMigration(name)\n\n\tresource.Test(t, resource.TestCase{\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\t// Step 1: Create project using old SDK-based provider (v7.12.0)\n\t\t\t\tExternalProviders: map[string]resource.ExternalProvider{\n\t\t\t\t\t\"argocd\": {\n\t\t\t\t\t\tVersionConstraint: \"7.12.0\",\n\t\t\t\t\t\tSource:            \"argoproj-labs/argocd\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_project.migration\", \"metadata.0.name\", name),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\"argocd_project.migration\", \"metadata.0.uid\"),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Step 2: Upgrade to new framework-based provider - verify it can read existing state\n\t\t\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\t\t\tConfig:                   config,\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_project.migration\", \"metadata.0.name\", name),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_project.migration\", \"spec.0.description\", \"project for state migration testing\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_project.migration\", \"spec.0.source_repos.#\", \"2\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_project.migration\", \"spec.0.destination.#\", \"2\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_project.migration\", \"spec.0.role.#\", \"2\"),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Step 3: Verify no unexpected plan changes after migration\n\t\t\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\t\t\tConfig:                   config,\n\t\t\t\tConfigPlanChecks: resource.ConfigPlanChecks{\n\t\t\t\t\tPreApply: []plancheck.PlanCheck{\n\t\t\t\t\t\tplancheck.ExpectEmptyPlan(),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc testAccArgoCDProjectForStateMigration(name string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_project\" \"migration\" {\n  metadata {\n    name      = \"%[1]s\"\n    namespace = \"argocd\"\n    labels = {\n      test = \"migration\"\n      env  = \"acceptance\"\n    }\n    annotations = {\n      \"description\" = \"testing provider upgrade\"\n    }\n  }\n\n  spec {\n    description  = \"project for state migration testing\"\n    source_repos = [\"https://github.com/example/repo1\", \"https://github.com/example/repo2\"]\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"production\"\n    }\n\n    cluster_resource_whitelist {\n      group = \"rbac.authorization.k8s.io\"\n      kind  = \"ClusterRole\"\n    }\n\n    namespace_resource_blacklist {\n      group = \"v1\"\n      kind  = \"ConfigMap\"\n    }\n\n    orphaned_resources {\n      warn = true\n      ignore {\n        group = \"apps/v1\"\n        kind  = \"Deployment\"\n        name  = \"legacy-app\"\n      }\n    }\n\n    role {\n      name = \"admin\"\n      description = \"Admin role\"\n      policies = [\n        \"p, proj:%[1]s:admin, applications, *, %[1]s/*, allow\",\n      ]\n      groups = [\"platform-team\"]\n    }\n\n    role {\n      name = \"readonly\"\n      description = \"Read-only role\"\n      policies = [\n        \"p, proj:%[1]s:readonly, applications, get, %[1]s/*, allow\",\n      ]\n      groups = [\"developers\"]\n    }\n\n    sync_window {\n      kind         = \"allow\"\n      applications = [\"*\"]\n      clusters     = [\"*\"]\n      namespaces   = [\"*\"]\n      duration     = \"1h\"\n      schedule     = \"0 22 * * *\"\n      manual_sync  = true\n    }\n  }\n}\n\t`, name)\n}\n\n// TestAccArgoCDProject_ProviderUpgradeStateMigration_WithoutNamespace tests the specific\n// case reported in issue #783 where projects created without an explicit namespace field\n// in v7.12.1 cause forced replacement when upgrading to v7.12.3+.\n// The namespace should be computed from the API response without causing drift.\nfunc TestAccArgoCDProject_ProviderUpgradeStateMigration_WithoutNamespace(t *testing.T) {\n\tname := acctest.RandomWithPrefix(\"test-acc-migrate-no-ns\")\n\tconfig := testAccArgoCDProjectForStateMigrationWithoutNamespace(name)\n\n\tresource.Test(t, resource.TestCase{\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\t// Step 1: Create project using old SDK-based provider (v7.12.1)\n\t\t\t\t// without specifying namespace in metadata (this is the key scenario)\n\t\t\t\tExternalProviders: map[string]resource.ExternalProvider{\n\t\t\t\t\t\"argocd\": {\n\t\t\t\t\t\tVersionConstraint: \"7.12.1\",\n\t\t\t\t\t\tSource:            \"argoproj-labs/argocd\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_project.tech\", \"metadata.0.name\", name),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\"argocd_project.tech\", \"metadata.0.uid\"),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Step 2: Upgrade to new framework-based provider\n\t\t\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\t\t\tConfig:                   config,\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_project.tech\", \"metadata.0.name\", name),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_project.tech\", \"spec.0.source_repos.#\", \"1\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_project.tech\", \"spec.0.destination.#\", \"1\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_project.tech\", \"spec.0.cluster_resource_whitelist.#\", \"1\"),\n\t\t\t\t\t// Namespace should be computed from API, not forcing replacement\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_project.tech\", \"metadata.0.namespace\", \"argocd\"),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Step 3: Verify no unexpected plan changes after migration (issue #783)\n\t\t\t\t// This should NOT show a forced replacement due to namespace changing\n\t\t\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\t\t\tConfig:                   config,\n\t\t\t\tConfigPlanChecks: resource.ConfigPlanChecks{\n\t\t\t\t\tPreApply: []plancheck.PlanCheck{\n\t\t\t\t\t\tplancheck.ExpectEmptyPlan(),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc testAccArgoCDProjectForStateMigrationWithoutNamespace(name string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_project\" \"tech\" {\n  metadata {\n    name = \"%s\"\n    # NOTE: namespace is intentionally NOT specified here to test issue #783\n  }\n\n  spec {\n    source_repos = [\"*\"]\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"*\"\n    }\n\n    cluster_resource_whitelist {\n      group = \"*\"\n      kind  = \"*\"\n    }\n  }\n}\n\t`, name)\n}\n\n// TestAccArgoCDProject_EmptySourceRepos tests the issue #788 where an empty source_repos list\n// causes \"Provider produced inconsistent result after apply\" error.\n// The provider should maintain an empty list as empty list, not convert it to null.\nfunc TestAccArgoCDProject_EmptySourceRepos(t *testing.T) {\n\tname := acctest.RandomWithPrefix(\"test-acc-empty-repos\")\n\tconfig := testAccArgoCDProjectWithEmptySourceRepos(name)\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_project.empty_repos\", \"metadata.0.name\", name),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_project.empty_repos\", \"spec.0.source_repos.#\", \"0\"),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Apply the same configuration again to verify no drift\n\t\t\t\tConfig: config,\n\t\t\t\tConfigPlanChecks: resource.ConfigPlanChecks{\n\t\t\t\t\tPreApply: []plancheck.PlanCheck{\n\t\t\t\t\t\tplancheck.ExpectEmptyPlan(),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc testAccArgoCDProjectWithEmptySourceRepos(name string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_project\" \"empty_repos\" {\n  metadata {\n    name      = \"%s\"\n    namespace = \"argocd\"\n  }\n\n  spec {\n    description  = \"project with empty source_repos\"\n    source_repos = []\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n  }\n}\n\t`, name)\n}\n\n// TestAccArgoCDProject_EmptyRoleGroups tests that empty groups list in roles\n// doesn't cause \"Provider produced inconsistent result after apply\" error.\nfunc TestAccArgoCDProject_EmptyRoleGroups(t *testing.T) {\n\tname := acctest.RandomWithPrefix(\"test-acc-empty-groups\")\n\tconfig := testAccArgoCDProjectWithEmptyRoleGroups(name)\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_project.empty_groups\", \"metadata.0.name\", name),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_project.empty_groups\", \"spec.0.role.0.groups.#\", \"0\"),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Apply the same configuration again to verify no drift\n\t\t\t\tConfig: config,\n\t\t\t\tConfigPlanChecks: resource.ConfigPlanChecks{\n\t\t\t\t\tPreApply: []plancheck.PlanCheck{\n\t\t\t\t\t\tplancheck.ExpectEmptyPlan(),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc testAccArgoCDProjectWithEmptyRoleGroups(name string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_project\" \"empty_groups\" {\n  metadata {\n    name      = \"%s\"\n    namespace = \"argocd\"\n  }\n\n  spec {\n    description  = \"project with role having empty groups\"\n    source_repos = [\"*\"]\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n\n    role {\n      name     = \"test-role\"\n      groups   = []\n      policies = [\"p, proj:%s:test-role, applications, get, %s/*, allow\"]\n    }\n  }\n}\n\t`, name, name, name)\n}\n\n// TestAccArgoCDProject_EmptyListsComprehensive tests multiple empty list fields\n// in a single project to ensure they all work correctly together (issue #788)\nfunc TestAccArgoCDProject_EmptyListsComprehensive(t *testing.T) {\n\tname := acctest.RandomWithPrefix(\"test-acc-comprehensive\")\n\tconfig := testAccArgoCDProjectWithMultipleEmptyLists(name)\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_project.comprehensive\", \"metadata.0.name\", name),\n\t\t\t\t\t// Verify empty source_repos\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_project.comprehensive\", \"spec.0.source_repos.#\", \"0\"),\n\t\t\t\t\t// Verify empty signature_keys\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_project.comprehensive\", \"spec.0.signature_keys.#\", \"0\"),\n\t\t\t\t\t// Verify empty groups in role\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_project.comprehensive\", \"spec.0.role.0.groups.#\", \"0\"),\n\t\t\t\t\t// Verify sync window with mixed empty/non-empty lists\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_project.comprehensive\", \"spec.0.sync_window.0.applications.#\", \"1\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_project.comprehensive\", \"spec.0.sync_window.0.clusters.#\", \"0\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_project.comprehensive\", \"spec.0.sync_window.0.namespaces.#\", \"0\"),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Apply the same configuration again to verify no drift\n\t\t\t\tConfig: config,\n\t\t\t\tConfigPlanChecks: resource.ConfigPlanChecks{\n\t\t\t\t\tPreApply: []plancheck.PlanCheck{\n\t\t\t\t\t\tplancheck.ExpectEmptyPlan(),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc testAccArgoCDProjectWithMultipleEmptyLists(name string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_project\" \"comprehensive\" {\n  metadata {\n    name      = \"%s\"\n    namespace = \"argocd\"\n  }\n\n  spec {\n    description     = \"project testing multiple empty list fields\"\n    source_repos    = []\n    signature_keys  = []\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n\n    role {\n      name     = \"test-role\"\n      groups   = []\n      policies = [\"p, proj:%s:test-role, applications, get, %s/*, allow\"]\n    }\n\n    sync_window {\n      kind         = \"allow\"\n      schedule     = \"0 0 * * *\"\n      duration     = \"1h\"\n      applications = [\"test-app\"]\n      clusters     = []\n      namespaces   = []\n    }\n  }\n}\n\t`, name, name, name)\n}\n\n// TestAccArgoCDProject_MetadataComputedFieldsOnUpdate tests that computed metadata fields\n// (resource_version, generation, uid) don't cause \"inconsistent state after apply\" errors\n// when the spec is updated with lifecycle { ignore_changes = [metadata] }.\n// This is a regression test for issue #807.\n// See: https://github.com/argoproj-labs/terraform-provider-argocd/issues/807\nfunc TestAccArgoCDProject_MetadataComputedFieldsOnUpdate(t *testing.T) {\n\tname := acctest.RandString(10)\n\n\t// Initial configuration with lifecycle ignore_changes on metadata\n\t// This replicates the exact scenario from issue #807\n\tconfigInitial := fmt.Sprintf(`\nresource \"argocd_project\" \"metadata_computed\" {\n  metadata {\n    name      = \"%s\"\n    namespace = \"argocd\"\n    labels = {\n      \"test\" = \"initial\"\n    }\n  }\n\n  spec {\n    description  = \"initial description\"\n    source_repos = [\"*\"]\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n  }\n\n  lifecycle {\n    ignore_changes = [metadata]\n  }\n}\n`, name)\n\n\t// Updated configuration - changes the spec but keeps metadata the same\n\t// With ignore_changes = [metadata], this should trigger resource_version\n\t// and generation changes without causing \"inconsistent state after apply\" errors\n\tconfigUpdated := fmt.Sprintf(`\nresource \"argocd_project\" \"metadata_computed\" {\n  metadata {\n    name      = \"%s\"\n    namespace = \"argocd\"\n    labels = {\n      \"test\" = \"initial\"\n    }\n  }\n\n  spec {\n    description  = \"updated description\"\n    source_repos = [\"*\", \"https://github.com/example/repo\"]\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"test\"\n    }\n  }\n\n  lifecycle {\n    ignore_changes = [metadata]\n  }\n}\n`, name)\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: configInitial,\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project.metadata_computed\",\n\t\t\t\t\t\t\"metadata.0.name\",\n\t\t\t\t\t\tname,\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_project.metadata_computed\",\n\t\t\t\t\t\t\"metadata.0.resource_version\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_project.metadata_computed\",\n\t\t\t\t\t\t\"metadata.0.generation\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_project.metadata_computed\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Update the spec - this should not cause inconsistent state errors\n\t\t\t\t// even though resource_version and generation will change\n\t\t\t\tConfig: configUpdated,\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project.metadata_computed\",\n\t\t\t\t\t\t\"spec.0.description\",\n\t\t\t\t\t\t\"updated description\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_project.metadata_computed\",\n\t\t\t\t\t\t\"metadata.0.resource_version\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_project.metadata_computed\",\n\t\t\t\t\t\t\"metadata.0.generation\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Apply the same configuration again to ensure no drift\n\t\t\t\tConfig: configUpdated,\n\t\t\t\tConfigPlanChecks: resource.ConfigPlanChecks{\n\t\t\t\t\tPreApply: []plancheck.PlanCheck{\n\t\t\t\t\t\tplancheck.ExpectEmptyPlan(),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t})\n}\n\n// TestAccArgoCDProject_MultipleSpecUpdates tests that multiple sequential spec updates\n// don't cause inconsistent state errors due to rapidly changing resource_version/generation.\n// This is a stress test for issue #807.\nfunc TestAccArgoCDProject_MultipleSpecUpdates(t *testing.T) {\n\tname := acctest.RandString(10)\n\n\tconfigs := []string{\n\t\t// Config 1: Initial\n\t\tfmt.Sprintf(`\nresource \"argocd_project\" \"multi_update\" {\n  metadata {\n    name      = \"%s\"\n    namespace = \"argocd\"\n  }\n\n  spec {\n    description  = \"version 1\"\n    source_repos = [\"*\"]\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n  }\n}\n`, name),\n\t\t// Config 2: Update description\n\t\tfmt.Sprintf(`\nresource \"argocd_project\" \"multi_update\" {\n  metadata {\n    name      = \"%s\"\n    namespace = \"argocd\"\n  }\n\n  spec {\n    description  = \"version 2\"\n    source_repos = [\"*\"]\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n  }\n}\n`, name),\n\t\t// Config 3: Add destination\n\t\tfmt.Sprintf(`\nresource \"argocd_project\" \"multi_update\" {\n  metadata {\n    name      = \"%s\"\n    namespace = \"argocd\"\n  }\n\n  spec {\n    description  = \"version 3\"\n    source_repos = [\"*\"]\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"kube-system\"\n    }\n  }\n}\n`, name),\n\t\t// Config 4: Add role\n\t\tfmt.Sprintf(`\nresource \"argocd_project\" \"multi_update\" {\n  metadata {\n    name      = \"%s\"\n    namespace = \"argocd\"\n  }\n\n  spec {\n    description  = \"version 4\"\n    source_repos = [\"*\"]\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"kube-system\"\n    }\n\n    role {\n      name     = \"test-role\"\n      policies = [\"p, proj:%[1]s:test-role, applications, get, %[1]s/*, allow\"]\n    }\n  }\n}\n`, name),\n\t}\n\n\tsteps := make([]resource.TestStep, len(configs))\n\tfor i, config := range configs {\n\t\tsteps[i] = resource.TestStep{\n\t\t\tConfig: config,\n\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\"argocd_project.multi_update\",\n\t\t\t\t\t\"spec.0.description\",\n\t\t\t\t\tfmt.Sprintf(\"version %d\", i+1),\n\t\t\t\t),\n\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\"argocd_project.multi_update\",\n\t\t\t\t\t\"metadata.0.resource_version\",\n\t\t\t\t),\n\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\"argocd_project.multi_update\",\n\t\t\t\t\t\"metadata.0.generation\",\n\t\t\t\t),\n\t\t\t),\n\t\t}\n\t}\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps:                    steps,\n\t})\n}\n\n// TestAccArgoCDProject_UnknownAnnotationValues tests that argocd_project handles unknown\n// (computed) annotation and label values at plan time without crashing.\n// This is a regression test for issue #846.\n// See: https://github.com/argoproj-labs/terraform-provider-argocd/issues/846\nfunc TestAccArgoCDProject_UnknownAnnotationValues(t *testing.T) {\n\tname := acctest.RandomWithPrefix(\"test-acc\")\n\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\t// First step: terraform_data.test is new so its output is unknown at plan time.\n\t\t\t\t// The argocd_project annotation references this unknown value.\n\t\t\t\t// Before the fix, this would crash with \"Value Conversion Error\".\n\t\t\t\tConfig: testAccArgoCDProjectWithUnknownAnnotation(name, \"initial\"),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project.unknown_annotation\",\n\t\t\t\t\t\t\"metadata.0.annotations.computed-key\",\n\t\t\t\t\t\t\"initial\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project.unknown_annotation\",\n\t\t\t\t\t\t\"metadata.0.labels.computed-label\",\n\t\t\t\t\t\t\"initial\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Second step: changing the input makes the output unknown again at plan time.\n\t\t\t\tConfig: testAccArgoCDProjectWithUnknownAnnotation(name, \"updated\"),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project.unknown_annotation\",\n\t\t\t\t\t\t\"metadata.0.annotations.computed-key\",\n\t\t\t\t\t\t\"updated\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project.unknown_annotation\",\n\t\t\t\t\t\t\"metadata.0.labels.computed-label\",\n\t\t\t\t\t\t\"updated\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc testAccArgoCDProjectWithUnknownAnnotation(name, value string) string {\n\treturn fmt.Sprintf(`\nresource \"terraform_data\" \"test\" {\n  input = \"%s\"\n}\n\nresource \"argocd_project\" \"unknown_annotation\" {\n  metadata {\n    name      = \"%s\"\n    namespace = \"argocd\"\n    annotations = {\n      \"computed-key\" = terraform_data.test.output\n    }\n    labels = {\n      \"computed-label\" = terraform_data.test.output\n    }\n  }\n\n  spec {\n    description  = \"test unknown annotation values\"\n    source_repos = [\"*\"]\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n  }\n}\n\t`, value, name)\n}\n"
  },
  {
    "path": "internal/provider/resource_project_token.go",
    "content": "package provider\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/argoproj-labs/terraform-provider-argocd/internal/diagnostics\"\n\targocdSync \"github.com/argoproj-labs/terraform-provider-argocd/internal/sync\"\n\t\"github.com/argoproj/argo-cd/v3/pkg/apiclient/project\"\n\t\"github.com/cristalhq/jwt/v5\"\n\t\"github.com/hashicorp/terraform-plugin-framework/path\"\n\t\"github.com/hashicorp/terraform-plugin-framework/resource\"\n\t\"github.com/hashicorp/terraform-plugin-framework/resource/schema\"\n\t\"github.com/hashicorp/terraform-plugin-framework/types\"\n\t\"github.com/hashicorp/terraform-plugin-log/tflog\"\n)\n\n// Ensure provider defined types fully satisfy framework interfaces.\nvar _ resource.Resource = &projectTokenResource{}\nvar _ resource.ResourceWithModifyPlan = &projectTokenResource{}\n\nfunc NewProjectTokenResource() resource.Resource {\n\treturn &projectTokenResource{}\n}\n\ntype projectTokenResource struct {\n\tsi *ServerInterface\n}\n\nfunc (r *projectTokenResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse) {\n\tresp.TypeName = req.ProviderTypeName + \"_project_token\"\n}\n\nfunc (r *projectTokenResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) {\n\tresp.Schema = schema.Schema{\n\t\tMarkdownDescription: \"Manages ArgoCD project role JWT tokens. See [Project Roles](https://argo-cd.readthedocs.io/en/stable/user-guide/projects/#project-roles) for more info.\\n\\n~> **Security Notice** The JWT token generated by this resource is treated as sensitive and, thus, not displayed in console output. However, it will be stored *unencrypted* in your Terraform state file. Read more about sensitive data handling in the [Terraform documentation](https://www.terraform.io/docs/language/state/sensitive-data.html).\\n\",\n\t\tAttributes:          projectTokenSchemaAttributes(),\n\t}\n}\n\nfunc (r *projectTokenResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse) {\n\t// Prevent panic if the provider has not been configured.\n\tif req.ProviderData == nil {\n\t\treturn\n\t}\n\n\tsi, ok := req.ProviderData.(*ServerInterface)\n\tif !ok {\n\t\tresp.Diagnostics.AddError(\n\t\t\t\"Unexpected Provider Data Type\",\n\t\t\tfmt.Sprintf(\"Expected *ServerInterface, got: %T. Please report this issue to the provider developers.\", req.ProviderData),\n\t\t)\n\n\t\treturn\n\t}\n\n\tr.si = si\n}\n\nfunc (r *projectTokenResource) ModifyPlan(ctx context.Context, req resource.ModifyPlanRequest, resp *resource.ModifyPlanResponse) {\n\tif req.Plan.Raw.IsNull() {\n\t\t// Resource is being destroyed\n\t\treturn\n\t}\n\n\tvar planData *projectTokenModel\n\n\tresp.Diagnostics.Append(req.Plan.Get(ctx, &planData)...)\n\n\tvar stateData *projectTokenModel\n\n\tresp.Diagnostics.Append(req.State.Get(ctx, &stateData)...)\n\n\tif resp.Diagnostics.HasError() {\n\t\treturn\n\t}\n\n\t// If issued_at is empty, this indicates a new token - nothing to do here\n\tif stateData == nil || stateData.IssuedAt.IsNull() || stateData.IssuedAt.ValueString() == \"\" {\n\t\treturn\n\t}\n\n\tissuedAt, err := strconv.ParseInt(stateData.IssuedAt.ValueString(), 10, 64)\n\tif err != nil {\n\t\tresp.Diagnostics.AddError(\"Invalid issued_at\", fmt.Sprintf(\"invalid issued_at: %s\", err.Error()))\n\t\treturn\n\t}\n\n\t// Check renew_after\n\tif planData != nil && !planData.RenewAfter.IsNull() && !planData.RenewAfter.IsUnknown() {\n\t\trenewAfterDuration, err := time.ParseDuration(planData.RenewAfter.ValueString())\n\t\tif err != nil {\n\t\t\tresp.Diagnostics.AddError(\"Invalid renew_after\", fmt.Sprintf(\"invalid renew_after: %s\", err.Error()))\n\t\t\treturn\n\t\t}\n\n\t\tif time.Now().Unix()-issuedAt > int64(renewAfterDuration.Seconds()) {\n\t\t\t// Token is older than renewAfterDuration - force recreation\n\t\t\tresp.Plan.SetAttribute(ctx, path.Root(\"issued_at\"), types.StringUnknown())\n\t\t\tresp.Plan.SetAttribute(ctx, path.Root(\"id\"), types.StringUnknown())\n\t\t\tresp.Plan.SetAttribute(ctx, path.Root(\"jwt\"), types.StringUnknown())\n\t\t\tresp.Plan.SetAttribute(ctx, path.Root(\"expires_at\"), types.StringUnknown())\n\n\t\t\treturn\n\t\t}\n\t}\n\n\t// Check expiration and renew_before\n\tif stateData != nil && !stateData.ExpiresAt.IsNull() && !stateData.ExpiresAt.IsUnknown() && stateData.ExpiresAt.ValueString() != \"\" {\n\t\texpiresAt, err := strconv.ParseInt(stateData.ExpiresAt.ValueString(), 10, 64)\n\t\tif err != nil {\n\t\t\tresp.Diagnostics.AddError(\"Invalid expires_at\", fmt.Sprintf(\"invalid expires_at: %s\", err.Error()))\n\t\t\treturn\n\t\t}\n\n\t\tif expiresAt == 0 {\n\t\t\t// Token not set to expire - no need to check anything else\n\t\t\treturn\n\t\t}\n\n\t\tif expiresAt < time.Now().Unix() {\n\t\t\t// Token has expired - force recreation\n\t\t\tresp.Plan.SetAttribute(ctx, path.Root(\"issued_at\"), types.StringUnknown())\n\t\t\tresp.Plan.SetAttribute(ctx, path.Root(\"id\"), types.StringUnknown())\n\t\t\tresp.Plan.SetAttribute(ctx, path.Root(\"jwt\"), types.StringUnknown())\n\t\t\tresp.Plan.SetAttribute(ctx, path.Root(\"expires_at\"), types.StringUnknown())\n\n\t\t\treturn\n\t\t}\n\n\t\tif planData != nil && !planData.RenewBefore.IsNull() && !planData.RenewBefore.IsUnknown() {\n\t\t\trenewBeforeDuration, err := time.ParseDuration(planData.RenewBefore.ValueString())\n\t\t\tif err != nil {\n\t\t\t\tresp.Diagnostics.AddError(\"Invalid renew_before\", fmt.Sprintf(\"invalid renew_before: %s\", err.Error()))\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tif expiresAt-time.Now().Unix() < int64(renewBeforeDuration.Seconds()) {\n\t\t\t\t// Token will expire within renewBeforeDuration - force recreation\n\t\t\t\tresp.Plan.SetAttribute(ctx, path.Root(\"issued_at\"), types.StringUnknown())\n\t\t\t\tresp.Plan.SetAttribute(ctx, path.Root(\"id\"), types.StringUnknown())\n\t\t\t\tresp.Plan.SetAttribute(ctx, path.Root(\"jwt\"), types.StringUnknown())\n\t\t\t\tresp.Plan.SetAttribute(ctx, path.Root(\"expires_at\"), types.StringUnknown())\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunc (r *projectTokenResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse) {\n\tvar data *projectTokenModel\n\n\t// Read Terraform configuration data into the model\n\tresp.Diagnostics.Append(req.Plan.Get(ctx, &data)...)\n\n\t// Initialize API clients\n\tresp.Diagnostics.Append(r.si.InitClients(ctx)...)\n\n\t// Check for errors before proceeding\n\tif resp.Diagnostics.HasError() {\n\t\treturn\n\t}\n\n\tprojectName := data.Project.ValueString()\n\trole := data.Role.ValueString()\n\n\topts := &project.ProjectTokenCreateRequest{\n\t\tProject: projectName,\n\t\tRole:    role,\n\t}\n\n\tif !data.Description.IsNull() {\n\t\topts.Description = data.Description.ValueString()\n\t}\n\n\tvar expiresIn int64\n\n\tif !data.ExpiresIn.IsNull() {\n\t\texpiresInDuration, err := time.ParseDuration(data.ExpiresIn.ValueString())\n\t\tif err != nil {\n\t\t\tresp.Diagnostics.AddError(\n\t\t\t\t\"Invalid Expiration Duration\",\n\t\t\t\tfmt.Sprintf(\"token expiration duration for project %s could not be parsed: %s\", projectName, err.Error()),\n\t\t\t)\n\n\t\t\treturn\n\t\t}\n\n\t\texpiresIn = int64(expiresInDuration.Seconds())\n\t\topts.ExpiresIn = expiresIn\n\t}\n\n\tif !data.RenewBefore.IsNull() {\n\t\trenewBeforeDuration, err := time.ParseDuration(data.RenewBefore.ValueString())\n\t\tif err != nil {\n\t\t\tresp.Diagnostics.AddError(\n\t\t\t\t\"Invalid Renewal Duration\",\n\t\t\t\tfmt.Sprintf(\"token renewal duration for project %s could not be parsed: %s\", projectName, err.Error()),\n\t\t\t)\n\n\t\t\treturn\n\t\t}\n\n\t\trenewBefore := int64(renewBeforeDuration.Seconds())\n\t\tif renewBefore > expiresIn {\n\t\t\tresp.Diagnostics.AddError(\n\t\t\t\t\"Invalid Token Configuration\",\n\t\t\t\tfmt.Sprintf(\"renew_before (%d) cannot be greater than expires_in (%d) for project %s\", renewBefore, expiresIn, projectName),\n\t\t\t)\n\n\t\t\treturn\n\t\t}\n\t}\n\n\t// Get or create project mutex safely\n\tprojectMutex := argocdSync.GetProjectMutex(projectName)\n\tprojectMutex.Lock()\n\tdefer projectMutex.Unlock()\n\n\ttokenResp, err := r.si.ProjectClient.CreateToken(ctx, opts)\n\n\tif err != nil {\n\t\tresp.Diagnostics.Append(diagnostics.ArgoCDAPIError(\"create\", \"token for project\", projectName, err)...)\n\t\treturn\n\t}\n\n\ttoken, err := jwt.ParseNoVerify([]byte(tokenResp.GetToken()))\n\tif err != nil {\n\t\tresp.Diagnostics.AddError(\n\t\t\t\"Invalid JWT Token\",\n\t\t\tfmt.Sprintf(\"token for project %s is not a valid jwt: %s\", projectName, err.Error()),\n\t\t)\n\n\t\treturn\n\t}\n\n\tvar claims jwt.RegisteredClaims\n\tif err = json.Unmarshal(token.Claims(), &claims); err != nil {\n\t\tresp.Diagnostics.AddError(\n\t\t\t\"JWT Claims Parse Error\",\n\t\t\tfmt.Sprintf(\"token claims for project %s could not be parsed: %s\", projectName, err.Error()),\n\t\t)\n\n\t\treturn\n\t}\n\n\tif claims.IssuedAt == nil {\n\t\tresp.Diagnostics.AddError(\n\t\t\t\"Missing JWT Issue Date\",\n\t\t\tfmt.Sprintf(\"token claims issue date for project %s is missing\", projectName),\n\t\t)\n\n\t\treturn\n\t}\n\n\tif claims.ID == \"\" {\n\t\tresp.Diagnostics.AddError(\n\t\t\t\"Missing JWT ID\",\n\t\t\tfmt.Sprintf(\"token claims ID for project %s is missing\", projectName),\n\t\t)\n\n\t\treturn\n\t}\n\n\t// Set the response data\n\tdata.ID = types.StringValue(claims.ID)\n\tdata.JWT = types.StringValue(token.String())\n\tdata.IssuedAt = types.StringValue(strconv.FormatInt(claims.IssuedAt.Unix(), 10))\n\n\tif !data.ExpiresIn.IsNull() {\n\t\tif claims.ExpiresAt == nil {\n\t\t\tresp.Diagnostics.AddError(\n\t\t\t\t\"Missing JWT Expiration Date\",\n\t\t\t\tfmt.Sprintf(\"token claims expiration date for project %s is missing\", projectName),\n\t\t\t)\n\n\t\t\treturn\n\t\t}\n\n\t\tdata.ExpiresAt = types.StringValue(strconv.FormatInt(claims.ExpiresAt.Unix(), 10))\n\t} else {\n\t\tdata.ExpiresAt = types.StringValue(\"0\")\n\t}\n\n\ttflog.Trace(ctx, fmt.Sprintf(\"created project token %s for project %s\", claims.ID, projectName))\n\n\t// Save data into Terraform state\n\tresp.Diagnostics.Append(resp.State.Set(ctx, &data)...)\n}\n\nfunc (r *projectTokenResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) {\n\tvar data *projectTokenModel\n\n\t// Read Terraform prior state data into the model\n\tresp.Diagnostics.Append(req.State.Get(ctx, &data)...)\n\n\t// Initialize API clients\n\tresp.Diagnostics.Append(r.si.InitClients(ctx)...)\n\n\t// Check for errors before proceeding\n\tif resp.Diagnostics.HasError() {\n\t\treturn\n\t}\n\n\tprojectName := data.Project.ValueString()\n\n\t// Get or create project mutex safely\n\tprojectMutex := argocdSync.GetProjectMutex(projectName)\n\n\t// Delete token from state if project has been deleted in an out-of-band fashion\n\tprojectMutex.RLock()\n\tdefer projectMutex.RUnlock()\n\n\tp, err := r.si.ProjectClient.Get(ctx, &project.ProjectQuery{\n\t\tName: projectName,\n\t})\n\n\tif err != nil {\n\t\tif strings.Contains(err.Error(), \"NotFound\") {\n\t\t\tresp.State.RemoveResource(ctx)\n\t\t\treturn\n\t\t}\n\n\t\tresp.Diagnostics.Append(diagnostics.ArgoCDAPIError(\"read\", \"project\", projectName, err)...)\n\n\t\treturn\n\t}\n\n\ttoken, _, err := p.GetJWTToken(\n\t\tdata.Role.ValueString(),\n\t\t0,\n\t\tdata.ID.ValueString(),\n\t)\n\n\tif err != nil {\n\t\t// Token has been deleted in an out-of-band fashion\n\t\tresp.State.RemoveResource(ctx)\n\t\treturn\n\t}\n\n\tdata.IssuedAt = types.StringValue(strconv.FormatInt(token.IssuedAt, 10))\n\tdata.ExpiresAt = types.StringValue(strconv.FormatInt(token.ExpiresAt, 10))\n\n\t// Save updated data into Terraform state\n\tresp.Diagnostics.Append(resp.State.Set(ctx, &data)...)\n}\n\nfunc (r *projectTokenResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) {\n\tvar data *projectTokenModel\n\n\tvar stateData *projectTokenModel\n\n\t// Read Terraform plan data into the model\n\tresp.Diagnostics.Append(req.Plan.Get(ctx, &data)...)\n\tresp.Diagnostics.Append(req.State.Get(ctx, &stateData)...)\n\n\t// Initialize API clients\n\tresp.Diagnostics.Append(r.si.InitClients(ctx)...)\n\n\t// Check for errors before proceeding\n\tif resp.Diagnostics.HasError() {\n\t\treturn\n\t}\n\n\t// Check if this is a token renewal (issued_at is unknown in plan)\n\tif data.IssuedAt.IsUnknown() {\n\t\t// Delete the old token first\n\t\tif stateData != nil && !stateData.ID.IsNull() {\n\t\t\tdeleteReq := resource.DeleteRequest{State: req.State}\n\t\t\tdeleteResp := resource.DeleteResponse{Diagnostics: resp.Diagnostics}\n\t\t\tr.Delete(ctx, deleteReq, &deleteResp)\n\t\t\tresp.Diagnostics = deleteResp.Diagnostics\n\n\t\t\tif resp.Diagnostics.HasError() {\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\n\t\t// Create a new token\n\t\tcreateReq := resource.CreateRequest{Plan: req.Plan}\n\t\tcreateResp := resource.CreateResponse{State: resp.State, Diagnostics: resp.Diagnostics}\n\t\tr.Create(ctx, createReq, &createResp)\n\t\tresp.State = createResp.State\n\t\tresp.Diagnostics = createResp.Diagnostics\n\n\t\treturn\n\t}\n\n\tprojectName := data.Project.ValueString()\n\n\t// Validate renewal configuration\n\tvar expiresIn int64\n\n\tif !data.ExpiresIn.IsNull() {\n\t\texpiresInDuration, err := time.ParseDuration(data.ExpiresIn.ValueString())\n\t\tif err != nil {\n\t\t\tresp.Diagnostics.AddError(\n\t\t\t\t\"Invalid Expiration Duration\",\n\t\t\t\tfmt.Sprintf(\"token expiration duration for project %s could not be parsed: %s\", projectName, err.Error()),\n\t\t\t)\n\n\t\t\treturn\n\t\t}\n\n\t\texpiresIn = int64(expiresInDuration.Seconds())\n\t}\n\n\tif !data.RenewBefore.IsNull() {\n\t\trenewBeforeDuration, err := time.ParseDuration(data.RenewBefore.ValueString())\n\t\tif err != nil {\n\t\t\tresp.Diagnostics.AddError(\n\t\t\t\t\"Invalid Renewal Duration\",\n\t\t\t\tfmt.Sprintf(\"token renewal duration for project %s could not be parsed: %s\", projectName, err.Error()),\n\t\t\t)\n\n\t\t\treturn\n\t\t}\n\n\t\trenewBefore := int64(renewBeforeDuration.Seconds())\n\t\tif renewBefore > expiresIn {\n\t\t\tresp.Diagnostics.AddError(\n\t\t\t\t\"Invalid Token Configuration\",\n\t\t\t\tfmt.Sprintf(\"renew_before (%d) cannot be greater than expires_in (%d) for project %s\", renewBefore, expiresIn, projectName),\n\t\t\t)\n\n\t\t\treturn\n\t\t}\n\t}\n\n\t// Update the state data with the plan data\n\t// (no actual API update needed as tokens are immutable)\n\tresp.Diagnostics.Append(resp.State.Set(ctx, &data)...)\n}\n\nfunc (r *projectTokenResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) {\n\tvar data *projectTokenModel\n\n\t// Read Terraform prior state data into the model\n\tresp.Diagnostics.Append(req.State.Get(ctx, &data)...)\n\n\t// Initialize API clients\n\tresp.Diagnostics.Append(r.si.InitClients(ctx)...)\n\n\t// Check for errors before proceeding\n\tif resp.Diagnostics.HasError() {\n\t\treturn\n\t}\n\n\tprojectName := data.Project.ValueString()\n\n\t// Get or create project mutex safely\n\tprojectMutex := argocdSync.GetProjectMutex(projectName)\n\tprojectMutex.Lock()\n\tdefer projectMutex.Unlock()\n\n\t_, err := r.si.ProjectClient.DeleteToken(ctx, &project.ProjectTokenDeleteRequest{\n\t\tId:      data.ID.ValueString(),\n\t\tProject: projectName,\n\t\tRole:    data.Role.ValueString(),\n\t})\n\n\tif err != nil {\n\t\tresp.Diagnostics.Append(diagnostics.ArgoCDAPIError(\"delete\", \"token for project\", projectName, err)...)\n\t\treturn\n\t}\n\n\ttflog.Trace(ctx, fmt.Sprintf(\"deleted project token %s for project %s\", data.ID.ValueString(), projectName))\n}\n\nfunc (r *projectTokenResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) {\n\t// Import format: project:role:id\n\tparts := strings.Split(req.ID, \":\")\n\tif len(parts) != 3 {\n\t\tresp.Diagnostics.AddError(\n\t\t\t\"Invalid Import ID\",\n\t\t\t\"Import ID must be in the format 'project:role:id'\",\n\t\t)\n\n\t\treturn\n\t}\n\n\tresp.Diagnostics.Append(resp.State.SetAttribute(ctx, path.Root(\"project\"), parts[0])...)\n\tresp.Diagnostics.Append(resp.State.SetAttribute(ctx, path.Root(\"role\"), parts[1])...)\n\tresp.Diagnostics.Append(resp.State.SetAttribute(ctx, path.Root(\"id\"), parts[2])...)\n}\n"
  },
  {
    "path": "internal/provider/resource_project_token_test.go",
    "content": "package provider\n\nimport (\n\t\"fmt\"\n\t\"math/rand\"\n\t\"regexp\"\n\t\"strconv\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/hashicorp/terraform-plugin-testing/helper/resource\"\n\t\"github.com/hashicorp/terraform-plugin-testing/plancheck\"\n\t\"github.com/hashicorp/terraform-plugin-testing/terraform\"\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestAccArgoCDProjectToken(t *testing.T) {\n\texpiresInDurationFunc := func(i int) time.Duration {\n\t\td, err := time.ParseDuration(fmt.Sprintf(\"%ds\", i))\n\t\tassert.NoError(t, err)\n\n\t\treturn d\n\t}\n\n\tcount := 3 + rand.Intn(7)\n\texpIn1 := expiresInDurationFunc(rand.Intn(100000))\n\n\tresource.ParallelTest(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDProjectTokenSimple(),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_project_token.simple\",\n\t\t\t\t\t\t\"issued_at\",\n\t\t\t\t\t),\n\t\t\t\t\ttestCheckTokenIssuedAt(\n\t\t\t\t\t\t\"argocd_project_token.simple\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDProjectTokenExpiry(int64(expIn1.Seconds())),\n\t\t\t\tCheck: testCheckTokenExpiresAt(\n\t\t\t\t\t\"argocd_project_token.expires\",\n\t\t\t\t\tint64(expIn1.Seconds()),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDProjectTokenMultiple(count),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\ttestTokenIssuedAtSet(\n\t\t\t\t\t\t\"argocd_project_token.multiple1a\",\n\t\t\t\t\t\tcount,\n\t\t\t\t\t),\n\t\t\t\t\ttestTokenIssuedAtSet(\n\t\t\t\t\t\t\"argocd_project_token.multiple1b\",\n\t\t\t\t\t\tcount,\n\t\t\t\t\t),\n\t\t\t\t\ttestTokenIssuedAtSet(\n\t\t\t\t\t\t\"argocd_project_token.multiple2a\",\n\t\t\t\t\t\tcount,\n\t\t\t\t\t),\n\t\t\t\t\ttestTokenIssuedAtSet(\n\t\t\t\t\t\t\"argocd_project_token.multiple2b\",\n\t\t\t\t\t\tcount,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDProjectToken_RenewBefore(t *testing.T) {\n\tresourceName := \"argocd_project_token.renew_before\"\n\n\texpiresInSeconds := 30\n\texpiresIn := fmt.Sprintf(\"%ds\", expiresInSeconds)\n\texpiresInDuration, _ := time.ParseDuration(expiresIn)\n\n\trenewBeforeSeconds := expiresInSeconds - 1\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDProjectTokenRenewBeforeSuccess(expiresIn, \"20s\"),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\ttestCheckTokenExpiresAt(resourceName, int64(expiresInDuration.Seconds())),\n\t\t\t\t\tresource.TestCheckResourceAttr(resourceName, \"renew_before\", \"20s\"),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDProjectTokenRenewBeforeSuccess(expiresIn, fmt.Sprintf(\"%ds\", renewBeforeSeconds)),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(resourceName, \"renew_before\", fmt.Sprintf(\"%ds\", renewBeforeSeconds)),\n\t\t\t\t\ttestDelay(renewBeforeSeconds+1),\n\t\t\t\t),\n\t\t\t\tExpectNonEmptyPlan: true, // token should be recreated when refreshed at end of step due to delay above\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig:      testAccArgoCDProjectTokenRenewBeforeFailure(expiresInDuration),\n\t\t\t\tExpectError: regexp.MustCompile(\"renew_before .* cannot be greater than expires_in .*\"),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDProjectToken_RenewAfter(t *testing.T) {\n\tresourceName := \"argocd_project_token.renew_after\"\n\trenewAfterSeconds := 30\n\n\t// Note: not running in parallel as this is a time sensitive test case\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDProjectTokenRenewAfter(renewAfterSeconds),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(resourceName, \"renew_after\", fmt.Sprintf(\"%ds\", renewAfterSeconds)),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDProjectTokenRenewAfter(renewAfterSeconds),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\ttestDelay(renewAfterSeconds + 1),\n\t\t\t\t),\n\t\t\t\tExpectNonEmptyPlan: true, // token should be recreated when refreshed at end of step due to delay above\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDProjectTokenRenewAfter(renewAfterSeconds),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(resourceName, \"renew_after\", fmt.Sprintf(\"%ds\", renewAfterSeconds)),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc testAccArgoCDProjectTokenSimple() string {\n\treturn `\nresource \"argocd_project_token\" \"simple\" {\n  project = \"myproject1\"\n  role    = \"test-role1234\"\n}\n`\n}\n\nfunc testAccArgoCDProjectTokenExpiry(expiresIn int64) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_project_token\" \"expires\" {\n  project = \"myproject1\"\n  role    = \"test-role1234\"\n  expires_in = \"%ds\"\n}\n`, expiresIn)\n}\n\nfunc testAccArgoCDProjectTokenMultiple(count int) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_project_token\" \"multiple1a\" {\n  count   = %d\n  project = \"myproject1\"\n  role    = \"test-role1234\"\n}\n\nresource \"argocd_project_token\" \"multiple1b\" {\n  count   = %d\n  project = \"myproject1\"\n  role    = \"test-role4321\"\n}\n\nresource \"argocd_project_token\" \"multiple2a\" {\n  count   = %d\n  project = \"myproject2\"\n  role    = \"test-role1234\"\n}\n\nresource \"argocd_project_token\" \"multiple2b\" {\n  count   = %d\n  project = \"myproject2\"\n  role    = \"test-role4321\"\n}\n\n`, count, count, count, count)\n}\n\nfunc testAccArgoCDProjectTokenRenewBeforeSuccess(expiresIn, renewBefore string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_project_token\" \"renew_before\" {\n  project = \"myproject1\"\n  role    = \"test-role1234\"\n  expires_in = \"%s\"\n  renew_before = \"%s\"\n}\n`, expiresIn, renewBefore)\n}\n\nfunc testAccArgoCDProjectTokenRenewBeforeFailure(expiresInDuration time.Duration) string {\n\texpiresIn := int64(expiresInDuration.Seconds())\n\trenewBefore := int64(expiresInDuration.Seconds() + 1.0)\n\n\treturn fmt.Sprintf(`\nresource \"argocd_project_token\" \"renew_before\" {\n  project = \"myproject1\"\n  role    = \"test-role1234\"\n  expires_in = \"%ds\"\n  renew_before = \"%ds\"\n}\n`, expiresIn, renewBefore)\n}\n\nfunc testAccArgoCDProjectTokenRenewAfter(renewAfter int) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_project_token\" \"renew_after\" {\n  project     = \"myproject1\"\n  description = \"auto-renewing long-lived token\"\n  role        = \"test-role1234\"\n  renew_after = \"%ds\"\n}\n`, renewAfter)\n}\n\nfunc testCheckTokenIssuedAt(resourceName string) resource.TestCheckFunc {\n\treturn func(s *terraform.State) error {\n\t\trs, ok := s.RootModule().Resources[resourceName]\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"not found: %s\", resourceName)\n\t\t}\n\n\t\tif rs.Primary.ID == \"\" {\n\t\t\treturn fmt.Errorf(\"token ID is not set\")\n\t\t}\n\n\t\t_issuedAt, ok := rs.Primary.Attributes[\"issued_at\"]\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"testCheckTokenIssuedAt: issued_at is not set\")\n\t\t}\n\n\t\t_, err := convertStringToInt64(_issuedAt)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"testCheckTokenIssuedAt: string attribute 'issued_at' stored in state cannot be converted to int64: %s\", err)\n\t\t}\n\n\t\treturn nil\n\t}\n}\n\nfunc testCheckTokenExpiresAt(resourceName string, expiresIn int64) resource.TestCheckFunc {\n\treturn func(s *terraform.State) error {\n\t\trs, ok := s.RootModule().Resources[resourceName]\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"not found: %s\", resourceName)\n\t\t}\n\n\t\tif rs.Primary.ID == \"\" {\n\t\t\treturn fmt.Errorf(\"token ID is not set\")\n\t\t}\n\n\t\t_expiresAt, ok := rs.Primary.Attributes[\"expires_at\"]\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"expires_at is not set\")\n\t\t}\n\n\t\t_issuedAt, ok := rs.Primary.Attributes[\"issued_at\"]\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"testCheckTokenExpiresAt: issued_at is not set\")\n\t\t}\n\n\t\texpiresAt, err := convertStringToInt64(_expiresAt)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"testCheckTokenExpiresAt: string attribute 'expires_at' stored in state cannot be converted to int64: %s\", err)\n\t\t}\n\n\t\tissuedAt, err := convertStringToInt64(_issuedAt)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"testCheckTokenExpiresAt: string attribute 'issued_at' stored in state cannot be converted to int64: %s\", err)\n\t\t}\n\n\t\tif issuedAt+expiresIn != expiresAt {\n\t\t\treturn fmt.Errorf(\"testCheckTokenExpiresAt: issuedAt + expiresIn != expiresAt : %d + %d != %d\", issuedAt, expiresIn, expiresAt)\n\t\t}\n\n\t\treturn nil\n\t}\n}\n\nfunc testTokenIssuedAtSet(name string, count int) resource.TestCheckFunc {\n\treturn func(s *terraform.State) error {\n\t\tkey := \"issued_at\"\n\n\t\tfor i := 0; i < count; i++ {\n\t\t\tms := s.RootModule()\n\t\t\t_name := fmt.Sprintf(\"%s.%d\", name, i)\n\n\t\t\trs, ok := ms.Resources[_name]\n\t\t\tif !ok {\n\t\t\t\treturn fmt.Errorf(\"not found: %s in %s\", _name, ms.Path)\n\t\t\t}\n\n\t\t\tis := rs.Primary\n\t\t\tif is == nil {\n\t\t\t\treturn fmt.Errorf(\"no primary instance: %s in %s\", _name, ms.Path)\n\t\t\t}\n\n\t\t\tif val, ok := is.Attributes[key]; !ok || val == \"\" {\n\t\t\t\treturn fmt.Errorf(\"%s: Attribute '%s' expected to be set\", _name, key)\n\t\t\t}\n\t\t}\n\n\t\treturn nil\n\t}\n}\n\nfunc testDelay(seconds int) resource.TestCheckFunc {\n\treturn func(s *terraform.State) error {\n\t\ttime.Sleep(time.Duration(seconds) * time.Second)\n\t\treturn nil\n\t}\n}\n\n// TestAccArgoCDProjectToken_BasicFieldsConsistency tests consistency of basic token fields\nfunc TestAccArgoCDProjectToken_BasicFieldsConsistency(t *testing.T) {\n\tconfig := `\nresource \"argocd_project_token\" \"basic_consistency\" {\n  project     = \"myproject1\"\n  role        = \"test-role1234\"\n  description = \"test token for consistency\"\n}\n`\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project_token.basic_consistency\",\n\t\t\t\t\t\t\"project\",\n\t\t\t\t\t\t\"myproject1\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project_token.basic_consistency\",\n\t\t\t\t\t\t\"role\",\n\t\t\t\t\t\t\"test-role1234\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project_token.basic_consistency\",\n\t\t\t\t\t\t\"description\",\n\t\t\t\t\t\t\"test token for consistency\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_project_token.basic_consistency\",\n\t\t\t\t\t\t\"issued_at\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Apply the same configuration again to test for consistency\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project_token.basic_consistency\",\n\t\t\t\t\t\t\"project\",\n\t\t\t\t\t\t\"myproject1\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project_token.basic_consistency\",\n\t\t\t\t\t\t\"role\",\n\t\t\t\t\t\t\"test-role1234\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project_token.basic_consistency\",\n\t\t\t\t\t\t\"description\",\n\t\t\t\t\t\t\"test token for consistency\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_project_token.basic_consistency\",\n\t\t\t\t\t\t\"issued_at\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\n// TestAccArgoCDProjectToken_ExpiryFieldsConsistency tests consistency of expiry-related fields\nfunc TestAccArgoCDProjectToken_ExpiryFieldsConsistency(t *testing.T) {\n\tconfig := `\nresource \"argocd_project_token\" \"expiry_consistency\" {\n  project    = \"myproject1\"\n  role       = \"test-role1234\"\n  expires_in = \"3600s\"\n}\n`\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project_token.expiry_consistency\",\n\t\t\t\t\t\t\"expires_in\",\n\t\t\t\t\t\t\"3600s\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_project_token.expiry_consistency\",\n\t\t\t\t\t\t\"expires_at\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_project_token.expiry_consistency\",\n\t\t\t\t\t\t\"issued_at\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Apply the same configuration again to test for consistency\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project_token.expiry_consistency\",\n\t\t\t\t\t\t\"expires_in\",\n\t\t\t\t\t\t\"3600s\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_project_token.expiry_consistency\",\n\t\t\t\t\t\t\"expires_at\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_project_token.expiry_consistency\",\n\t\t\t\t\t\t\"issued_at\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\n// TestAccArgoCDProjectToken_RenewFieldsConsistency tests consistency of renew-related fields\nfunc TestAccArgoCDProjectToken_RenewFieldsConsistency(t *testing.T) {\n\tconfig := `\nresource \"argocd_project_token\" \"renew_consistency\" {\n  project      = \"myproject1\"\n  role         = \"test-role1234\"\n  expires_in   = \"3600s\"\n  renew_before = \"600s\"\n}\n`\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project_token.renew_consistency\",\n\t\t\t\t\t\t\"expires_in\",\n\t\t\t\t\t\t\"3600s\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project_token.renew_consistency\",\n\t\t\t\t\t\t\"renew_before\",\n\t\t\t\t\t\t\"600s\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_project_token.renew_consistency\",\n\t\t\t\t\t\t\"expires_at\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Apply the same configuration again to test for consistency\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project_token.renew_consistency\",\n\t\t\t\t\t\t\"expires_in\",\n\t\t\t\t\t\t\"3600s\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project_token.renew_consistency\",\n\t\t\t\t\t\t\"renew_before\",\n\t\t\t\t\t\t\"600s\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_project_token.renew_consistency\",\n\t\t\t\t\t\t\"expires_at\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\n// TestAccArgoCDProjectToken_RenewAfterConsistency tests consistency of renew_after field\nfunc TestAccArgoCDProjectToken_RenewAfterConsistency(t *testing.T) {\n\tconfig := `\nresource \"argocd_project_token\" \"renew_after_consistency\" {\n  project     = \"myproject1\"\n  role        = \"test-role1234\"\n  description = \"long-lived token with renew_after\"\n  renew_after = \"86400s\"\n}\n`\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project_token.renew_after_consistency\",\n\t\t\t\t\t\t\"project\",\n\t\t\t\t\t\t\"myproject1\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project_token.renew_after_consistency\",\n\t\t\t\t\t\t\"role\",\n\t\t\t\t\t\t\"test-role1234\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project_token.renew_after_consistency\",\n\t\t\t\t\t\t\"renew_after\",\n\t\t\t\t\t\t\"86400s\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project_token.renew_after_consistency\",\n\t\t\t\t\t\t\"description\",\n\t\t\t\t\t\t\"long-lived token with renew_after\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Apply the same configuration again to test for consistency\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project_token.renew_after_consistency\",\n\t\t\t\t\t\t\"project\",\n\t\t\t\t\t\t\"myproject1\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project_token.renew_after_consistency\",\n\t\t\t\t\t\t\"role\",\n\t\t\t\t\t\t\"test-role1234\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project_token.renew_after_consistency\",\n\t\t\t\t\t\t\"renew_after\",\n\t\t\t\t\t\t\"86400s\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_project_token.renew_after_consistency\",\n\t\t\t\t\t\t\"description\",\n\t\t\t\t\t\t\"long-lived token with renew_after\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc convertStringToInt64(s string) (i int64, err error) {\n\ti, err = strconv.ParseInt(s, 10, 64)\n\treturn\n}\n\n// TestAccArgoCDProjectToken_ProviderUpgradeStateMigration tests that tokens created with the\n// old SDK-based provider (v7.12.0) can be successfully read and managed by the new\n// framework-based provider. This ensures backward compatibility when upgrading the provider.\nfunc TestAccArgoCDProjectToken_ProviderUpgradeStateMigration(t *testing.T) {\n\tconfig := testAccArgoCDProjectTokenForStateMigration()\n\n\tresource.Test(t, resource.TestCase{\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\t// Step 1: Create tokens using old SDK-based provider (v7.12.0)\n\t\t\t\tExternalProviders: map[string]resource.ExternalProvider{\n\t\t\t\t\t\"argocd\": {\n\t\t\t\t\t\tVersionConstraint: \"7.12.0\",\n\t\t\t\t\t\tSource:            \"argoproj-labs/argocd\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\"argocd_project_token.migration_simple\", \"issued_at\"),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\"argocd_project_token.migration_simple\", \"id\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_project_token.migration_simple\", \"project\", \"myproject1\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_project_token.migration_simple\", \"role\", \"test-role1234\"),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Step 2: Upgrade to new framework-based provider - verify it can read existing state\n\t\t\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\t\t\tConfig:                   config,\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\"argocd_project_token.migration_simple\", \"issued_at\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_project_token.migration_simple\", \"project\", \"myproject1\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_project_token.migration_simple\", \"role\", \"test-role1234\"),\n\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\"argocd_project_token.migration_with_expiry\", \"issued_at\"),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\"argocd_project_token.migration_with_expiry\", \"expires_at\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_project_token.migration_with_expiry\", \"description\", \"token with expiration\"),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Step 3: Verify no unexpected plan changes after migration\n\t\t\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\t\t\tConfig:                   config,\n\t\t\t\tConfigPlanChecks: resource.ConfigPlanChecks{\n\t\t\t\t\tPreApply: []plancheck.PlanCheck{\n\t\t\t\t\t\tplancheck.ExpectEmptyPlan(),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc testAccArgoCDProjectTokenForStateMigration() string {\n\treturn `\nresource \"argocd_project_token\" \"migration_simple\" {\n  project = \"myproject1\"\n  role    = \"test-role1234\"\n}\n\nresource \"argocd_project_token\" \"migration_with_expiry\" {\n  project     = \"myproject1\"\n  role        = \"test-role1234\"\n  description = \"token with expiration\"\n  expires_in  = \"7200s\"\n}\n`\n}\n"
  },
  {
    "path": "internal/provider/resource_repository.go",
    "content": "package provider\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"regexp\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/argoproj-labs/terraform-provider-argocd/internal/diagnostics\"\n\t\"github.com/argoproj-labs/terraform-provider-argocd/internal/features\"\n\t\"github.com/argoproj-labs/terraform-provider-argocd/internal/sync\"\n\t\"github.com/argoproj/argo-cd/v3/pkg/apiclient/repository\"\n\t\"github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1\"\n\t\"github.com/hashicorp/terraform-plugin-framework/diag\"\n\t\"github.com/hashicorp/terraform-plugin-framework/path\"\n\t\"github.com/hashicorp/terraform-plugin-framework/resource\"\n\t\"github.com/hashicorp/terraform-plugin-framework/resource/schema\"\n\t\"github.com/hashicorp/terraform-plugin-log/tflog\"\n\t\"github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry\"\n)\n\n// Ensure provider defined types fully satisfy framework interfaces.\nvar _ resource.Resource = &repositoryResource{}\nvar _ resource.ResourceWithImportState = &repositoryResource{}\n\nfunc NewRepositoryResource() resource.Resource {\n\treturn &repositoryResource{}\n}\n\n// repositoryResource defines the resource implementation.\ntype repositoryResource struct {\n\tsi *ServerInterface\n}\n\nfunc (r *repositoryResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse) {\n\tresp.TypeName = req.ProviderTypeName + \"_repository\"\n}\n\nfunc (r *repositoryResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) {\n\tresp.Schema = schema.Schema{\n\t\tMarkdownDescription: \"Manages [repositories](https://argo-cd.readthedocs.io/en/stable/operator-manual/declarative-setup/#repositories) within ArgoCD.\",\n\t\tAttributes:          repositorySchemaAttributes(),\n\t}\n}\n\nfunc (r *repositoryResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse) {\n\t// Prevent panic if the provider has not been configured.\n\tif req.ProviderData == nil {\n\t\treturn\n\t}\n\n\tsi, ok := req.ProviderData.(*ServerInterface)\n\tif !ok {\n\t\tresp.Diagnostics.AddError(\n\t\t\t\"Unexpected Provider Data Type\",\n\t\t\tfmt.Sprintf(\"Expected *ServerInterface, got: %T. Please report this issue to the provider developers.\", req.ProviderData),\n\t\t)\n\n\t\treturn\n\t}\n\n\tr.si = si\n}\n\nfunc (r *repositoryResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse) {\n\tvar data repositoryModel\n\n\t// Read Terraform configuration data into the model\n\tresp.Diagnostics.Append(req.Plan.Get(ctx, &data)...)\n\n\t// Initialize API clients\n\tresp.Diagnostics.Append(r.si.InitClients(ctx)...)\n\n\t// Check for errors before proceeding\n\tif resp.Diagnostics.HasError() {\n\t\treturn\n\t}\n\n\tif !r.si.IsFeatureSupported(features.RepositoryDepth) && !data.Depth.IsUnknown() && !data.Depth.IsNull() && data.Depth.ValueInt64() > 0 {\n\t\tresp.Diagnostics.Append(diagnostics.FeatureNotSupported(features.RepositoryDepth)...)\n\t\treturn\n\t}\n\n\t// Convert to API model\n\trepo, err := data.toAPIModel()\n\tif err != nil {\n\t\tresp.Diagnostics.AddError(\"Failed to convert repository model\", err.Error())\n\t\treturn\n\t}\n\n\ttimeout := 2 * time.Minute\n\n\t// Create repository with retry logic for SSH handshake issues\n\tvar createdRepo *v1alpha1.Repository\n\n\tretryErr := retry.RetryContext(ctx, timeout, func() *retry.RetryError {\n\t\tsync.RepositoryMutex.Lock()\n\t\tdefer sync.RepositoryMutex.Unlock()\n\n\t\tvar createErr error\n\t\tcreatedRepo, createErr = r.si.RepositoryClient.CreateRepository(\n\t\t\tctx,\n\t\t\t&repository.RepoCreateRequest{\n\t\t\t\tRepo:   repo,\n\t\t\t\tUpsert: false,\n\t\t\t},\n\t\t)\n\n\t\tif createErr != nil {\n\t\t\t// Check for SSH handshake issues and retry\n\t\t\tif matched, _ := regexp.MatchString(\"ssh: handshake failed: knownhosts: key is unknown\", createErr.Error()); matched {\n\t\t\t\ttflog.Warn(ctx, fmt.Sprintf(\"SSH handshake failed for repository %s, retrying in case a repository certificate has been set recently\", repo.Repo))\n\t\t\t\treturn retry.RetryableError(createErr)\n\t\t\t}\n\n\t\t\treturn retry.NonRetryableError(createErr)\n\t\t}\n\n\t\tif createdRepo == nil {\n\t\t\treturn retry.NonRetryableError(fmt.Errorf(\"ArgoCD did not return an error or a repository result\"))\n\t\t}\n\n\t\tif createdRepo.ConnectionState.Status == v1alpha1.ConnectionStatusFailed {\n\t\t\treturn retry.NonRetryableError(fmt.Errorf(\"could not connect to repository %s: %s\", repo.Repo, createdRepo.ConnectionState.Message))\n\t\t}\n\n\t\treturn nil\n\t})\n\n\tif retryErr != nil {\n\t\tresp.Diagnostics.Append(diagnostics.ArgoCDAPIError(\"create\", \"repository\", repo.Repo, retryErr)...)\n\t\treturn\n\t}\n\n\ttflog.Trace(ctx, fmt.Sprintf(\"created repository %s\", createdRepo.Repo))\n\n\t// Save data into Terraform state\n\tresp.Diagnostics.Append(resp.State.Set(ctx, data.updateFromAPI(createdRepo))...)\n\n\t// Perform a read to get the latest state with connection status\n\tif !resp.Diagnostics.HasError() {\n\t\treadResp := &resource.ReadResponse{State: resp.State, Diagnostics: resp.Diagnostics}\n\t\tr.Read(ctx, resource.ReadRequest{State: resp.State}, readResp)\n\t\tresp.Diagnostics = readResp.Diagnostics\n\t\tresp.State = readResp.State\n\t}\n}\n\nfunc (r *repositoryResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) {\n\tvar data repositoryModel\n\n\t// Read Terraform prior state data into the model\n\tresp.Diagnostics.Append(req.State.Get(ctx, &data)...)\n\n\t// Initialize API clients\n\tresp.Diagnostics.Append(r.si.InitClients(ctx)...)\n\n\t// Check for errors before proceeding\n\tif resp.Diagnostics.HasError() {\n\t\treturn\n\t}\n\n\t// Read repository from API\n\trepo, diags := r.readRepository(ctx, data.Repo.ValueString(), data.Project.ValueString())\n\tresp.Diagnostics.Append(diags...)\n\n\tif resp.Diagnostics.HasError() {\n\t\treturn\n\t}\n\n\t// If repository was not found, remove from state\n\tif repo == nil {\n\t\tresp.State.RemoveResource(ctx)\n\t\treturn\n\t}\n\n\t// Save updated data into Terraform state\n\tresp.Diagnostics.Append(resp.State.Set(ctx, data.updateFromAPI(repo))...)\n}\n\nfunc (r *repositoryResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) {\n\tvar data repositoryModel\n\n\t// Read Terraform plan data into the model\n\tresp.Diagnostics.Append(req.Plan.Get(ctx, &data)...)\n\n\t// Initialize API clients\n\tresp.Diagnostics.Append(r.si.InitClients(ctx)...)\n\n\t// Check for errors before proceeding\n\tif resp.Diagnostics.HasError() {\n\t\treturn\n\t}\n\n\tif !r.si.IsFeatureSupported(features.RepositoryDepth) && !data.Depth.IsUnknown() && !data.Depth.IsNull() && data.Depth.ValueInt64() > 0 {\n\t\tresp.Diagnostics.Append(diagnostics.FeatureNotSupported(features.RepositoryDepth)...)\n\t\treturn\n\t}\n\n\t// Convert to API model\n\trepo, err := data.toAPIModel()\n\tif err != nil {\n\t\tresp.Diagnostics.AddError(\"Failed to convert repository model\", err.Error())\n\t\treturn\n\t}\n\n\tvar updatedRepo *v1alpha1.Repository\n\n\tfunc() {\n\t\t// Keep mutex enclosed in a function to keep the lock scoped to it and to prevent deadlocking\n\t\tsync.RepositoryMutex.Lock()\n\t\tdefer sync.RepositoryMutex.Unlock()\n\n\t\tupdatedRepo, err = r.si.RepositoryClient.UpdateRepository(\n\t\t\tctx,\n\t\t\t&repository.RepoUpdateRequest{Repo: repo},\n\t\t)\n\t}()\n\n\tif err != nil {\n\t\tresp.Diagnostics.Append(diagnostics.ArgoCDAPIError(\"update\", \"repository\", repo.Repo, err)...)\n\t\treturn\n\t}\n\n\tif updatedRepo == nil {\n\t\tresp.Diagnostics.AddError(\"ArgoCD did not return an error or a repository result\", \"\")\n\t\treturn\n\t}\n\n\tif updatedRepo.ConnectionState.Status == v1alpha1.ConnectionStatusFailed {\n\t\tresp.Diagnostics.AddError(\n\t\t\t\"Repository connection failed\",\n\t\t\tfmt.Sprintf(\"could not connect to repository %s: %s\", repo.Repo, updatedRepo.ConnectionState.Message),\n\t\t)\n\n\t\treturn\n\t}\n\n\ttflog.Trace(ctx, fmt.Sprintf(\"updated repository %s\", updatedRepo.Repo))\n\n\t// Save updated data into Terraform state\n\tresp.Diagnostics.Append(resp.State.Set(ctx, data.updateFromAPI(updatedRepo))...)\n\n\t// Perform a read to get the latest state\n\tif !resp.Diagnostics.HasError() {\n\t\treadResp := &resource.ReadResponse{State: resp.State, Diagnostics: resp.Diagnostics}\n\t\tr.Read(ctx, resource.ReadRequest{State: resp.State}, readResp)\n\t\tresp.Diagnostics = readResp.Diagnostics\n\t\tresp.State = readResp.State\n\t}\n}\n\nfunc (r *repositoryResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) {\n\tvar data repositoryModel\n\n\t// Read Terraform prior state data into the model\n\tresp.Diagnostics.Append(req.State.Get(ctx, &data)...)\n\n\t// Initialize API clients\n\tresp.Diagnostics.Append(r.si.InitClients(ctx)...)\n\n\t// Check for errors before proceeding\n\tif resp.Diagnostics.HasError() {\n\t\treturn\n\t}\n\n\t// Delete repository\n\tsync.RepositoryMutex.Lock()\n\tdefer sync.RepositoryMutex.Unlock()\n\n\t_, err := r.si.RepositoryClient.DeleteRepository(\n\t\tctx,\n\t\t&repository.RepoQuery{\n\t\t\tRepo:       data.Repo.ValueString(),\n\t\t\tAppProject: data.Project.ValueString(),\n\t\t},\n\t)\n\n\tif err != nil {\n\t\tif !strings.Contains(err.Error(), \"NotFound\") {\n\t\t\tresp.Diagnostics.Append(diagnostics.ArgoCDAPIError(\"delete\", \"repository\", data.Repo.ValueString(), err)...)\n\t\t\treturn\n\t\t}\n\t}\n\n\ttflog.Trace(ctx, fmt.Sprintf(\"deleted repository %s\", data.Repo.ValueString()))\n}\n\nfunc (r *repositoryResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) {\n\t// Import ID format can be:\n\t// - \"repo_url\" for global repositories\n\t// - \"repo_url|project_name\" for project-scoped repositories\n\tidParts := strings.SplitN(req.ID, \"|\", 2)\n\n\trepoURL := idParts[0]\n\n\t// Set repo attribute\n\tresp.Diagnostics.Append(resp.State.SetAttribute(ctx, path.Root(\"repo\"), repoURL)...)\n\n\t// Only set project if it was provided in the import ID\n\tif len(idParts) == 2 && idParts[1] != \"\" {\n\t\tresp.Diagnostics.Append(resp.State.SetAttribute(ctx, path.Root(\"project\"), idParts[1])...)\n\t}\n}\n\nfunc (r *repositoryResource) readRepository(ctx context.Context, repoURL, project string) (*v1alpha1.Repository, diag.Diagnostics) {\n\tvar diags diag.Diagnostics\n\n\tsync.RepositoryMutex.RLock()\n\tdefer sync.RepositoryMutex.RUnlock()\n\n\trepos, err := r.si.RepositoryClient.List(ctx, &repository.RepoQuery{\n\t\tAppProject: project,\n\t})\n\n\tvar finalRepo *v1alpha1.Repository\n\n\tif repos != nil {\n\t\tfor _, repo := range repos.Items {\n\t\t\t// Match both URL and project to handle cases where the same repo URL\n\t\t\t// exists in multiple projects\n\t\t\tif repo.Repo == repoURL && repo.Project == project {\n\t\t\t\tfinalRepo = repo\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\tif err != nil {\n\t\tif strings.Contains(err.Error(), \"NotFound\") {\n\t\t\t// Repository has been deleted out-of-band\n\t\t\treturn nil, diags\n\t\t}\n\n\t\tdiags.Append(diagnostics.ArgoCDAPIError(\"read\", \"repository\", repoURL, err)...)\n\n\t\treturn nil, diags\n\t}\n\n\treturn finalRepo, diags\n}\n"
  },
  {
    "path": "internal/provider/resource_repository_certificate.go",
    "content": "package provider\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/argoproj-labs/terraform-provider-argocd/internal/diagnostics\"\n\t\"github.com/argoproj-labs/terraform-provider-argocd/internal/sync\"\n\t\"github.com/argoproj-labs/terraform-provider-argocd/internal/validators\"\n\t\"github.com/argoproj/argo-cd/v3/pkg/apiclient/certificate\"\n\t\"github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1\"\n\t\"github.com/hashicorp/terraform-plugin-framework/diag\"\n\t\"github.com/hashicorp/terraform-plugin-framework/path\"\n\t\"github.com/hashicorp/terraform-plugin-framework/resource\"\n\t\"github.com/hashicorp/terraform-plugin-framework/resource/schema\"\n\t\"github.com/hashicorp/terraform-plugin-framework/types\"\n\t\"github.com/hashicorp/terraform-plugin-log/tflog\"\n)\n\nconst sshCertType = \"ssh\"\n\n// Ensure provider defined types fully satisfy framework interfaces.\nvar _ resource.Resource = &repositoryCertificateResource{}\nvar _ resource.ResourceWithImportState = &repositoryCertificateResource{}\nvar _ resource.ResourceWithConfigValidators = &repositoryCertificateResource{}\n\nfunc NewRepositoryCertificateResource() resource.Resource {\n\treturn &repositoryCertificateResource{}\n}\n\n// repositoryCertificateResource defines the resource implementation.\ntype repositoryCertificateResource struct {\n\tsi *ServerInterface\n}\n\nfunc (r *repositoryCertificateResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse) {\n\tresp.TypeName = req.ProviderTypeName + \"_repository_certificate\"\n}\n\nfunc (r *repositoryCertificateResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) {\n\tresp.Schema = schema.Schema{\n\t\tMarkdownDescription: \"Manages [custom TLS certificates](https://argo-cd.readthedocs.io/en/stable/user-guide/private-repositories/#self-signed-untrusted-tls-certificates) used by ArgoCD for connecting Git repositories.\",\n\t\tAttributes:          repositoryCertificateSchemaAttributes(),\n\t\tBlocks:              repositoryCertificateSchemaBlocks(),\n\t}\n}\n\nfunc (r *repositoryCertificateResource) ConfigValidators(ctx context.Context) []resource.ConfigValidator {\n\treturn []resource.ConfigValidator{\n\t\tvalidators.RepositoryCertificate(),\n\t}\n}\n\nfunc (r *repositoryCertificateResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse) {\n\t// Prevent panic if the provider has not been configured.\n\tif req.ProviderData == nil {\n\t\treturn\n\t}\n\n\tsi, ok := req.ProviderData.(*ServerInterface)\n\tif !ok {\n\t\tresp.Diagnostics.AddError(\n\t\t\t\"Unexpected Provider Data Type\",\n\t\t\tfmt.Sprintf(\"Expected *ServerInterface, got: %T. Please report this issue to the provider developers.\", req.ProviderData),\n\t\t)\n\n\t\treturn\n\t}\n\n\tr.si = si\n}\n\nfunc (r *repositoryCertificateResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse) {\n\tvar data repositoryCertificateModel\n\n\t// Read Terraform configuration data into the model\n\tresp.Diagnostics.Append(req.Plan.Get(ctx, &data)...)\n\n\t// Initialize API clients\n\tresp.Diagnostics.Append(r.si.InitClients(ctx)...)\n\n\t// Check for errors before proceeding\n\tif resp.Diagnostics.HasError() {\n\t\treturn\n\t}\n\n\t// Convert to API model\n\tcert := data.toAPIModel()\n\n\t// Check if HTTPS certificate already exists\n\tif cert.CertType == \"https\" {\n\t\tsync.CertificateMutex.Lock()\n\t\texisting, err := r.si.CertificateClient.ListCertificates(ctx, &certificate.RepositoryCertificateQuery{\n\t\t\tHostNamePattern: cert.ServerName,\n\t\t\tCertType:        cert.CertType,\n\t\t})\n\t\tsync.CertificateMutex.Unlock()\n\n\t\tif err != nil {\n\t\t\tresp.Diagnostics.Append(diagnostics.ArgoCDAPIError(\"list\", \"repository certificates\", cert.ServerName, err)...)\n\t\t\treturn\n\t\t}\n\n\t\tif len(existing.Items) > 0 {\n\t\t\tresp.Diagnostics.AddError(\n\t\t\t\t\"Repository certificate already exists\",\n\t\t\t\tfmt.Sprintf(\"https certificate for '%s' already exist.\", cert.ServerName),\n\t\t\t)\n\n\t\t\treturn\n\t\t}\n\t}\n\n\t// Create certificate\n\tcerts := v1alpha1.RepositoryCertificateList{\n\t\tItems: []v1alpha1.RepositoryCertificate{*cert},\n\t}\n\n\tsync.CertificateMutex.Lock()\n\t_, err := r.si.CertificateClient.CreateCertificate(\n\t\tctx,\n\t\t&certificate.RepositoryCertificateCreateRequest{\n\t\t\tCertificates: &certs,\n\t\t\tUpsert:       false,\n\t\t},\n\t)\n\tsync.CertificateMutex.Unlock()\n\n\tif err != nil {\n\t\tresp.Diagnostics.Append(diagnostics.ArgoCDAPIError(\"create\", \"repository certificate\", cert.ServerName, err)...)\n\t\treturn\n\t}\n\n\t// Set the ID so we can read the certificate back\n\tdata.ID = types.StringValue(data.generateID())\n\n\t// Read the certificate back to get computed fields like cert_subtype for HTTPS\n\t// This is necessary because the create response doesn't include computed fields\n\tcertType, certSubType, serverName, err := r.parseID(data.ID.ValueString())\n\tif err != nil {\n\t\tresp.Diagnostics.AddError(\"Failed to parse certificate ID\", err.Error())\n\t\treturn\n\t}\n\n\treadCert, diags := r.readCertificate(ctx, certType, certSubType, serverName)\n\tresp.Diagnostics.Append(diags...)\n\n\tif resp.Diagnostics.HasError() {\n\t\treturn\n\t}\n\n\tif readCert == nil {\n\t\tresp.Diagnostics.AddError(\"Certificate not found\", \"Certificate was created but could not be read back\")\n\t\treturn\n\t}\n\n\t// Update the model with the read certificate data\n\tresult := data // Start with the original data to preserve all fields\n\tresult.ID = data.ID\n\n\t// Update computed fields from API response\n\tif len(data.SSH) > 0 && readCert.CertType == sshCertType {\n\t\tresult.SSH[0].CertInfo = types.StringValue(readCert.CertInfo)\n\t}\n\n\tif len(data.HTTPS) > 0 && readCert.CertType == \"https\" {\n\t\tresult.HTTPS[0].CertInfo = types.StringValue(readCert.CertInfo)\n\t\tresult.HTTPS[0].CertSubType = types.StringValue(readCert.CertSubType)\n\t}\n\n\t// Save data into Terraform state\n\tresp.Diagnostics.Append(resp.State.Set(ctx, result)...)\n\n\ttflog.Trace(ctx, fmt.Sprintf(\"created repository certificate %s\", data.ID.ValueString()))\n}\n\nfunc (r *repositoryCertificateResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) {\n\tvar data repositoryCertificateModel\n\n\t// Read Terraform prior state data into the model\n\tresp.Diagnostics.Append(req.State.Get(ctx, &data)...)\n\n\t// Initialize API clients\n\tresp.Diagnostics.Append(r.si.InitClients(ctx)...)\n\n\t// Check for errors before proceeding\n\tif resp.Diagnostics.HasError() {\n\t\treturn\n\t}\n\n\t// Parse certificate ID to get query parameters\n\tcertType, certSubType, serverName, err := r.parseID(data.ID.ValueString())\n\tif err != nil {\n\t\tresp.Diagnostics.AddError(\"Failed to parse certificate ID\", err.Error())\n\t\treturn\n\t}\n\n\t// Read certificate from API\n\tcert, diags := r.readCertificate(ctx, certType, certSubType, serverName)\n\tresp.Diagnostics.Append(diags...)\n\n\tif resp.Diagnostics.HasError() {\n\t\treturn\n\t}\n\n\t// If certificate was not found, remove from state\n\tif cert == nil {\n\t\tresp.State.RemoveResource(ctx)\n\t\treturn\n\t}\n\n\t// Update the model with the read certificate data\n\tresult := data // Start with the original data to preserve all fields\n\tresult.ID = data.ID\n\n\t// Update computed fields from API response\n\tif len(data.SSH) > 0 && cert.CertType == sshCertType {\n\t\tresult.SSH[0].CertInfo = types.StringValue(cert.CertInfo)\n\t}\n\n\tif len(data.HTTPS) > 0 && cert.CertType == \"https\" {\n\t\tresult.HTTPS[0].CertInfo = types.StringValue(cert.CertInfo)\n\t\tresult.HTTPS[0].CertSubType = types.StringValue(cert.CertSubType)\n\t}\n\n\t// Save updated data into Terraform state\n\tresp.Diagnostics.Append(resp.State.Set(ctx, result)...)\n}\n\nfunc (r *repositoryCertificateResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) {\n\t// Repository certificates don't support updates - all attributes are ForceNew\n\tresp.Diagnostics.AddError(\n\t\t\"Repository certificates cannot be updated\",\n\t\t\"Repository certificates are immutable. To change a certificate, it must be deleted and recreated.\",\n\t)\n}\n\nfunc (r *repositoryCertificateResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) {\n\tvar data repositoryCertificateModel\n\n\t// Read Terraform prior state data into the model\n\tresp.Diagnostics.Append(req.State.Get(ctx, &data)...)\n\n\t// Initialize API clients\n\tresp.Diagnostics.Append(r.si.InitClients(ctx)...)\n\n\t// Check for errors before proceeding\n\tif resp.Diagnostics.HasError() {\n\t\treturn\n\t}\n\n\t// Parse certificate ID to get query parameters\n\tcertType, certSubType, serverName, err := r.parseID(data.ID.ValueString())\n\tif err != nil {\n\t\tresp.Diagnostics.AddError(\"Failed to parse certificate ID\", err.Error())\n\t\treturn\n\t}\n\n\t// Delete certificate\n\tquery := certificate.RepositoryCertificateQuery{\n\t\tHostNamePattern: serverName,\n\t\tCertType:        certType,\n\t\tCertSubType:     certSubType,\n\t}\n\n\tsync.CertificateMutex.Lock()\n\t_, err = r.si.CertificateClient.DeleteCertificate(ctx, &query)\n\tsync.CertificateMutex.Unlock()\n\n\tif err != nil {\n\t\tif !strings.Contains(err.Error(), \"NotFound\") {\n\t\t\tresp.Diagnostics.Append(diagnostics.ArgoCDAPIError(\"delete\", \"repository certificate\", serverName, err)...)\n\t\t\treturn\n\t\t}\n\t}\n\n\ttflog.Trace(ctx, fmt.Sprintf(\"deleted repository certificate %s\", data.ID.ValueString()))\n}\n\nfunc (r *repositoryCertificateResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) {\n\tresource.ImportStatePassthroughID(ctx, path.Root(\"id\"), req, resp)\n}\n\nfunc (r *repositoryCertificateResource) readCertificate(ctx context.Context, certType, certSubType, serverName string) (*v1alpha1.RepositoryCertificate, diag.Diagnostics) {\n\tvar diags diag.Diagnostics\n\n\tsync.CertificateMutex.RLock()\n\tdefer sync.CertificateMutex.RUnlock()\n\n\tcerts, err := r.si.CertificateClient.ListCertificates(ctx, &certificate.RepositoryCertificateQuery{\n\t\tHostNamePattern: serverName,\n\t\tCertType:        certType,\n\t\tCertSubType:     certSubType,\n\t})\n\n\tif err != nil {\n\t\tdiags.Append(diagnostics.ArgoCDAPIError(\"read\", \"repository certificate\", serverName, err)...)\n\t\treturn nil, diags\n\t}\n\n\tif certs == nil || len(certs.Items) == 0 {\n\t\t// Certificate has been deleted out-of-band\n\t\treturn nil, diags\n\t}\n\n\t// Find the specific certificate by generating its ID\n\ttargetID := r.generateID(certType, certSubType, serverName)\n\n\tfor _, cert := range certs.Items {\n\t\tcertID := r.generateIDFromCert(&cert)\n\t\tif certID == targetID {\n\t\t\treturn &cert, diags\n\t\t}\n\t}\n\n\t// Certificate not found\n\treturn nil, diags\n}\n\nfunc (r *repositoryCertificateResource) parseID(id string) (certType, certSubType, serverName string, err error) {\n\tparts := strings.Split(id, \"/\")\n\tif len(parts) < 2 {\n\t\treturn \"\", \"\", \"\", fmt.Errorf(\"invalid certificate ID format: %s\", id)\n\t}\n\n\tcertType = parts[0]\n\tswitch certType {\n\tcase sshCertType:\n\t\tif len(parts) < 3 {\n\t\t\treturn \"\", \"\", \"\", fmt.Errorf(\"invalid SSH certificate ID format: %s\", id)\n\t\t}\n\n\t\treturn parts[0], parts[1], parts[2], nil\n\tcase \"https\":\n\t\tif len(parts) < 2 {\n\t\t\treturn \"\", \"\", \"\", fmt.Errorf(\"invalid HTTPS certificate ID format: %s\", id)\n\t\t}\n\n\t\treturn parts[0], \"\", parts[1], nil\n\tdefault:\n\t\treturn \"\", \"\", \"\", fmt.Errorf(\"unknown certificate type: %s\", certType)\n\t}\n}\n\nfunc (r *repositoryCertificateResource) generateID(certType, certSubType, serverName string) string {\n\tif certType == sshCertType {\n\t\treturn fmt.Sprintf(\"%s/%s/%s\", certType, certSubType, serverName)\n\t}\n\n\treturn fmt.Sprintf(\"%s/%s\", certType, serverName)\n}\n\nfunc (r *repositoryCertificateResource) generateIDFromCert(cert *v1alpha1.RepositoryCertificate) string {\n\tif cert.CertType == sshCertType {\n\t\treturn fmt.Sprintf(\"%s/%s/%s\", cert.CertType, cert.CertSubType, cert.ServerName)\n\t}\n\n\treturn fmt.Sprintf(\"%s/%s\", cert.CertType, cert.ServerName)\n}\n"
  },
  {
    "path": "internal/provider/resource_repository_certificate_test.go",
    "content": "package provider\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"os\"\n\t\"os/exec\"\n\t\"regexp\"\n\t\"testing\"\n\n\t\"github.com/argoproj-labs/terraform-provider-argocd/internal/testhelpers\"\n\t\"github.com/hashicorp/terraform-plugin-testing/helper/acctest\"\n\t\"github.com/hashicorp/terraform-plugin-testing/helper/resource\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestAccArgoCDRepositoryCertificatesSSH(t *testing.T) {\n\tserverName := acctest.RandomWithPrefix(\"mywebsite\")\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDRepositoryCertificatesSSH(\n\t\t\t\t\tserverName,\n\t\t\t\t\t\"ecdsa-sha2-nistp256\",\n\t\t\t\t\t// gitlab's\n\t\t\t\t\t\"AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFSMqzJeV9rUzU4kWitGjeR4PWSa29SPqJ1fVkhtj3Hw9xjLVXVYrU9QlYWrOLXBpQ6KWjbjTDTdDkoohFzgbEY=\",\n\t\t\t\t),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_repository_certificate.simple\", \"ssh.0.server_name\", serverName),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_repository_certificate.simple\", \"ssh.0.cert_subtype\", \"ecdsa-sha2-nistp256\"),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\"argocd_repository_certificate.simple\", \"ssh.0.cert_info\"),\n\t\t\t\t),\n\t\t\t},\n\t\t\t// same, no diff\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDRepositoryCertificatesSSH(\n\t\t\t\t\tserverName,\n\t\t\t\t\t\"ecdsa-sha2-nistp256\",\n\t\t\t\t\t// gitlab's\n\t\t\t\t\t\"AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFSMqzJeV9rUzU4kWitGjeR4PWSa29SPqJ1fVkhtj3Hw9xjLVXVYrU9QlYWrOLXBpQ6KWjbjTDTdDkoohFzgbEY=\",\n\t\t\t\t),\n\t\t\t\tPlanOnly:           true,\n\t\t\t\tExpectNonEmptyPlan: false,\n\t\t\t},\n\t\t\t// change only the cert_data => same id => diff\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDRepositoryCertificatesSSH(\n\t\t\t\t\tserverName,\n\t\t\t\t\t\"ecdsa-sha2-nistp256\",\n\t\t\t\t\t// github's\n\t\t\t\t\t\"AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEmKSENjQEezOmxkZMy7opKgwFB9nkt5YRrYMjNuG5N87uRgg6CLrbo5wAdT/y6v0mKV0U2w0WZ2YB/++Tpockg=\",\n\t\t\t\t),\n\t\t\t\tPlanOnly:           true,\n\t\t\t\tExpectNonEmptyPlan: true,\n\t\t\t},\n\t\t\t// change cert_subtype & cert_data => changes id => diff\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDRepositoryCertificatesSSH(\n\t\t\t\t\tserverName,\n\t\t\t\t\t\"ssh-rsa\",\n\t\t\t\t\t// github's\n\t\t\t\t\t\"AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==\",\n\t\t\t\t),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_repository_certificate.simple\", \"ssh.0.server_name\", serverName),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_repository_certificate.simple\", \"ssh.0.cert_subtype\", \"ssh-rsa\"),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDRepositoryCertificatesHttps(t *testing.T) {\n\tserverName := acctest.RandomWithPrefix(\"github\")\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDRepositoryCertificateHttps(\n\t\t\t\t\tserverName,\n\t\t\t\t\t// github's\n\t\t\t\t\t\"-----BEGIN CERTIFICATE-----\\nMIIFajCCBPCgAwIBAgIQBRiaVOvox+kD4KsNklVF3jAKBggqhkjOPQQDAzBWMQsw\\nCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMTAwLgYDVQQDEydEaWdp\\nQ2VydCBUTFMgSHlicmlkIEVDQyBTSEEzODQgMjAyMCBDQTEwHhcNMjIwMzE1MDAw\\nMDAwWhcNMjMwMzE1MjM1OTU5WjBmMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2Fs\\naWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZyYW5jaXNjbzEVMBMGA1UEChMMR2l0SHVi\\nLCBJbmMuMRMwEQYDVQQDEwpnaXRodWIuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0D\\nAQcDQgAESrCTcYUh7GI/y3TARsjnANwnSjJLitVRgwgRI1JlxZ1kdZQQn5ltP3v7\\nKTtYuDdUeEu3PRx3fpDdu2cjMlyA0aOCA44wggOKMB8GA1UdIwQYMBaAFAq8CCkX\\njKU5bXoOzjPHLrPt+8N6MB0GA1UdDgQWBBR4qnLGcWloFLVZsZ6LbitAh0I7HjAl\\nBgNVHREEHjAcggpnaXRodWIuY29tgg53d3cuZ2l0aHViLmNvbTAOBgNVHQ8BAf8E\\nBAMCB4AwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMIGbBgNVHR8EgZMw\\ngZAwRqBEoEKGQGh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydFRMU0h5\\nYnJpZEVDQ1NIQTM4NDIwMjBDQTEtMS5jcmwwRqBEoEKGQGh0dHA6Ly9jcmw0LmRp\\nZ2ljZXJ0LmNvbS9EaWdpQ2VydFRMU0h5YnJpZEVDQ1NIQTM4NDIwMjBDQTEtMS5j\\ncmwwPgYDVR0gBDcwNTAzBgZngQwBAgIwKTAnBggrBgEFBQcCARYbaHR0cDovL3d3\\ndy5kaWdpY2VydC5jb20vQ1BTMIGFBggrBgEFBQcBAQR5MHcwJAYIKwYBBQUHMAGG\\nGGh0dHA6Ly9vY3NwLmRpZ2ljZXJ0LmNvbTBPBggrBgEFBQcwAoZDaHR0cDovL2Nh\\nY2VydHMuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0VExTSHlicmlkRUNDU0hBMzg0MjAy\\nMENBMS0xLmNydDAJBgNVHRMEAjAAMIIBfwYKKwYBBAHWeQIEAgSCAW8EggFrAWkA\\ndgCt9776fP8QyIudPZwePhhqtGcpXc+xDCTKhYY069yCigAAAX+Oi8SRAAAEAwBH\\nMEUCIAR9cNnvYkZeKs9JElpeXwztYB2yLhtc8bB0rY2ke98nAiEAjiML8HZ7aeVE\\nP/DkUltwIS4c73VVrG9JguoRrII7gWMAdwA1zxkbv7FsV78PrUxtQsu7ticgJlHq\\nP+Eq76gDwzvWTAAAAX+Oi8R7AAAEAwBIMEYCIQDNckqvBhup7GpANMf0WPueytL8\\nu/PBaIAObzNZeNMpOgIhAMjfEtE6AJ2fTjYCFh/BNVKk1mkTwBTavJlGmWomQyaB\\nAHYAs3N3B+GEUPhjhtYFqdwRCUp5LbFnDAuH3PADDnk2pZoAAAF/jovErAAABAMA\\nRzBFAiEA9Uj5Ed/XjQpj/MxQRQjzG0UFQLmgWlc73nnt3CJ7vskCICqHfBKlDz7R\\nEHdV5Vk8bLMBW1Q6S7Ga2SbFuoVXs6zFMAoGCCqGSM49BAMDA2gAMGUCMCiVhqft\\n7L/stBmv1XqSRNfE/jG/AqKIbmjGTocNbuQ7kt1Cs7kRg+b3b3C9Ipu5FQIxAM7c\\ntGKrYDGt0pH8iF6rzbp9Q4HQXMZXkNxg+brjWxnaOVGTDNwNH7048+s/hT9bUQ==\\n-----END CERTIFICATE-----\",\n\t\t\t\t),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_repository_certificate.simple\", \"https.0.server_name\", serverName),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_repository_certificate.simple\", \"https.0.cert_subtype\", \"ecdsa\"),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\"argocd_repository_certificate.simple\", \"https.0.cert_info\"),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDRepositoryCertificateHttps(\n\t\t\t\t\tserverName,\n\t\t\t\t\t// gitlab's\n\t\t\t\t\t\"-----BEGIN CERTIFICATE-----\\nMIIGBzCCBO+gAwIBAgIQXCLSMilzZJR9TSABzbgKzzANBgkqhkiG9w0BAQsFADCB\\njzELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G\\nA1UEBxMHU2FsZm9yZDEYMBYGA1UEChMPU2VjdGlnbyBMaW1pdGVkMTcwNQYDVQQD\\nEy5TZWN0aWdvIFJTQSBEb21haW4gVmFsaWRhdGlvbiBTZWN1cmUgU2VydmVyIENB\\nMB4XDTIxMDQxMjAwMDAwMFoXDTIyMDUxMTIzNTk1OVowFTETMBEGA1UEAxMKZ2l0\\nbGFiLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANXnhcvOl289\\n8oMglaax6bDz988oNMpXZCH6sI7Fzx9G/isEPObN6cyP+fjFa0dvwRmOHnepk2eo\\nbzcECdgdBLCa7E29p7lLF0NFFTuIb52ew58fK/209XJ3amvjJ/m5rPP00uHrT+9v\\nky2jkQUQszuC9R4vK+tfs2S5z9w6qh3hwIJecChzWKce8hRZdiO9S7ix/6ZNiAgw\\nY2h8AiG0VruPOJ6PbNXOFUTsajK0EP8AzJfNDIjvWHjUOawR352m4eKxXvXm9knd\\nB/w1gY90jmAQ9JIiyOm+QlmHwO+qQUpWYOxt5Xnb0Pp/RRHEtxDgjygQWajAwsxG\\nobx6sCf6+qcCAwEAAaOCAtYwggLSMB8GA1UdIwQYMBaAFI2MXsRUrYrhd+mb+ZsF\\n4bgBjWHhMB0GA1UdDgQWBBTFjbuGoOUrgk9Dhr35DblkBZCj1jAOBgNVHQ8BAf8E\\nBAMCBaAwDAYDVR0TAQH/BAIwADAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUH\\nAwIwSQYDVR0gBEIwQDA0BgsrBgEEAbIxAQICBzAlMCMGCCsGAQUFBwIBFhdodHRw\\nczovL3NlY3RpZ28uY29tL0NQUzAIBgZngQwBAgEwgYQGCCsGAQUFBwEBBHgwdjBP\\nBggrBgEFBQcwAoZDaHR0cDovL2NydC5zZWN0aWdvLmNvbS9TZWN0aWdvUlNBRG9t\\nYWluVmFsaWRhdGlvblNlY3VyZVNlcnZlckNBLmNydDAjBggrBgEFBQcwAYYXaHR0\\ncDovL29jc3Auc2VjdGlnby5jb20wggEEBgorBgEEAdZ5AgQCBIH1BIHyAPAAdgBG\\npVXrdfqRIDC1oolp9PN9ESxBdL79SbiFq/L8cP5tRwAAAXjDcW8TAAAEAwBHMEUC\\nIQCxf+r8/dbHJDrh0YTAKSwdR8VUxAT6kHN5/HLuOvSsKgIgY2jAAf/tr59/f0JX\\nKvHaN4qIv54gtj+KsNo7N0d4xcEAdgDfpV6raIJPH2yt7rhfTj5a6s2iEqRqXo47\\nEsAgRFwqcwAAAXjDcW7VAAAEAwBHMEUCID0jtWvtpO1yypP7i7SeZZb3dQ6QdLlD\\nlXpvWhjqrQfdAiEA0gp8tTUwOt2XN01OVTUrDgb4wV5VbFtx1SSYNFREQxwweQYD\\nVR0RBHIwcIIKZ2l0bGFiLmNvbYIPYXV0aC5naXRsYWIuY29tghRjdXN0b21lcnMu\\nZ2l0bGFiLmNvbYIaZW1haWwuY3VzdG9tZXJzLmdpdGxhYi5jb22CD2dwcmQuZ2l0\\nbGFiLmNvbYIOd3d3LmdpdGxhYi5jb20wDQYJKoZIhvcNAQELBQADggEBAD7lgx6z\\ncZI+uLtr7fYWOZDtPChNy7YjAXVtDbrQ61D1lESUIZwyDF9/xCDMqMSe+It2+j+t\\nT0PHkbz6zbJdUMQhQxW0RLMZUthPg66YLqRJuvBU7VdWHxhqjfFb9UZvxOzTGgmN\\nMuzmdThtlhRacNCTxGO/AJfcAt13RbKyR30UtqHb883qAH6isQvYFsQmijXcJXiT\\ntRbcJ1Dm/dI+57BCTYLp2WfBdg0Axla5QsApQ+ER5GZoY1m6H3+OWpX77IdCgXF+\\nHMtKCn08QLVBjhLr3IkeKgrYJTR1IDmzRwGUuUVvn1iO9+W10GV02SMngdN4nFp3\\nwoE3CsYogf1SfQM=\\n-----END CERTIFICATE-----\",\n\t\t\t\t),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_repository_certificate.simple\", \"https.0.server_name\", serverName),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_repository_certificate.simple\", \"https.0.cert_subtype\", \"rsa\"),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\"argocd_repository_certificate.simple\", \"https.0.cert_info\"),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDRepositoryCertificatesHttps_Crash(t *testing.T) {\n\tserverName := acctest.RandomWithPrefix(\"github\")\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDRepositoryCertificateHttps(\n\t\t\t\t\tserverName,\n\t\t\t\t\t// github's\n\t\t\t\t\t\"-----BEGIN CERTIFICATE-----\\nMIIFajCCBPCgAwIBAgIQBRiaVOvox+kD4KsNklVF3jAKBggqhkjOPQQDAzBWMQsw\\nCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMTAwLgYDVQQDEydEaWdp\\nQ2VydCBUTFMgSHlicmlkIEVDQyBTSEEzODQgMjAyMCBDQTEwHhcNMjIwMzE1MDAw\\nMDAwWhcNMjMwMzE1MjM1OTU5WjBmMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2Fs\\naWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZyYW5jaXNjbzEVMBMGA1UEChMMR2l0SHVi\\nLCBJbmMuMRMwEQYDVQQDEwpnaXRodWIuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0D\\nAQcDQgAESrCTcYUh7GI/y3TARsjnANwnSjJLitVRgwgRI1JlxZ1kdZQQn5ltP3v7\\nKTtYuDdUeEu3PRx3fpDdu2cjMlyA0aOCA44wggOKMB8GA1UdIwQYMBaAFAq8CCkX\\njKU5bXoOzjPHLrPt+8N6MB0GA1UdDgQWBBR4qnLGcWloFLVZsZ6LbitAh0I7HjAl\\nBgNVHREEHjAcggpnaXRodWIuY29tgg53d3cuZ2l0aHViLmNvbTAOBgNVHQ8BAf8E\\nBAMCB4AwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMIGbBgNVHR8EgZMw\\ngZAwRqBEoEKGQGh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydFRMU0h5\\nYnJpZEVDQ1NIQTM4NDIwMjBDQTEtMS5jcmwwRqBEoEKGQGh0dHA6Ly9jcmw0LmRp\\nZ2ljZXJ0LmNvbS9EaWdpQ2VydFRMU0h5YnJpZEVDQ1NIQTM4NDIwMjBDQTEtMS5j\\ncmwwPgYDVR0gBDcwNTAzBgZngQwBAgIwKTAnBggrBgEFBQcCARYbaHR0cDovL3d3\\ndy5kaWdpY2VydC5jb20vQ1BTMIGFBggrBgEFBQcBAQR5MHcwJAYIKwYBBQUHMAGG\\nGGh0dHA6Ly9vY3NwLmRpZ2ljZXJ0LmNvbTBPBggrBgEFBQcwAoZDaHR0cDovL2Nh\\nY2VydHMuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0VExTSHlicmlkRUNDU0hBMzg0MjAy\\nMENBMS0xLmNydDAJBgNVHRMEAjAAMIIBfwYKKwYBBAHWeQIEAgSCAW8EggFrAWkA\\ndgCt9776fP8QyIudPZwePhhqtGcpXc+xDCTKhYY069yCigAAAX+Oi8SRAAAEAwBH\\nMEUCIAR9cNnvYkZeKs9JElpeXwztYB2yLhtc8bB0rY2ke98nAiEAjiML8HZ7aeVE\\nP/DkUltwIS4c73VVrG9JguoRrII7gWMAdwA1zxkbv7FsV78PrUxtQsu7ticgJlHq\\nP+Eq76gDwzvWTAAAAX+Oi8R7AAAEAwBIMEYCIQDNckqvBhup7GpANMf0WPueytL8\\nu/PBaIAObzNZeNMpOgIhAMjfEtE6AJ2fTjYCFh/BNVKk1mkTwBTavJlGmWomQyaB\\nAHYAs3N3B+GEUPhjhtYFqdwRCUp5LbFnDAuH3PADDnk2pZoAAAF/jovErAAABAMA\\nRzBFAiEA9Uj5Ed/XjQpj/MxQRQjzG0UFQLmgWlc73nnt3CJ7vskCICqHfBKlDz7R\\nEHdV5Vk8bLMBW1Q6S7Ga2SbFuoVXs6zFMAoGCCqGSM49BAMDA2gAMGUCMCiVhqft\\n7L/stBmv1XqSRNfE/jG/AqKIbmjGTocNbuQ7kt1Cs7kRg+b3b3C9Ipu5FQIxAM7c\\ntGKrYDGt0pH8iF6rzbp9Q4HQXMZXkNxg+brjWxnaOVGTDNwNH7048+s/hT9bUQ==\\n-----END CERTIFICATE-----\",\n\t\t\t\t),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_repository_certificate.simple\", \"https.0.server_name\", serverName),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_repository_certificate.simple\", \"https.0.cert_subtype\", \"ecdsa\"),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\"argocd_repository_certificate.simple\", \"https.0.cert_info\"),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDRepositoryCertificateHttps(\n\t\t\t\t\tserverName,\n\t\t\t\t\t// gitlab's\n\t\t\t\t\t\"-----BEGIN CERTIFICATE-----\\nMIIGBzCCBO+gAwIBAgIQXCLSMilzZJR9TSABzbgKzzANBgkqhkiG9w0BAQsFADCB\\njzELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G\\nA1UEBxMHU2FsZm9yZDEYMBYGA1UEChMPU2VjdGlnbyBMaW1pdGVkMTcwNQYDVQQD\\nEy5TZWN0aWdvIFJTQSBEb21haW4gVmFsaWRhdGlvbiBTZWN1cmUgU2VydmVyIENB\\nMB4XDTIxMDQxMjAwMDAwMFoXDTIyMDUxMTIzNTk1OVowFTETMBEGA1UEAxMKZ2l0\\nbGFiLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANXnhcvOl289\\n8oMglaax6bDz988oNMpXZCH6sI7Fzx9G/isEPObN6cyP+fjFa0dvwRmOHnepk2eo\\nbzcECdgdBLCa7E29p7lLF0NFFTuIb52ew58fK/209XJ3amvjJ/m5rPP00uHrT+9v\\nky2jkQUQszuC9R4vK+tfs2S5z9w6qh3hwIJecChzWKce8hRZdiO9S7ix/6ZNiAgw\\nY2h8AiG0VruPOJ6PbNXOFUTsajK0EP8AzJfNDIjvWHjUOawR352m4eKxXvXm9knd\\nB/w1gY90jmAQ9JIiyOm+QlmHwO+qQUpWYOxt5Xnb0Pp/RRHEtxDgjygQWajAwsxG\\nobx6sCf6+qcCAwEAAaOCAtYwggLSMB8GA1UdIwQYMBaAFI2MXsRUrYrhd+mb+ZsF\\n4bgBjWHhMB0GA1UdDgQWBBTFjbuGoOUrgk9Dhr35DblkBZCj1jAOBgNVHQ8BAf8E\\nBAMCBaAwDAYDVR0TAQH/BAIwADAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUH\\nAwIwSQYDVR0gBEIwQDA0BgsrBgEEAbIxAQICBzAlMCMGCCsGAQUFBwIBFhdodHRw\\nczovL3NlY3RpZ28uY29tL0NQUzAIBgZngQwBAgEwgYQGCCsGAQUFBwEBBHgwdjBP\\nBggrBgEFBQcwAoZDaHR0cDovL2NydC5zZWN0aWdvLmNvbS9TZWN0aWdvUlNBRG9t\\nYWluVmFsaWRhdGlvblNlY3VyZVNlcnZlckNBLmNydDAjBggrBgEFBQcwAYYXaHR0\\ncDovL29jc3Auc2VjdGlnby5jb20wggEEBgorBgEEAdZ5AgQCBIH1BIHyAPAAdgBG\\npVXrdfqRIDC1oolp9PN9ESxBdL79SbiFq/L8cP5tRwAAAXjDcW8TAAAEAwBHMEUC\\nIQCxf+r8/dbHJDrh0YTAKSwdR8VUxAT6kHN5/HLuOvSsKgIgY2jAAf/tr59/f0JX\\nKvHaN4qIv54gtj+KsNo7N0d4xcEAdgDfpV6raIJPH2yt7rhfTj5a6s2iEqRqXo47\\nEsAgRFwqcwAAAXjDcW7VAAAEAwBHMEUCID0jtWvtpO1yypP7i7SeZZb3dQ6QdLlD\\nlXpvWhjqrQfdAiEA0gp8tTUwOt2XN01OVTUrDgb4wV5VbFtx1SSYNFREQxwweQYD\\nVR0RBHIwcIIKZ2l0bGFiLmNvbYIPYXV0aC5naXRsYWIuY29tghRjdXN0b21lcnMu\\nZ2l0bGFiLmNvbYIaZW1haWwuY3VzdG9tZXJzLmdpdGxhYi5jb22CD2dwcmQuZ2l0\\nbGFiLmNvbYIOd3d3LmdpdGxhYi5jb20wDQYJKoZIhvcNAQELBQADggEBAD7lgx6z\\ncZI+uLtr7fYWOZDtPChNy7YjAXVtDbrQ61D1lESUIZwyDF9/xCDMqMSe+It2+j+t\\nT0PHkbz6zbJdUMQhQxW0RLMZUthPg66YLqRJuvBU7VdWHxhqjfFb9UZvxOzTGgmN\\nMuzmdThtlhRacNCTxGO/AJfcAt13RbKyR30UtqHb883qAH6isQvYFsQmijXcJXiT\\ntRbcJ1Dm/dI+57BCTYLp2WfBdg0Axla5QsApQ+ER5GZoY1m6H3+OWpX77IdCgXF+\\nHMtKCn08QLVBjhLr3IkeKgrYJTR1IDmzRwGUuUVvn1iO9+W10GV02SMngdN4nFp3\\nwoE3CsYogf1SfQM=\\n-----END CERTIFICATE-----\",\n\t\t\t\t),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_repository_certificate.simple\", \"https.0.server_name\", serverName),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_repository_certificate.simple\", \"https.0.cert_subtype\", \"rsa\"),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\"argocd_repository_certificate.simple\", \"https.0.cert_info\"),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDRepositoryCertificatesSSH_Invalid(t *testing.T) {\n\tcertSubType := acctest.RandomWithPrefix(\"cert\")\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDRepositoryCertificatesSSH(\n\t\t\t\t\t\"\",\n\t\t\t\t\tcertSubType,\n\t\t\t\t\t\"\",\n\t\t\t\t),\n\t\t\t\t// prior to Argo CD v3.1 this error message started with capitalized I\n\t\t\t\tExpectError: regexp.MustCompile(\"(i|I)nvalid hostname in request\"),\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDRepositoryCertificatesSSH(\n\t\t\t\t\t\"dummy_server\",\n\t\t\t\t\tcertSubType,\n\t\t\t\t\t\"\",\n\t\t\t\t),\n\t\t\t\tExpectError: regexp.MustCompile(\"invalid entry in known_hosts data\"),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDRepositoryCertificates_Empty(t *testing.T) {\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig:      testAccArgoCDRepositoryCertificates_Empty(),\n\t\t\t\tExpectError: regexp.MustCompile(\"one of `https,ssh` must be specified\"),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDRepositoryCertificatesSSH_Allow_Random_Subtype(t *testing.T) {\n\tcertSubType := acctest.RandomWithPrefix(\"cert\")\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDRepositoryCertificatesSSH(\n\t\t\t\t\t\"dummy_server\",\n\t\t\t\t\tcertSubType,\n\t\t\t\t\t\"AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFSMqzJeV9rUzU4kWitGjeR4PWSa29SPqJ1fVkhtj3Hw9xjLVXVYrU9QlYWrOLXBpQ6KWjbjTDTdDkoohFzgbEY=\",\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDRepositoryCertificatesSSH_WithApplication(t *testing.T) {\n\t// Skip if we're not in an acceptance test environment\n\tif os.Getenv(\"TF_ACC\") == \"\" {\n\t\tt.Skip(\"Acceptance tests skipped unless env 'TF_ACC' set\")\n\t}\n\n\tappName := acctest.RandomWithPrefix(\"testacc\")\n\n\tsubtypesKeys, err := getSshKeysForHost(t.Context(), \"private-git-repository\")\n\trequire.NoError(t, err)\n\trequire.NotEmpty(t, subtypesKeys, \"ssh-keyscan should return at least one key\")\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDRepositoryCertificateCredentialsApplicationWithSSH(appName, subtypesKeys),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_application.simple\",\n\t\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.private\",\n\t\t\t\t\t\t\"connection_state_status\",\n\t\t\t\t\t\t\"Successful\",\n\t\t\t\t\t)),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDRepositoryCertificatesSSH_CannotUpdateExisting(t *testing.T) {\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDRepositoryCertificatesSSH(\n\t\t\t\t\t\"github.com\",\n\t\t\t\t\t\"ssh-rsa\",\n\t\t\t\t\t// github's\n\t\t\t\t\t\"AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==\",\n\t\t\t\t),\n\t\t\t\tExpectError: regexp.MustCompile(\"already (exist|exists,) and upsert was not specified\"),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDRepositoryCertificatesSSH_CannotUpdateExisting_MultipleAtOnce(t *testing.T) {\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDRepositoryCertificateSSH_Duplicated(\n\t\t\t\t\t\"github.com\",\n\t\t\t\t\t\"ssh-rsaaa\",\n\t\t\t\t\t// github's\n\t\t\t\t\t\"AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==\",\n\t\t\t\t),\n\t\t\t\tExpectError: regexp.MustCompile(\"already (exist|exists,) and upsert was not specified\"),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDRepositoryCertificatesHttps_CannotUpdateExisting_MultipleAtOnce(t *testing.T) {\n\thost := \"github.com\"\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDRepositoryCertificateHttps_Duplicated(\n\t\t\t\t\thost,\n\t\t\t\t\t// github's\n\t\t\t\t\t\"-----BEGIN CERTIFICATE-----\\nMIIFajCCBPCgAwIBAgIQBRiaVOvox+kD4KsNklVF3jAKBggqhkjOPQQDAzBWMQsw\\nCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMTAwLgYDVQQDEydEaWdp\\nQ2VydCBUTFMgSHlicmlkIEVDQyBTSEEzODQgMjAyMCBDQTEwHhcNMjIwMzE1MDAw\\nMDAwWhcNMjMwMzE1MjM1OTU5WjBmMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2Fs\\naWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZyYW5jaXNjbzEVMBMGA1UEChMMR2l0SHVi\\nLCBJbmMuMRMwEQYDVQQDEwpnaXRodWIuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0D\\nAQcDQgAESrCTcYUh7GI/y3TARsjnANwnSjJLitVRgwgRI1JlxZ1kdZQQn5ltP3v7\\nKTtYuDdUeEu3PRx3fpDdu2cjMlyA0aOCA44wggOKMB8GA1UdIwQYMBaAFAq8CCkX\\njKU5bXoOzjPHLrPt+8N6MB0GA1UdDgQWBBR4qnLGcWloFLVZsZ6LbitAh0I7HjAl\\nBgNVHREEHjAcggpnaXRodWIuY29tgg53d3cuZ2l0aHViLmNvbTAOBgNVHQ8BAf8E\\nBAMCB4AwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMIGbBgNVHR8EgZMw\\ngZAwRqBEoEKGQGh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydFRMU0h5\\nYnJpZEVDQ1NIQTM4NDIwMjBDQTEtMS5jcmwwRqBEoEKGQGh0dHA6Ly9jcmw0LmRp\\nZ2ljZXJ0LmNvbS9EaWdpQ2VydFRMU0h5YnJpZEVDQ1NIQTM4NDIwMjBDQTEtMS5j\\ncmwwPgYDVR0gBDcwNTAzBgZngQwBAgIwKTAnBggrBgEFBQcCARYbaHR0cDovL3d3\\ndy5kaWdpY2VydC5jb20vQ1BTMIGFBggrBgEFBQcBAQR5MHcwJAYIKwYBBQUHMAGG\\nGGh0dHA6Ly9vY3NwLmRpZ2ljZXJ0LmNvbTBPBggrBgEFBQcwAoZDaHR0cDovL2Nh\\nY2VydHMuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0VExTSHlicmlkRUNDU0hBMzg0MjAy\\nMENBMS0xLmNydDAJBgNVHRMEAjAAMIIBfwYKKwYBBAHWeQIEAgSCAW8EggFrAWkA\\ndgCt9776fP8QyIudPZwePhhqtGcpXc+xDCTKhYY069yCigAAAX+Oi8SRAAAEAwBH\\nMEUCIAR9cNnvYkZeKs9JElpeXwztYB2yLhtc8bB0rY2ke98nAiEAjiML8HZ7aeVE\\nP/DkUltwIS4c73VVrG9JguoRrII7gWMAdwA1zxkbv7FsV78PrUxtQsu7ticgJlHq\\nP+Eq76gDwzvWTAAAAX+Oi8R7AAAEAwBIMEYCIQDNckqvBhup7GpANMf0WPueytL8\\nu/PBaIAObzNZeNMpOgIhAMjfEtE6AJ2fTjYCFh/BNVKk1mkTwBTavJlGmWomQyaB\\nAHYAs3N3B+GEUPhjhtYFqdwRCUp5LbFnDAuH3PADDnk2pZoAAAF/jovErAAABAMA\\nRzBFAiEA9Uj5Ed/XjQpj/MxQRQjzG0UFQLmgWlc73nnt3CJ7vskCICqHfBKlDz7R\\nEHdV5Vk8bLMBW1Q6S7Ga2SbFuoVXs6zFMAoGCCqGSM49BAMDA2gAMGUCMCiVhqft\\n7L/stBmv1XqSRNfE/jG/AqKIbmjGTocNbuQ7kt1Cs7kRg+b3b3C9Ipu5FQIxAM7c\\ntGKrYDGt0pH8iF6rzbp9Q4HQXMZXkNxg+brjWxnaOVGTDNwNH7048+s/hT9bUQ==\\n-----END CERTIFICATE-----\",\n\t\t\t\t),\n\t\t\t\tExpectError: regexp.MustCompile(fmt.Sprintf(\"https certificate for '%s' already exist.\", host)),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc testAccArgoCDRepositoryCertificates_Empty() string {\n\treturn `\nresource \"argocd_repository_certificate\" \"simple\" {\n}\n`\n}\n\nfunc testAccArgoCDRepositoryCertificatesSSH(serverName, cert_subtype, cert_data string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_repository_certificate\" \"simple\" {\n  ssh {\n\tserver_name  = \"%s\"\n\tcert_subtype = \"%s\"\n\tcert_data    = <<EOT\n%s\nEOT\n  }\n}\n`, serverName, cert_subtype, cert_data)\n}\n\nfunc testAccArgoCDRepositoryCertificateSSH_Duplicated(serverName, cert_subtype, cert_data string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_repository_certificate\" \"simple\" {\n  ssh {\n\tserver_name  = \"%s\"\n\tcert_subtype = \"%s\"\n\tcert_data    = <<EOT\n%s\nEOT\n  }\n}\n\nresource \"argocd_repository_certificate\" \"simple2\" {\n\tssh {\n\t  server_name  = \"%s\"\n\t  cert_subtype = \"%s\"\n\t  cert_data    = <<EOT\n  %s\n  EOT\n\t}\n  }\n`, serverName, cert_subtype, cert_data, serverName, cert_subtype, cert_data)\n}\n\nfunc testAccArgoCDRepositoryCertificateHttps(serverName, cert_data string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_repository_certificate\" \"simple\" {\n  https {\n    server_name  = \"%s\"\n    cert_data    = <<EOT\n%s\nEOT\n  }\n}\n`, serverName, cert_data)\n}\n\nfunc testAccArgoCDRepositoryCertificateHttps_Duplicated(serverName, cert_data string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_repository_certificate\" \"simple\" {\n  https {\n    server_name  = \"%s\"\n    cert_data    = <<EOT\n%s\nEOT\n  }\n}\n\nresource \"argocd_repository_certificate\" \"simple2\" {\n  https {\n    server_name  = \"%s\"\n    cert_data    = <<EOT\n%s\nEOT\n  }\n}\n`, serverName, cert_data, serverName, cert_data)\n}\n\nfunc testAccArgoCDRepositoryCertificateCredentialsApplicationWithSSH(random string, subtypesKeys []string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_repository_certificate\" \"private-git-repository_0\" {\n\tssh {\n\t\tserver_name  = \"private-git-repository.argocd.svc.cluster.local\"\n\t\tcert_subtype = \"%s\"\n\t\tcert_data    = <<EOT\n\t\t%s\nEOT\n\t}\n}\nresource \"argocd_repository_certificate\" \"private-git-repository_1\" {\n\tssh {\n\t\tserver_name  = \"private-git-repository.argocd.svc.cluster.local\"\n\t\tcert_subtype = \"%s\"\n\t\tcert_data    = <<EOT\n\t\t%s\nEOT\n\t}\n}\nresource \"argocd_repository_certificate\" \"private-git-repository_2\" {\n\tssh {\n\t\tserver_name  = \"private-git-repository.argocd.svc.cluster.local\"\n\t\tcert_subtype = \"%s\"\n\t\tcert_data    = <<EOT\n\t\t%s\nEOT\n\t}\n}\n\nresource \"argocd_repository\" \"private\" {\n  repo       = \"git@private-git-repository.argocd.svc.cluster.local:~/project-1.git\"\n  insecure   = false\n  depends_on = [\n\t  argocd_repository_credentials.private, \n\t  argocd_repository_certificate.private-git-repository_0, \n\t  argocd_repository_certificate.private-git-repository_1, \n\t  argocd_repository_certificate.private-git-repository_2\n  ]\n}\n \nresource \"argocd_repository_credentials\" \"private\" {\n  url             = \"git@private-git-repository.argocd.svc.cluster.local\"\n  username        = \"git\"\n  ssh_private_key = \"-----BEGIN OPENSSH PRIVATE KEY-----\\nb3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW\\nQyNTUxOQAAACCGe6Vx0gbKqKCI0wIplfgK5JBjCDO3bhtU3sZfLoeUZgAAAJB9cNEifXDR\\nIgAAAAtzc2gtZWQyNTUxOQAAACCGe6Vx0gbKqKCI0wIplfgK5JBjCDO3bhtU3sZfLoeUZg\\nAAAEAJeUrObjoTbGO1Sq4TXHl/j4RJ5aKMC1OemWuHmLK7XYZ7pXHSBsqooIjTAimV+Ark\\nkGMIM7duG1Texl8uh5RmAAAAC3Rlc3RAYXJnb2NkAQI=\\n-----END OPENSSH PRIVATE KEY-----\"\n}\n\nresource \"argocd_application\" \"simple\" {\n  metadata {\n    name      = \"%s\"\n    namespace = \"argocd\"\n    labels = {\n      acceptance = \"true\"\n    }\n  }\n\n  spec {\n    source {\n      repo_url        = argocd_repository.private.repo\n\t  path = \".\"\n    }\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n  }\n}\n`, subtypesKeys[0], subtypesKeys[1], subtypesKeys[2], subtypesKeys[3], subtypesKeys[4], subtypesKeys[5], random)\n}\n\n// Return an array like :\n// [0] = ssh-rsa\n// [1] = AAAAB3NzaC1y...\n// [2] = ecdsa-sha2-nistp256\n// [3] = AAAAB3NzaC1y...\n// etc\nfunc getSshKeysForHost(ctx context.Context, host string) ([]string, error) {\n\tapp := \"kubectl\"\n\targs := []string{\n\t\t\"exec\",\n\t\t\"-n\",\n\t\t\"argocd\",\n\t\t\"deploy/argocd-server\",\n\t\t\"--\",\n\t\t\"ssh-keyscan\",\n\t\thost,\n\t}\n\n\tvar err error\n\tvar output []byte\n\n\tif testhelpers.GlobalTestEnv != nil {\n\t\targs = append([]string{app}, args...)\n\t\toutput, err = testhelpers.GlobalTestEnv.ExecInK3s(ctx, args...)\n\t\tif err != nil {\n\t\t\t// Print the actual command output to see what ssh-keyscan is saying\n\t\t\tfmt.Printf(\"ERROR: Command failed: %v\\n\", err)\n\t\t\tfmt.Printf(\"ERROR: Command output:\\n%s\\n\", string(output))\n\t\t\treturn nil, fmt.Errorf(\"ssh-keyscan failed for host %s: %w (output: %s)\", host, err, string(output))\n\t\t}\n\t} else {\n\t\tcmd := exec.Command(app, args...)\n\t\toutput, err = cmd.Output()\n\t\tif err != nil {\n\t\t\tfmt.Println(err.Error())\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tre, _ := regexp.Compile(`(?m)^private-git-repository (?P<subtype>[^\\s]+) (?P<key>.+)$`)\n\tmatches := re.FindAllStringSubmatch(string(output), 3)\n\n\tsubTypesKeys := make([]string, 0)\n\tfor _, match := range matches {\n\t\tsubTypesKeys = append(subTypesKeys, match[1])\n\t\tsubTypesKeys = append(subTypesKeys, match[2])\n\t}\n\n\treturn subTypesKeys, nil\n}\n\n// TestAccArgoCDRepositoryCertificate_SSHConsistency tests consistency of SSH certificate fields\nfunc TestAccArgoCDRepositoryCertificate_SSHConsistency(t *testing.T) {\n\tserverName := acctest.RandomWithPrefix(\"ssh-test\")\n\n\tconfig := testAccArgoCDRepositoryCertificatesSSH(\n\t\tserverName,\n\t\t\"ssh-rsa\",\n\t\t\"AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==\",\n\t)\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository_certificate.simple\",\n\t\t\t\t\t\t\"ssh.0.server_name\",\n\t\t\t\t\t\tserverName,\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository_certificate.simple\",\n\t\t\t\t\t\t\"ssh.0.cert_subtype\",\n\t\t\t\t\t\t\"ssh-rsa\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_repository_certificate.simple\",\n\t\t\t\t\t\t\"ssh.0.cert_info\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Apply the same configuration again to test for consistency\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository_certificate.simple\",\n\t\t\t\t\t\t\"ssh.0.server_name\",\n\t\t\t\t\t\tserverName,\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository_certificate.simple\",\n\t\t\t\t\t\t\"ssh.0.cert_subtype\",\n\t\t\t\t\t\t\"ssh-rsa\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_repository_certificate.simple\",\n\t\t\t\t\t\t\"ssh.0.cert_info\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\n// TestAccArgoCDRepositoryCertificate_HTTPSConsistency tests consistency of HTTPS certificate fields\nfunc TestAccArgoCDRepositoryCertificate_HTTPSConsistency(t *testing.T) {\n\tserverName := acctest.RandomWithPrefix(\"https-test\")\n\tcertData := \"-----BEGIN CERTIFICATE-----\\nMIIFajCCBPCgAwIBAgIQBRiaVOvox+kD4KsNklVF3jAKBggqhkjOPQQDAzBWMQsw\\nCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMTAwLgYDVQQDEydEaWdp\\nQ2VydCBUTFMgSHlicmlkIEVDQyBTSEEzODQgMjAyMCBDQTEwHhcNMjIwMzE1MDAw\\nMDAwWhcNMjMwMzE1MjM1OTU5WjBmMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2Fs\\naWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZyYW5jaXNjbzEVMBMGA1UEChMMR2l0SHVi\\nLCBJbmMuMRMwEQYDVQQDEwpnaXRodWIuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0D\\nAQcDQgAESrCTcYUh7GI/y3TARsjnANwnSjJLitVRgwgRI1JlxZ1kdZQQn5ltP3v7\\nKTtYuDdUeEu3PRx3fpDdu2cjMlyA0aOCA44wggOKMB8GA1UdIwQYMBaAFAq8CCkX\\njKU5bXoOzjPHLrPt+8N6MB0GA1UdDgQWBBR4qnLGcWloFLVZsZ6LbitAh0I7HjAl\\nBgNVHREEHjAcggpnaXRodWIuY29tgg53d3cuZ2l0aHViLmNvbTAOBgNVHQ8BAf8E\\nBAMCB4AwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMIGbBgNVHR8EgZMw\\ngZAwRqBEoEKGQGh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydFRMU0h5\\nYnJpZEVDQ1NIQTM4NDIwMjBDQTEtMS5jcmwwRqBEoEKGQGh0dHA6Ly9jcmw0LmRp\\nZ2ljZXJ0LmNvbS9EaWdpQ2VydFRMU0h5YnJpZEVDQ1NIQTM4NDIwMjBDQTEtMS5j\\ncmwwPgYDVR0gBDcwNTAzBgZngQwBAgIwKTAnBggrBgEFBQcCARYbaHR0cDovL3d3\\ndy5kaWdpY2VydC5jb20vQ1BTMIGFBggrBgEFBQcBAQR5MHcwJAYIKwYBBQUHMAGG\\nGGh0dHA6Ly9vY3NwLmRpZ2ljZXJ0LmNvbTBPBggrBgEFBQcwAoZDaHR0cDovL2Nh\\nY2VydHMuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0VExTSHlicmlkRUNDU0hBMzg0MjAy\\nMENBMS0xLmNydDAJBgNVHRMEAjAAMIIBfwYKKwYBBAHWeQIEAgSCAW8EggFrAWkA\\ndgCt9776fP8QyIudPZwePhhqtGcpXc+xDCTKhYY069yCigAAAX+Oi8SRAAAEAwBH\\nMEUCIAR9cNnvYkZeKs9JElpeXwztYB2yLhtc8bB0rY2ke98nAiEAjiML8HZ7aeVE\\nP/DkUltwIS4c73VVrG9JguoRrII7gWMAdwA1zxkbv7FsV78PrUxtQsu7ticgJlHq\\nP+Eq76gDwzvWTAAAAX+Oi8R7AAAEAwBIMEYCIQDNckqvBhup7GpANMf0WPueytL8\\nu/PBaIAObzNZeNMpOgIhAMjfEtE6AJ2fTjYCFh/BNVKk1mkTwBTavJlGmWomQyaB\\nAHYAs3N3B+GEUPhjhtYFqdwRCUp5LbFnDAuH3PADDnk2pZoAAAF/jovErAAABAMA\\nRzBFAiEA9Uj5Ed/XjQpj/MxQRQjzG0UFQLmgWlc73nnt3CJ7vskCICqHfBKlDz7R\\nEHdV5Vk8bLMBW1Q6S7Ga2SbFuoVXs6zFMAoGCCqGSM49BAMDA2gAMGUCMCiVhqft\\n7L/stBmv1XqSRNfE/jG/AqKIbmjGTocNbuQ7kt1Cs7kRg+b3b3C9Ipu5FQIxAM7c\\ntGKrYDGt0pH8iF6rzbp9Q4HQXMZXkNxg+brjWxnaOVGTDNwNH7048+s/hT9bUQ==\\n-----END CERTIFICATE-----\"\n\n\tconfig := testAccArgoCDRepositoryCertificateHttps(serverName, certData)\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository_certificate.simple\",\n\t\t\t\t\t\t\"https.0.server_name\",\n\t\t\t\t\t\tserverName,\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrWith(\n\t\t\t\t\t\t\"argocd_repository_certificate.simple\",\n\t\t\t\t\t\t\"https.0.cert_data\",\n\t\t\t\t\t\tfunc(value string) error {\n\t\t\t\t\t\t\t// Not yet sure why the impl is suffixing with newline. Adding a newline only makes the test fail,\n\t\t\t\t\t\t\t// since it'll add yet another newline.\n\t\t\t\t\t\t\trequire.Contains(t, value, certData)\n\t\t\t\t\t\t\treturn nil\n\t\t\t\t\t\t},\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository_certificate.simple\",\n\t\t\t\t\t\t\"https.0.cert_subtype\",\n\t\t\t\t\t\t\"ecdsa\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_repository_certificate.simple\",\n\t\t\t\t\t\t\"https.0.cert_info\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Apply the same configuration again to test for consistency\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository_certificate.simple\",\n\t\t\t\t\t\t\"https.0.server_name\",\n\t\t\t\t\t\tserverName,\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrWith(\n\t\t\t\t\t\t\"argocd_repository_certificate.simple\",\n\t\t\t\t\t\t\"https.0.cert_data\",\n\t\t\t\t\t\tfunc(value string) error {\n\t\t\t\t\t\t\t// Not yet sure why the impl is suffixing with newline. Adding a newline only makes the test fail,\n\t\t\t\t\t\t\t// since it'll add yet another newline.\n\t\t\t\t\t\t\trequire.Contains(t, value, certData)\n\t\t\t\t\t\t\treturn nil\n\t\t\t\t\t\t},\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository_certificate.simple\",\n\t\t\t\t\t\t\"https.0.cert_subtype\",\n\t\t\t\t\t\t\"ecdsa\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\n\t\t\t\t\t\t\"argocd_repository_certificate.simple\",\n\t\t\t\t\t\t\"https.0.cert_info\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n"
  },
  {
    "path": "internal/provider/resource_repository_credentials.go",
    "content": "package provider\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"github.com/argoproj-labs/terraform-provider-argocd/internal/diagnostics\"\n\t\"github.com/argoproj-labs/terraform-provider-argocd/internal/sync\"\n\t\"github.com/argoproj/argo-cd/v3/pkg/apiclient/repocreds\"\n\t\"github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1\"\n\t\"github.com/hashicorp/terraform-plugin-framework/diag\"\n\t\"github.com/hashicorp/terraform-plugin-framework/path\"\n\t\"github.com/hashicorp/terraform-plugin-framework/resource\"\n\t\"github.com/hashicorp/terraform-plugin-framework/resource/schema\"\n\t\"github.com/hashicorp/terraform-plugin-framework/types\"\n\t\"github.com/hashicorp/terraform-plugin-log/tflog\"\n)\n\n// Ensure provider defined types fully satisfy framework interfaces.\nvar _ resource.Resource = &repositoryCredentialsResource{}\nvar _ resource.ResourceWithImportState = &repositoryCredentialsResource{}\n\nfunc NewRepositoryCredentialsResource() resource.Resource {\n\treturn &repositoryCredentialsResource{}\n}\n\n// repositoryCredentialsResource defines the resource implementation.\ntype repositoryCredentialsResource struct {\n\tsi *ServerInterface\n}\n\nfunc (r *repositoryCredentialsResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse) {\n\tresp.TypeName = req.ProviderTypeName + \"_repository_credentials\"\n}\n\nfunc (r *repositoryCredentialsResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) {\n\tresp.Schema = schema.Schema{\n\t\tMarkdownDescription: \"Manages [repository credentials](https://argo-cd.readthedocs.io/en/stable/user-guide/private-repositories/#credentials) within ArgoCD.\\n\\n\" +\n\t\t\t\"**Note**: due to restrictions in the ArgoCD API the provider is unable to track drift in this resource to fields other than `username`. I.e. the \" +\n\t\t\t\"provider is unable to detect changes to repository credentials that are made outside of Terraform (e.g. manual updates to the underlying Kubernetes \" +\n\t\t\t\"Secrets).\",\n\t\tAttributes: repositoryCredentialsSchemaAttributes(),\n\t}\n}\n\nfunc (r *repositoryCredentialsResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse) {\n\t// Prevent panic if the provider has not been configured.\n\tif req.ProviderData == nil {\n\t\treturn\n\t}\n\n\tsi, ok := req.ProviderData.(*ServerInterface)\n\tif !ok {\n\t\tresp.Diagnostics.AddError(\n\t\t\t\"Unexpected Provider Data Type\",\n\t\t\tfmt.Sprintf(\"Expected *ServerInterface, got: %T. Please report this issue to the provider developers.\", req.ProviderData),\n\t\t)\n\n\t\treturn\n\t}\n\n\tr.si = si\n}\n\nfunc (r *repositoryCredentialsResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse) {\n\tvar data repositoryCredentialsModel\n\n\t// Read Terraform configuration data into the model\n\tresp.Diagnostics.Append(req.Plan.Get(ctx, &data)...)\n\n\t// Initialize API clients\n\tresp.Diagnostics.Append(r.si.InitClients(ctx)...)\n\n\t// Check for errors before proceeding\n\tif resp.Diagnostics.HasError() {\n\t\treturn\n\t}\n\n\t// Convert to API model\n\tcreds, err := data.toAPIModel()\n\tif err != nil {\n\t\tresp.Diagnostics.AddError(\"Failed to convert repository credentials model\", err.Error())\n\t\treturn\n\t}\n\n\t// Create repository credentials\n\tsync.RepositoryCredentialsMutex.Lock()\n\tcreatedCreds, err := r.si.RepoCredsClient.CreateRepositoryCredentials(\n\t\tctx,\n\t\t&repocreds.RepoCredsCreateRequest{\n\t\t\tCreds:  creds,\n\t\t\tUpsert: false,\n\t\t},\n\t)\n\tsync.RepositoryCredentialsMutex.Unlock()\n\n\tif err != nil {\n\t\tresp.Diagnostics.Append(diagnostics.ArgoCDAPIError(\"create\", \"repository credentials\", creds.URL, err)...)\n\t\treturn\n\t}\n\n\t// Set the ID from the created credentials\n\tdata.ID = types.StringValue(createdCreds.URL)\n\n\t// Update the model with the created credentials data\n\tresult := data // Start with the original data to preserve all fields\n\tresult.ID = types.StringValue(createdCreds.URL)\n\tresult.URL = types.StringValue(createdCreds.URL)\n\n\t// Handle Type - preserve planned value if API doesn't return it\n\t// ArgoCD API doesn't reliably return type field, so we trust the planned value\n\tif createdCreds.Type != \"\" {\n\t\tresult.Type = types.StringValue(createdCreds.Type)\n\t} else if result.Type.IsUnknown() || result.Type.IsNull() {\n\t\tresult.Type = types.StringValue(\"git\")\n\t}\n\t// Otherwise keep the planned value (API accepted it without error)\n\n\t// Only update fields that are returned by the API\n\tif createdCreds.Username != \"\" {\n\t\tresult.Username = types.StringValue(createdCreds.Username)\n\t}\n\n\t// Handle EnableOCI - preserve planned value if API doesn't return it\n\t// ArgoCD API doesn't reliably return enableOCI field, so we trust the planned value\n\t// Only overwrite if API explicitly returns true\n\tif createdCreds.EnableOCI {\n\t\tresult.EnableOCI = types.BoolValue(true)\n\t}\n\t// Otherwise keep the planned value (API accepted it without error)\n\tif createdCreds.UseAzureWorkloadIdentity {\n\t\tresult.UseAzureWorkloadIdentity = types.BoolValue(true)\n\t}\n\t// Update computed fields if available\n\tif createdCreds.TLSClientCertData != \"\" {\n\t\tresult.TLSClientCertData = types.StringValue(createdCreds.TLSClientCertData)\n\t}\n\n\tif createdCreds.GitHubAppEnterpriseBaseURL != \"\" {\n\t\tresult.GitHubAppEnterpriseBaseURL = types.StringValue(createdCreds.GitHubAppEnterpriseBaseURL)\n\t}\n\n\t// GitHub App ID conversion\n\tif createdCreds.GithubAppId > 0 {\n\t\tresult.GitHubAppID = types.StringValue(strconv.FormatInt(createdCreds.GithubAppId, 10))\n\t}\n\n\t// GitHub App Installation ID conversion\n\tif createdCreds.GithubAppInstallationId > 0 {\n\t\tresult.GitHubAppInstallationID = types.StringValue(strconv.FormatInt(createdCreds.GithubAppInstallationId, 10))\n\t}\n\n\t// Save data into Terraform state\n\tresp.Diagnostics.Append(resp.State.Set(ctx, result)...)\n\n\ttflog.Trace(ctx, fmt.Sprintf(\"created repository credentials %s\", result.ID.ValueString()))\n}\n\nfunc (r *repositoryCredentialsResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) {\n\tvar data repositoryCredentialsModel\n\n\t// Read Terraform prior state data into the model\n\tresp.Diagnostics.Append(req.State.Get(ctx, &data)...)\n\n\t// Initialize API clients\n\tresp.Diagnostics.Append(r.si.InitClients(ctx)...)\n\n\t// Check for errors before proceeding\n\tif resp.Diagnostics.HasError() {\n\t\treturn\n\t}\n\n\t// Read repository credentials from API\n\tcreds, diags := r.readRepositoryCredentials(ctx, data.ID.ValueString())\n\tresp.Diagnostics.Append(diags...)\n\n\tif resp.Diagnostics.HasError() {\n\t\treturn\n\t}\n\n\t// If credentials were not found, remove from state\n\tif creds == nil {\n\t\tresp.State.RemoveResource(ctx)\n\t\treturn\n\t}\n\n\t// Update the model with the read credentials data\n\tresult := data // Start with the original data to preserve all fields\n\tresult.ID = types.StringValue(creds.URL)\n\tresult.URL = types.StringValue(creds.URL)\n\n\t// Handle Type - preserve prior state value if API doesn't return it\n\t// ArgoCD API doesn't reliably return type field, so we trust the prior state value\n\tif creds.Type != \"\" {\n\t\tresult.Type = types.StringValue(creds.Type)\n\t} else if result.Type.IsUnknown() || result.Type.IsNull() {\n\t\tresult.Type = types.StringValue(\"git\")\n\t}\n\t// Otherwise keep the existing value (API accepted it without error)\n\n\t// Only update fields that are returned by the API\n\tif creds.Username != \"\" {\n\t\tresult.Username = types.StringValue(creds.Username)\n\t}\n\n\t// Handle EnableOCI - preserve prior state value if API doesn't return it\n\t// ArgoCD API doesn't reliably return enableOCI field, so we trust the prior state value\n\t// Only overwrite if API explicitly returns true\n\tif creds.EnableOCI {\n\t\tresult.EnableOCI = types.BoolValue(true)\n\t} else if result.EnableOCI.IsNull() || result.EnableOCI.IsUnknown() {\n\t\t// For import or initial read, set to default value if API returns false\n\t\tresult.EnableOCI = types.BoolValue(false)\n\t}\n\t// Otherwise keep the prior state value (API accepted it without error)\n\tif creds.UseAzureWorkloadIdentity {\n\t\tresult.UseAzureWorkloadIdentity = types.BoolValue(true)\n\t} else if result.UseAzureWorkloadIdentity.IsNull() || result.UseAzureWorkloadIdentity.IsUnknown() {\n\t\t// For import or initial read, set to default value if API returns false\n\t\tresult.UseAzureWorkloadIdentity = types.BoolValue(false)\n\t}\n\t// Update computed fields if available\n\tif creds.TLSClientCertData != \"\" {\n\t\tresult.TLSClientCertData = types.StringValue(creds.TLSClientCertData)\n\t}\n\n\tif creds.GitHubAppEnterpriseBaseURL != \"\" {\n\t\tresult.GitHubAppEnterpriseBaseURL = types.StringValue(creds.GitHubAppEnterpriseBaseURL)\n\t}\n\n\t// GitHub App ID conversion\n\tif creds.GithubAppId > 0 {\n\t\tresult.GitHubAppID = types.StringValue(strconv.FormatInt(creds.GithubAppId, 10))\n\t}\n\n\t// GitHub App Installation ID conversion\n\tif creds.GithubAppInstallationId > 0 {\n\t\tresult.GitHubAppInstallationID = types.StringValue(strconv.FormatInt(creds.GithubAppInstallationId, 10))\n\t}\n\n\t// Save updated data into Terraform state\n\tresp.Diagnostics.Append(resp.State.Set(ctx, result)...)\n}\n\nfunc (r *repositoryCredentialsResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) {\n\tvar data repositoryCredentialsModel\n\n\t// Read Terraform plan data into the model\n\tresp.Diagnostics.Append(req.Plan.Get(ctx, &data)...)\n\n\t// Initialize API clients\n\tresp.Diagnostics.Append(r.si.InitClients(ctx)...)\n\n\t// Check for errors before proceeding\n\tif resp.Diagnostics.HasError() {\n\t\treturn\n\t}\n\n\t// Convert to API model\n\tcreds, err := data.toAPIModel()\n\tif err != nil {\n\t\tresp.Diagnostics.AddError(\"Failed to convert repository credentials model\", err.Error())\n\t\treturn\n\t}\n\n\t// Update repository credentials\n\tsync.RepositoryCredentialsMutex.Lock()\n\tupdatedCreds, err := r.si.RepoCredsClient.UpdateRepositoryCredentials(\n\t\tctx,\n\t\t&repocreds.RepoCredsUpdateRequest{Creds: creds},\n\t)\n\tsync.RepositoryCredentialsMutex.Unlock()\n\n\tif err != nil {\n\t\tresp.Diagnostics.Append(diagnostics.ArgoCDAPIError(\"update\", \"repository credentials\", creds.URL, err)...)\n\t\treturn\n\t}\n\n\t// Set the ID from the updated credentials\n\tdata.ID = types.StringValue(updatedCreds.URL)\n\n\t// Update the model with the updated credentials data\n\tresult := data // Start with the original data to preserve all fields\n\tresult.ID = types.StringValue(updatedCreds.URL)\n\tresult.URL = types.StringValue(updatedCreds.URL)\n\n\t// Handle Type - preserve planned value if API doesn't return it\n\t// ArgoCD API doesn't reliably return type field, so we trust the planned value\n\tif updatedCreds.Type != \"\" {\n\t\tresult.Type = types.StringValue(updatedCreds.Type)\n\t} else if result.Type.IsUnknown() || result.Type.IsNull() {\n\t\tresult.Type = types.StringValue(\"git\")\n\t}\n\t// Otherwise keep the planned value (API accepted it without error)\n\n\t// Only update fields that are returned by the API\n\tif updatedCreds.Username != \"\" {\n\t\tresult.Username = types.StringValue(updatedCreds.Username)\n\t}\n\n\t// Handle EnableOCI - preserve planned value if API doesn't return it\n\t// ArgoCD API doesn't reliably return enableOCI field, so we trust the planned value\n\t// Only overwrite if API explicitly returns true\n\tif updatedCreds.EnableOCI {\n\t\tresult.EnableOCI = types.BoolValue(true)\n\t}\n\t// Otherwise keep the planned value (API accepted it without error)\n\tif updatedCreds.UseAzureWorkloadIdentity {\n\t\tresult.UseAzureWorkloadIdentity = types.BoolValue(true)\n\t}\n\t// Update computed fields if available\n\tif updatedCreds.TLSClientCertData != \"\" {\n\t\tresult.TLSClientCertData = types.StringValue(updatedCreds.TLSClientCertData)\n\t}\n\n\tif updatedCreds.GitHubAppEnterpriseBaseURL != \"\" {\n\t\tresult.GitHubAppEnterpriseBaseURL = types.StringValue(updatedCreds.GitHubAppEnterpriseBaseURL)\n\t}\n\n\t// GitHub App ID conversion\n\tif updatedCreds.GithubAppId > 0 {\n\t\tresult.GitHubAppID = types.StringValue(strconv.FormatInt(updatedCreds.GithubAppId, 10))\n\t}\n\n\t// GitHub App Installation ID conversion\n\tif updatedCreds.GithubAppInstallationId > 0 {\n\t\tresult.GitHubAppInstallationID = types.StringValue(strconv.FormatInt(updatedCreds.GithubAppInstallationId, 10))\n\t}\n\n\t// Save updated data into Terraform state\n\tresp.Diagnostics.Append(resp.State.Set(ctx, result)...)\n\n\ttflog.Trace(ctx, fmt.Sprintf(\"updated repository credentials %s\", result.ID.ValueString()))\n}\n\nfunc (r *repositoryCredentialsResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) {\n\tvar data repositoryCredentialsModel\n\n\t// Read Terraform prior state data into the model\n\tresp.Diagnostics.Append(req.State.Get(ctx, &data)...)\n\n\t// Initialize API clients\n\tresp.Diagnostics.Append(r.si.InitClients(ctx)...)\n\n\t// Check for errors before proceeding\n\tif resp.Diagnostics.HasError() {\n\t\treturn\n\t}\n\n\t// Delete repository credentials\n\tsync.RepositoryCredentialsMutex.Lock()\n\t_, err := r.si.RepoCredsClient.DeleteRepositoryCredentials(\n\t\tctx,\n\t\t&repocreds.RepoCredsDeleteRequest{Url: data.ID.ValueString()},\n\t)\n\tsync.RepositoryCredentialsMutex.Unlock()\n\n\tif err != nil {\n\t\tif !strings.Contains(err.Error(), \"NotFound\") {\n\t\t\tresp.Diagnostics.Append(diagnostics.ArgoCDAPIError(\"delete\", \"repository credentials\", data.ID.ValueString(), err)...)\n\t\t\treturn\n\t\t}\n\t}\n\n\ttflog.Trace(ctx, fmt.Sprintf(\"deleted repository credentials %s\", data.ID.ValueString()))\n}\n\nfunc (r *repositoryCredentialsResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) {\n\tresource.ImportStatePassthroughID(ctx, path.Root(\"id\"), req, resp)\n}\n\nfunc (r *repositoryCredentialsResource) readRepositoryCredentials(ctx context.Context, url string) (*v1alpha1.RepoCreds, diag.Diagnostics) {\n\tvar diags diag.Diagnostics\n\n\tsync.RepositoryCredentialsMutex.RLock()\n\tdefer sync.RepositoryCredentialsMutex.RUnlock()\n\n\tcredsList, err := r.si.RepoCredsClient.ListRepositoryCredentials(ctx, &repocreds.RepoCredsQuery{\n\t\tUrl: url,\n\t})\n\n\tif err != nil {\n\t\tdiags.Append(diagnostics.ArgoCDAPIError(\"read\", \"repository credentials\", url, err)...)\n\t\treturn nil, diags\n\t}\n\n\tif credsList == nil || len(credsList.Items) == 0 {\n\t\t// Repository credentials have been deleted out-of-band\n\t\treturn nil, diags\n\t}\n\n\t// Find the specific credentials by URL\n\tfor _, creds := range credsList.Items {\n\t\tif creds.URL == url {\n\t\t\treturn &creds, diags\n\t\t}\n\t}\n\n\t// Credentials not found\n\treturn nil, diags\n}\n"
  },
  {
    "path": "internal/provider/resource_repository_credentials_test.go",
    "content": "package provider\n\nimport (\n\t\"crypto/rand\"\n\t\"crypto/rsa\"\n\t\"crypto/x509\"\n\t\"encoding/pem\"\n\t\"fmt\"\n\t\"regexp\"\n\t\"testing\"\n\n\t\"github.com/hashicorp/terraform-plugin-testing/helper/resource\"\n\t\"github.com/hashicorp/terraform-plugin-testing/terraform\"\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestAccArgoCDRepositoryCredentials(t *testing.T) {\n\tsshPrivateKey, err := generateSSHPrivateKey()\n\tassert.NoError(t, err)\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDRepositoryCredentialsSimple(\n\t\t\t\t\t\"https://github.com/argoproj-labs/terraform-provider-argocd\",\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDRepositoryCredentialsSSH(\n\t\t\t\t\t\"https://private-git-repository.argocd.svc.cluster.local/project-1.git\",\n\t\t\t\t\t\"git\",\n\t\t\t\t\tsshPrivateKey,\n\t\t\t\t),\n\t\t\t\tCheck: resource.TestCheckResourceAttr(\n\t\t\t\t\t\"argocd_repository_credentials.simple\",\n\t\t\t\t\t\"username\",\n\t\t\t\t\t\"git\",\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_repository_credentials.simple\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"ssh_private_key\"},\n\t\t\t},\n\t\t},\n\t})\n\n\t// Run coexistence test separately with multiplexed provider\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDRepositoryCredentialsRepositoryCoexistence(),\n\t\t\t\tCheck: testCheckMultipleResourceAttr(\n\t\t\t\t\t\"argocd_repository.private\",\n\t\t\t\t\t\"connection_state_status\",\n\t\t\t\t\t\"Successful\",\n\t\t\t\t\t10,\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDRepositoryCredentials_UseAzureWorkloadIdentity(t *testing.T) {\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDRepositoryCredentialsUseAzureWorkloadIdentity(\"https://github.com/argoproj-labs/terraform-provider-argocd\"),\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_repository_credentials.azurewi\", \"use_azure_workload_identity\", \"true\"),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDRepositoryCredentialsUseAzureWorkloadIdentity(\"https://github.com/argoproj-labs/terraform-provider-argocd\"),\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_repository_credentials.azurewi\", \"use_azure_workload_identity\", \"true\"),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc testAccArgoCDRepositoryCredentialsUseAzureWorkloadIdentity(repoUrl string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_repository_credentials\" \"azurewi\" {\n  url                          = \"%s\"\n  use_azure_workload_identity  = true\n}\n`, repoUrl)\n}\n\nfunc TestAccArgoCDRepositoryCredentials_GitHubApp(t *testing.T) {\n\tsshPrivateKey, err := generateSSHPrivateKey()\n\tassert.NoError(t, err)\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDRepositoryCredentialsGitHubApp(\n\t\t\t\t\t\"https://private-git-repository.argocd.svc.cluster.local/project-1.git\",\n\t\t\t\t\t\"123456\",\n\t\t\t\t\t\"987654321\",\n\t\t\t\t\t\"https://ghe.example.com/api/v3\",\n\t\t\t\t\tsshPrivateKey,\n\t\t\t\t),\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository_credentials.githubapp\",\n\t\t\t\t\t\t\"githubapp_id\",\n\t\t\t\t\t\t\"123456\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository_credentials.githubapp\",\n\t\t\t\t\t\t\"githubapp_installation_id\",\n\t\t\t\t\t\t\"987654321\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository_credentials.githubapp\",\n\t\t\t\t\t\t\"githubapp_enterprise_base_url\",\n\t\t\t\t\t\t\"https://ghe.example.com/api/v3\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc testAccArgoCDRepositoryCredentialsSimple(repoUrl string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_repository_credentials\" \"simple\" {\n  url             = \"%s\"\n}\n`, repoUrl)\n}\n\nfunc testAccArgoCDRepositoryCredentialsSSH(repoUrl, username, sshPrivateKey string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_repository_credentials\" \"simple\" {\n  url             = \"%s\"\n  username        = \"%s\"\n  ssh_private_key = <<EOT\n%s\nEOT\n}\n`, repoUrl, username, sshPrivateKey)\n}\n\nfunc testAccArgoCDRepositoryCredentialsRepositoryCoexistence() string {\n\treturn fmt.Sprintf(`\nresource \"argocd_repository\" \"private\" {\n  count      = 10\n  repo       = format(\"git@private-git-repository.argocd.svc.cluster.local:~/project-%%d.git\", count.index+1)\n  insecure   = true\n  depends_on = [argocd_repository_credentials.private]\n}\n\nresource \"argocd_repository_credentials\" \"private\" {\n  url             = \"git@private-git-repository.argocd.svc.cluster.local\"\n  username        = \"git\"\n  ssh_private_key = \"-----BEGIN OPENSSH PRIVATE KEY-----\\nb3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW\\nQyNTUxOQAAACCGe6Vx0gbKqKCI0wIplfgK5JBjCDO3bhtU3sZfLoeUZgAAAJB9cNEifXDR\\nIgAAAAtzc2gtZWQyNTUxOQAAACCGe6Vx0gbKqKCI0wIplfgK5JBjCDO3bhtU3sZfLoeUZg\\nAAAEAJeUrObjoTbGO1Sq4TXHl/j4RJ5aKMC1OemWuHmLK7XYZ7pXHSBsqooIjTAimV+Ark\\nkGMIM7duG1Texl8uh5RmAAAAC3Rlc3RAYXJnb2NkAQI=\\n-----END OPENSSH PRIVATE KEY-----\"\n}\n`)\n}\n\nfunc testAccArgoCDRepositoryCredentialsGitHubApp(repoUrl, id, installID, enterpriseBaseURL, appKey string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_repository_credentials\" \"githubapp\" {\n  url             \t\t\t\t= \"%s\"\n  githubapp_id    \t\t\t\t= \"%s\"\n  githubapp_installation_id \t= \"%s\"\n  githubapp_enterprise_base_url = \"%s\"\n  githubapp_private_key \t\t= <<EOT\n%s\nEOT\n}\n`, repoUrl, id, installID, enterpriseBaseURL, appKey)\n}\n\nfunc generateSSHPrivateKey() (privateKey string, err error) {\n\tpk, err := rsa.GenerateKey(rand.Reader, 2048)\n\tif err != nil {\n\t\treturn\n\t}\n\n\terr = pk.Validate()\n\tif err != nil {\n\t\treturn\n\t}\n\n\tprivDER := x509.MarshalPKCS1PrivateKey(pk)\n\tprivBlock := pem.Block{\n\t\tType:    \"RSA PRIVATE KEY\",\n\t\tHeaders: nil,\n\t\tBytes:   privDER,\n\t}\n\n\treturn string(pem.EncodeToMemory(&privBlock)), nil\n}\n\nfunc TestAccArgoCDRepositoryCredentials_UsernamePasswordConsistency(t *testing.T) {\n\tconfig := testAccArgoCDRepositoryCredentialsSimple(\n\t\t\"https://github.com/argoproj-labs/terraform-provider-argocd\",\n\t)\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_repository_credentials.simple\", \"url\", \"https://github.com/argoproj-labs/terraform-provider-argocd\"),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Apply the same configuration again to test for consistency\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_repository_credentials.simple\", \"url\", \"https://github.com/argoproj-labs/terraform-provider-argocd\"),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDRepositoryCredentials_SSHConsistency(t *testing.T) {\n\tsshPrivateKey, err := generateSSHPrivateKey()\n\tassert.NoError(t, err)\n\n\tconfig := testAccArgoCDRepositoryCredentialsSSH(\n\t\t\"https://private-git-repository.argocd.svc.cluster.local/project-1.git\",\n\t\t\"git\",\n\t\tsshPrivateKey,\n\t)\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_repository_credentials.simple\", \"url\", \"https://private-git-repository.argocd.svc.cluster.local/project-1.git\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_repository_credentials.simple\", \"username\", \"git\"),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\"argocd_repository_credentials.simple\", \"ssh_private_key\"),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Apply the same configuration again to test for consistency\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_repository_credentials.simple\", \"url\", \"https://private-git-repository.argocd.svc.cluster.local/project-1.git\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_repository_credentials.simple\", \"username\", \"git\"),\n\t\t\t\t\tresource.TestCheckResourceAttrSet(\"argocd_repository_credentials.simple\", \"ssh_private_key\"),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDRepositoryCredentials_GitHubAppConsistency(t *testing.T) {\n\tsshPrivateKey, err := generateSSHPrivateKey()\n\tassert.NoError(t, err)\n\n\tconfig := testAccArgoCDRepositoryCredentialsGitHubApp(\n\t\t\"https://private-git-repository.argocd.svc.cluster.local/project-1.git\",\n\t\t\"123456\",\n\t\t\"987654321\",\n\t\t\"https://ghe.example.com/api/v3\",\n\t\tsshPrivateKey,\n\t)\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_repository_credentials.githubapp\", \"url\", \"https://private-git-repository.argocd.svc.cluster.local/project-1.git\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_repository_credentials.githubapp\", \"githubapp_id\", \"123456\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_repository_credentials.githubapp\", \"githubapp_installation_id\", \"987654321\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_repository_credentials.githubapp\", \"githubapp_enterprise_base_url\", \"https://ghe.example.com/api/v3\"),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Apply the same configuration again to test for consistency\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_repository_credentials.githubapp\", \"url\", \"https://private-git-repository.argocd.svc.cluster.local/project-1.git\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_repository_credentials.githubapp\", \"githubapp_id\", \"123456\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_repository_credentials.githubapp\", \"githubapp_installation_id\", \"987654321\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_repository_credentials.githubapp\", \"githubapp_enterprise_base_url\", \"https://ghe.example.com/api/v3\"),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDRepositoryCredentials_GitHubAppWithRepositoryInheritance(t *testing.T) {\n\tsshPrivateKey, err := generateSSHPrivateKey()\n\tassert.NoError(t, err)\n\n\t// Use the local test repository infrastructure to avoid external dependencies\n\t// while still testing GitHub App credential inheritance\n\tconfig := testAccArgoCDRepositoryCredentialsGitHubAppWithRepository(\n\t\t\"git@private-git-repository.argocd.svc.cluster.local\",\n\t\t\"git@private-git-repository.argocd.svc.cluster.local:~/project-1.git\",\n\t\t\"123456\",\n\t\t\"987654321\",\n\t\t\"https://ghe.example.com/api/v3\",\n\t\tsshPrivateKey,\n\t)\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\t// Check repository credentials - verify GitHub App fields are set\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_repository_credentials.githubapp\", \"url\", \"git@private-git-repository.argocd.svc.cluster.local\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_repository_credentials.githubapp\", \"githubapp_id\", \"123456\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_repository_credentials.githubapp\", \"githubapp_installation_id\", \"987654321\"),\n\t\t\t\t\t// resource.TestCheckResourceAttr(\"argocd_repository_credentials.githubapp\", \"githubapp_enterprise_base_url\", \"https://ghe.example.com/api/v3\"),\n\t\t\t\t\t// Check repository that inherits credentials\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_repository.repo\", \"repo\", \"git@private-git-repository.argocd.svc.cluster.local:~/project-1.git\"),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Apply the same configuration again to test for consistency (Issue #697)\n\t\t\t\t// This should NOT produce \"inconsistent result after apply\" errors\n\t\t\t\t// This is the key test - without the updateFromAPI fix, this step would fail\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\t// Verify repository credentials fields remain stable across applies\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_repository_credentials.githubapp\", \"url\", \"git@private-git-repository.argocd.svc.cluster.local\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_repository_credentials.githubapp\", \"githubapp_id\", \"123456\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_repository_credentials.githubapp\", \"githubapp_installation_id\", \"987654321\"),\n\t\t\t\t\t// resource.TestCheckResourceAttr(\"argocd_repository_credentials.githubapp\", \"githubapp_enterprise_base_url\", \"https://ghe.example.com/api/v3\"),\n\t\t\t\t\t// Verify repository remains stable\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_repository.repo\", \"repo\", \"git@private-git-repository.argocd.svc.cluster.local:~/project-1.git\"),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Apply a third time to ensure continued consistency\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_repository_credentials.githubapp\", \"url\", \"git@private-git-repository.argocd.svc.cluster.local\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_repository_credentials.githubapp\", \"githubapp_id\", \"123456\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_repository_credentials.githubapp\", \"githubapp_installation_id\", \"987654321\"),\n\t\t\t\t\t// resource.TestCheckResourceAttr(\"argocd_repository_credentials.githubapp\", \"githubapp_enterprise_base_url\", \"https://ghe.example.com/api/v3\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_repository.repo\", \"repo\", \"git@private-git-repository.argocd.svc.cluster.local:~/project-1.git\"),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc testAccArgoCDRepositoryCredentialsGitHubAppWithRepository(credsUrl, repoUrl, id, installID, enterpriseBaseURL, _ string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_repository_credentials\" \"githubapp\" {\n  url                           = \"%s\"\n  githubapp_id                  = \"%s\"\n  githubapp_installation_id     = \"%s\"\n  #githubapp_enterprise_base_url = \"%s\"\n  ssh_private_key = \"-----BEGIN OPENSSH PRIVATE KEY-----\\nb3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW\\nQyNTUxOQAAACCGe6Vx0gbKqKCI0wIplfgK5JBjCDO3bhtU3sZfLoeUZgAAAJB9cNEifXDR\\nIgAAAAtzc2gtZWQyNTUxOQAAACCGe6Vx0gbKqKCI0wIplfgK5JBjCDO3bhtU3sZfLoeUZg\\nAAAEAJeUrObjoTbGO1Sq4TXHl/j4RJ5aKMC1OemWuHmLK7XYZ7pXHSBsqooIjTAimV+Ark\\nkGMIM7duG1Texl8uh5RmAAAAC3Rlc3RAYXJnb2NkAQI=\\n-----END OPENSSH PRIVATE KEY-----\"\n}\n\nresource \"argocd_repository\" \"repo\" {\n  repo       = \"%s\"\n  type       = \"git\"\n  insecure   = true\n  depends_on = [argocd_repository_credentials.githubapp]\n}\n`, credsUrl, id, installID, enterpriseBaseURL, repoUrl)\n}\n\nfunc TestAccArgoCDRepositoryCredentials_TypeWithEnableOCI(t *testing.T) {\n\t// This test reproduces issue #791: https://github.com/argoproj-labs/terraform-provider-argocd/issues/791\n\t// When enable_oci = true, the type should be \"helm\", but without a type parameter,\n\t// the provider can't handle this correctly and causes \"inconsistent result after apply\" errors.\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDRepositoryCredentialsWithOCI(\n\t\t\t\t\t\"oci://ghcr.io/example/charts\",\n\t\t\t\t\t\"testuser\",\n\t\t\t\t\t\"testpassword\",\n\t\t\t\t),\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_repository_credentials.oci\", \"url\", \"oci://ghcr.io/example/charts\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_repository_credentials.oci\", \"username\", \"testuser\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_repository_credentials.oci\", \"enable_oci\", \"true\"),\n\t\t\t\t\t// This should be \"helm\" when enable_oci is true\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_repository_credentials.oci\", \"type\", \"helm\"),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Apply the same configuration again to test for consistency\n\t\t\t\t// This would fail without the type field, causing \"inconsistent result after apply\"\n\t\t\t\tConfig: testAccArgoCDRepositoryCredentialsWithOCI(\n\t\t\t\t\t\"oci://ghcr.io/example/charts\",\n\t\t\t\t\t\"testuser\",\n\t\t\t\t\t\"testpassword\",\n\t\t\t\t),\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_repository_credentials.oci\", \"url\", \"oci://ghcr.io/example/charts\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_repository_credentials.oci\", \"username\", \"testuser\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_repository_credentials.oci\", \"enable_oci\", \"true\"),\n\t\t\t\t\tresource.TestCheckResourceAttr(\"argocd_repository_credentials.oci\", \"type\", \"helm\"),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDRepositoryCredentials_EnableOCIValidation(t *testing.T) {\n\t// Test that enable_oci=true with type=\"git\" fails validation\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: `\nresource \"argocd_repository_credentials\" \"invalid\" {\n  url        = \"https://git.example.com\"\n  username   = \"testuser\"\n  password   = \"testpass\"\n  enable_oci = true\n  type       = \"git\"\n}\n`,\n\t\t\t\tExpectError: regexp.MustCompile(\"enable_oci can only be set to true when type is 'helm'\"),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc testAccArgoCDRepositoryCredentialsWithOCI(repoUrl, username, password string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_repository_credentials\" \"oci\" {\n  url        = \"%s\"\n  username   = \"%s\"\n  password   = \"%s\"\n  enable_oci = true\n  type       = \"helm\"\n}\n`, repoUrl, username, password)\n}\n\nfunc testCheckMultipleResourceAttr(name, key, value string, count int) resource.TestCheckFunc {\n\treturn func(s *terraform.State) error {\n\t\tfor i := 0; i < count; i++ {\n\t\t\tms := s.RootModule()\n\t\t\t_name := fmt.Sprintf(\"%s.%d\", name, i)\n\n\t\t\trs, ok := ms.Resources[_name]\n\t\t\tif !ok {\n\t\t\t\treturn fmt.Errorf(\"not found: %s in %s\", _name, ms.Path)\n\t\t\t}\n\n\t\t\tis := rs.Primary\n\t\t\tif is == nil {\n\t\t\t\treturn fmt.Errorf(\"no primary instance: %s in %s\", _name, ms.Path)\n\t\t\t}\n\n\t\t\tif val, ok := is.Attributes[key]; !ok || val != value {\n\t\t\t\treturn fmt.Errorf(\"%s: Attribute '%s' expected to be set and have value '%s': %s\", _name, key, value, val)\n\t\t\t}\n\t\t}\n\n\t\treturn nil\n\t}\n}\n"
  },
  {
    "path": "internal/provider/resource_repository_test.go",
    "content": "package provider\n\nimport (\n\t\"fmt\"\n\t\"regexp\"\n\t\"testing\"\n\n\t\"github.com/argoproj-labs/terraform-provider-argocd/internal/features\"\n\t\"github.com/hashicorp/terraform-plugin-testing/helper/acctest\"\n\t\"github.com/hashicorp/terraform-plugin-testing/helper/resource\"\n\t\"github.com/hashicorp/terraform-plugin-testing/plancheck\"\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestAccArgoCDRepository_Simple(t *testing.T) {\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDRepositorySimple(),\n\t\t\t\tCheck: resource.TestCheckResourceAttr(\n\t\t\t\t\t\"argocd_repository.simple\",\n\t\t\t\t\t\"connection_state_status\",\n\t\t\t\t\t\"Successful\",\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:      \"argocd_repository.simple\",\n\t\t\t\tImportState:       true,\n\t\t\t\tImportStateVerify: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDRepositoryPublicUsageInApplication(acctest.RandString(10)),\n\t\t\t\tCheck: resource.TestCheckResourceAttrSet(\n\t\t\t\t\t\"argocd_application.public\",\n\t\t\t\t\t\"metadata.0.uid\",\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDRepository_UseAzureWorkloadIdentity(t *testing.T) {\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig:      testAccArgoCDRepositoryUseAzureWorkloadIdentity(),\n\t\t\t\tExpectError: regexp.MustCompile(\"failed to acquire a token\"),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc testAccArgoCDRepositoryUseAzureWorkloadIdentity() string {\n\treturn `\nresource \"argocd_repository\" \"azurewi\" {\n  repo                        = \"https://github.com/argoproj-labs/terraform-provider-argocd\"\n  use_azure_workload_identity = true\n}\n`\n}\n\nfunc TestAccArgoCDRepository_Helm(t *testing.T) {\n\tprojectName := acctest.RandString(10)\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDRepositoryHelm(),\n\t\t\t\tCheck: resource.TestCheckResourceAttr(\n\t\t\t\t\t\"argocd_repository.helm\",\n\t\t\t\t\t\"connection_state_status\",\n\t\t\t\t\t\"Successful\",\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:      \"argocd_repository.helm\",\n\t\t\t\tImportState:       true,\n\t\t\t\tImportStateVerify: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDRepositoryHelmProjectScoped(projectName),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.helm\",\n\t\t\t\t\t\t\"connection_state_status\",\n\t\t\t\t\t\t\"Successful\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.helm\",\n\t\t\t\t\t\t\"project\",\n\t\t\t\t\t\tprojectName,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDRepository_PrivateSSH(t *testing.T) {\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDRepositoryPrivateGitSSH(\"git@private-git-repository.argocd.svc.cluster.local:~/project-1.git\"),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.private_ssh\",\n\t\t\t\t\t\t\"connection_state_status\",\n\t\t\t\t\t\t\"Successful\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.private_ssh\",\n\t\t\t\t\t\t\"inherited_creds\",\n\t\t\t\t\t\t\"false\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tResourceName:            \"argocd_repository.private_ssh\",\n\t\t\t\tImportState:             true,\n\t\t\t\tImportStateVerify:       true,\n\t\t\t\tImportStateVerifyIgnore: []string{\"ssh_private_key\"},\n\t\t\t},\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDRepositoryMultiplePrivateGitSSH(10),\n\t\t\t\tCheck: testCheckMultipleResourceAttr(\n\t\t\t\t\t\"argocd_repository.private_ssh\",\n\t\t\t\t\t\"connection_state_status\",\n\t\t\t\t\t\"Successful\",\n\t\t\t\t\t10,\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDRepository_GitHubApp(t *testing.T) {\n\tsshPrivateKey, err := generateSSHPrivateKey()\n\tassert.NoError(t, err)\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: testAccArgoCDRepositoryGitHubApp(\n\t\t\t\t\t\"https://private-git-repository.argocd.svc.cluster.local/project-1.git\",\n\t\t\t\t\t\"123456\",\n\t\t\t\t\t\"987654321\",\n\t\t\t\t\t\"https://ghe.example.com/api/v3\",\n\t\t\t\t\tsshPrivateKey,\n\t\t\t\t),\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.githubapp\",\n\t\t\t\t\t\t\"githubapp_id\",\n\t\t\t\t\t\t\"123456\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.githubapp\",\n\t\t\t\t\t\t\"githubapp_installation_id\",\n\t\t\t\t\t\t\"987654321\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.githubapp\",\n\t\t\t\t\t\t\"githubapp_enterprise_base_url\",\n\t\t\t\t\t\t\"https://ghe.example.com/api/v3\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\n// TestAccArgoCDRepository_GitHubAppConsistency tests the fix for issue #697\n// This test verifies that GitHub App authentication fields remain consistent\n// across multiple applies without configuration changes\nfunc TestAccArgoCDRepository_GitHubAppConsistency(t *testing.T) {\n\tsshPrivateKey, err := generateSSHPrivateKey()\n\tassert.NoError(t, err)\n\n\tconfig := testAccArgoCDRepositoryGitHubApp(\n\t\t\"https://github.com/MyCompany/MyRepo.git\",\n\t\t\"12345\",\n\t\t\"987654\",\n\t\t\"\",\n\t\tsshPrivateKey,\n\t)\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.githubapp\",\n\t\t\t\t\t\t\"githubapp_id\",\n\t\t\t\t\t\t\"12345\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.githubapp\",\n\t\t\t\t\t\t\"githubapp_installation_id\",\n\t\t\t\t\t\t\"987654\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Apply the same configuration again to test for consistency\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.githubapp\",\n\t\t\t\t\t\t\"githubapp_id\",\n\t\t\t\t\t\t\"12345\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.githubapp\",\n\t\t\t\t\t\t\"githubapp_installation_id\",\n\t\t\t\t\t\t\"987654\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Third apply to ensure fields don't become null over time\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.githubapp\",\n\t\t\t\t\t\t\"githubapp_id\",\n\t\t\t\t\t\t\"12345\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.githubapp\",\n\t\t\t\t\t\t\"githubapp_installation_id\",\n\t\t\t\t\t\t\"987654\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\n// TestAccArgoCDRepository_BearerTokenConsistency tests consistency of bearer token field\n// Note: This test uses a Helm repository which doesn't require authentication but allows token auth\nfunc TestAccArgoCDRepository_BearerTokenConsistency(t *testing.T) {\n\tconfig := `\nresource \"argocd_repository\" \"bearer_token\" {\n  repo     = \"https://helm.nginx.com/stable\"\n  type     = \"helm\"\n\tbearer_token = \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWUsImlhdCI6MTUxNjIzOTAyMn0.KMUFsIDTnFmyG3nMiGM6H9FNFUROf3wh7SmqJp-QV30\"\n}\n`\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.bearer_token\",\n\t\t\t\t\t\t\"bearer_token\",\n\t\t\t\t\t\t\"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWUsImlhdCI6MTUxNjIzOTAyMn0.KMUFsIDTnFmyG3nMiGM6H9FNFUROf3wh7SmqJp-QV30\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.bearer_token\",\n\t\t\t\t\t\t\"connection_state_status\",\n\t\t\t\t\t\t\"Successful\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Apply the same configuration again to test for consistency\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.bearer_token\",\n\t\t\t\t\t\t\"bearer_token\",\n\t\t\t\t\t\t\"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWUsImlhdCI6MTUxNjIzOTAyMn0.KMUFsIDTnFmyG3nMiGM6H9FNFUROf3wh7SmqJp-QV30\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.bearer_token\",\n\t\t\t\t\t\t\"connection_state_status\",\n\t\t\t\t\t\t\"Successful\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\n// TestAccArgoCDRepository_UsernamePasswordConsistency tests consistency of username/password fields\n// Note: This test uses a Helm repository which doesn't require authentication but allows username/password fields\nfunc TestAccArgoCDRepository_UsernamePasswordConsistency(t *testing.T) {\n\tconfig := `\nresource \"argocd_repository\" \"username_password\" {\n  repo     = \"https://helm.nginx.com/stable\"\n  type     = \"helm\"\n  username = \"testuser\"\n  password = \"testpass\"\n}\n`\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.username_password\",\n\t\t\t\t\t\t\"username\",\n\t\t\t\t\t\t\"testuser\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.username_password\",\n\t\t\t\t\t\t\"password\",\n\t\t\t\t\t\t\"testpass\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.username_password\",\n\t\t\t\t\t\t\"connection_state_status\",\n\t\t\t\t\t\t\"Successful\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Apply the same configuration again to test for consistency\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.username_password\",\n\t\t\t\t\t\t\"username\",\n\t\t\t\t\t\t\"testuser\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.username_password\",\n\t\t\t\t\t\t\"password\",\n\t\t\t\t\t\t\"testpass\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.username_password\",\n\t\t\t\t\t\t\"connection_state_status\",\n\t\t\t\t\t\t\"Successful\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\n// TestAccArgoCDRepository_TLSCertificateConsistency tests consistency of TLS certificate fields\nfunc TestAccArgoCDRepository_TLSCertificateConsistency(t *testing.T) {\n\tcertData := `-----BEGIN CERTIFICATE-----\nMIICljCCAX4CCQCKXiP0ZxJxHDANBgkqhkiG9w0BAQsFADANMQswCQYDVQQGEwJV\nUzAeFw0yNDAxMDEwMDAwMDBaFw0yNTAxMDEwMDAwMDBaMA0xCzAJBgNVBAYTAlVT\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3qZ8x/example...\n-----END CERTIFICATE-----`\n\n\tcertKey := `-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDepnzH/example...\n-----END PRIVATE KEY-----`\n\n\tconfig := fmt.Sprintf(`\nresource \"argocd_repository\" \"tls_cert\" {\n  repo                 = \"https://github.com/kubernetes-sigs/kustomize\"\n  tls_client_cert_data = %q\n  tls_client_cert_key  = %q\n}\n`, certData, certKey)\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.tls_cert\",\n\t\t\t\t\t\t\"tls_client_cert_data\",\n\t\t\t\t\t\tcertData,\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.tls_cert\",\n\t\t\t\t\t\t\"tls_client_cert_key\",\n\t\t\t\t\t\tcertKey,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Apply the same configuration again to test for consistency\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.tls_cert\",\n\t\t\t\t\t\t\"tls_client_cert_data\",\n\t\t\t\t\t\tcertData,\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.tls_cert\",\n\t\t\t\t\t\t\"tls_client_cert_key\",\n\t\t\t\t\t\tcertKey,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\n// TestAccArgoCDRepository_OptionalFieldsConsistency tests consistency of optional fields\nfunc TestAccArgoCDRepository_OptionalFieldsConsistency(t *testing.T) {\n\tprojectName := acctest.RandString(10)\n\n\tconfig := fmt.Sprintf(`\nresource \"argocd_project\" \"test\" {\n  metadata {\n    name      = \"%[1]s\"\n    namespace = \"argocd\"\n  }\n  spec {\n    description  = \"test project\"\n    source_repos = [\"*\"]\n    destination {\n      name      = \"in-cluster\"\n      namespace = \"default\"\n    }\n  }\n}\n\nresource \"argocd_repository\" \"optional_fields\" {\n  repo    = \"https://helm.nginx.com/stable/\"\n  name    = \"nginx-stable-test\"\n  type    = \"helm\"\n  project = argocd_project.test.metadata[0].name\n}\n`, projectName)\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.optional_fields\",\n\t\t\t\t\t\t\"name\",\n\t\t\t\t\t\t\"nginx-stable-test\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.optional_fields\",\n\t\t\t\t\t\t\"type\",\n\t\t\t\t\t\t\"helm\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.optional_fields\",\n\t\t\t\t\t\t\"project\",\n\t\t\t\t\t\tprojectName,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Apply the same configuration again to test for consistency\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.optional_fields\",\n\t\t\t\t\t\t\"name\",\n\t\t\t\t\t\t\"nginx-stable-test\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.optional_fields\",\n\t\t\t\t\t\t\"type\",\n\t\t\t\t\t\t\"helm\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.optional_fields\",\n\t\t\t\t\t\t\"project\",\n\t\t\t\t\t\tprojectName,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\n// TestAccArgoCDRepository_BooleanFieldsConsistency tests consistency of boolean fields\nfunc TestAccArgoCDRepository_BooleanFieldsConsistency(t *testing.T) {\n\tconfig := `\nresource \"argocd_repository\" \"boolean_fields\" {\n  repo       = \"https://github.com/kubernetes-sigs/kustomize\"\n  enable_lfs = true\n  enable_oci = true\n  insecure   = true\n}\n`\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.boolean_fields\",\n\t\t\t\t\t\t\"enable_lfs\",\n\t\t\t\t\t\t\"true\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.boolean_fields\",\n\t\t\t\t\t\t\"enable_oci\",\n\t\t\t\t\t\t\"true\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.boolean_fields\",\n\t\t\t\t\t\t\"insecure\",\n\t\t\t\t\t\t\"true\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Apply the same configuration again to test for consistency\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.boolean_fields\",\n\t\t\t\t\t\t\"enable_lfs\",\n\t\t\t\t\t\t\"true\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.boolean_fields\",\n\t\t\t\t\t\t\"enable_oci\",\n\t\t\t\t\t\t\"true\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.boolean_fields\",\n\t\t\t\t\t\t\"insecure\",\n\t\t\t\t\t\t\"true\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc TestAccArgoCDRepository_ProviderUpgradeStateMigration(t *testing.T) {\n\tconfig := `\nresource \"argocd_repository\" \"private\" {\n  count = 1\n  repo  = \"https://github.com/kubernetes-sigs/kustomize\"\n  name  = \"gitlab-private\"\n  type  = \"git\"\n}\n`\n\tresource.Test(t, resource.TestCase{\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tExternalProviders: map[string]resource.ExternalProvider{\n\t\t\t\t\t\"argocd\": {\n\t\t\t\t\t\tVersionConstraint: \"7.8.0\",\n\t\t\t\t\t\tSource:            \"argoproj-labs/argocd\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tConfig: config,\n\t\t\t},\n\t\t\t{\n\t\t\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\t\t\tConfig:                   config,\n\t\t\t},\n\t\t\t{\n\t\t\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\t\t\tConfig:                   config,\n\t\t\t\tConfigPlanChecks: resource.ConfigPlanChecks{\n\t\t\t\t\tPreApply: []plancheck.PlanCheck{\n\t\t\t\t\t\tplancheck.ExpectEmptyPlan(),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t})\n}\n\n// TestAccArgoCDRepository_DepthConsistency tests the depth field for shallow clones\nfunc TestAccArgoCDRepository_DepthConsistency(t *testing.T) {\n\tconfig := `\nresource \"argocd_repository\" \"shallow\" {\n  repo  = \"https://github.com/kubernetes-sigs/kustomize\"\n  depth = 1\n}\n`\n\tconfigUpdated := `\nresource \"argocd_repository\" \"shallow\" {\n  repo  = \"https://github.com/kubernetes-sigs/kustomize\"\n  depth = 5\n}\n`\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck: func() {\n\t\t\ttestAccPreCheck(t)\n\t\t\ttestAccPreCheckFeatureSupported(t, features.RepositoryDepth)\n\t\t},\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.shallow\",\n\t\t\t\t\t\t\"depth\",\n\t\t\t\t\t\t\"1\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.shallow\",\n\t\t\t\t\t\t\"connection_state_status\",\n\t\t\t\t\t\t\"Successful\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Re-apply to verify no plan diff from the default\n\t\t\t\tConfig: config,\n\t\t\t\tConfigPlanChecks: resource.ConfigPlanChecks{\n\t\t\t\t\tPreApply: []plancheck.PlanCheck{\n\t\t\t\t\t\tplancheck.ExpectEmptyPlan(),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Apply the same configuration again to test for consistency\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.shallow\",\n\t\t\t\t\t\t\"depth\",\n\t\t\t\t\t\t\"1\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Re-apply to verify no plan diff from the default\n\t\t\t\tConfig: config,\n\t\t\t\tConfigPlanChecks: resource.ConfigPlanChecks{\n\t\t\t\t\tPreApply: []plancheck.PlanCheck{\n\t\t\t\t\t\tplancheck.ExpectEmptyPlan(),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Update depth value\n\t\t\t\tConfig: configUpdated,\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.shallow\",\n\t\t\t\t\t\t\"depth\",\n\t\t\t\t\t\t\"5\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Re-apply to verify no plan diff after update\n\t\t\t\tConfig: configUpdated,\n\t\t\t\tConfigPlanChecks: resource.ConfigPlanChecks{\n\t\t\t\t\tPreApply: []plancheck.PlanCheck{\n\t\t\t\t\t\tplancheck.ExpectEmptyPlan(),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t})\n}\n\n// TestAccArgoCDRepository_DepthDefault tests that depth defaults to 0 when omitted\nfunc TestAccArgoCDRepository_DepthDefault(t *testing.T) {\n\tconfig := `\nresource \"argocd_repository\" \"no_depth\" {\n  repo = \"https://github.com/kubernetes-sigs/kustomize\"\n}\n`\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck: func() {\n\t\t\ttestAccPreCheck(t)\n\t\t\ttestAccPreCheckFeatureSupported(t, features.RepositoryDepth)\n\t\t},\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.TestCheckResourceAttr(\n\t\t\t\t\t\"argocd_repository.no_depth\",\n\t\t\t\t\t\"depth\",\n\t\t\t\t\t\"0\",\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Re-apply to verify no plan diff from the default\n\t\t\t\tConfig: config,\n\t\t\t\tConfigPlanChecks: resource.ConfigPlanChecks{\n\t\t\t\t\tPreApply: []plancheck.PlanCheck{\n\t\t\t\t\t\tplancheck.ExpectEmptyPlan(),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t})\n}\n\n// TestAccArgoCDRepository_DepthUnsupportedVersion tests that depth is rejected on older ArgoCD versions\nfunc TestAccArgoCDRepository_DepthUnsupportedVersion(t *testing.T) {\n\tconfig := `\nresource \"argocd_repository\" \"depth_unsupported\" {\n  repo  = \"https://github.com/kubernetes-sigs/kustomize\"\n  depth = 1\n}\n`\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck: func() {\n\t\t\ttestAccPreCheck(t)\n\t\t\ttestAccPreCheckFeatureNotSupported(t, features.RepositoryDepth)\n\t\t},\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig:      config,\n\t\t\t\tExpectError: regexp.MustCompile(\"only supported from ArgoCD\"),\n\t\t\t},\n\t\t},\n\t})\n}\n\n// TestAccArgoCDRepository_DepthNegativeValidation tests that negative depth is rejected\nfunc TestAccArgoCDRepository_DepthNegativeValidation(t *testing.T) {\n\tconfig := `\nresource \"argocd_repository\" \"negative_depth\" {\n  repo  = \"https://github.com/kubernetes-sigs/kustomize\"\n  depth = -1\n}\n`\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig:      config,\n\t\t\t\tExpectError: regexp.MustCompile(\"must be at least 0\"),\n\t\t\t},\n\t\t},\n\t})\n}\n\n// TestAccArgoCDRepository_EmptyStringFieldsConsistency tests handling of empty string fields\nfunc TestAccArgoCDRepository_EmptyStringFieldsConsistency(t *testing.T) {\n\tconfig := `\nresource \"argocd_repository\" \"empty_strings\" {\n  repo                          = \"https://github.com/kubernetes-sigs/kustomize\"\n  name                          = \"\"\n  githubapp_enterprise_base_url = \"\"\n}\n`\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.empty_strings\",\n\t\t\t\t\t\t\"name\",\n\t\t\t\t\t\t\"\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.empty_strings\",\n\t\t\t\t\t\t\"githubapp_enterprise_base_url\",\n\t\t\t\t\t\t\"\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Apply the same configuration again to test for consistency\n\t\t\t\tConfig: config,\n\t\t\t\tCheck: resource.ComposeAggregateTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.empty_strings\",\n\t\t\t\t\t\t\"name\",\n\t\t\t\t\t\t\"\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.empty_strings\",\n\t\t\t\t\t\t\"githubapp_enterprise_base_url\",\n\t\t\t\t\t\t\"\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc testAccArgoCDRepositorySimple() string {\n\treturn `\nresource \"argocd_repository\" \"simple\" {\n  repo = \"https://github.com/kubernetes-sigs/kustomize\"\n}\n`\n}\n\nfunc testAccArgoCDRepositoryHelm() string {\n\treturn `\nresource \"argocd_repository\" \"helm\" {\n  repo = \"https://helm.nginx.com/stable\"\n  name = \"nginx-stable\"\n  type = \"helm\"\n}\n`\n}\n\nfunc testAccArgoCDRepositoryHelmProjectScoped(project string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_project\" \"simple\" {\n  metadata {\n    name      = \"%[1]s\"\n    namespace = \"argocd\"\n  }\n\n  spec {\n    description  = \"simple project\"\n    source_repos = [\"*\"]\n    \n\tdestination {\n      name      = \"anothercluster\"\n      namespace = \"bar\"\n    }\n  }\n}\n\nresource \"argocd_repository\" \"helm\" {\n  repo = \"https://helm.nginx.com/stable/\"\n  name = \"nginx-stable-scoped\"\n  type = \"helm\"\n  project = \"%[1]s\"\n}\n`, project)\n}\n\nfunc testAccArgoCDRepositoryPublicUsageInApplication(name string) string {\n\treturn testAccArgoCDRepositorySimple() + fmt.Sprintf(`\nresource \"argocd_application\" \"public\" {\n  metadata {\n    name      = \"%s\"\n    namespace = \"argocd\"\n  }\n  spec {\n    source {\n      repo_url        = argocd_repository.simple.repo\n      path            = \"examples/helloWorld\"\n      target_revision = \"release-kustomize-v3.7\"\n    }\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n  }\n}\n`, name)\n}\n\nfunc testAccArgoCDRepositoryPrivateGitSSH(repoUrl string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_repository\" \"private_ssh\" {\n  repo            = \"%s\"\n  type            = \"git\"\n  insecure        = true\n  ssh_private_key = \"-----BEGIN OPENSSH PRIVATE KEY-----\\nb3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW\\nQyNTUxOQAAACCGe6Vx0gbKqKCI0wIplfgK5JBjCDO3bhtU3sZfLoeUZgAAAJB9cNEifXDR\\nIgAAAAtzc2gtZWQyNTUxOQAAACCGe6Vx0gbKqKCI0wIplfgK5JBjCDO3bhtU3sZfLoeUZg\\nAAAEAJeUrObjoTbGO1Sq4TXHl/j4RJ5aKMC1OemWuHmLK7XYZ7pXHSBsqooIjTAimV+Ark\\nkGMIM7duG1Texl8uh5RmAAAAC3Rlc3RAYXJnb2NkAQI=\\n-----END OPENSSH PRIVATE KEY-----\"\n}\n`, repoUrl)\n}\n\nfunc testAccArgoCDRepositoryMultiplePrivateGitSSH(repoCount int) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_repository\" \"private_ssh\" {\n  count           = %d\n  repo            = format(\"git@private-git-repository.argocd.svc.cluster.local:~/project-%%d.git\", count.index+1)\n  type            = \"git\"\n  insecure        = true\n  ssh_private_key = \"-----BEGIN OPENSSH PRIVATE KEY-----\\nb3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW\\nQyNTUxOQAAACCGe6Vx0gbKqKCI0wIplfgK5JBjCDO3bhtU3sZfLoeUZgAAAJB9cNEifXDR\\nIgAAAAtzc2gtZWQyNTUxOQAAACCGe6Vx0gbKqKCI0wIplfgK5JBjCDO3bhtU3sZfLoeUZg\\nAAAEAJeUrObjoTbGO1Sq4TXHl/j4RJ5aKMC1OemWuHmLK7XYZ7pXHSBsqooIjTAimV+Ark\\nkGMIM7duG1Texl8uh5RmAAAAC3Rlc3RAYXJnb2NkAQI=\\n-----END OPENSSH PRIVATE KEY-----\"\n}\n`, repoCount)\n}\n\nfunc testAccArgoCDRepositoryGitHubApp(repoUrl, id, installID, baseURL, appKey string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_repository\" \"githubapp\" {\n  project                       = \"default\"\n  repo             \t\t\t\t= \"%s\"\n  githubapp_id    \t\t\t\t= \"%s\"\n  githubapp_installation_id \t= \"%s\"\n  githubapp_enterprise_base_url = \"%s\"\n  githubapp_private_key \t\t= <<EOT\n%s\nEOT\n}\n`, repoUrl, id, installID, baseURL, appKey)\n}\n\n// TestAccArgoCDRepository_MultiProject tests the fix for issue #719\n// This test verifies that the same repository can be added to multiple projects\n// and that Terraform correctly identifies them as separate resources\nfunc TestAccArgoCDRepository_MultiProject(t *testing.T) {\n\tprojectA := acctest.RandString(10)\n\tprojectB := acctest.RandString(10)\n\trepoURL := \"https://helm.nginx.com/stable\"\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\t// Create the repository in project A\n\t\t\t\tConfig: testAccArgoCDRepositoryMultiProjectStepOne(projectA, repoURL),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.helm_project_a\",\n\t\t\t\t\t\t\"project\",\n\t\t\t\t\t\tprojectA,\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.helm_project_a\",\n\t\t\t\t\t\t\"repo\",\n\t\t\t\t\t\trepoURL,\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.helm_project_a\",\n\t\t\t\t\t\t\"connection_state_status\",\n\t\t\t\t\t\t\"Successful\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Create the same repository in project B\n\t\t\t\t// This should create a separate resource, not try to update project A's repository\n\t\t\t\tConfig: testAccArgoCDRepositoryMultiProjectStepTwo(projectA, projectB, repoURL),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\t// Verify project A repository still exists with correct project\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.helm_project_a\",\n\t\t\t\t\t\t\"project\",\n\t\t\t\t\t\tprojectA,\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.helm_project_a\",\n\t\t\t\t\t\t\"repo\",\n\t\t\t\t\t\trepoURL,\n\t\t\t\t\t),\n\t\t\t\t\t// Verify project B repository exists with correct project\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.helm_project_b\",\n\t\t\t\t\t\t\"project\",\n\t\t\t\t\t\tprojectB,\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.helm_project_b\",\n\t\t\t\t\t\t\"repo\",\n\t\t\t\t\t\trepoURL,\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.helm_project_b\",\n\t\t\t\t\t\t\"connection_state_status\",\n\t\t\t\t\t\t\"Successful\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc testAccArgoCDRepositoryMultiProjectStepOne(projectA, repoURL string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_project\" \"project_a\" {\n  metadata {\n    name      = \"%[1]s\"\n    namespace = \"argocd\"\n  }\n  spec {\n    description  = \"Project A\"\n    source_repos = [\"*\"]\n    destination {\n      name      = \"in-cluster\"\n      namespace = \"default\"\n    }\n  }\n}\n\nresource \"argocd_repository\" \"helm_project_a\" {\n  repo    = \"%[2]s\"\n  name    = \"nginx-stable-project-a\"\n  type    = \"helm\"\n  project = argocd_project.project_a.metadata[0].name\n}\n`, projectA, repoURL)\n}\n\nfunc testAccArgoCDRepositoryMultiProjectStepTwo(projectA, projectB, repoURL string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_project\" \"project_a\" {\n  metadata {\n    name      = \"%[1]s\"\n    namespace = \"argocd\"\n  }\n  spec {\n    description  = \"Project A\"\n    source_repos = [\"*\"]\n    destination {\n      name      = \"in-cluster\"\n      namespace = \"default\"\n    }\n  }\n}\n\nresource \"argocd_repository\" \"helm_project_a\" {\n  repo    = \"%[3]s\"\n  name    = \"nginx-stable-project-a\"\n  type    = \"helm\"\n  project = argocd_project.project_a.metadata[0].name\n}\n\nresource \"argocd_project\" \"project_b\" {\n  metadata {\n    name      = \"%[2]s\"\n    namespace = \"argocd\"\n  }\n  spec {\n    description  = \"Project B\"\n    source_repos = [\"*\"]\n    destination {\n      name      = \"in-cluster\"\n      namespace = \"default\"\n    }\n  }\n}\n\nresource \"argocd_repository\" \"helm_project_b\" {\n  repo    = \"%[3]s\"\n  name    = \"nginx-stable-project-b\"\n  type    = \"helm\"\n  project = argocd_project.project_b.metadata[0].name\n}\n`, projectA, projectB, repoURL)\n}\n\n// TestAccArgoCDRepository_ProjectChange tests that changing the project field requires replacement\nfunc TestAccArgoCDRepository_ProjectChange(t *testing.T) {\n\tprojectA := acctest.RandString(10)\n\tprojectB := acctest.RandString(10)\n\trepoURL := \"https://helm.nginx.com/stable\"\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\t// Create repository in project A\n\t\t\t\tConfig: testAccArgoCDRepositoryProjectChange(projectA, projectB, repoURL, projectA),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.changing_project\",\n\t\t\t\t\t\t\"project\",\n\t\t\t\t\t\tprojectA,\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.changing_project\",\n\t\t\t\t\t\t\"repo\",\n\t\t\t\t\t\trepoURL,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Change to project B - should require replacement\n\t\t\t\tConfig: testAccArgoCDRepositoryProjectChange(projectA, projectB, repoURL, projectB),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.changing_project\",\n\t\t\t\t\t\t\"project\",\n\t\t\t\t\t\tprojectB,\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.changing_project\",\n\t\t\t\t\t\t\"repo\",\n\t\t\t\t\t\trepoURL,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\n// TestAccArgoCDRepository_ProjectToGlobal tests changing from project-scoped to global\nfunc TestAccArgoCDRepository_ProjectToGlobal(t *testing.T) {\n\tprojectName := acctest.RandString(10)\n\trepoURL := \"https://helm.nginx.com/stable\"\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\t// Create project-scoped repository\n\t\t\t\tConfig: testAccArgoCDRepositoryProjectToGlobalStep1(projectName, repoURL),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.project_to_global\",\n\t\t\t\t\t\t\"project\",\n\t\t\t\t\t\tprojectName,\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.project_to_global\",\n\t\t\t\t\t\t\"repo\",\n\t\t\t\t\t\trepoURL,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Change to global (remove project) - should require replacement\n\t\t\t\tConfig: testAccArgoCDRepositoryProjectToGlobalStep2(repoURL),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckNoResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.project_to_global\",\n\t\t\t\t\t\t\"project\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.project_to_global\",\n\t\t\t\t\t\t\"repo\",\n\t\t\t\t\t\trepoURL,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\n// TestAccArgoCDRepository_GlobalToProject tests changing from global to project-scoped\nfunc TestAccArgoCDRepository_GlobalToProject(t *testing.T) {\n\tprojectName := acctest.RandString(10)\n\trepoURL := \"https://helm.nginx.com/stable\"\n\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\t// Create global repository\n\t\t\t\tConfig: testAccArgoCDRepositoryGlobalToProjectStep1(repoURL),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckNoResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.global_to_project\",\n\t\t\t\t\t\t\"project\",\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.global_to_project\",\n\t\t\t\t\t\t\"repo\",\n\t\t\t\t\t\trepoURL,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\t// Change to project-scoped - should require replacement\n\t\t\t\tConfig: testAccArgoCDRepositoryGlobalToProjectStep2(projectName, repoURL),\n\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.global_to_project\",\n\t\t\t\t\t\t\"project\",\n\t\t\t\t\t\tprojectName,\n\t\t\t\t\t),\n\t\t\t\t\tresource.TestCheckResourceAttr(\n\t\t\t\t\t\t\"argocd_repository.global_to_project\",\n\t\t\t\t\t\t\"repo\",\n\t\t\t\t\t\trepoURL,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc testAccArgoCDRepositoryProjectChange(projectA, projectB, repoURL, currentProject string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_project\" \"project_a\" {\n  metadata {\n    name      = \"%[1]s\"\n    namespace = \"argocd\"\n  }\n  spec {\n    description  = \"Project A\"\n    source_repos = [\"*\"]\n    destination {\n      name      = \"in-cluster\"\n      namespace = \"default\"\n    }\n  }\n}\n\nresource \"argocd_project\" \"project_b\" {\n  metadata {\n    name      = \"%[2]s\"\n    namespace = \"argocd\"\n  }\n  spec {\n    description  = \"Project B\"\n    source_repos = [\"*\"]\n    destination {\n      name      = \"in-cluster\"\n      namespace = \"default\"\n    }\n  }\n}\n\nresource \"argocd_repository\" \"changing_project\" {\n  repo    = \"%[3]s\"\n  name    = \"nginx-stable-changing\"\n  type    = \"helm\"\n  project = \"%[4]s\"\n}\n`, projectA, projectB, repoURL, currentProject)\n}\n\nfunc testAccArgoCDRepositoryProjectToGlobalStep1(projectName, repoURL string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_project\" \"test\" {\n  metadata {\n    name      = \"%[1]s\"\n    namespace = \"argocd\"\n  }\n  spec {\n    description  = \"Test Project\"\n    source_repos = [\"*\"]\n    destination {\n      name      = \"in-cluster\"\n      namespace = \"default\"\n    }\n  }\n}\n\nresource \"argocd_repository\" \"project_to_global\" {\n  repo    = \"%[2]s\"\n  name    = \"nginx-stable-p2g\"\n  type    = \"helm\"\n  project = argocd_project.test.metadata[0].name\n}\n`, projectName, repoURL)\n}\n\nfunc testAccArgoCDRepositoryProjectToGlobalStep2(repoURL string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_repository\" \"project_to_global\" {\n  repo = \"%[1]s\"\n  name = \"nginx-stable-p2g\"\n  type = \"helm\"\n}\n`, repoURL)\n}\n\nfunc testAccArgoCDRepositoryGlobalToProjectStep1(repoURL string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_repository\" \"global_to_project\" {\n  repo = \"%[1]s\"\n  name = \"nginx-stable-g2p\"\n  type = \"helm\"\n}\n`, repoURL)\n}\n\nfunc testAccArgoCDRepositoryGlobalToProjectStep2(projectName, repoURL string) string {\n\treturn fmt.Sprintf(`\nresource \"argocd_project\" \"test\" {\n  metadata {\n    name      = \"%[1]s\"\n    namespace = \"argocd\"\n  }\n  spec {\n    description  = \"Test Project\"\n    source_repos = [\"*\"]\n    destination {\n      name      = \"in-cluster\"\n      namespace = \"default\"\n    }\n  }\n}\n\nresource \"argocd_repository\" \"global_to_project\" {\n  repo    = \"%[2]s\"\n  name    = \"nginx-stable-g2p\"\n  type    = \"helm\"\n  project = argocd_project.test.metadata[0].name\n}\n`, projectName, repoURL)\n}\n\n// TestAccArgoCDRepository_ProxyConnectivityError verifies that proxy configuration\n// is correctly passed to ArgoCD by expecting a connection failure when using an invalid proxy.\nfunc TestAccArgoCDRepository_ProxyConnectivityError(t *testing.T) {\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: `\nresource \"argocd_repository\" \"proxy_fail\" {\n  repo     = \"https://helm.nginx.com/stable\"\n  name     = \"nginx-stable-proxy-fail\"\n  type     = \"helm\"\n  proxy    = \"http://proxy.example.com:8080\"\n}\n`,\n\t\t\t\tExpectError: regexp.MustCompile(\"proxyconnect tcp|no such host|context deadline exceeded|Unable to connect to repository\"),\n\t\t\t},\n\t\t},\n\t})\n}\n\n// TestAccArgoCDRepository_OCI verifies that OCI repository type is correctly handled.\n// Since public OCI registries often require authentication token even for public pulls via API,\n// we expect a connection error (denied/unauthorized/forbidden), proving that ArgoCD received the config.\nfunc TestAccArgoCDRepository_OCI(t *testing.T) {\n\tresource.Test(t, resource.TestCase{\n\t\tPreCheck:                 func() { testAccPreCheck(t) },\n\t\tProtoV6ProviderFactories: testAccProtoV6ProviderFactories,\n\t\tSteps: []resource.TestStep{\n\t\t\t{\n\t\t\t\tConfig: `\nresource \"argocd_repository\" \"oci_test\" {\n  repo = \"oci://ghcr.io/argoproj/argo-helm/argo-cd\"\n  name = \"argocd-oci\"\n  type = \"oci\"\n}\n`,\n\t\t\t\tExpectError: regexp.MustCompile(\"denied|unauthorized|forbidden\"),\n\t\t\t},\n\t\t},\n\t})\n}\n"
  },
  {
    "path": "internal/provider/server_interface.go",
    "content": "package provider\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"os\"\n\t\"strconv\"\n\t\"sync\"\n\n\t\"github.com/Masterminds/semver/v3\"\n\t\"github.com/argoproj-labs/terraform-provider-argocd/internal/diagnostics\"\n\t\"github.com/argoproj-labs/terraform-provider-argocd/internal/features\"\n\t\"github.com/argoproj/argo-cd/v3/pkg/apiclient\"\n\t\"github.com/argoproj/argo-cd/v3/pkg/apiclient/account\"\n\t\"github.com/argoproj/argo-cd/v3/pkg/apiclient/application\"\n\t\"github.com/argoproj/argo-cd/v3/pkg/apiclient/applicationset\"\n\t\"github.com/argoproj/argo-cd/v3/pkg/apiclient/certificate\"\n\t\"github.com/argoproj/argo-cd/v3/pkg/apiclient/cluster\"\n\t\"github.com/argoproj/argo-cd/v3/pkg/apiclient/gpgkey\"\n\t\"github.com/argoproj/argo-cd/v3/pkg/apiclient/project\"\n\t\"github.com/argoproj/argo-cd/v3/pkg/apiclient/repocreds\"\n\t\"github.com/argoproj/argo-cd/v3/pkg/apiclient/repository\"\n\t\"github.com/argoproj/argo-cd/v3/pkg/apiclient/session\"\n\t\"github.com/argoproj/argo-cd/v3/pkg/apiclient/version\"\n\t\"github.com/argoproj/argo-cd/v3/util/io\"\n\t\"github.com/hashicorp/terraform-plugin-framework/diag\"\n\t\"github.com/hashicorp/terraform-plugin-framework/types\"\n\t\"github.com/hashicorp/terraform-plugin-log/tflog\"\n\t\"google.golang.org/protobuf/types/known/emptypb\"\n\t\"k8s.io/apimachinery/pkg/util/runtime\"\n)\n\nvar runtimeErrorHandlers []runtime.ErrorHandler\n\ntype ServerInterface struct {\n\tAccountClient        account.AccountServiceClient\n\tApiClient            apiclient.Client\n\tApplicationClient    application.ApplicationServiceClient\n\tApplicationSetClient applicationset.ApplicationSetServiceClient\n\tCertificateClient    certificate.CertificateServiceClient\n\tClusterClient        cluster.ClusterServiceClient\n\tGPGKeysClient        gpgkey.GPGKeyServiceClient\n\tProjectClient        project.ProjectServiceClient\n\tRepoCredsClient      repocreds.RepoCredsServiceClient\n\tRepositoryClient     repository.RepositoryServiceClient\n\tSessionClient        session.SessionServiceClient\n\n\tServerVersion        *semver.Version\n\tServerVersionMessage *version.VersionMessage\n\n\tconfig      ArgoCDProviderConfig\n\tinitialized bool\n\tsync.RWMutex\n}\n\nfunc NewServerInterface(c ArgoCDProviderConfig) *ServerInterface {\n\treturn &ServerInterface{\n\t\tconfig: c,\n\t}\n}\n\nfunc (si *ServerInterface) InitClients(ctx context.Context) diag.Diagnostics {\n\tsi.Lock()\n\tdefer si.Unlock()\n\n\tif si.initialized {\n\t\treturn nil\n\t}\n\n\topts, d := si.config.getApiClientOptions(ctx)\n\tif d.HasError() {\n\t\treturn d\n\t}\n\n\tac, err := apiclient.NewClient(opts)\n\tif err != nil {\n\t\treturn diagnostics.Error(\"failed to create new API client\", err)\n\t}\n\n\tvar diags diag.Diagnostics\n\n\t_, si.AccountClient, err = ac.NewAccountClient()\n\tif err != nil {\n\t\tdiags.Append(diagnostics.Error(\"failed to initialize account client\", err)...)\n\t}\n\n\t_, si.ApplicationClient, err = ac.NewApplicationClient()\n\tif err != nil {\n\t\tdiags.Append(diagnostics.Error(\"failed to initialize application client\", err)...)\n\t}\n\n\t_, si.ApplicationSetClient, err = ac.NewApplicationSetClient()\n\tif err != nil {\n\t\tdiags.Append(diagnostics.Error(\"failed to initialize application set client\", err)...)\n\t}\n\n\t_, si.CertificateClient, err = ac.NewCertClient()\n\tif err != nil {\n\t\tdiags.Append(diagnostics.Error(\"failed to initialize certificate client\", err)...)\n\t}\n\n\t_, si.ClusterClient, err = ac.NewClusterClient()\n\tif err != nil {\n\t\tdiags.Append(diagnostics.Error(\"failed to initialize cluster client\", err)...)\n\t}\n\n\t_, si.GPGKeysClient, err = ac.NewGPGKeyClient()\n\tif err != nil {\n\t\tdiags.Append(diagnostics.Error(\"failed to initialize GPG keys client\", err)...)\n\t}\n\n\t_, si.ProjectClient, err = ac.NewProjectClient()\n\tif err != nil {\n\t\tdiags.Append(diagnostics.Error(\"failed to initialize project client\", err)...)\n\t}\n\n\t_, si.RepositoryClient, err = ac.NewRepoClient()\n\tif err != nil {\n\t\tdiags.Append(diagnostics.Error(\"failed to initialize repository client\", err)...)\n\t}\n\n\t_, si.RepoCredsClient, err = ac.NewRepoCredsClient()\n\tif err != nil {\n\t\tdiags.Append(diagnostics.Error(\"failed to initialize repository credentials client\", err)...)\n\t}\n\n\t_, si.SessionClient, err = ac.NewSessionClient()\n\tif err != nil {\n\t\tdiags.Append(diagnostics.Error(\"failed to initialize session client\", err)...)\n\t}\n\n\tacCloser, versionClient, err := ac.NewVersionClient()\n\tif err != nil {\n\t\tdiags.Append(diagnostics.Error(\"failed to initialize version client\", err)...)\n\t} else {\n\t\tdefer io.Close(acCloser)\n\n\t\tserverVersionMessage, err := versionClient.Version(ctx, &emptypb.Empty{})\n\t\tif err != nil {\n\t\t\treturn diagnostics.Error(\"failed to read server version\", err)\n\t\t}\n\n\t\tif serverVersionMessage == nil {\n\t\t\treturn diagnostics.Error(\"could not get server version information\", nil)\n\t\t}\n\n\t\tsi.ServerVersionMessage = serverVersionMessage\n\n\t\tserverVersion, err := semver.NewVersion(serverVersionMessage.Version)\n\t\tif err != nil {\n\t\t\tdiags.Append(diagnostics.Error(fmt.Sprintf(\"could not parse server semantic version: %s\", serverVersionMessage.Version), nil)...)\n\t\t}\n\n\t\tsi.ServerVersion = serverVersion\n\t}\n\n\tsi.initialized = !diags.HasError()\n\n\treturn diags\n}\n\n// Checks that a specific feature is available for the current ArgoCD server version.\n// 'feature' argument must match one of the predefined feature* constants.\nfunc (si *ServerInterface) IsFeatureSupported(feature features.Feature) bool {\n\tfc, ok := features.ConstraintsMap[feature]\n\n\tif fc.MinVersion == nil {\n\t\treturn true\n\t}\n\n\treturn ok && fc.MinVersion.Compare(si.ServerVersion) != 1\n}\n\nfunc getDefaultString(s types.String, envKey string) string {\n\tif !s.IsNull() && !s.IsUnknown() {\n\t\treturn s.ValueString()\n\t}\n\n\treturn os.Getenv(envKey)\n}\n\nfunc getDefaultBool(ctx context.Context, b types.Bool, envKey string) bool {\n\tif !b.IsNull() && !b.IsUnknown() {\n\t\treturn b.ValueBool()\n\t}\n\n\tenv, ok := os.LookupEnv(envKey)\n\tif !ok {\n\t\treturn false\n\t}\n\n\tpb, err := strconv.ParseBool(env)\n\tif err == nil {\n\t\treturn pb\n\t}\n\n\ttflog.Warn(ctx, fmt.Sprintf(\"failed to parse env var %s with value %s as bool. Will default to `false`.\", envKey, env))\n\n\treturn false\n}\n"
  },
  {
    "path": "internal/provider/server_interface_test.go",
    "content": "package provider\n\nimport (\n\t\"fmt\"\n\t\"testing\"\n\n\t\"github.com/Masterminds/semver/v3\"\n\t\"github.com/argoproj-labs/terraform-provider-argocd/internal/features\"\n\t\"github.com/argoproj/argo-cd/v3/pkg/apiclient/version\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nconst (\n\tsemverEquals = iota\n\tsemverGreater\n\tsemverLess\n)\n\nfunc serverInterfaceTestData(t *testing.T, argocdVersion string, semverOperator int) *ServerInterface {\n\tv, err := semver.NewVersion(argocdVersion)\n\trequire.NoError(t, err)\n\trequire.True(t, v.Major() >= 1)\n\n\tswitch semverOperator {\n\tcase semverEquals:\n\tcase semverGreater:\n\t\tinc := v.IncMajor()\n\t\tv = &inc\n\n\t\tassert.NoError(t, err)\n\tcase semverLess:\n\t\tv, err = semver.NewVersion(\n\t\t\tfmt.Sprintf(\"%d.%d.%d\",\n\t\t\t\tv.Major()-1,\n\t\t\t\tv.Minor(),\n\t\t\t\tv.Patch(),\n\t\t\t))\n\t\tassert.NoError(t, err)\n\tdefault:\n\t\tt.Error(\"unsupported semver test semverOperator\")\n\t}\n\n\tvm := &version.VersionMessage{\n\t\tVersion: v.String(),\n\t}\n\n\treturn &ServerInterface{\n\t\tServerVersion:        v,\n\t\tServerVersionMessage: vm,\n\t}\n}\n\nfunc TestServerInterface_isFeatureSupported(t *testing.T) {\n\tt.Parallel()\n\n\ttype args struct {\n\t\tfeature features.Feature\n\t}\n\n\ttests := []struct {\n\t\tname string\n\t\tsi   *ServerInterface\n\t\targs args\n\t\twant bool\n\t}{\n\t\t{\n\t\t\tname: \"featureExecLogsPolicy-2.7.2\",\n\t\t\tsi:   serverInterfaceTestData(t, \"2.7.2\", semverEquals),\n\t\t\targs: args{feature: features.ExecLogsPolicy},\n\t\t\twant: true,\n\t\t},\n\t\t{\n\t\t\tname: \"featureExecLogsPolicy-2.7.2+\",\n\t\t\tsi:   serverInterfaceTestData(t, \"2.7.2\", semverGreater),\n\t\t\targs: args{feature: features.ExecLogsPolicy},\n\t\t\twant: true,\n\t\t},\n\t\t{\n\t\t\tname: \"featureExecLogsPolicy-2.7.2-\",\n\t\t\tsi:   serverInterfaceTestData(t, \"2.7.2\", semverLess),\n\t\t\targs: args{feature: features.ExecLogsPolicy},\n\t\t\twant: false,\n\t\t},\n\t}\n\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\tt.Parallel()\n\n\t\t\tgot := tt.si.IsFeatureSupported(tt.args.feature)\n\n\t\t\tif got != tt.want {\n\t\t\t\tt.Errorf(\"isFeatureSupported() got = %v, want %v, version %s\",\n\t\t\t\t\tgot,\n\t\t\t\t\ttt.want,\n\t\t\t\t\ttt.si.ServerVersion.String(),\n\t\t\t\t)\n\t\t\t}\n\t\t})\n\t}\n}\n"
  },
  {
    "path": "internal/sync/mutex.go",
    "content": "package sync\n\nimport \"sync\"\n\n// GPGKeysMutex is used to handle concurrent access to ArgoCD GPG keys which are\n// stored in the `argocd-gpg-keys-cm` ConfigMap resource\nvar GPGKeysMutex = &sync.RWMutex{}\n\n// RepositoryMutex is used to handle concurrent access to ArgoCD repositories\nvar RepositoryMutex = &sync.RWMutex{}\n\n// CertificateMutex is used to handle concurrent access to ArgoCD repository certificates\nvar CertificateMutex = &sync.RWMutex{}\n\n// RepositoryCredentialsMutex is used to handle concurrent access to ArgoCD repository credentials\nvar RepositoryCredentialsMutex = &sync.RWMutex{}\n\n// tokenMutexProjectMap is used to handle concurrent access to ArgoCD project tokens per project\nvar tokenMutexProjectMap = make(map[string]*sync.RWMutex)\n\n// tokenMutexProjectMapMutex protects access to TokenMutexProjectMap itself\nvar tokenMutexProjectMapMutex = &sync.Mutex{}\n\n// GetProjectMutex safely gets or creates a mutex for a project\nfunc GetProjectMutex(projectName string) *sync.RWMutex {\n\ttokenMutexProjectMapMutex.Lock()\n\tdefer tokenMutexProjectMapMutex.Unlock()\n\n\tif mutex, exists := tokenMutexProjectMap[projectName]; exists {\n\t\treturn mutex\n\t}\n\n\ttokenMutexProjectMap[projectName] = &sync.RWMutex{}\n\n\treturn tokenMutexProjectMap[projectName]\n}\n"
  },
  {
    "path": "internal/testhelpers/suite.go",
    "content": "package testhelpers\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"os\"\n\t\"sync\"\n\t\"testing\"\n\t\"time\"\n)\n\nvar (\n\tGlobalTestEnv *K3sTestEnvironment\n\ttestEnvOnce   sync.Once\n)\n\n// TestMain is a helper function to be used in test files' TestMain functions\nfunc TestMain(m *testing.M) {\n\tenvDefaultValue(\"ARGOCD_AUTH_USERNAME\", \"admin\")\n\tenvDefaultValue(\"ARGOCD_AUTH_PASSWORD\", \"acceptancetesting\")\n\tenvDefaultValue(\"ARGOCD_SERVER\", \"127.0.0.1:8080\")\n\tenvDefaultValue(\"ARGOCD_INSECURE\", \"true\")\n\tenvDefaultValue(\"USE_TESTCONTAINERS\", \"true\")\n\tenvDefaultValue(\"K3S_VERSION\", \"v1.34.3-k3s3\")\n\tenvDefaultValue(\"ARGOCD_VERSION\", \"v3.3.0\")\n\n\tif os.Getenv(\"USE_TESTCONTAINERS\") == \"true\" {\n\t\tos.Exit(runTestSuite(m))\n\t} else {\n\t\tos.Exit(m.Run())\n\t}\n}\n\nfunc envDefaultValue(envvar, defaultValue string) {\n\tif v := os.Getenv(envvar); v == \"\" {\n\t\tfmt.Printf(\"environment variable %s not set; using %s as default value\\n\", envvar, defaultValue)\n\t\t_ = os.Setenv(envvar, defaultValue)\n\t}\n}\n\nconst (\n\t// DefaultTestTimeout is the default timeout for test setup\n\tDefaultTestTimeout = 15 * time.Minute\n)\n\nfunc runTestSuite(m *testing.M) int {\n\tctx, cancel := context.WithTimeout(context.Background(), DefaultTestTimeout)\n\tdefer cancel()\n\n\t// Setup the test environment once\n\tvar setupErr error\n\n\ttestEnvOnce.Do(func() {\n\t\targoCDVersion := os.Getenv(\"ARGOCD_VERSION\")\n\t\tk3sVersion := os.Getenv(\"K3S_VERSION\")\n\n\t\tGlobalTestEnv, setupErr = SetupK3sWithArgoCD(ctx, argoCDVersion, k3sVersion)\n\t\tif setupErr != nil {\n\t\t\treturn\n\t\t}\n\n\t\t// Set environment variables for tests; currently only ARGOCD_SERVER is used (since we're port-forwarding the k8s\n\t\t// service) but can be extended with more env vars if needed\n\t\tenvVars := GlobalTestEnv.GetEnvironmentVariables()\n\t\tfor key, value := range envVars {\n\t\t\tos.Setenv(key, value)\n\t\t}\n\t})\n\n\tif setupErr != nil {\n\t\tpanic(\"Failed to setup test environment: \" + setupErr.Error())\n\t}\n\n\t// Run tests\n\tcode := m.Run()\n\n\t// Cleanup\n\tif GlobalTestEnv != nil {\n\t\tGlobalTestEnv.Cleanup(ctx)\n\t}\n\n\treturn code\n}\n"
  },
  {
    "path": "internal/testhelpers/testcontainers.go",
    "content": "package testhelpers\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"log\"\n\t\"os\"\n\t\"os/exec\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\t\"github.com/testcontainers/testcontainers-go\"\n\t\"github.com/testcontainers/testcontainers-go/modules/k3s\"\n\t\"github.com/testcontainers/testcontainers-go/wait\"\n\t\"k8s.io/client-go/rest\"\n\t\"k8s.io/client-go/tools/clientcmd\"\n)\n\nconst (\n\t// DefaultFileMode represents standard file permissions (0o644)\n\tDefaultFileMode = 0o644\n)\n\n// K3sTestEnvironment represents a test environment with K3s and ArgoCD\ntype K3sTestEnvironment struct {\n\tK3sContainer *k3s.K3sContainer\n\tArgoCDURL    string\n\tRESTConfig   *rest.Config\n}\n\n// SetupK3sWithArgoCD sets up a K3s cluster with ArgoCD using testcontainers\nfunc SetupK3sWithArgoCD(ctx context.Context, argoCDVersion, k3sVersion string) (*K3sTestEnvironment, error) {\n\tlog.Println(\"Setting up K3s test environment...\")\n\n\tk3sContainer, err := k3s.Run(ctx,\n\t\tfmt.Sprintf(\"rancher/k3s:%s\", k3sVersion),\n\t\ttestcontainers.WithWaitStrategy(wait.ForLog(\"k3s is up and running\")),\n\t\ttestcontainers.WithExposedPorts(\"30124/tcp\", \"30123/tcp\"),\n\t)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to start K3s container: %w\", err)\n\t}\n\n\tconfig, err := k3sContainer.GetKubeConfig(ctx)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to get kubeconfig: %w\", err)\n\t}\n\n\trestConfig, err := clientcmd.RESTConfigFromKubeConfig(config)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to get rest config: %w\", err)\n\t}\n\n\tenv := &K3sTestEnvironment{K3sContainer: k3sContainer, RESTConfig: restConfig}\n\n\t// Pull and preload Argo CD image in k3s to reduce waiting time during the `waitForArgoCD` step.\n\targoCDImage := fmt.Sprintf(\"quay.io/argoproj/argocd:%s\", argoCDVersion)\n\n\tlog.Printf(\"Pre-pulling Argo CD image %s...\\n\", argoCDImage)\n\n\t// First, pull the image to ensure it exists locally\n\t_, err = testcontainers.GenericContainer(ctx, testcontainers.GenericContainerRequest{\n\t\tContainerRequest: testcontainers.ContainerRequest{Image: argoCDImage},\n\t\tStarted:          false, // Don't start the container, just pull the image\n\t})\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to pull Argo CD image: %w\", err)\n\t}\n\n\t// Now load the image into k3s\n\terr = k3sContainer.LoadImages(ctx, argoCDImage)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to preload Argo CD image: %w\", err)\n\t}\n\n\tif err := env.installArgoCD(ctx, argoCDVersion); err != nil {\n\t\tenv.Cleanup(ctx)\n\t\treturn nil, fmt.Errorf(\"failed to install ArgoCD: %w\", err)\n\t}\n\n\tlog.Println(\"Waiting for ArgoCD to be ready...\")\n\n\tif err := env.waitForArgoCD(ctx); err != nil {\n\t\tenv.Cleanup(ctx)\n\t\treturn nil, fmt.Errorf(\"failed to wait for ArgoCD: %w\", err)\n\t}\n\n\tlog.Println(\"ArgoCD ready!\")\n\n\treturn env, nil\n}\n\n// installArgoCD installs ArgoCD in the K3s cluster using kustomize\nfunc (env *K3sTestEnvironment) installArgoCD(ctx context.Context, version string) error {\n\trootDir, err := env.projectRoot()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to find project root: %w\", err)\n\t}\n\n\tkustomizeDir := filepath.Join(rootDir, \"manifests\", \"overlays\", version)\n\tlog.Printf(\"Running 'kustomize build %s'\\n\", kustomizeDir)\n\n\tkustomizedManifests, err := env.runKustomizeBuild(kustomizeDir)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to run kustomize build for version %s: %w\", version, err)\n\t}\n\n\tlog.Println(\"Applying manifests...\")\n\n\tif err = env.applyManifestsToContainer(ctx, kustomizedManifests, \"/tmp/argocd-kustomized.yaml\"); err != nil {\n\t\treturn fmt.Errorf(\"failed to copy kustomized manifests to container: %w\", err)\n\t}\n\n\ttestDataDir := filepath.Join(rootDir, \"manifests/testdata\")\n\tif _, err = os.Stat(testDataDir); os.IsNotExist(err) {\n\t\treturn nil // No test data to install\n\t}\n\n\tif err = env.K3sContainer.CopyFileToContainer(ctx, testDataDir, \"/tmp/testdata\", DefaultFileMode); err != nil {\n\t\treturn fmt.Errorf(\"failed to copy testdata to container: %w\", err)\n\t}\n\n\tif _, err = env.ExecInK3s(ctx, \"kubectl\", \"apply\", \"-f\", \"/tmp/testdata\"); err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\nfunc (env *K3sTestEnvironment) applyManifestsToContainer(ctx context.Context, manifests []byte, containerFilePath string) error {\n\t// Copy manifests to container\n\tif err := env.K3sContainer.CopyToContainer(ctx, manifests, containerFilePath, DefaultFileMode); err != nil {\n\t\treturn fmt.Errorf(\"failed to copy kustomized manifests to container: %w\", err)\n\t}\n\n\t// Apply manifests\n\tif _, err := env.ExecInK3s(ctx, \"kubectl\", \"apply\", \"-f\", containerFilePath, \"--server-side\", \"--force-conflicts\"); err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\n// projectRoot gets the project root directory by checking `go env GOMOD`\nfunc (env *K3sTestEnvironment) projectRoot() (string, error) {\n\tcmd := exec.Command(\"go\", \"env\", \"GOMOD\")\n\n\toutput, err := cmd.Output()\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"failed to find project root: %w\", err)\n\t}\n\n\treturn filepath.Dir(string(output)), nil\n}\n\n// runKustomizeBuild runs kustomize build on the temporary directory\nfunc (env *K3sTestEnvironment) runKustomizeBuild(dir string) ([]byte, error) {\n\tcmd := exec.Command(\"kustomize\", \"build\", dir)\n\n\toutput, err := cmd.Output()\n\tif err != nil {\n\t\tvar exitErr *exec.ExitError\n\t\tif errors.As(err, &exitErr) {\n\t\t\treturn nil, fmt.Errorf(\"kustomize build failed: %s\", string(exitErr.Stderr))\n\t\t}\n\n\t\treturn nil, fmt.Errorf(\"failed to run kustomize: %w\", err)\n\t}\n\n\treturn output, nil\n}\n\nfunc (env *K3sTestEnvironment) ExecInK3s(ctx context.Context, args ...string) ([]byte, error) {\n\tconcat := strings.Join(args, \" \")\n\texitCode, reader, err := env.K3sContainer.Exec(ctx, args)\n\tif err != nil {\n\t\treturn []byte{}, fmt.Errorf(\"failed to exec '%s': %w\", concat, err)\n\t}\n\n\toutput, err := io.ReadAll(reader)\n\tif err != nil {\n\t\treturn []byte{}, fmt.Errorf(\"failed to read kubectl output: %w\", err)\n\t}\n\n\tif exitCode != 0 {\n\t\treturn output, fmt.Errorf(\"'%s' failed with exit code %d: %s\", concat, exitCode, string(output))\n\t}\n\n\treturn output, nil\n}\n\n// waitForArgoCD waits for ArgoCD components to be ready\nfunc (env *K3sTestEnvironment) waitForArgoCD(ctx context.Context) error {\n\t// Wait for CRDs to be established\n\tcrds := []string{\n\t\t\"applications.argoproj.io\",\n\t\t\"applicationsets.argoproj.io\",\n\t\t\"appprojects.argoproj.io\",\n\t}\n\n\tfor _, crd := range crds {\n\t\tif _, err := env.ExecInK3s(ctx, \"kubectl\", \"wait\", \"--for=condition=Established\", fmt.Sprintf(\"crd/%s\", crd), \"--timeout=60s\"); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\t// Wait for deployments to be ready\n\tdeployments := []string{\"argocd-server\", \"argocd-repo-server\", \"argocd-redis\", \"private-git-repository\"}\n\n\ttimeout := \"60s\"\n\tfor _, deployment := range deployments {\n\t\tif _, err := env.ExecInK3s(ctx, \"kubectl\", \"wait\", \"--for=condition=available\", fmt.Sprintf(\"deployment/%s\", deployment), \"-n\", \"argocd\", \"--timeout=\"+timeout); err != nil {\n\t\t\treturn fmt.Errorf(\"failed to wait for deployment %s: %w\", deployment, err)\n\t\t}\n\t}\n\n\tlocalPort, err := env.K3sContainer.MappedPort(ctx, \"30123\")\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to setup port forward: %w\", err)\n\t}\n\n\tenv.ArgoCDURL = fmt.Sprintf(\"127.0.0.1:%s\", localPort.Port())\n\n\treturn nil\n}\n\n// GetEnvironmentVariables returns the environment variables needed for tests\nfunc (env *K3sTestEnvironment) GetEnvironmentVariables() map[string]string {\n\treturn map[string]string{\"ARGOCD_SERVER\": env.ArgoCDURL}\n}\n\n// Cleanup cleans up the test environment\nfunc (env *K3sTestEnvironment) Cleanup(ctx context.Context) {\n\t// Terminate container\n\tif env.K3sContainer != nil {\n\t\tif err := env.K3sContainer.Terminate(ctx); err != nil {\n\t\t\tfmt.Printf(\"Warning: failed to terminate container: %v\\n\", err)\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "internal/types/pgp_public_key.go",
    "content": "package types\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/ProtonMail/gopenpgp/v3/crypto\"\n\t\"github.com/hashicorp/terraform-plugin-framework/attr\"\n\t\"github.com/hashicorp/terraform-plugin-framework/attr/xattr\"\n\t\"github.com/hashicorp/terraform-plugin-framework/diag\"\n\t\"github.com/hashicorp/terraform-plugin-framework/path\"\n\t\"github.com/hashicorp/terraform-plugin-framework/types\"\n\t\"github.com/hashicorp/terraform-plugin-framework/types/basetypes\"\n\t\"github.com/hashicorp/terraform-plugin-go/tftypes\"\n)\n\ntype pgpPublicKeyType uint8\n\nconst (\n\tPGPPublicKeyType pgpPublicKeyType = iota\n)\n\nvar (\n\t_ xattr.TypeWithValidate  = PGPPublicKeyType\n\t_ basetypes.StringTypable = PGPPublicKeyType\n\n\t_ basetypes.StringValuable                   = PGPPublicKey{}\n\t_ basetypes.StringValuableWithSemanticEquals = PGPPublicKey{}\n)\n\n// TerraformType returns the tftypes.Type that should be used to represent this\n// framework type.\nfunc (t pgpPublicKeyType) TerraformType(_ context.Context) tftypes.Type {\n\treturn tftypes.String\n}\n\n// ValueFromString returns a StringValuable type given a StringValue.\nfunc (t pgpPublicKeyType) ValueFromString(_ context.Context, in types.String) (basetypes.StringValuable, diag.Diagnostics) {\n\tif in.IsUnknown() {\n\t\treturn PGPPublicKeyUnknown(), nil\n\t}\n\n\tif in.IsNull() {\n\t\treturn PGPPublicKeyNull(), nil\n\t}\n\n\treturn PGPPublicKey{\n\t\tstate: attr.ValueStateKnown,\n\t\tvalue: in.ValueString(),\n\t}, nil\n}\n\n// ValueFromTerraform returns a Value given a tftypes.Value.  This is meant to\n// convert the tftypes.Value into a more convenient Go type for the provider to\n// consume the data with.\nfunc (t pgpPublicKeyType) ValueFromTerraform(_ context.Context, in tftypes.Value) (attr.Value, error) {\n\tif !in.IsKnown() {\n\t\treturn PGPPublicKeyUnknown(), nil\n\t}\n\n\tif in.IsNull() {\n\t\treturn PGPPublicKeyNull(), nil\n\t}\n\n\tvar s string\n\terr := in.As(&s)\n\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn PGPPublicKey{\n\t\tstate: attr.ValueStateKnown,\n\t\tvalue: s,\n\t}, nil\n}\n\n// ValueType returns the Value type.\nfunc (t pgpPublicKeyType) ValueType(context.Context) attr.Value {\n\treturn PGPPublicKey{}\n}\n\n// Equal returns true if `o` is also a PGPPublicKeyType.\nfunc (t pgpPublicKeyType) Equal(o attr.Type) bool {\n\t_, ok := o.(pgpPublicKeyType)\n\treturn ok\n}\n\n// ApplyTerraform5AttributePathStep applies the given AttributePathStep to the\n// type.\nfunc (t pgpPublicKeyType) ApplyTerraform5AttributePathStep(step tftypes.AttributePathStep) (interface{}, error) {\n\treturn nil, fmt.Errorf(\"cannot apply AttributePathStep %T to %s\", step, t.String())\n}\n\n// String returns a human-friendly description of the PGPPublicKeyType.\nfunc (t pgpPublicKeyType) String() string {\n\treturn \"types.PGPPublicKeyType\"\n}\n\n// Validate implements type validation.\nfunc (t pgpPublicKeyType) Validate(ctx context.Context, in tftypes.Value, path path.Path) diag.Diagnostics {\n\tvar diags diag.Diagnostics\n\n\tif !in.Type().Is(tftypes.String) {\n\t\tdiags.AddAttributeError(\n\t\t\tpath,\n\t\t\t\"PGPPublicKey Type Validation Error\",\n\t\t\t\"An unexpected error was encountered trying to validate an attribute value. This is always an error in the provider. Please report the following to the provider developer:\\n\\n\"+\n\t\t\t\tfmt.Sprintf(\"Expected String value, received %T with value: %v\", in, in),\n\t\t)\n\n\t\treturn diags\n\t}\n\n\tif !in.IsKnown() || in.IsNull() {\n\t\treturn diags\n\t}\n\n\tvar value string\n\n\terr := in.As(&value)\n\tif err != nil {\n\t\tdiags.AddAttributeError(\n\t\t\tpath,\n\t\t\t\"PGPPublicKey Type Validation Error\",\n\t\t\t\"An unexpected error was encountered trying to validate an attribute value. This is always an error in the provider. Please report the following to the provider developer:\\n\\n\"+\n\t\t\t\tfmt.Sprintf(\"Error: %s\", err),\n\t\t)\n\n\t\treturn diags\n\t}\n\n\t_, err = crypto.NewKeyFromArmored(value)\n\tif err != nil {\n\t\tdiags.AddAttributeError(\n\t\t\tpath,\n\t\t\t\"Invalid PGP Public Key\",\n\t\t\terr.Error())\n\n\t\treturn diags\n\t}\n\n\treturn diags\n}\n\nfunc (t pgpPublicKeyType) Description() string {\n\treturn `PGP Public key in ASCII-armor base64 encoded format.`\n}\n\nfunc PGPPublicKeyNull() PGPPublicKey {\n\treturn PGPPublicKey{\n\t\tstate: attr.ValueStateNull,\n\t}\n}\n\nfunc PGPPublicKeyUnknown() PGPPublicKey {\n\treturn PGPPublicKey{\n\t\tstate: attr.ValueStateUnknown,\n\t}\n}\n\nfunc PGPPublicKeyValue(value string) PGPPublicKey {\n\treturn PGPPublicKey{\n\t\tstate: attr.ValueStateKnown,\n\t\tvalue: value,\n\t}\n}\n\ntype PGPPublicKey struct {\n\t// state represents whether the value is null, unknown, or known. The\n\t// zero-value is null.\n\tstate attr.ValueState\n\n\t// value contains the original string representation.\n\tvalue string\n}\n\n// Type returns a PGPPublicKeyType.\nfunc (k PGPPublicKey) Type(_ context.Context) attr.Type {\n\treturn PGPPublicKeyType\n}\n\n// ToStringValue should convert the value type to a String.\nfunc (k PGPPublicKey) ToStringValue(ctx context.Context) (types.String, diag.Diagnostics) {\n\tswitch k.state {\n\tcase attr.ValueStateKnown:\n\t\treturn types.StringValue(k.value), nil\n\tcase attr.ValueStateNull:\n\t\treturn types.StringNull(), nil\n\tcase attr.ValueStateUnknown:\n\t\treturn types.StringUnknown(), nil\n\tdefault:\n\t\treturn types.StringUnknown(), diag.Diagnostics{\n\t\t\tdiag.NewErrorDiagnostic(fmt.Sprintf(\"unhandled PGPPublicKey state in ToStringValue: %s\", k.state), \"\"),\n\t\t}\n\t}\n}\n\n// ToTerraformValue returns the data contained in the *String as a string. If\n// Unknown is true, it returns a tftypes.UnknownValue. If Null is true, it\n// returns nil.\nfunc (k PGPPublicKey) ToTerraformValue(ctx context.Context) (tftypes.Value, error) {\n\tt := PGPPublicKeyType.TerraformType(ctx)\n\n\tswitch k.state {\n\tcase attr.ValueStateKnown:\n\t\tif err := tftypes.ValidateValue(t, k.value); err != nil {\n\t\t\treturn tftypes.NewValue(t, tftypes.UnknownValue), err\n\t\t}\n\n\t\treturn tftypes.NewValue(t, k.value), nil\n\tcase attr.ValueStateNull:\n\t\treturn tftypes.NewValue(t, nil), nil\n\tcase attr.ValueStateUnknown:\n\t\treturn tftypes.NewValue(t, tftypes.UnknownValue), nil\n\tdefault:\n\t\treturn tftypes.NewValue(t, tftypes.UnknownValue), fmt.Errorf(\"unhandled PGPPublicKey state in ToTerraformValue: %s\", k.state)\n\t}\n}\n\n// Equal returns true if `other` is a *PGPPublicKey and has the same value as `d`.\nfunc (k PGPPublicKey) Equal(other attr.Value) bool {\n\to, ok := other.(PGPPublicKey)\n\n\tif !ok {\n\t\treturn false\n\t}\n\n\tif k.state != o.state {\n\t\treturn false\n\t}\n\n\tif k.state != attr.ValueStateKnown {\n\t\treturn true\n\t}\n\n\treturn k.value == o.value\n}\n\n// IsNull returns true if the Value is not set, or is explicitly set to null.\nfunc (k PGPPublicKey) IsNull() bool {\n\treturn k.state == attr.ValueStateNull\n}\n\n// IsUnknown returns true if the Value is not yet known.\nfunc (k PGPPublicKey) IsUnknown() bool {\n\treturn k.state == attr.ValueStateUnknown\n}\n\n// String returns a summary representation of either the underlying Value,\n// or UnknownValueString (`<unknown>`) when IsUnknown() returns true,\n// or NullValueString (`<null>`) when IsNull() return true.\n//\n// This is an intentionally lossy representation, that are best suited for\n// logging and error reporting, as they are not protected by\n// compatibility guarantees within the framework.\nfunc (k PGPPublicKey) String() string {\n\tif k.IsUnknown() {\n\t\treturn attr.UnknownValueString\n\t}\n\n\tif k.IsNull() {\n\t\treturn attr.NullValueString\n\t}\n\n\treturn k.value\n}\n\n// ValuePGPPublicKey returns the known string value. If PGPPublicKey is null or unknown, returns \"\".\nfunc (k PGPPublicKey) ValuePGPPublicKey() string {\n\treturn k.value\n}\n\n// StringSemanticEquals should return true if the given value is\n// semantically equal to the current value. This logic is used to prevent\n// Terraform data consistency errors and resource drift where a value change\n// may have inconsequential differences, such as spacing character removal\n// in JSON formatted strings.\n//\n// Only known values are compared with this method as changing a value's\n// state implicitly represents a different value.\nfunc (k PGPPublicKey) StringSemanticEquals(ctx context.Context, other basetypes.StringValuable) (bool, diag.Diagnostics) {\n\treturn strings.TrimSpace(k.value) == strings.TrimSpace(other.String()), nil\n}\n"
  },
  {
    "path": "internal/utils/utils.go",
    "content": "package utils\n\nimport (\n\t\"github.com/hashicorp/terraform-plugin-framework/types\"\n\t\"github.com/hashicorp/terraform-plugin-framework/types/basetypes\"\n\n\tmetav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\"\n)\n\nfunc OptionalInt64(value *int64) basetypes.Int64Value {\n\tif value == nil {\n\t\treturn types.Int64Null()\n\t}\n\n\treturn types.Int64Value(*value)\n}\n\nfunc OptionalString(value *string) basetypes.StringValue {\n\tif value == nil {\n\t\treturn types.StringNull()\n\t}\n\n\treturn types.StringValue(*value)\n}\n\nfunc OptionalTimeString(value *metav1.Time) basetypes.StringValue {\n\tif value == nil {\n\t\treturn types.StringNull()\n\t}\n\n\treturn types.StringValue(value.String())\n}\n\n// MapMap will return a new map where each element has been mapped (transformed).\n// The number of elements returned will always be the same as the input.\n//\n// Be careful when using this with maps of pointers. If you modify the input\n// value it will affect the original slice. Be sure to return a new allocated\n// object or deep copy the existing one.\n//\n// Based on pie.Map (which only works on slices) at https://github.com/elliotchance/pie/blob/a9ee294da00683bd3f44e8b35bc1deb1dad8fbda/v2/map.go#L3-L20\nfunc MapMap[T comparable, U any, V any](ss map[T]U, fn func(U) V) map[T]V {\n\tif ss == nil {\n\t\treturn nil\n\t}\n\n\tss2 := make(map[T]V)\n\tfor k, v := range ss {\n\t\tss2[k] = fn(v)\n\t}\n\n\treturn ss2\n}\n"
  },
  {
    "path": "internal/validators/duration.go",
    "content": "package validators\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/hashicorp/terraform-plugin-framework/schema/validator\"\n)\n\n// DurationValidator returns a validator which ensures that any configured\n// attribute value is a valid duration string.\nfunc DurationValidator() validator.String {\n\treturn durationValidator{}\n}\n\ntype durationValidator struct{}\n\nfunc (v durationValidator) Description(ctx context.Context) string {\n\treturn \"value must be a valid duration string\"\n}\n\nfunc (v durationValidator) MarkdownDescription(ctx context.Context) string {\n\treturn \"value must be a valid duration string\"\n}\n\nfunc (v durationValidator) ValidateString(ctx context.Context, req validator.StringRequest, resp *validator.StringResponse) {\n\tif req.ConfigValue.IsNull() || req.ConfigValue.IsUnknown() {\n\t\treturn\n\t}\n\n\tvalue := req.ConfigValue.ValueString()\n\tif _, err := time.ParseDuration(value); err != nil {\n\t\tresp.Diagnostics.AddAttributeError(\n\t\t\treq.Path,\n\t\t\t\"Invalid Duration\",\n\t\t\tfmt.Sprintf(\"cannot parse duration '%s': %s\", value, err.Error()),\n\t\t)\n\t}\n}\n"
  },
  {
    "path": "internal/validators/enable_oci.go",
    "content": "package validators\n\nimport (\n\t\"context\"\n\n\t\"github.com/hashicorp/terraform-plugin-framework/attr\"\n\t\"github.com/hashicorp/terraform-plugin-framework/path\"\n\t\"github.com/hashicorp/terraform-plugin-framework/schema/validator\"\n)\n\nvar _ validator.Bool = enableOCIValidator{}\n\ntype enableOCIValidator struct{}\n\nfunc (v enableOCIValidator) Description(_ context.Context) string {\n\treturn \"enable_oci can only be set to true when type is 'helm'\"\n}\n\nfunc (v enableOCIValidator) MarkdownDescription(ctx context.Context) string {\n\treturn v.Description(ctx)\n}\n\nfunc (v enableOCIValidator) ValidateBool(ctx context.Context, req validator.BoolRequest, resp *validator.BoolResponse) {\n\t// If the value is null or unknown, no validation needed\n\tif req.ConfigValue.IsNull() || req.ConfigValue.IsUnknown() {\n\t\treturn\n\t}\n\n\t// Only validate if enable_oci is true\n\tif !req.ConfigValue.ValueBool() {\n\t\treturn\n\t}\n\n\t// Get the type attribute value\n\tvar typeValue attr.Value\n\tdiags := req.Config.GetAttribute(ctx, path.Root(\"type\"), &typeValue)\n\tresp.Diagnostics.Append(diags...)\n\tif resp.Diagnostics.HasError() {\n\t\treturn\n\t}\n\n\t// If type is unknown, we can't validate yet (will be validated during apply)\n\tif typeValue.IsUnknown() {\n\t\treturn\n\t}\n\n\t// If type is null, it will default to \"git\", which is invalid for enable_oci=true\n\tif typeValue.IsNull() {\n\t\tresp.Diagnostics.AddAttributeError(\n\t\t\treq.Path,\n\t\t\t\"Invalid Configuration\",\n\t\t\t\"enable_oci can only be set to true when type is 'helm'\",\n\t\t)\n\t\treturn\n\t}\n\n\t// Check if type is \"helm\"\n\ttypeStr, ok := typeValue.(interface{ ValueString() string })\n\tif !ok {\n\t\t// This shouldn't happen, but handle it gracefully\n\t\tresp.Diagnostics.AddAttributeError(\n\t\t\treq.Path,\n\t\t\t\"Invalid Configuration\",\n\t\t\t\"Unable to validate enable_oci: type attribute has unexpected type\",\n\t\t)\n\t\treturn\n\t}\n\n\tif typeStr.ValueString() != \"helm\" {\n\t\tresp.Diagnostics.AddAttributeError(\n\t\t\treq.Path,\n\t\t\t\"Invalid Configuration\",\n\t\t\t\"enable_oci can only be set to true when type is 'helm', but type is '\"+typeStr.ValueString()+\"'\",\n\t\t)\n\t}\n}\n\n// EnableOCIRequiresHelmType returns a validator that ensures enable_oci is only true when type is \"helm\"\nfunc EnableOCIRequiresHelmType() validator.Bool {\n\treturn enableOCIValidator{}\n}\n"
  },
  {
    "path": "internal/validators/is_dns_subdomain.go",
    "content": "package validators\n\nimport (\n\t\"context\"\n\n\t\"github.com/hashicorp/terraform-plugin-framework/schema/validator\"\n\t\"k8s.io/apimachinery/pkg/api/validation\"\n)\n\nvar _ validator.String = (*isDNSSubdomainValidator)(nil)\n\ntype isDNSSubdomainValidator struct{}\n\nfunc IsDNSSubdomain() isDNSSubdomainValidator {\n\treturn isDNSSubdomainValidator{}\n}\n\n// Description returns a plain text description of the validator's behavior, suitable for a practitioner to understand its impact.\nfunc (v isDNSSubdomainValidator) Description(ctx context.Context) string {\n\treturn \"ensures that attribute is a valid DNS subdomain\"\n}\n\n// MarkdownDescription returns a markdown formatted description of the validator's behavior, suitable for a practitioner to understand its impact.\nfunc (v isDNSSubdomainValidator) MarkdownDescription(ctx context.Context) string {\n\treturn v.Description(ctx)\n}\n\n// Validate runs the main validation logic of the validator, reading configuration data out of `req` and updating `resp` with diagnostics.\nfunc (v isDNSSubdomainValidator) ValidateString(ctx context.Context, req validator.StringRequest, resp *validator.StringResponse) {\n\t// If the value is unknown or null, there is nothing to validate.\n\tif req.ConfigValue.IsUnknown() || req.ConfigValue.IsNull() {\n\t\treturn\n\t}\n\n\terrors := validation.NameIsDNSSubdomain(req.ConfigValue.ValueString(), false)\n\tfor _, err := range errors {\n\t\tresp.Diagnostics.AddAttributeError(\n\t\t\treq.Path,\n\t\t\t\"Invalid DNS subdomain\",\n\t\t\terr)\n\t}\n}\n"
  },
  {
    "path": "internal/validators/metadata_annotations.go",
    "content": "package validators\n\nimport (\n\t\"context\"\n\n\t\"github.com/hashicorp/terraform-plugin-framework/schema/validator\"\n\t\"k8s.io/apimachinery/pkg/util/validation\"\n)\n\nvar _ validator.Map = (*metadataAnnotationsValidator)(nil)\n\ntype metadataAnnotationsValidator struct{}\n\nfunc MetadataAnnotations() metadataAnnotationsValidator {\n\treturn metadataAnnotationsValidator{}\n}\n\n// Description returns a plain text description of the validator's behavior, suitable for a practitioner to understand its impact.\nfunc (v metadataAnnotationsValidator) Description(ctx context.Context) string {\n\treturn \"ensures that all keys in the supplied map are valid qualified names\"\n}\n\n// MarkdownDescription returns a markdown formatted description of the validator's behavior, suitable for a practitioner to understand its impact.\nfunc (v metadataAnnotationsValidator) MarkdownDescription(ctx context.Context) string {\n\treturn v.Description(ctx)\n}\n\n// Validate runs the main validation logic of the validator, reading configuration data out of `req` and updating `resp` with diagnostics.\nfunc (v metadataAnnotationsValidator) ValidateMap(ctx context.Context, req validator.MapRequest, resp *validator.MapResponse) {\n\t// If the value is unknown or null, there is nothing to validate.\n\tif req.ConfigValue.IsUnknown() || req.ConfigValue.IsNull() {\n\t\treturn\n\t}\n\n\t// Only keys need validation for annotations, so iterate over Elements()\n\t// directly to avoid converting unknown element values to Go strings.\n\tfor k := range req.ConfigValue.Elements() {\n\t\terrors := validation.IsQualifiedName(k)\n\t\tfor _, err := range errors {\n\t\t\tresp.Diagnostics.AddAttributeError(\n\t\t\t\treq.Path,\n\t\t\t\t\"Invalid Annotation Key: not a valid qualified name\",\n\t\t\t\terr)\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "internal/validators/metadata_annotations_test.go",
    "content": "package validators\n\nimport (\n\t\"context\"\n\t\"testing\"\n\n\t\"github.com/hashicorp/terraform-plugin-framework/attr\"\n\t\"github.com/hashicorp/terraform-plugin-framework/path\"\n\t\"github.com/hashicorp/terraform-plugin-framework/schema/validator\"\n\t\"github.com/hashicorp/terraform-plugin-framework/types\"\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestMetadataAnnotationsValidator(t *testing.T) {\n\tt.Parallel()\n\n\ttests := map[string]struct {\n\t\tval         types.Map\n\t\texpectError bool\n\t}{\n\t\t\"null map\": {\n\t\t\tval: types.MapNull(types.StringType),\n\t\t},\n\t\t\"unknown map\": {\n\t\t\tval: types.MapUnknown(types.StringType),\n\t\t},\n\t\t\"valid annotation key\": {\n\t\t\tval: types.MapValueMust(types.StringType, map[string]attr.Value{\n\t\t\t\t\"app.kubernetes.io/name\": types.StringValue(\"myapp\"),\n\t\t\t}),\n\t\t},\n\t\t\"multiple valid keys\": {\n\t\t\tval: types.MapValueMust(types.StringType, map[string]attr.Value{\n\t\t\t\t\"app.kubernetes.io/name\":    types.StringValue(\"myapp\"),\n\t\t\t\t\"this.is.a.valid.key/stuff\": types.StringValue(\"value\"),\n\t\t\t}),\n\t\t},\n\t\t\"unknown element value\": {\n\t\t\tval: types.MapValueMust(types.StringType, map[string]attr.Value{\n\t\t\t\t\"app.kubernetes.io/name\": types.StringUnknown(),\n\t\t\t}),\n\t\t},\n\t\t\"mixed known and unknown values\": {\n\t\t\tval: types.MapValueMust(types.StringType, map[string]attr.Value{\n\t\t\t\t\"app.kubernetes.io/name\":    types.StringValue(\"myapp\"),\n\t\t\t\t\"app.kubernetes.io/version\": types.StringUnknown(),\n\t\t\t}),\n\t\t},\n\t\t\"invalid annotation key\": {\n\t\t\tval: types.MapValueMust(types.StringType, map[string]attr.Value{\n\t\t\t\t\"-invalid\": types.StringValue(\"value\"),\n\t\t\t}),\n\t\t\texpectError: true,\n\t\t},\n\t\t\"uppercase annotation key rejected\": {\n\t\t\tval: types.MapValueMust(types.StringType, map[string]attr.Value{\n\t\t\t\t\"App.Kubernetes.IO/Name\": types.StringValue(\"myapp\"),\n\t\t\t}),\n\t\t\texpectError: true,\n\t\t},\n\t}\n\n\tfor name, test := range tests {\n\t\tt.Run(name, func(t *testing.T) {\n\t\t\tt.Parallel()\n\n\t\t\treq := validator.MapRequest{\n\t\t\t\tPath:        path.Root(\"annotations\"),\n\t\t\t\tConfigValue: test.val,\n\t\t\t}\n\n\t\t\tresp := validator.MapResponse{}\n\t\t\tMetadataAnnotations().ValidateMap(context.Background(), req, &resp)\n\t\t\tassert.Equal(t, test.expectError, resp.Diagnostics.HasError())\n\t\t})\n\t}\n}\n"
  },
  {
    "path": "internal/validators/metadata_labels.go",
    "content": "package validators\n\nimport (\n\t\"context\"\n\n\t\"github.com/hashicorp/terraform-plugin-framework/schema/validator\"\n\t\"github.com/hashicorp/terraform-plugin-framework/types\"\n\t\"k8s.io/apimachinery/pkg/util/validation\"\n)\n\nvar _ validator.Map = (*metadataLabelsValidator)(nil)\n\ntype metadataLabelsValidator struct{}\n\nfunc MetadataLabels() metadataLabelsValidator {\n\treturn metadataLabelsValidator{}\n}\n\n// Description returns a plain text description of the validator's behavior, suitable for a practitioner to understand its impact.\nfunc (v metadataLabelsValidator) Description(ctx context.Context) string {\n\treturn \"ensures that all keys in the supplied map are valid qualified names and that the values are valid label values\"\n}\n\n// MarkdownDescription returns a markdown formatted description of the validator's behavior, suitable for a practitioner to understand its impact.\nfunc (v metadataLabelsValidator) MarkdownDescription(ctx context.Context) string {\n\treturn v.Description(ctx)\n}\n\n// Validate runs the main validation logic of the validator, reading configuration data out of `req` and updating `resp` with diagnostics.\nfunc (v metadataLabelsValidator) ValidateMap(ctx context.Context, req validator.MapRequest, resp *validator.MapResponse) {\n\t// If the value is unknown or null, there is nothing to validate.\n\tif req.ConfigValue.IsUnknown() || req.ConfigValue.IsNull() {\n\t\treturn\n\t}\n\n\t// Iterate over Elements() directly to handle maps containing unknown\n\t// element values (e.g. computed attributes from other resources).\n\tfor k, val := range req.ConfigValue.Elements() {\n\t\tfor _, err := range validation.IsQualifiedName(k) {\n\t\t\tresp.Diagnostics.AddAttributeError(\n\t\t\t\treq.Path,\n\t\t\t\t\"Invalid Label Key: not a valid qualified name\",\n\t\t\t\terr)\n\t\t}\n\n\t\t// Skip value validation if the value is unknown or null.\n\t\tsv, ok := val.(types.String)\n\t\tif !ok || sv.IsUnknown() || sv.IsNull() {\n\t\t\tcontinue\n\t\t}\n\n\t\tfor _, err := range validation.IsValidLabelValue(sv.ValueString()) {\n\t\t\tresp.Diagnostics.AddAttributeError(\n\t\t\t\treq.Path,\n\t\t\t\t\"Invalid Label Value\",\n\t\t\t\terr)\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "internal/validators/metadata_labels_test.go",
    "content": "package validators\n\nimport (\n\t\"context\"\n\t\"testing\"\n\n\t\"github.com/hashicorp/terraform-plugin-framework/attr\"\n\t\"github.com/hashicorp/terraform-plugin-framework/path\"\n\t\"github.com/hashicorp/terraform-plugin-framework/schema/validator\"\n\t\"github.com/hashicorp/terraform-plugin-framework/types\"\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestMetadataLabelsValidator(t *testing.T) {\n\tt.Parallel()\n\n\ttests := map[string]struct {\n\t\tval         types.Map\n\t\texpectError bool\n\t}{\n\t\t\"null map\": {\n\t\t\tval: types.MapNull(types.StringType),\n\t\t},\n\t\t\"unknown map\": {\n\t\t\tval: types.MapUnknown(types.StringType),\n\t\t},\n\t\t\"valid label\": {\n\t\t\tval: types.MapValueMust(types.StringType, map[string]attr.Value{\n\t\t\t\t\"app.kubernetes.io/name\": types.StringValue(\"myapp\"),\n\t\t\t}),\n\t\t},\n\t\t\"valid label with empty value\": {\n\t\t\tval: types.MapValueMust(types.StringType, map[string]attr.Value{\n\t\t\t\t\"app.kubernetes.io/name\": types.StringValue(\"\"),\n\t\t\t}),\n\t\t},\n\t\t\"multiple valid labels\": {\n\t\t\tval: types.MapValueMust(types.StringType, map[string]attr.Value{\n\t\t\t\t\"app.kubernetes.io/name\":    types.StringValue(\"myapp\"),\n\t\t\t\t\"app.kubernetes.io/version\": types.StringValue(\"v1\"),\n\t\t\t}),\n\t\t},\n\t\t\"unknown element value\": {\n\t\t\tval: types.MapValueMust(types.StringType, map[string]attr.Value{\n\t\t\t\t\"app.kubernetes.io/name\": types.StringUnknown(),\n\t\t\t}),\n\t\t},\n\t\t\"mixed known and unknown values\": {\n\t\t\tval: types.MapValueMust(types.StringType, map[string]attr.Value{\n\t\t\t\t\"app.kubernetes.io/name\":    types.StringValue(\"myapp\"),\n\t\t\t\t\"app.kubernetes.io/version\": types.StringUnknown(),\n\t\t\t}),\n\t\t},\n\t\t\"null element value\": {\n\t\t\tval: types.MapValueMust(types.StringType, map[string]attr.Value{\n\t\t\t\t\"app.kubernetes.io/name\": types.StringNull(),\n\t\t\t}),\n\t\t},\n\t\t\"invalid label key\": {\n\t\t\tval: types.MapValueMust(types.StringType, map[string]attr.Value{\n\t\t\t\t\"-invalid\": types.StringValue(\"value\"),\n\t\t\t}),\n\t\t\texpectError: true,\n\t\t},\n\t\t\"uppercase label key rejected\": {\n\t\t\tval: types.MapValueMust(types.StringType, map[string]attr.Value{\n\t\t\t\t\"App.Kubernetes.IO/Name\": types.StringValue(\"myapp\"),\n\t\t\t}),\n\t\t\texpectError: true,\n\t\t},\n\t\t\"invalid label value\": {\n\t\t\tval: types.MapValueMust(types.StringType, map[string]attr.Value{\n\t\t\t\t\"app.kubernetes.io/name\": types.StringValue(\"invalid value with spaces\"),\n\t\t\t}),\n\t\t\texpectError: true,\n\t\t},\n\t}\n\n\tfor name, test := range tests {\n\t\tt.Run(name, func(t *testing.T) {\n\t\t\tt.Parallel()\n\n\t\t\treq := validator.MapRequest{\n\t\t\t\tPath:        path.Root(\"labels\"),\n\t\t\t\tConfigValue: test.val,\n\t\t\t}\n\n\t\t\tresp := validator.MapResponse{}\n\t\t\tMetadataLabels().ValidateMap(context.Background(), req, &resp)\n\t\t\tassert.Equal(t, test.expectError, resp.Diagnostics.HasError())\n\t\t})\n\t}\n}\n"
  },
  {
    "path": "internal/validators/positive_integer.go",
    "content": "package validators\n\nimport (\n\t\"context\"\n\t\"strconv\"\n\n\t\"github.com/hashicorp/terraform-plugin-framework/schema/validator\"\n)\n\nvar _ validator.String = positiveIntegerValidator{}\n\ntype positiveIntegerValidator struct{}\n\nfunc (v positiveIntegerValidator) Description(_ context.Context) string {\n\treturn \"value must be a positive integer\"\n}\n\nfunc (v positiveIntegerValidator) MarkdownDescription(ctx context.Context) string {\n\treturn v.Description(ctx)\n}\n\nfunc (v positiveIntegerValidator) ValidateString(ctx context.Context, req validator.StringRequest, resp *validator.StringResponse) {\n\tif req.ConfigValue.IsNull() || req.ConfigValue.IsUnknown() {\n\t\treturn\n\t}\n\n\tvalue := req.ConfigValue.ValueString()\n\tif value == \"\" {\n\t\treturn\n\t}\n\n\ti, err := strconv.ParseInt(value, 10, 64)\n\tif err != nil {\n\t\tresp.Diagnostics.AddAttributeError(\n\t\t\treq.Path,\n\t\t\t\"Invalid Integer\",\n\t\t\t\"The provided value is not a valid integer: \"+err.Error(),\n\t\t)\n\n\t\treturn\n\t}\n\n\tif i <= 0 {\n\t\tresp.Diagnostics.AddAttributeError(\n\t\t\treq.Path,\n\t\t\t\"Invalid Positive Integer\",\n\t\t\t\"The provided value must be a positive integer (greater than 0)\",\n\t\t)\n\n\t\treturn\n\t}\n}\n\nfunc PositiveInteger() validator.String {\n\treturn positiveIntegerValidator{}\n}\n"
  },
  {
    "path": "internal/validators/project_validators.go",
    "content": "package validators\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"regexp\"\n\t\"time\"\n\n\targocdtime \"github.com/argoproj/pkg/v2/time\"\n\t\"github.com/hashicorp/terraform-plugin-framework/schema/validator\"\n\t\"github.com/robfig/cron/v3\"\n)\n\n// GroupNameValidator returns a validator which ensures that any configured\n// attribute value is a valid group name (no commas, newlines, carriage returns, or tabs).\nfunc GroupNameValidator() validator.String {\n\treturn groupNameValidator{}\n}\n\ntype groupNameValidator struct{}\n\nfunc (v groupNameValidator) Description(ctx context.Context) string {\n\treturn \"value must be a valid group name\"\n}\n\nfunc (v groupNameValidator) MarkdownDescription(ctx context.Context) string {\n\treturn \"value must be a valid group name\"\n}\n\nfunc (v groupNameValidator) ValidateString(ctx context.Context, req validator.StringRequest, resp *validator.StringResponse) {\n\tif req.ConfigValue.IsNull() || req.ConfigValue.IsUnknown() {\n\t\treturn\n\t}\n\n\tvalue := req.ConfigValue.ValueString()\n\tinvalidChars := regexp.MustCompile(\"[,\\n\\r\\t]\")\n\n\tif invalidChars.MatchString(value) {\n\t\tresp.Diagnostics.AddAttributeError(\n\t\t\treq.Path,\n\t\t\t\"Invalid Group Name\",\n\t\t\tfmt.Sprintf(\"Group '%s' contains invalid characters (comma, newline, carriage return, or tab)\", value),\n\t\t)\n\t}\n}\n\n// RoleNameValidator returns a validator which ensures that any configured\n// attribute value is a valid role name.\nfunc RoleNameValidator() validator.String {\n\treturn roleNameValidator{}\n}\n\ntype roleNameValidator struct{}\n\nfunc (v roleNameValidator) Description(ctx context.Context) string {\n\treturn \"value must be a valid role name\"\n}\n\nfunc (v roleNameValidator) MarkdownDescription(ctx context.Context) string {\n\treturn \"value must be a valid role name\"\n}\n\nfunc (v roleNameValidator) ValidateString(ctx context.Context, req validator.StringRequest, resp *validator.StringResponse) {\n\tif req.ConfigValue.IsNull() || req.ConfigValue.IsUnknown() {\n\t\treturn\n\t}\n\n\tvalue := req.ConfigValue.ValueString()\n\troleNameRegexp := regexp.MustCompile(`^[a-zA-Z0-9]([-_a-zA-Z0-9]*[a-zA-Z0-9])?$`)\n\n\tif !roleNameRegexp.MatchString(value) {\n\t\tresp.Diagnostics.AddAttributeError(\n\t\t\treq.Path,\n\t\t\t\"Invalid Role Name\",\n\t\t\tfmt.Sprintf(\"Invalid role name '%s'. Must consist of alphanumeric characters, '-' or '_', and must start and end with an alphanumeric character\", value),\n\t\t)\n\t}\n}\n\n// SyncWindowKindValidator returns a validator which ensures that any configured\n// attribute value is either \"allow\" or \"deny\".\nfunc SyncWindowKindValidator() validator.String {\n\treturn syncWindowKindValidator{}\n}\n\ntype syncWindowKindValidator struct{}\n\nfunc (v syncWindowKindValidator) Description(ctx context.Context) string {\n\treturn \"value must be either 'allow' or 'deny'\"\n}\n\nfunc (v syncWindowKindValidator) MarkdownDescription(ctx context.Context) string {\n\treturn \"value must be either 'allow' or 'deny'\"\n}\n\nfunc (v syncWindowKindValidator) ValidateString(ctx context.Context, req validator.StringRequest, resp *validator.StringResponse) {\n\tif req.ConfigValue.IsNull() || req.ConfigValue.IsUnknown() {\n\t\treturn\n\t}\n\n\tvalue := req.ConfigValue.ValueString()\n\tif value != \"allow\" && value != \"deny\" {\n\t\tresp.Diagnostics.AddAttributeError(\n\t\t\treq.Path,\n\t\t\t\"Invalid Sync Window Kind\",\n\t\t\tfmt.Sprintf(\"Kind '%s' mismatch: can only be allow or deny\", value),\n\t\t)\n\t}\n}\n\n// SyncWindowScheduleValidator returns a validator which ensures that any configured\n// attribute value is a valid cron schedule.\nfunc SyncWindowScheduleValidator() validator.String {\n\treturn syncWindowScheduleValidator{}\n}\n\ntype syncWindowScheduleValidator struct{}\n\nfunc (v syncWindowScheduleValidator) Description(ctx context.Context) string {\n\treturn \"value must be a valid cron schedule\"\n}\n\nfunc (v syncWindowScheduleValidator) MarkdownDescription(ctx context.Context) string {\n\treturn \"value must be a valid cron schedule\"\n}\n\nfunc (v syncWindowScheduleValidator) ValidateString(ctx context.Context, req validator.StringRequest, resp *validator.StringResponse) {\n\tif req.ConfigValue.IsNull() || req.ConfigValue.IsUnknown() {\n\t\treturn\n\t}\n\n\tvalue := req.ConfigValue.ValueString()\n\tspecParser := cron.NewParser(cron.Minute | cron.Hour | cron.Dom | cron.Month | cron.Dow)\n\n\tif _, err := specParser.Parse(value); err != nil {\n\t\tresp.Diagnostics.AddAttributeError(\n\t\t\treq.Path,\n\t\t\t\"Invalid Cron Schedule\",\n\t\t\tfmt.Sprintf(\"cannot parse schedule '%s': %s\", value, err.Error()),\n\t\t)\n\t}\n}\n\n// SyncWindowDurationValidator returns a validator which ensures that any configured\n// attribute value is a valid ArgoCD duration.\nfunc SyncWindowDurationValidator() validator.String {\n\treturn syncWindowDurationValidator{}\n}\n\ntype syncWindowDurationValidator struct{}\n\nfunc (v syncWindowDurationValidator) Description(ctx context.Context) string {\n\treturn \"value must be a valid ArgoCD duration\"\n}\n\nfunc (v syncWindowDurationValidator) MarkdownDescription(ctx context.Context) string {\n\treturn \"value must be a valid ArgoCD duration\"\n}\n\nfunc (v syncWindowDurationValidator) ValidateString(ctx context.Context, req validator.StringRequest, resp *validator.StringResponse) {\n\tif req.ConfigValue.IsNull() || req.ConfigValue.IsUnknown() {\n\t\treturn\n\t}\n\n\tvalue := req.ConfigValue.ValueString()\n\tif _, err := argocdtime.ParseDuration(value); err != nil {\n\t\tresp.Diagnostics.AddAttributeError(\n\t\t\treq.Path,\n\t\t\t\"Invalid Duration\",\n\t\t\tfmt.Sprintf(\"cannot parse duration '%s': %s\", value, err.Error()),\n\t\t)\n\t}\n}\n\n// SyncWindowTimezoneValidator returns a validator which ensures that any configured\n// attribute value is a valid timezone.\nfunc SyncWindowTimezoneValidator() validator.String {\n\treturn syncWindowTimezoneValidator{}\n}\n\ntype syncWindowTimezoneValidator struct{}\n\nfunc (v syncWindowTimezoneValidator) Description(ctx context.Context) string {\n\treturn \"value must be a valid timezone\"\n}\n\nfunc (v syncWindowTimezoneValidator) MarkdownDescription(ctx context.Context) string {\n\treturn \"value must be a valid timezone\"\n}\n\nfunc (v syncWindowTimezoneValidator) ValidateString(ctx context.Context, req validator.StringRequest, resp *validator.StringResponse) {\n\tif req.ConfigValue.IsNull() || req.ConfigValue.IsUnknown() {\n\t\treturn\n\t}\n\n\tvalue := req.ConfigValue.ValueString()\n\tif _, err := time.LoadLocation(value); err != nil {\n\t\tresp.Diagnostics.AddAttributeError(\n\t\t\treq.Path,\n\t\t\t\"Invalid Timezone\",\n\t\t\tfmt.Sprintf(\"cannot parse timezone '%s': %s\", value, err.Error()),\n\t\t)\n\t}\n}\n"
  },
  {
    "path": "internal/validators/repository_certificate.go",
    "content": "package validators\n\nimport (\n\t\"context\"\n\n\t\"github.com/hashicorp/terraform-plugin-framework/path\"\n\t\"github.com/hashicorp/terraform-plugin-framework/resource\"\n\t\"github.com/hashicorp/terraform-plugin-framework/types\"\n)\n\nvar _ resource.ConfigValidator = repositoryCertificateValidator{}\n\ntype repositoryCertificateValidator struct{}\n\nfunc (v repositoryCertificateValidator) Description(_ context.Context) string {\n\treturn \"one of `https,ssh` must be specified\"\n}\n\nfunc (v repositoryCertificateValidator) MarkdownDescription(ctx context.Context) string {\n\treturn v.Description(ctx)\n}\n\nfunc (v repositoryCertificateValidator) ValidateResource(ctx context.Context, req resource.ValidateConfigRequest, resp *resource.ValidateConfigResponse) {\n\tvar ssh types.List\n\n\tvar https types.List\n\n\tresp.Diagnostics.Append(req.Config.GetAttribute(ctx, path.Root(\"ssh\"), &ssh)...)\n\tresp.Diagnostics.Append(req.Config.GetAttribute(ctx, path.Root(\"https\"), &https)...)\n\n\tif resp.Diagnostics.HasError() {\n\t\treturn\n\t}\n\n\tsshConfigured := !ssh.IsNull() && len(ssh.Elements()) > 0\n\thttpsConfigured := !https.IsNull() && len(https.Elements()) > 0\n\n\t// Validate that each list contains at most one element\n\tif sshConfigured && len(ssh.Elements()) > 1 {\n\t\tresp.Diagnostics.AddError(\n\t\t\t\"Too many SSH certificates\",\n\t\t\t\"Only one SSH certificate can be specified\",\n\t\t)\n\n\t\treturn\n\t}\n\n\tif httpsConfigured && len(https.Elements()) > 1 {\n\t\tresp.Diagnostics.AddError(\n\t\t\t\"Too many HTTPS certificates\",\n\t\t\t\"Only one HTTPS certificate can be specified\",\n\t\t)\n\n\t\treturn\n\t}\n\n\tif !sshConfigured && !httpsConfigured {\n\t\tresp.Diagnostics.AddError(\n\t\t\t\"Missing required configuration\",\n\t\t\t\"one of `https,ssh` must be specified\",\n\t\t)\n\n\t\treturn\n\t}\n\n\tif sshConfigured && httpsConfigured {\n\t\tresp.Diagnostics.AddError(\n\t\t\t\"Conflicting configuration\",\n\t\t\t\"only one of `https,ssh` can be specified\",\n\t\t)\n\n\t\treturn\n\t}\n}\n\nfunc RepositoryCertificate() resource.ConfigValidator {\n\treturn repositoryCertificateValidator{}\n}\n"
  },
  {
    "path": "internal/validators/ssh_private_key.go",
    "content": "package validators\n\nimport (\n\t\"context\"\n\t\"crypto/x509\"\n\t\"encoding/pem\"\n\t\"strings\"\n\n\t\"github.com/hashicorp/terraform-plugin-framework/schema/validator\"\n)\n\nvar _ validator.String = sshPrivateKeyValidator{}\n\ntype sshPrivateKeyValidator struct{}\n\nfunc (v sshPrivateKeyValidator) Description(_ context.Context) string {\n\treturn \"value must be a valid SSH private key in PEM format\"\n}\n\nfunc (v sshPrivateKeyValidator) MarkdownDescription(ctx context.Context) string {\n\treturn v.Description(ctx)\n}\n\nfunc (v sshPrivateKeyValidator) ValidateString(ctx context.Context, req validator.StringRequest, resp *validator.StringResponse) {\n\tif req.ConfigValue.IsNull() || req.ConfigValue.IsUnknown() {\n\t\treturn\n\t}\n\n\tvalue := req.ConfigValue.ValueString()\n\tif value == \"\" {\n\t\treturn\n\t}\n\n\t// Check if it's a valid PEM block\n\tblock, _ := pem.Decode([]byte(value))\n\tif block == nil {\n\t\tresp.Diagnostics.AddAttributeError(\n\t\t\treq.Path,\n\t\t\t\"Invalid SSH Private Key\",\n\t\t\t\"The provided value is not a valid PEM-encoded private key\",\n\t\t)\n\n\t\treturn\n\t}\n\n\t// Check if it's a recognized private key type\n\tvalidTypes := []string{\n\t\t\"RSA PRIVATE KEY\",\n\t\t\"PRIVATE KEY\",\n\t\t\"EC PRIVATE KEY\",\n\t\t\"DSA PRIVATE KEY\",\n\t\t\"OPENSSH PRIVATE KEY\",\n\t}\n\n\tisValidType := false\n\n\tfor _, validType := range validTypes {\n\t\tif strings.EqualFold(block.Type, validType) {\n\t\t\tisValidType = true\n\t\t\tbreak\n\t\t}\n\t}\n\n\tif !isValidType {\n\t\tresp.Diagnostics.AddAttributeError(\n\t\t\treq.Path,\n\t\t\t\"Invalid SSH Private Key Type\",\n\t\t\t\"The provided PEM block is not a recognized private key type\",\n\t\t)\n\n\t\treturn\n\t}\n\n\t// Additional validation for PKCS#8 and PKCS#1 formats\n\tif strings.EqualFold(block.Type, \"PRIVATE KEY\") {\n\t\t// PKCS#8 format\n\t\t_, err := x509.ParsePKCS8PrivateKey(block.Bytes)\n\t\tif err != nil {\n\t\t\tresp.Diagnostics.AddAttributeError(\n\t\t\t\treq.Path,\n\t\t\t\t\"Invalid PKCS#8 Private Key\",\n\t\t\t\t\"The provided PKCS#8 private key is invalid: \"+err.Error(),\n\t\t\t)\n\n\t\t\treturn\n\t\t}\n\t} else if strings.EqualFold(block.Type, \"RSA PRIVATE KEY\") {\n\t\t// PKCS#1 format\n\t\t_, err := x509.ParsePKCS1PrivateKey(block.Bytes)\n\t\tif err != nil {\n\t\t\tresp.Diagnostics.AddAttributeError(\n\t\t\t\treq.Path,\n\t\t\t\t\"Invalid PKCS#1 Private Key\",\n\t\t\t\t\"The provided PKCS#1 private key is invalid: \"+err.Error(),\n\t\t\t)\n\n\t\t\treturn\n\t\t}\n\t}\n}\n\nfunc SSHPrivateKey() validator.String {\n\treturn sshPrivateKeyValidator{}\n}\n"
  },
  {
    "path": "kind-config.yml",
    "content": "---\napiVersion: kind.x-k8s.io/v1alpha4\nkind: Cluster\nname: argocd\nnodes:\n  - role: control-plane\n    image: kindest/node:v1.34.3\n    extraPortMappings:\n      - containerPort: 30123\n        hostPort: 8080\n        listenAddress: \"127.0.0.1\"\n        protocol: TCP\n"
  },
  {
    "path": "main.go",
    "content": "package main\n\nimport (\n\t\"context\"\n\t\"flag\"\n\t\"log\"\n\n\t\"github.com/hashicorp/terraform-plugin-framework/providerserver\"\n\t\"github.com/hashicorp/terraform-plugin-go/tfprotov6\"\n\t\"github.com/hashicorp/terraform-plugin-go/tfprotov6/tf6server\"\n\t\"github.com/hashicorp/terraform-plugin-mux/tf5to6server\"\n\t\"github.com/hashicorp/terraform-plugin-mux/tf6muxserver\"\n\n\t\"github.com/argoproj-labs/terraform-provider-argocd/argocd\"\n\t\"github.com/argoproj-labs/terraform-provider-argocd/internal/provider\"\n)\n\n// Run \"go generate\" to format example terraform files and generate the docs for the registry/website\n\n// If you do not have terraform installed, you can remove the formatting command, but its suggested to\n// ensure the documentation is formatted properly.\n//go:generate terraform fmt -recursive ./examples/\n\n// Run the docs generation tool, check its repository for more information on how it works and how docs\n// can be customized.\n//go:generate go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs\n\nvar (\n\t// these will be set by the goreleaser configuration\n\t// to appropriate values for the compiled binary.\n\tversion string = \"dev\"\n\n\t// goreleaser can pass other information to the main package, such as the specific commit\n\t// https://goreleaser.com/cookbooks/using-main.version/\n)\n\nfunc main() {\n\tctx := context.Background()\n\n\tvar debug bool\n\n\tflag.BoolVar(&debug, \"debug\", false, \"set to true to run the provider with support for debuggers like delve\")\n\tflag.Parse()\n\n\tupgradedSdkServer, err := tf5to6server.UpgradeServer(\n\t\tctx,\n\t\targocd.Provider().GRPCProvider,\n\t)\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tproviders := []func() tfprotov6.ProviderServer{\n\t\tproviderserver.NewProtocol6(provider.New(version)),\n\t\tfunc() tfprotov6.ProviderServer {\n\t\t\treturn upgradedSdkServer\n\t\t},\n\t}\n\n\tmuxServer, err := tf6muxserver.NewMuxServer(ctx, providers...)\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tvar serveOpts []tf6server.ServeOpt\n\n\tif debug {\n\t\tserveOpts = append(serveOpts, tf6server.WithManagedDebug())\n\t}\n\n\terr = tf6server.Serve(\n\t\t\"registry.terraform.io/argoproj-labs/argocd\",\n\t\tmuxServer.ProviderServer,\n\t\tserveOpts...,\n\t)\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n}\n"
  },
  {
    "path": "manifests/install/cluster-rbac.yml",
    "content": "# The below RBAC will allow the argocd-server to deploy Application resources to any namespace, not just to argocd\napiVersion: rbac.authorization.k8s.io/v1\nkind: ClusterRole\nmetadata:\n  name: argocd-server-cluster-role\nrules:\n  - verbs:\n      - create\n      - get\n      - list\n      - watch\n      - update\n      - delete\n      - patch\n    apiGroups:\n      - argoproj.io\n    resources:\n      - applications\n      - applicationsets\n---\napiVersion: rbac.authorization.k8s.io/v1\nkind: ClusterRoleBinding\nmetadata:\n  name: argocd-server-cluster-role\nsubjects:\n  - kind: ServiceAccount\n    name: argocd-server\n    namespace: argocd\nroleRef:\n  apiGroup: rbac.authorization.k8s.io\n  kind: ClusterRole\n  name: argocd-server-cluster-role\n"
  },
  {
    "path": "manifests/install/git-private-repository.yml",
    "content": "---\napiVersion: v1\nkind: Secret\nmetadata:\n  name: git-authorized-ssh-keys\n  namespace: argocd\ntype: Opaque\nstringData:\n  sshUsername: git\n  sshPublicKey: \"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIZ7pXHSBsqooIjTAimV+ArkkGMIM7duG1Texl8uh5Rm test@argocd\"\n  sshPrivateKey: |\n    -----BEGIN OPENSSH PRIVATE KEY-----\n    b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW\n    QyNTUxOQAAACCGe6Vx0gbKqKCI0wIplfgK5JBjCDO3bhtU3sZfLoeUZgAAAJB9cNEifXDR\n    IgAAAAtzc2gtZWQyNTUxOQAAACCGe6Vx0gbKqKCI0wIplfgK5JBjCDO3bhtU3sZfLoeUZg\n    AAAEAJeUrObjoTbGO1Sq4TXHl/j4RJ5aKMC1OemWuHmLK7XYZ7pXHSBsqooIjTAimV+Ark\n    kGMIM7duG1Texl8uh5RmAAAAC3Rlc3RAYXJnb2NkAQI=\n    -----END OPENSSH PRIVATE KEY-----\n\n---\napiVersion: v1\nkind: ConfigMap\nmetadata:\n  name: git-private-repository-contents\n  namespace: argocd\ndata:\n  configmap.yml: |\n    apiVersion: v1\n    kind: Configmap\n    metadata:\n      name: testdata\n      namespace: default\n    data:\n      foo: bar\n\n---\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n  name: private-git-repository\n  namespace: argocd\nspec:\n  selector:\n    matchLabels:\n      app.kubernetes.io/name: private-git-repository\n  template:\n    metadata:\n      labels:\n        app.kubernetes.io/name: private-git-repository\n    spec:\n      volumes:\n        - name: repo-contents\n          configMap:\n            optional: false\n            name: git-private-repository-contents\n      containers:\n        - name: private-git-repository\n          image: alpine:3\n          volumeMounts:\n            - mountPath: /mnt/testdata\n              name: repo-contents\n              readOnly: true\n          ports:\n            - containerPort: 22\n              protocol: TCP\n              name: sshd\n          readinessProbe:\n            tcpSocket:\n              port: 22\n          command:\n            - sh\n            - -c\n          args:\n            - 'apk add --no-cache --update git sudo openssh &&\n              adduser git -D &&\n              echo \"git:2S8RrPQgxGdAv3Wp2ALKsWQLT5WLj66R3JxuJU35dCemwqLVfd\"|chpasswd &&\n              sudo -u git sh -c \"\n                cd &&\n                mkdir .ssh &&\n                chmod 700 .ssh &&\n                echo ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIZ7pXHSBsqooIjTAimV+ArkkGMIM7duG1Texl8uh5Rm test@argocd > .ssh/authorized_keys &&\n                chmod 600 .ssh/authorized_keys &&\n                for P in \\$(seq 1 10);do\n                  mkdir project-\\${P}.git &&\n                  cd project-\\${P}.git &&\n                  git config --global user.email \\\"test@argocd\\\" &&\n                  git config --global user.name \\\"acctest\\\" &&\n                  git config --global init.defaultBranch \\\"master\\\" &&\n                  git init &&\n                  cp /mnt/testdata/configmap.yml . &&\n                  git add . &&\n                  git commit -m init-\\${P} &&\n                  cd ..;\n                done\" &&\n              ssh-keygen -A &&\n              /usr/sbin/sshd -p 22 -D'\n\n---\napiVersion: v1\nkind: Service\nmetadata:\n  name: private-git-repository\n  namespace: argocd\nspec:\n  type: ClusterIP\n  selector:\n    app.kubernetes.io/name: private-git-repository\n  ports:\n    - port: 22\n      targetPort: sshd\n      name: sshd\n      protocol: TCP\n"
  },
  {
    "path": "manifests/install/kustomization.yml",
    "content": "---\napiVersion: kustomize.config.k8s.io/v1beta1\nkind: Kustomization\nresources:\n  - namespace.yml\n  - git-private-repository.yml\n  - proxy-service.yml\n  - cluster-rbac.yml\n"
  },
  {
    "path": "manifests/install/namespace.yml",
    "content": "---\napiVersion: v1\nkind: Namespace\nmetadata:\n  name: argocd"
  },
  {
    "path": "manifests/install/proxy-service.yml",
    "content": "---\n# Access to argocd service port without the need to proxy through kubectl proxy\napiVersion: v1\nkind: Service\nmetadata:\n  name: argocd-server-proxy\nspec:\n  type: NodePort\n  ports:\n    - name: http\n      port: 80\n      protocol: TCP\n      nodePort: 30124\n      targetPort: 8080\n    - name: https\n      port: 443\n      protocol: TCP\n      nodePort: 30123\n      targetPort: 8080\n  selector:\n    app.kubernetes.io/name: argocd-server\n"
  },
  {
    "path": "manifests/install/ssh-identity.key",
    "content": "-----BEGIN OPENSSH PRIVATE KEY-----\nb3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW\nQyNTUxOQAAACCGe6Vx0gbKqKCI0wIplfgK5JBjCDO3bhtU3sZfLoeUZgAAAJB9cNEifXDR\nIgAAAAtzc2gtZWQyNTUxOQAAACCGe6Vx0gbKqKCI0wIplfgK5JBjCDO3bhtU3sZfLoeUZg\nAAAEAJeUrObjoTbGO1Sq4TXHl/j4RJ5aKMC1OemWuHmLK7XYZ7pXHSBsqooIjTAimV+Ark\nkGMIM7duG1Texl8uh5RmAAAAC3Rlc3RAYXJnb2NkAQI=\n-----END OPENSSH PRIVATE KEY-----\n"
  },
  {
    "path": "manifests/local-dev/.gitignore",
    "content": ".terraform*\nterraform.tfstate*\ncrash.log\n*-config"
  },
  {
    "path": "manifests/local-dev/account-token.tf",
    "content": "resource \"argocd_account_token\" \"admin\" {\n  renew_after = \"30s\"\n}\n\nresource \"argocd_account_token\" \"test\" {\n  account      = \"test\"\n  expires_in   = \"1m\"\n  renew_before = \"45s\"\n}\n"
  },
  {
    "path": "manifests/local-dev/application-set.tf",
    "content": "resource \"argocd_application_set\" \"clusters\" {\n  metadata {\n    name = \"clusters\"\n  }\n\n  spec {\n    generator {\n      clusters {}\n    }\n\n    template {\n      metadata {\n        name = \"appset-clusters-{{name}}\"\n      }\n\n      spec {\n        project = \"default\"\n\n        source {\n          repo_url        = \"https://github.com/argoproj/argo-cd/\"\n          target_revision = \"HEAD\"\n          chart           = \"test/e2e/testdata/guestbook\"\n        }\n\n        destination {\n          server    = \"{{server}}\"\n          namespace = \"default\"\n        }\n      }\n    }\n  }\n}\n\nresource \"argocd_application_set\" \"cluster_decision_resource\" {\n  metadata {\n    name = \"cluster-decision-resource\"\n  }\n\n  spec {\n    generator {\n      cluster_decision_resource {\n        config_map_ref = \"my-configmap\"\n        name           = \"quak\"\n\n        label_selector {\n          match_labels = {\n            duck = \"spotted\"\n          }\n\n          match_expressions {\n            key      = \"duck\"\n            operator = \"In\"\n            values = [\n              \"spotted\",\n              \"canvasback\"\n            ]\n          }\n        }\n      }\n    }\n\n    template {\n      metadata {\n        name = \"appset-cdr-{{name}}\"\n      }\n\n      spec {\n        source {\n          repo_url        = \"https://github.com/argoproj/argo-cd/\"\n          target_revision = \"HEAD\"\n          path            = \"test/e2e/testdata/guestbook\"\n        }\n\n        destination {\n          server    = \"{{server}}\"\n          namespace = \"default\"\n        }\n      }\n    }\n  }\n}\n\nresource \"argocd_application_set\" \"git\" {\n  metadata {\n    name = \"git\"\n  }\n\n  spec {\n    generator {\n      git {\n        repo_url = \"https://github.com/argoproj/argo-cd.git\"\n        revision = \"HEAD\"\n\n        # directory {\n        #   path = \"applicationset/examples/git-generator-directory/excludes/cluster-addons/*\"\n        # }\n\n        # directory {\n        #   exclude = true\n        #   path    = \"applicationset/examples/git-generator-directory/excludes/cluster-addons/exclude-helm-guestbook\"\n        # }\n\n        file {\n          path = \"applicationset/examples/git-generator-files-discovery/cluster-config/**/config.json\"\n        }\n      }\n    }\n\n    template {\n      metadata {\n        name = \"appset-git-{{path.basename}}\"\n      }\n\n      spec {\n        project = \"default\"\n\n        source {\n          repo_url        = \"https://github.com/argoproj/argo-cd.git\"\n          target_revision = \"HEAD\"\n          path            = \"{{path}}\"\n        }\n\n        destination {\n          server    = \"https://kubernetes.default.svc\"\n          namespace = \"{{path.basename}}\"\n        }\n      }\n    }\n  }\n}\n\nresource \"argocd_application_set\" \"list\" {\n  metadata {\n    name = \"list\"\n  }\n\n  spec {\n    generator {\n      list {\n        elements = [\n          {\n            cluster = \"engineering-dev\"\n            url     = \"https://kubernetes.default.svc\"\n          },\n          {\n            cluster = argocd_cluster.kind_secondary.name\n            url     = argocd_cluster.kind_secondary.server\n          }\n        ]\n\n        template {\n          metadata {}\n          spec {\n            project = \"default\"\n            source {\n              target_revision = \"HEAD\"\n              repo_url        = \"https://github.com/argoproj/argo-cd.git\"\n              # New path value is generated here:\n              path = \"applicationset/examples/template-override/{{cluster}}-override\"\n            }\n            destination {}\n          }\n        }\n      }\n    }\n\n    template {\n      metadata {\n        name = \"appset-list-{{cluster}}\"\n      }\n\n      spec {\n        project = \"default\"\n\n        source {\n          repo_url        = \"https://github.com/argoproj/argo-cd.git\"\n          target_revision = \"HEAD\"\n          path            = \"applicationset/examples/list-generator/guestbook/{{cluster}}\"\n        }\n\n        destination {\n          server    = \"{{url}}\"\n          namespace = \"guestbook\"\n        }\n      }\n    }\n  }\n}\n\nresource \"argocd_application_set\" \"matrix\" {\n  metadata {\n    name = \"matrix\"\n  }\n\n  spec {\n    generator {\n      matrix {\n        generator {\n          matrix {\n            generator {\n              list {\n                elements = [\n                  {\n                    cluster = \"in-cluster\"\n                    url     = \"https://kubernetes.default.svc\"\n                  }\n                ]\n              }\n            }\n\n            generator {\n              git {\n                repo_url = \"https://github.com/argoproj/argo-cd.git\"\n                revision = \"HEAD\"\n\n                file {\n                  path = \"applicationset/examples/git-generator-files-discovery/cluster-config/**/config.json\"\n                }\n              }\n            }\n          }\n        }\n\n        generator {\n          clusters {}\n        }\n      }\n    }\n\n    template {\n      metadata {\n        name = \"appset-matrix-{{name}}\"\n      }\n\n      spec {\n        project = \"default\"\n\n        source {\n          repo_url        = \"https://kubernetes-sigs.github.io/descheduler\"\n          chart           = \"descheduler\"\n          target_revision = \"0.33.0\"\n\n          helm {\n            release_name = \"testing\"\n\n            parameter {\n              name  = \"image.tag\"\n              value = \"6.2.5\"\n            }\n\n            parameter {\n              name  = \"architecture\"\n              value = \"standalone\"\n            }\n          }\n        }\n\n        destination {\n          server    = \"{{server}}\"\n          namespace = \"default\"\n        }\n      }\n    }\n  }\n}\n\n\n# List Generator with elements_yaml\nresource \"argocd_application_set\" \"list_elements_yaml\" {\n  metadata {\n    name = \"list-elements-yaml\"\n  }\n\n  spec {\n    generator {\n      list {\n        elements_yaml = <<-EOT\n          - cluster: engineering-dev\n            url: https://kubernetes.default.svc\n            environment: development\n          - cluster: engineering-prod\n            url: https://kubernetes.default.svc\n            environment: production\n            foo: bar\n        EOT\n      }\n    }\n\n    template {\n      metadata {\n        name = \"{{cluster}}-guestbook\"\n      }\n\n      spec {\n        project = \"default\"\n\n        source {\n          repo_url        = \"https://github.com/argoproj/argo-cd.git\"\n          target_revision = \"HEAD\"\n          path            = \"applicationset/examples/list-generator/guestbook/{{cluster}}\"\n        }\n\n        destination {\n          server    = \"{{url}}\"\n          namespace = \"guestbook\"\n        }\n      }\n    }\n  }\n}\n\n# List Generator with dynamic elements_yaml using Go templating\nresource \"argocd_application_set\" \"list_elements_yaml_dynamic\" {\n  metadata {\n    name = \"list-elements-yaml-dynamic\"\n  }\n\n  spec {\n    go_template         = true\n    go_template_options = [\"missingkey=error\"]\n\n    generator {\n      matrix {\n        generator {\n          git {\n            repo_url = \"https://github.com/argoproj/argo-cd.git\"\n            revision = \"HEAD\"\n\n            file {\n              path = \"applicationset/examples/list-generator/list-elementsYaml-example.yaml\"\n            }\n          }\n        }\n\n        generator {\n          list {\n            elements_yaml = <<-EOT\n              {{ .key.components | toJson }}\n            EOT\n          }\n        }\n      }\n    }\n\n    template {\n      metadata {\n        name = \"{{.name}}\"\n      }\n\n      spec {\n        project = \"default\"\n\n        sync_policy {\n          automated {\n            self_heal = true\n          }\n          sync_options = [\"CreateNamespace=true\"]\n        }\n\n        source {\n          chart           = \"{{.chart}}\"\n          repo_url        = \"{{.repoUrl}}\"\n          target_revision = \"{{.version}}\"\n          helm {\n            release_name = \"{{.releaseName}}\"\n          }\n        }\n\n        destination {\n          server    = \"https://kubernetes.default.svc\"\n          namespace = \"{{.namespace}}\"\n        }\n      }\n    }\n  }\n}\n\n\n\n\nresource \"argocd_application_set\" \"merge\" {\n  metadata {\n    name = \"merge\"\n  }\n\n  spec {\n    generator {\n      merge {\n        merge_keys = [\n          \"server\"\n        ]\n\n        generator {\n          clusters {\n            values = {\n              kafka = true\n              redis = false\n            }\n          }\n        }\n\n        generator {\n          clusters {\n            selector {\n              match_labels = {\n                use-kafka = \"false\"\n              }\n            }\n\n            values = {\n              kafka = \"false\"\n            }\n          }\n        }\n\n        generator {\n          list {\n            elements = [\n              {\n                server         = \"https://2.4.6.8\"\n                \"values.redis\" = \"true\"\n              },\n            ]\n          }\n        }\n      }\n    }\n\n    template {\n      metadata {\n        name = \"appset-merge-{{name}}\"\n      }\n\n      spec {\n        project = \"default\"\n\n        source {\n          repo_url        = \"https://github.com/argoproj/argo-cd.git\"\n          path            = \"app\"\n          target_revision = \"HEAD\"\n\n          helm {\n            parameter {\n              name  = \"kafka\"\n              value = \"{{values.kafka}}\"\n            }\n\n            parameter {\n              name  = \"redis\"\n              value = \"{{values.redis}}\"\n            }\n          }\n        }\n\n        destination {\n          server    = \"{{server}}\"\n          namespace = \"default\"\n        }\n      }\n    }\n  }\n}\n\nresource \"argocd_application_set\" \"pull_request_github\" {\n  metadata {\n    name = \"pull-request-github\"\n  }\n\n  spec {\n    generator {\n      pull_request {\n        github {\n          api             = \"https://git.example.com/\"\n          owner           = \"myorg\"\n          repo            = \"myrepository\"\n          app_secret_name = \"github-app-repo-creds\"\n\n          token_ref {\n            secret_name = \"github-token\"\n            key         = \"token\"\n          }\n\n          labels = [\n            \"preview\"\n          ]\n        }\n      }\n    }\n\n    template {\n      metadata {\n        name = \"appset-opull-request-{{branch}}-{{number}}\"\n      }\n\n      spec {\n        project = \"default\"\n\n        source {\n          repo_url        = \"https://github.com/myorg/myrepo.git\"\n          path            = \"kubernetes/\"\n          target_revision = \"{{head_sha}}\"\n\n          helm {\n            parameter {\n              name  = \"image.tag\"\n              value = \"pull-{{head_sha}}\"\n            }\n          }\n        }\n\n        destination {\n          server    = \"https://kubernetes.default.svc\"\n          namespace = \"default\"\n        }\n      }\n    }\n  }\n}\n\n\nresource \"argocd_application_set\" \"pull_request_azure_devops\" {\n  metadata {\n    name = \"pull-request-azure-devops\"\n  }\n\n  spec {\n    generator {\n      pull_request {\n        azure_devops {\n          organization = \"myorg\"\n          project      = \"myproject\"\n          repo         = \"myrepo\"\n          api          = \"https://dev.azure.com/\"\n\n          token_ref {\n            secret_name = \"pat-token\"\n            key         = \"token\"\n          }\n\n          labels = [\n            \"preview\"\n          ]\n        }\n      }\n    }\n\n    template {\n      metadata {\n        name = \"appset-opull-request-{{branch}}-{{number}}\"\n      }\n\n      spec {\n        project = \"default\"\n\n        source {\n          repo_url        = \"https://github.com/myorg/myrepo.git\"\n          path            = \"kubernetes/\"\n          target_revision = \"{{head_sha}}\"\n\n          helm {\n            parameter {\n              name  = \"image.tag\"\n              value = \"pull-{{head_sha}}\"\n            }\n          }\n        }\n\n        destination {\n          server    = \"https://kubernetes.default.svc\"\n          namespace = \"default\"\n        }\n      }\n    }\n  }\n}\n\n\n\nresource \"argocd_application_set\" \"scm_provider\" {\n  metadata {\n    name = \"scm-provider\"\n  }\n\n  spec {\n    generator {\n      scm_provider {\n        github {\n          all_branches    = true\n          api             = \"https://git.example.com/\"\n          app_secret_name = \"gh-app-repo-creds\"\n          organization    = \"myorg\"\n\n          token_ref {\n            secret_name = \"github-token\"\n            key         = \"token\"\n          }\n        }\n      }\n    }\n\n    template {\n      metadata {\n        name = \"appset-scm-provider-{{repository}}\"\n      }\n\n      spec {\n        project = \"default\"\n\n        source {\n          repo_url        = \"{{url}}\"\n          path            = \"kubernetes/\"\n          target_revision = \"{{branch}}\"\n        }\n\n        destination {\n          server    = \"https://kubernetes.default.svc\"\n          namespace = \"default\"\n        }\n      }\n    }\n  }\n}\n\nresource \"argocd_application_set\" \"progressive_sync\" {\n  metadata {\n    name = \"progressive-sync\"\n  }\n\n  spec {\n    generator {\n      list {\n        elements = [\n          {\n            cluster = \"engineering-dev\"\n            url     = \"https://1.2.3.4\"\n            env     = \"env-dev\"\n          },\n          {\n            cluster = \"engineering-qa\"\n            url     = \"https://2.4.6.8\"\n            env     = \"env-qa\"\n          },\n          {\n            cluster = \"engineering-prod\"\n            url     = \"https://9.8.7.6/\"\n            env     = \"env-prod\"\n          }\n        ]\n      }\n    }\n\n    strategy {\n      type = \"RollingSync\"\n      rolling_sync {\n        step {\n          match_expressions {\n            key      = \"envLabel\"\n            operator = \"In\"\n            values = [\n              \"env-dev\"\n            ]\n          }\n\n          # max_update = \"100%\"  # if undefined, all applications matched are updated together (default is 100%)\n        }\n\n        step {\n          match_expressions {\n            key      = \"envLabel\"\n            operator = \"In\"\n            values = [\n              \"env-qa\"\n            ]\n          }\n\n          max_update = \"0\"\n        }\n\n        step {\n          match_expressions {\n            key      = \"envLabel\"\n            operator = \"In\"\n            values = [\n              \"env-prod\"\n            ]\n          }\n\n          max_update = \"10%\"\n        }\n      }\n    }\n\n    go_template = true\n\n    template {\n      metadata {\n        name = \"appset-progressive-sync-{{.cluster}}\"\n        labels = {\n          envLabel = \"{{.env}}\"\n        }\n      }\n\n      spec {\n        project = \"default\"\n\n        source {\n          repo_url        = \"https://github.com/infra-team/cluster-deployments.git\"\n          path            = \"guestbook/{{.cluster}}\"\n          target_revision = \"HEAD\"\n        }\n\n        destination {\n          server    = \"{{.url}}\"\n          namespace = \"guestbook\"\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "manifests/local-dev/application.tf",
    "content": "resource \"argocd_application\" \"foo\" {\n  metadata {\n    name      = \"foo\"\n    namespace = \"argocd\"\n    labels = {\n      acceptance = \"true\"\n    }\n    annotations = {\n      \"this.is.a.really.long.nested.key\" = \"yes, really!\"\n    }\n  }\n\n  spec {\n    project = argocd_project.foo.metadata[0].name\n\n    source {\n      repo_url        = \"https://kubernetes-sigs.github.io/descheduler\"\n      chart           = \"descheduler\"\n      target_revision = \"0.33.0\"\n\n      helm {\n        release_name = \"testing\"\n\n        parameter {\n          name  = \"image.tag\"\n          value = \"6.2.5\"\n        }\n\n        parameter {\n          name  = \"architecture\"\n          value = \"standalone\"\n        }\n      }\n    }\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n\n    sync_policy {\n      automated {\n        prune       = true\n        self_heal   = true\n        allow_empty = false\n      }\n\n      sync_options = [\n        \"PrunePropagationPolicy=foreground\",\n        \"ApplyOutOfSyncOnly=true\"\n      ]\n\n      retry {\n        limit = 5\n        backoff {\n          duration     = \"3m\"\n          factor       = \"2\"\n          max_duration = \"30m\"\n        }\n      }\n    }\n  }\n\n  # wait = true\n}\n"
  },
  {
    "path": "manifests/local-dev/cluster.tf",
    "content": "resource \"kind_cluster\" \"secondary\" {\n  name       = \"secondary\"\n  node_image = \"kindest/node:v1.24.7\"\n}\n\nresource \"argocd_cluster\" \"kind_secondary\" {\n  name   = \"kind-secondary\"\n  server = kind_cluster.secondary.endpoint\n\n  config {\n    tls_client_config {\n      ca_data = kind_cluster.secondary.cluster_ca_certificate\n      // insecure = true\n    }\n  }\n}\n"
  },
  {
    "path": "manifests/local-dev/data.tf",
    "content": "# Uncomment below to see full data source for application `foo` (needs to have\n# been applied first).\n#\n# data \"argocd_application\" \"foo\" {\n#   metadata = {\n#     name = \"foo\"\n#   }\n# }\n#\n# output \"application_foo\" {\n#   value = data.argocd_application.foo\n# }\n"
  },
  {
    "path": "manifests/local-dev/gpg-key.tf",
    "content": "resource \"argocd_gpg_key\" \"this\" {\n  public_key = <<EOF\n-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQINBGSJdlcBEACnza+KvWLyKWUHJPhgs//HRL0EEmA/EcFKioBlrgPNYf/O7hNg\nKT3NDaNrD26pr+bOb4mfaqNNS9no8b9EP3C7Co3Wf2d4xpJ5/hlpIm3V652S5daZ\nI7ylVT8QOrhaqEnHH2hEcOfDaqjrYfrx3qiI8v7DmV6jfGi1tDUUgfJwiOyZk4q1\njiPo5k4+XNp9mCtUAGyidLFcUqQ9XbHKgBwgAoxtIKNSbdPCGhsjgTHHhzswMH/Z\nDhhtcraqrfOhoP9lI4/zyCS+B9OfUy7BS/1SqWKIgdsjFIR+zHIOI69lh77+ZAVE\nMVYJBdFke5/g/tTPaQGuBqaIJ3d/Mi/ZlbTsoBcq5qam73uh7fcgBV5la6NeuNcR\ntvKMVl4DlnkJS8LBtElLEeHEylTCdNltrUFwshDKDBtq6ilTKCK14R6g4lkn8VcE\n9xx7Mhdh77tp66FRZ6ge1E8EUEFwEeFhp240KRyaA5U1/kAarn8083zZ7d4+QObp\nL4KMqgrwLaxyPLgu0J/f946qLewV7XsbZRXE1jQa9Z7W5TEoJwjcC79DXe1wChc6\ncBfCtluDsnklwvldpKTEZU0q/hKE6Zt7NjLUyExV+5guoHllxoVxx7sh+jtKm/J+\n5gh+B3xOTDxRV2XYIx1TM6U1iLxAqchzFec8dfkuTbs/5f++PrddvZfiUQARAQAB\ntD1BcmdvQ0QgVGVycmFmb3JtIFByb3ZpZGVyIDxmYWtldXNlckB1c2Vycy5ub3Jl\ncGx5LmdpdGh1Yi5jb20+iQJOBBMBCgA4FiEEvK9bNlncXDhFAk6kmtkpVUAdOI0F\nAmSJdlcCGwMFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQmtkpVUAdOI2FdA//\nYuFYsX6SUVgI4l68ZHE34jLTWU5R2ujB6luErcguAlLyDtrD3melva3V/ETc69/1\n5o7Ayn3a7uz5lCEvUSLsCN+V2o3EjrA81pt8Zs+Z9WYeZE5F5DnKzq81PObdASB7\nPo2X0qLqqKIhpQxc/E7m26xmePCf82H36gtvPiEVmVA5yduk1lLG3aZtNIRCa4VK\ngmDjR8Se+OZeAw7JQCOeJB9/Y8oQ8nVkj1SWNIICaUwIXHtrj7r1z6XTDAEkGeBg\nHXW8IEhZDE1Nq3vQtZvgwftEoPT/Ff+8DwvL1JUov2ObQDolallzKaiiVfGZhPJZ\n4PMtEPEmSL9QWJAG5jiBVC3BdVZtXBNkC1HqTCXwZc/wzp5O9MmMXmCrUFr4FfHu\nIZ560MNpp/SrtUrOahLmvuG0B+Ze96e2nm5ap5wkCDaQouOIqM7Lj+FGq64cu2B/\noSsl7joBZQUYXv8meNOQssm6jArRLG2oFoiEdRqzd2/RjvvJliLN9OCNvV43f38h\n8Ep8RDi9RiHhSKvwrvDD9x/JRm6zQUetjrctmjdIYp8k129LrD0Qr9ULXfphZdrv\nxga7/lyQLmukLu7Mxwp+ss2bY/wjT8mlT5P55kBpXXyYILhLsUESCHG6D8/Ov+vv\nOoZS+BSfe/0vc1aTfDKxj5wAx27a6z5o25X27feEl3U=\n=kqkH\n-----END PGP PUBLIC KEY BLOCK-----\nEOF\n}\n"
  },
  {
    "path": "manifests/local-dev/outputs.tf",
    "content": "# Uncomment output below to see `status` for application `foo`.\n#\n# Note: making use of `status` within Terraform code will result in Terraform\n# displaying information regarding changes to this field that occur between\n# Terraform runs. I.e. we can expect to see the following in the plan details if\n# the status changes:\n# \n# ```\n# Note: Objects have changed outside of Terraform\n# \n# Terraform detected the following changes made outside of Terraform since the last \"terraform apply\" which may have affected this plan:\n# ```\n# \n# Tip: post apply run the following for better formatting: \n# ``` sh\n# terraform output -raw foo_status | jq .\n# ```\n# \n# output \"foo_status\" {\n#   value = jsonencode(argocd_application.foo.status.0)\n# }\n"
  },
  {
    "path": "manifests/local-dev/project-token.tf",
    "content": "resource \"argocd_project_token\" \"long\" {\n  project     = argocd_project.foo.metadata.0.name\n  role        = \"foo\"\n  description = \"long lived token\"\n}\n\nresource \"argocd_project_token\" \"renew_before\" {\n  project      = argocd_project.foo.metadata.0.name\n  role         = \"foo\"\n  description  = \"auto-renewing short lived token\"\n  expires_in   = \"24h\"\n  renew_before = \"10h\"\n}\n\nresource \"argocd_project_token\" \"renew_after\" {\n  project     = argocd_project.foo.metadata.0.name\n  role        = \"foo\"\n  description = \"auto-renewing long-lived token\"\n  renew_after = \"1m\"\n}\n"
  },
  {
    "path": "manifests/local-dev/project.tf",
    "content": "resource \"argocd_project\" \"foo\" {\n  metadata {\n    name      = \"foo\"\n    namespace = \"argocd\"\n    labels = {\n      acceptance = \"true\"\n    }\n    annotations = {\n      \"this.is.a.really.long.nested.key\" = \"yes, really!\"\n    }\n  }\n\n  spec {\n    description  = \"simple project\"\n    source_repos = [\"*\"]\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"default\"\n    }\n\n    destination {\n      server    = \"https://kubernetes.default.svc\"\n      namespace = \"foo\"\n    }\n\n    destination {\n      server    = argocd_cluster.kind_secondary.server\n      namespace = \"default\"\n    }\n\n    cluster_resource_whitelist {\n      group = \"rbac.authorization.k8s.io\"\n      kind  = \"ClusterRoleBinding\"\n    }\n\n    cluster_resource_whitelist {\n      group = \"rbac.authorization.k8s.io\"\n      kind  = \"ClusterRole\"\n    }\n\n    namespace_resource_blacklist {\n      group = \"networking.k8s.io\"\n      kind  = \"Ingress\"\n    }\n\n    namespace_resource_whitelist {\n      group = \"*\"\n      kind  = \"*\"\n    }\n\n    role {\n      name = \"foo\"\n      policies = [\n        \"p, proj:foo:foo, applications, get, foo/*, allow\",\n        \"p, proj:foo:foo, applications, sync, foo/*, deny\",\n      ]\n    }\n\n    orphaned_resources {\n      warn = true\n    }\n\n    sync_window {\n      kind         = \"allow\"\n      applications = [\"api-*\"]\n      clusters     = [\"*\"]\n      namespaces   = [\"*\"]\n      duration     = \"3600s\"\n      schedule     = \"10 1 * * *\"\n      manual_sync  = true\n    }\n\n    sync_window {\n      kind         = \"deny\"\n      applications = [\"foo\"]\n      clusters     = [\"in-cluster\"]\n      namespaces   = [\"default\"]\n      duration     = \"12h\"\n      schedule     = \"22 1 5 * *\"\n      manual_sync  = false\n      timezone     = \"Europe/London\"\n    }\n  }\n}\n"
  },
  {
    "path": "manifests/local-dev/repository-credentials.tf",
    "content": "resource \"argocd_repository_credentials\" \"this\" {\n  url      = \"https://github.com/foo\"\n  username = \"foo\"\n  password = \"bar\"\n}\n"
  },
  {
    "path": "manifests/local-dev/repository.tf",
    "content": "resource \"argocd_repository\" \"this\" {\n  repo = \"https://github.com/argoproj-labs/terraform-provider-argocd\"\n}\n"
  },
  {
    "path": "manifests/local-dev/versions.tf",
    "content": "terraform {\n  required_providers {\n    argocd = {\n      source  = \"argoproj-labs/argocd\"\n      version = \">= 6.2.0\"\n    }\n    kind = {\n      source  = \"unicell/kind\"\n      version = \"0.0.2-u2\"\n    }\n  }\n}\n\nprovider \"argocd\" {\n  server_addr = \"127.0.0.1:8080\"\n  insecure    = true\n  username    = \"admin\"\n  password    = \"acceptancetesting\"\n}\n\n# provider \"argocd\" {\n#   context          = \"localhost:8080\"\n#   use_local_config = true # Note: you will need to log in via the ArgoCD CLI first (`argocd login localhost:8080 --username admin --password acceptancetesting --insecure`) for this to work\n# }\n\n# provider \"argocd\" {\n#   port_forward = true\n#   username     = \"admin\"\n#   password     = \"acceptancetesting\"\n#   kubernetes {\n#     config_context = \"kind-argocd\"\n#   }\n# }\n\n# provider \"argocd\" {\n#   core = true\n# }\n\nprovider \"kind\" {}\n"
  },
  {
    "path": "manifests/overlays/v3.1.12/kustomization.yml",
    "content": "apiVersion: kustomize.config.k8s.io/v1beta1\nkind: Kustomization\nnamespace: argocd\nresources:\n- https://raw.githubusercontent.com/argoproj/argo-cd/v3.1.12/manifests/install.yaml\n- ../../install\ncomponents:\n  - ../../patches\n"
  },
  {
    "path": "manifests/overlays/v3.2.6/kustomization.yml",
    "content": "apiVersion: kustomize.config.k8s.io/v1beta1\nkind: Kustomization\nnamespace: argocd\nresources:\n- https://raw.githubusercontent.com/argoproj/argo-cd/v3.2.6/manifests/install.yaml\n- ../../install\ncomponents:\n  - ../../patches\n"
  },
  {
    "path": "manifests/overlays/v3.3.0/kustomization.yml",
    "content": "apiVersion: kustomize.config.k8s.io/v1beta1\nkind: Kustomization\nnamespace: argocd\nresources:\n- https://raw.githubusercontent.com/argoproj/argo-cd/v3.3.0/manifests/install.yaml\n- ../../install\ncomponents:\n  - ../../patches\n"
  },
  {
    "path": "manifests/patches/argocd-cm.yml",
    "content": "apiVersion: v1\nkind: ConfigMap\nmetadata:\n  name: argocd-cm\ndata:\n  accounts.admin: apiKey\n  accounts.test: apiKey\n"
  },
  {
    "path": "manifests/patches/argocd-cmd-params-cm.yml",
    "content": "apiVersion: v1\nkind: ConfigMap\nmetadata:\n  name: argocd-cmd-params-cm\ndata:\n  application.namespaces: mynamespace-*\n  applicationsetcontroller.enable.scm.providers: \"true\"\n  applicationsetcontroller.allowed.scm.providers: \"https://github.com,https://gitlab.com,https://dev.azure.com/,https://gitea.com,https://git.example.com\"\n  applicationsetcontroller.namespaces: \"*\"\n"
  },
  {
    "path": "manifests/patches/kustomization.yaml",
    "content": "apiVersion: kustomize.config.k8s.io/v1alpha1\nkind: Component\npatches:\n  - target:\n      kind: ConfigMap\n      name: argocd-cm\n    path: argocd-cm.yml\n  - target:\n      kind: ConfigMap\n      name: argocd-cmd-params-cm\n    path: argocd-cmd-params-cm.yml\n  - target:\n      kind: Secret\n      name: argocd-secret\n    path: secret.yml\n"
  },
  {
    "path": "manifests/patches/secret.yml",
    "content": "---\napiVersion: v1\nkind: Secret\nmetadata:\n  name: argocd-secret\nstringData:\n  \"admin.password\": \"$2a$10$O7VHb/85434QLWAep6.pye/z454DE3R2IWbCIJ7q5V/nTXUdPEBZC\""
  },
  {
    "path": "manifests/testdata/custom_namespace.yml",
    "content": "\n# Used to test deploying Applications to this namespace instead of to 'argocd'\n---\napiVersion: v1\nkind: Namespace\nmetadata:\n  name: mynamespace-1 "
  },
  {
    "path": "manifests/testdata/token_resource.yml",
    "content": "---\napiVersion: argoproj.io/v1alpha1\nkind: AppProject\nmetadata:\n  name: myproject1\n  namespace: argocd\nspec:\n  description: myproject1\n  sourceRepos:\n    - '*'\n  destinations:\n    - namespace: '*'\n      server: https://kubernetes.default.svc\n  orphanedResources:\n    warn: false\n  clusterResourceWhitelist:\n    - group: '*'\n      kind: '*'\n  roles:\n    - name: test-role1234\n      description: test role, waiting for a Terraform ArgoCD provider resource\n      policies:\n        - p, proj:myproject1:test-role1234, applications, override, myproject1/*, allow\n        - p, proj:myproject1:test-role1234, applications, sync, myproject1/*, allow\n        - p, proj:myproject1:test-role1234, applications, update, myproject1/*, allow\n        - p, proj:myproject1:test-role1234, applications, get, myproject1/*, allow\n    - name: test-role4321\n      description: test role, waiting for a Terraform ArgoCD provider resource\n      policies:\n        - p, proj:myproject1:test-role4321, applications, override, myproject1/*, allow\n        - p, proj:myproject1:test-role4321, applications, sync, myproject1/*, allow\n        - p, proj:myproject1:test-role4321, applications, update, myproject1/*, allow\n        - p, proj:myproject1:test-role4321, applications, get, myproject1/*, allow\n---\napiVersion: argoproj.io/v1alpha1\nkind: AppProject\nmetadata:\n  name: myproject2\n  namespace: argocd\nspec:\n  description: myproject2\n  sourceRepos:\n    - '*'\n  destinations:\n    - namespace: '*'\n      server: https://kubernetes.default.svc\n  orphanedResources:\n    warn: false\n  clusterResourceWhitelist:\n    - group: '*'\n      kind: '*'\n  roles:\n    - name: test-role1234\n      description: test role, waiting for a Terraform ArgoCD provider resource\n      policies:\n        - p, proj:myproject2:test-role1234, applications, override, myproject2/*, allow\n        - p, proj:myproject2:test-role1234, applications, sync, myproject2/*, allow\n        - p, proj:myproject2:test-role1234, applications, update, myproject2/*, allow\n        - p, proj:myproject2:test-role1234, applications, get, myproject2/*, allow\n    - name: test-role4321\n      description: test role, waiting for a Terraform ArgoCD provider resource\n      policies:\n        - p, proj:myproject2:test-role4321, applications, override, myproject2/*, allow\n        - p, proj:myproject2:test-role4321, applications, sync, myproject2/*, allow\n        - p, proj:myproject2:test-role4321, applications, update, myproject2/*, allow\n        - p, proj:myproject2:test-role4321, applications, get, myproject2/*, allow\n"
  },
  {
    "path": "scripts/update-kubernetes-version.sh",
    "content": "#!/usr/bin/env bash\n# Source: \n# https://github.com/kubernetes/kubernetes/issues/79384#issuecomment-521493597\n# https://github.com/argoproj/argo-cd/blob/master/hack/update-kubernetes-version.sh\nset -euo pipefail\n\nif [ -z \"${1:-}\" ]; then\n  echo \"Example usage: ./hack/update-kubernetes-version.sh v1.26.11\"\n  exit 1\nfi\nVERSION=${1#\"v\"}\nMODS=($(\n  curl -sS https://raw.githubusercontent.com/kubernetes/kubernetes/v${VERSION}/go.mod |\n    sed -n 's|.*k8s.io/\\(.*\\) => ./staging/src/k8s.io/.*|k8s.io/\\1|p'\n))\nfor MOD in \"${MODS[@]}\"; do\n  echo \"Updating $MOD...\" >&2\n  V=$(\n    go mod download -json \"${MOD}@kubernetes-${VERSION}\" |\n      sed -n 's|.*\"Version\": \"\\(.*\\)\".*|\\1|p'\n  )\n  go mod edit \"-replace=${MOD}=${MOD}@${V}\"\ndone\ngo get \"k8s.io/kubernetes@v${VERSION}\"\ngo mod tidy\n"
  },
  {
    "path": "templates/index.md.tmpl",
    "content": "---\npage_title: \"Provider: ArgoCD\"\ndescription: |-\n  The ArgoCD provider provides lifecycle management of ArgoCD resources.\n---\n\n{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates.\n\nFor example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}}\n\n# ArgoCD Provider\n\nThe ArgoCD Provider provides lifecycle management of [ArgoCD](https://argo-cd.readthedocs.io/en/stable/) resources.\n\n**NB**: The provider is not concerned with the installation/configuration of ArgoCD itself. To make use of the provider, you will need to have an existing ArgoCD installation.\n\nThe correct provider configuration largely depends on whether or not your ArgoCD API server is exposed or not.\n\nIf your ArgoCD API server is exposed, then:\n- use `server_addr` along with a `username`/`password` or `auth_token`.\n- use `use_local_config` if you have (pre)authenticated via the ArgoCD CLI (E.g. via SSO using `argocd login --sso`.\n\nIf you have not exposed your ArgoCD API server or have not deployed the API server ([ArgoCD core](https://argo-cd.readthedocs.io/en/stable/operator-manual/installation/#core)), see below for options. **Note**: in both these cases, you need sufficient access to the Kubernetes API to perform any actions.\n- use `port_forward_with_namespace` and optionally `kubernetes` configuration (to temporarily expose the ArgoCD API server using port forwarding) along with a `username`/`password` or `auth_token`.\n  - if you use port-forwarding and your argo-cd-server is running on plain HTTP you need to add the flag `plain_text = true` to the provider configuration as well\n- use `core` to run a local ArgoCD API server that communicates directly with the Kubernetes API. **NB**: When using `core`, take note of the warning in the docs below.\n\nIf you are struggling to determine the correct configuration for the provider or the provider is behaving strangely and failing to connect for whatever reason, then we would suggest that you first figure out what combination of parameters work to log in using the ArgoCD CLI (`argocd login`) and then set the provider configuration to match what you used in the CLI. See also the ArgoCD [Getting Started](https://argo-cd.readthedocs.io/en/stable/getting_started/#3-access-the-argo-cd-api-server) docs.\n\n## Example Usage\n\n{{tffile \"examples/provider/provider.tf\"}}\n\n<br/>\n\n{{- .SchemaMarkdown | trimspace -}}\n"
  },
  {
    "path": "terraform-registry-manifest.json",
    "content": "{\n    \"version\": 1,\n    \"metadata\": {\n        \"protocol_versions\": [\"6.0\"]\n    }\n}"
  },
  {
    "path": "tools/go.mod",
    "content": "module tools\n\ngo 1.24.0\n\nrequire github.com/hashicorp/terraform-plugin-docs v0.24.0\n\nrequire (\n\tgithub.com/BurntSushi/toml v1.2.1 // indirect\n\tgithub.com/Kunde21/markdownfmt/v3 v3.1.0 // indirect\n\tgithub.com/Masterminds/goutils v1.1.1 // indirect\n\tgithub.com/Masterminds/semver/v3 v3.2.0 // indirect\n\tgithub.com/Masterminds/sprig/v3 v3.2.3 // indirect\n\tgithub.com/ProtonMail/go-crypto v1.1.6 // indirect\n\tgithub.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect\n\tgithub.com/armon/go-radix v1.0.0 // indirect\n\tgithub.com/bgentry/speakeasy v0.1.0 // indirect\n\tgithub.com/bmatcuk/doublestar/v4 v4.9.1 // indirect\n\tgithub.com/cloudflare/circl v1.6.1 // indirect\n\tgithub.com/fatih/color v1.16.0 // indirect\n\tgithub.com/google/uuid v1.3.0 // indirect\n\tgithub.com/hashicorp/cli v1.1.7 // indirect\n\tgithub.com/hashicorp/errwrap v1.1.0 // indirect\n\tgithub.com/hashicorp/go-checkpoint v0.5.0 // indirect\n\tgithub.com/hashicorp/go-cleanhttp v0.5.2 // indirect\n\tgithub.com/hashicorp/go-multierror v1.1.1 // indirect\n\tgithub.com/hashicorp/go-retryablehttp v0.7.7 // indirect\n\tgithub.com/hashicorp/go-uuid v1.0.3 // indirect\n\tgithub.com/hashicorp/go-version v1.7.0 // indirect\n\tgithub.com/hashicorp/hc-install v0.9.2 // indirect\n\tgithub.com/hashicorp/terraform-exec v0.24.0 // indirect\n\tgithub.com/hashicorp/terraform-json v0.27.2 // indirect\n\tgithub.com/huandu/xstrings v1.3.3 // indirect\n\tgithub.com/imdario/mergo v0.3.15 // indirect\n\tgithub.com/mattn/go-colorable v0.1.14 // indirect\n\tgithub.com/mattn/go-isatty v0.0.20 // indirect\n\tgithub.com/mattn/go-runewidth v0.0.15 // indirect\n\tgithub.com/mitchellh/copystructure v1.2.0 // indirect\n\tgithub.com/mitchellh/reflectwalk v1.0.2 // indirect\n\tgithub.com/posener/complete v1.2.3 // indirect\n\tgithub.com/rivo/uniseg v0.4.7 // indirect\n\tgithub.com/shopspring/decimal v1.3.1 // indirect\n\tgithub.com/spf13/cast v1.5.0 // indirect\n\tgithub.com/yuin/goldmark v1.7.7 // indirect\n\tgithub.com/yuin/goldmark-meta v1.1.0 // indirect\n\tgithub.com/zclconf/go-cty v1.17.0 // indirect\n\tgo.abhg.dev/goldmark/frontmatter v0.2.0 // indirect\n\tgolang.org/x/crypto v0.38.0 // indirect\n\tgolang.org/x/exp v0.0.0-20230626212559-97b1e661b5df // indirect\n\tgolang.org/x/mod v0.28.0 // indirect\n\tgolang.org/x/sys v0.36.0 // indirect\n\tgolang.org/x/text v0.30.0 // indirect\n\tgopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect\n\tgopkg.in/yaml.v2 v2.4.0 // indirect\n\tgopkg.in/yaml.v3 v3.0.1 // indirect\n)\n"
  },
  {
    "path": "tools/go.sum",
    "content": "dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk=\ndario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk=\ngithub.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak=\ngithub.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=\ngithub.com/Kunde21/markdownfmt/v3 v3.1.0 h1:KiZu9LKs+wFFBQKhrZJrFZwtLnCCWJahL+S+E/3VnM0=\ngithub.com/Kunde21/markdownfmt/v3 v3.1.0/go.mod h1:tPXN1RTyOzJwhfHoon9wUr4HGYmWgVxSQN6VBJDkrVc=\ngithub.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI=\ngithub.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU=\ngithub.com/Masterminds/semver/v3 v3.2.0 h1:3MEsd0SM6jqZojhjLWWeBY+Kcjy9i6MQAeY7YgDP83g=\ngithub.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ=\ngithub.com/Masterminds/sprig/v3 v3.2.3 h1:eL2fZNezLomi0uOLqjQoN6BfsDD+fyLtgbJMAj9n6YA=\ngithub.com/Masterminds/sprig/v3 v3.2.3/go.mod h1:rXcFaZ2zZbLRJv/xSysmlgIM1u11eBaRMhvYXJNkGuM=\ngithub.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY=\ngithub.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=\ngithub.com/ProtonMail/go-crypto v1.1.6 h1:ZcV+Ropw6Qn0AX9brlQLAUXfqLBc7Bl+f/DmNxpLfdw=\ngithub.com/ProtonMail/go-crypto v1.1.6/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE=\ngithub.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew1u1fNQOlOtuGxQY=\ngithub.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4=\ngithub.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI=\ngithub.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=\ngithub.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY=\ngithub.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=\ngithub.com/bmatcuk/doublestar/v4 v4.9.1 h1:X8jg9rRZmJd4yRy7ZeNDRnM+T3ZfHv15JiBJ/avrEXE=\ngithub.com/bmatcuk/doublestar/v4 v4.9.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc=\ngithub.com/cloudflare/circl v1.6.1 h1:zqIqSPIndyBh1bjLVVDHMPpVKqp8Su/V+6MeDzzQBQ0=\ngithub.com/cloudflare/circl v1.6.1/go.mod h1:uddAzsPgqdMAYatqJ0lsjX1oECcQLIlRpzZh3pJrofs=\ngithub.com/cyphar/filepath-securejoin v0.4.1 h1:JyxxyPEaktOD+GAnqIqTf9A8tHyAG22rowi7HkoSU1s=\ngithub.com/cyphar/filepath-securejoin v0.4.1/go.mod h1:Sdj7gXlvMcPZsbhwhQ33GguGLDGQL7h7bg04C/+u9jI=\ngithub.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=\ngithub.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=\ngithub.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=\ngithub.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc=\ngithub.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ=\ngithub.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=\ngithub.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE=\ngithub.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE=\ngithub.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps=\ngithub.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI=\ngithub.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic=\ngithub.com/go-git/go-billy/v5 v5.6.2 h1:6Q86EsPXMa7c3YZ3aLAQsMA0VlWmy43r6FHqa/UNbRM=\ngithub.com/go-git/go-billy/v5 v5.6.2/go.mod h1:rcFC2rAsp/erv7CMz9GczHcuD0D32fWzH+MJAU+jaUU=\ngithub.com/go-git/go-git/v5 v5.14.0 h1:/MD3lCrGjCen5WfEAzKg00MJJffKhC8gzS80ycmCi60=\ngithub.com/go-git/go-git/v5 v5.14.0/go.mod h1:Z5Xhoia5PcWA3NF8vRLURn9E5FRhSl7dGj9ItW3Wk5k=\ngithub.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 h1:f+oWsMOmNPc8JmEHVZIycC7hBoQxHH9pNKQORJNozsQ=\ngithub.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8/go.mod h1:wcDNUvekVysuuOpQKo3191zZyTpiI6se1N1ULghS0sw=\ngithub.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=\ngithub.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=\ngithub.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=\ngithub.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=\ngithub.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=\ngithub.com/hashicorp/cli v1.1.7 h1:/fZJ+hNdwfTSfsxMBa9WWMlfjUZbX8/LnUxgAd7lCVU=\ngithub.com/hashicorp/cli v1.1.7/go.mod h1:e6Mfpga9OCT1vqzFuoGZiiF/KaG9CbUfO5s3ghU3YgU=\ngithub.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=\ngithub.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I=\ngithub.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=\ngithub.com/hashicorp/go-checkpoint v0.5.0 h1:MFYpPZCnQqQTE18jFwSII6eUQrD/oxMFp3mlgcqk5mU=\ngithub.com/hashicorp/go-checkpoint v0.5.0/go.mod h1:7nfLNL10NsxqO4iWuW6tWW0HjZuDrwkBuEQsVcpCOgg=\ngithub.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=\ngithub.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ=\ngithub.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=\ngithub.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k=\ngithub.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M=\ngithub.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=\ngithub.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=\ngithub.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=\ngithub.com/hashicorp/go-retryablehttp v0.7.7 h1:C8hUCYzor8PIfXHa4UrZkU4VvK8o9ISHxT2Q8+VepXU=\ngithub.com/hashicorp/go-retryablehttp v0.7.7/go.mod h1:pkQpWZeYWskR+D1tR2O5OcBFOxfA7DoAO6xtkuQnHTk=\ngithub.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=\ngithub.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8=\ngithub.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=\ngithub.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY=\ngithub.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=\ngithub.com/hashicorp/hc-install v0.9.2 h1:v80EtNX4fCVHqzL9Lg/2xkp62bbvQMnvPQ0G+OmtO24=\ngithub.com/hashicorp/hc-install v0.9.2/go.mod h1:XUqBQNnuT4RsxoxiM9ZaUk0NX8hi2h+Lb6/c0OZnC/I=\ngithub.com/hashicorp/terraform-exec v0.24.0 h1:mL0xlk9H5g2bn0pPF6JQZk5YlByqSqrO5VoaNtAf8OE=\ngithub.com/hashicorp/terraform-exec v0.24.0/go.mod h1:lluc/rDYfAhYdslLJQg3J0oDqo88oGQAdHR+wDqFvo4=\ngithub.com/hashicorp/terraform-json v0.27.2 h1:BwGuzM6iUPqf9JYM/Z4AF1OJ5VVJEEzoKST/tRDBJKU=\ngithub.com/hashicorp/terraform-json v0.27.2/go.mod h1:GzPLJ1PLdUG5xL6xn1OXWIjteQRT2CNT9o/6A9mi9hE=\ngithub.com/hashicorp/terraform-plugin-docs v0.24.0 h1:YNZYd+8cpYclQyXbl1EEngbld8w7/LPOm99GD5nikIU=\ngithub.com/hashicorp/terraform-plugin-docs v0.24.0/go.mod h1:YLg+7LEwVmRuJc0EuCw0SPLxuQXw5mW8iJ5ml/kvi+o=\ngithub.com/huandu/xstrings v1.3.3 h1:/Gcsuc1x8JVbJ9/rlye4xZnVAbEkGauT8lbebqcQws4=\ngithub.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=\ngithub.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=\ngithub.com/imdario/mergo v0.3.15 h1:M8XP7IuFNsqUx6VPK2P9OSmsYsI/YFaGil0uD21V3dM=\ngithub.com/imdario/mergo v0.3.15/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY=\ngithub.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A=\ngithub.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo=\ngithub.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4=\ngithub.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM=\ngithub.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=\ngithub.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=\ngithub.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk=\ngithub.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=\ngithub.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=\ngithub.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=\ngithub.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=\ngithub.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE=\ngithub.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=\ngithub.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=\ngithub.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=\ngithub.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U=\ngithub.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=\ngithub.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw=\ngithub.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw=\ngithub.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s=\ngithub.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=\ngithub.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ=\ngithub.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=\ngithub.com/pjbgf/sha1cd v0.3.2 h1:a9wb0bp1oC2TGwStyn0Umc/IGKQnEgF0vVaZ8QF8eo4=\ngithub.com/pjbgf/sha1cd v0.3.2/go.mod h1:zQWigSxVmsHEZow5qaLtPYxpcKMMQpa09ixqBxuCS6A=\ngithub.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=\ngithub.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=\ngithub.com/posener/complete v1.2.3 h1:NP0eAhjcjImqslEwo/1hq7gpajME0fTLTezBKDqfXqo=\ngithub.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s=\ngithub.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=\ngithub.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=\ngithub.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=\ngithub.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=\ngithub.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=\ngithub.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8=\ngithub.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4=\ngithub.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=\ngithub.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8=\ngithub.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=\ngithub.com/skeema/knownhosts v1.3.1 h1:X2osQ+RAjK76shCbvhHHHVl3ZlgDm8apHEHFqRjnBY8=\ngithub.com/skeema/knownhosts v1.3.1/go.mod h1:r7KTdC8l4uxWRyK2TpQZ/1o5HaSzh06ePQNxPwTcfiY=\ngithub.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=\ngithub.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w=\ngithub.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU=\ngithub.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=\ngithub.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=\ngithub.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=\ngithub.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=\ngithub.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=\ngithub.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=\ngithub.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM=\ngithub.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw=\ngithub.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=\ngithub.com/yuin/goldmark v1.7.7 h1:5m9rrB1sW3JUMToKFQfb+FGt1U7r57IHu5GrYrG2nqU=\ngithub.com/yuin/goldmark v1.7.7/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E=\ngithub.com/yuin/goldmark-meta v1.1.0 h1:pWw+JLHGZe8Rk0EGsMVssiNb/AaPMHfSRszZeUeiOUc=\ngithub.com/yuin/goldmark-meta v1.1.0/go.mod h1:U4spWENafuA7Zyg+Lj5RqK/MF+ovMYtBvXi1lBb2VP0=\ngithub.com/zclconf/go-cty v1.17.0 h1:seZvECve6XX4tmnvRzWtJNHdscMtYEx5R7bnnVyd/d0=\ngithub.com/zclconf/go-cty v1.17.0/go.mod h1:wqFzcImaLTI6A5HfsRwB0nj5n0MRZFwmey8YoFPPs3U=\ngo.abhg.dev/goldmark/frontmatter v0.2.0 h1:P8kPG0YkL12+aYk2yU3xHv4tcXzeVnN+gU0tJ5JnxRw=\ngo.abhg.dev/goldmark/frontmatter v0.2.0/go.mod h1:XqrEkZuM57djk7zrlRUB02x8I5J0px76YjkOzhB4YlU=\ngolang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=\ngolang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=\ngolang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=\ngolang.org/x/crypto v0.38.0 h1:jt+WWG8IZlBnVbomuhg2Mdq0+BBQaHbtqHEFEigjUV8=\ngolang.org/x/crypto v0.38.0/go.mod h1:MvrbAqul58NNYPKnOra203SB9vpuZW0e+RRZV+Ggqjw=\ngolang.org/x/exp v0.0.0-20230626212559-97b1e661b5df h1:UA2aFVmmsIlefxMk29Dp2juaUSth8Pyn3Tq5Y5mJGME=\ngolang.org/x/exp v0.0.0-20230626212559-97b1e661b5df/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc=\ngolang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=\ngolang.org/x/mod v0.28.0 h1:gQBtGhjxykdjY9YhZpSlZIsbnaE2+PgjfLWUQTnoZ1U=\ngolang.org/x/mod v0.28.0/go.mod h1:yfB/L0NOf/kmEbXjzCPOx1iK1fRutOydrCMsqRhEBxI=\ngolang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=\ngolang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=\ngolang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=\ngolang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8=\ngolang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=\ngolang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.36.0 h1:KVRy2GtZBrk1cBYA7MKu5bEZFxQk4NIDV6RLVcC8o0k=\ngolang.org/x/sys v0.36.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=\ngolang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=\ngolang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=\ngolang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=\ngolang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=\ngolang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=\ngolang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=\ngolang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=\ngolang.org/x/text v0.30.0 h1:yznKA/E9zq54KzlzBEAWn1NXSQ8DIp/NYMy88xJjl4k=\ngolang.org/x/text v0.30.0/go.mod h1:yDdHFIX9t+tORqspjENWgzaCVXgk0yYnYuSZ8UzzBVM=\ngolang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=\ngolang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=\ngolang.org/x/tools v0.37.0 h1:DVSRzp7FwePZW356yEAChSdNcQo6Nsp+fex1SUW09lE=\ngolang.org/x/tools v0.37.0/go.mod h1:MBN5QPQtLMHVdvsbtarmTNukZDdgwdwlO5qGacAzF0w=\ngolang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=\ngopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=\ngopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=\ngopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=\ngopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME=\ngopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=\ngopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=\ngopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=\ngopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=\ngopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=\n"
  },
  {
    "path": "tools/tools.go",
    "content": "//go:build generate\n\npackage tools\n\nimport (\n\t_ \"github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs\"\n)\n\n// Format Terraform code for use in documentation.\n// If you do not have Terraform installed, you can remove the formatting command, but it is suggested\n// to ensure the documentation is formatted properly.\n//go:generate terraform fmt -recursive ../examples/\n\n// Generate documentation.\n//go:generate go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs generate --provider-dir .. -provider-name terraform-provider-argocd\n"
  }
]