terraform-provider-artifactory
terraform-provider-artifactory copied to clipboard
Support detecting wrong resource configuration in stage "terraform plan"
Is your feature request related to a problem? Please describe.
When the resource configuration is wrong, the command "terraform plan" should report error message.
- Such as when we want to create two duplicate users in Artifactory, and the wrong main.tf is:
`terraform { required_providers { artifactory = { source = "jfrog/artifactory" version = "10.7.4" } } }
provider "artifactory" { url = "http://localhost:8082/artifactory" access_token = "xxxxx"
}
resource "artifactory_user" "example_user2" { name = "user2" email = "[email protected]" admin = false groups = [ "readers" ] } resource "artifactory_user" "example_user3" { name = "user2" email = "[email protected]" admin = false groups = [ "readers" ] }`
- Then, we execute the command:
terraform plan
- The response is normal (It should be wrong due to the username is duplicate):
Describe the solution you'd like The response should report an error such as "Error: Unable to Create Resource due to the user is duplicate"
$ terraform -v Terraform v1.8.3 on darwin_amd64 provider registry.terraform.io/jfrog/artifactory v10.7.4