Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error on spec.generator.matrix.template #359

Open
josh-mcq opened this issue Dec 22, 2023 · 0 comments
Open

error on spec.generator.matrix.template #359

josh-mcq opened this issue Dec 22, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@josh-mcq
Copy link

josh-mcq commented Dec 22, 2023

Terraform Version, ArgoCD Provider Version and ArgoCD Version

Terraform version: Terraform v1.6.6
ArgoCD provider version: "6.0.3"
ArgoCD version: 

Affected Resource(s)

argocd_applications_set

Terraform Configuration Files

# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. For
# security, you can also encrypt the files using our GPG public key.
resource "argocd_application_set" "cluster_addons" {
  metadata {
    name      = "cluster-addons"
    namespace = "argocd"
  }

  spec {
    go_template = true
    generator {
      matrix {
       # adding template below results in a plugin error
        template {
          spec {
            project = "project-name-override"
          }
        }
        generator {
          clusters {
            selector {
              match_labels = {
                external = "true"
              }
            }
          }
        }
	generator {
          list {
            elements = [
              {
                name = "app1"
                project = "guestbook"
              }
            ]
          }
        }
      }
    }

    template {
      metadata {
        name = "{{ .chart_name }}"
      }

      spec {
        source {
          repo_url        = "https://github.com/argoproj/argo-cd.git"
          target_revision = "HEAD"
	  path            = "applicationset/examples/list-generator/guestbook/{{.cluster}}"
        }

        destination {
          server    = "{{ .server }}"
          namespace = "guestbook"
        }

      }
    }
  }
}

Debug Output

https://gist.github.com/josh-mcq/3747c24dd600832514df3614040d24d6

Panic Output

Steps to Reproduce

terraform apply

Expected Behavior

According to documentation, a template block should be allowed at spec.generator.matrix.

Actual Behavior

When a template block is added, the error described here occurs opon apply.

Important Factoids

References

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant