Skip to content

While creating appproject how we can add finalizers in the argocd_project resource #404

@Sudhanshu-Saurav

Description

@Sudhanshu-Saurav
Terraform version:1.7.1
ArgoCD provider version: 6.1.1
ArgoCD version: 2.11.3

Terraform configuration

# Enter your configuration here.
resource "argocd_project" "argocd_appproject" {
  metadata {
    name      = join("-",[var.namespace,"appproject"]) 
    namespace = "argocd"
    finalizers = ["resources-finalizer.argocd.argoproj.io"]
  }
   spec {
    description = "Project for ${var.namespace}"
    source_repos = [var.gitops_source_repo]
    destinations {
      namespace   = var.namespace
      server      = "https://kubernetes.default.svc"
    }
    orphaned_resources {
      warn = true
    }
  }
} 

Question

This does not allow me to create appproject saying

➜ Test terraform plan

╷
│ Error: Unsupported argument
│ 
│   on main.tf line 17, in resource "argocd_project" "argocd_appproject":
│   17:     finalizers = ["resources-finalizer.argocd.argoproj.io"]
│ 
│ An argument named "finalizers" is not expected here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    on-holdIssues or Pull Requests with this label will never be considered stalequestionIndicates this issue is a question instead of a bug or feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions