Support creation of project scoped argocd repositories and clusters
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
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