terraform-provider-argocd icon indicating copy to clipboard operation
terraform-provider-argocd copied to clipboard

Support creation of project scoped argocd repositories and clusters

Open felipem1210 opened this issue 3 years ago • 1 comments

Since argocd v2.2.0 there is the possibility to add clusters and repositories project scoped, using the --project flag, when using the cli, for example:

ARGOCD_AUTH_TOKEN=my-project-token argocd repo add --name stable https://gitlab.com/myrepo.git --type git --project my-project

I see that using the provider to create the repository there is no option to pass the project.

The proposal is to add something like this in the repository resource:

resource "argocd_repository" "myrepo" {
  repo = "https://gitlab.com/myrepo.git"
  name = "my-repo"
  type = "git"
  project = "my-project"
}

So if project argument is passed create the repository project scoped based.

This same can be applied for clusters

felipem1210 avatar May 27 '22 00:05 felipem1210

I created a PR for this, but don't know how to implement a test. Is it required? https://github.com/oboukili/terraform-provider-argocd/pull/189

felipem1210 avatar Jun 03 '22 12:06 felipem1210