Skip terraform resource if it exists



  • I'm Getting an error creating a secret because it was created manually.

    Error: error creating Secrets Manager Secret: ResourceExistsException: The operation failed because the secret  already exists.
    

    Is there any way to tell Terraform to skip creating a resource if it already exists ?



  • No there is no way to tell Terraform to skip creating a resource if it already exists.

    Is there a reason why you want to skip resource creation? Why not import the existing resource into Terraform state file so it doesn't try to create the resource that already exists?

    You could provide more background information for this.


Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2