Terraform should return an error message (e.g. 'actions block cannot be empty') and exit 'gracefully'.
OR
Terraform should omit the empty actions block.
Actual Behavior
Terraform panics and crashes.
Steps to Reproduce
Create a config file like the one shown above with an empty actions block.
terraform apply
Additional Context
This crash is an outcome of me playing with dynamic blocks like so:
actions {
dynamic "users" {
for_each...
}
}
}
If I don't specify any users or groups, the result is an empty actions block. I will get around this by making actions dynamic as well, but ultimately Terraform crashed so I'm reporting it.
Community Note
Terraform Version
Terraform v0.12.21 terraform-provider-artifactory 2.0.0-alpha1
Affected Resource(s)
Terraform Configuration Files
Panic Output
https://gist.github.com/kubiak95/4d9650bdb47a481b7d58128fdc7ea256
Expected Behavior
actions
block.Actual Behavior
Terraform panics and crashes.
Steps to Reproduce
actions
block.terraform apply
Additional Context
This crash is an outcome of me playing with dynamic blocks like so:
If I don't specify any users or groups, the result is an empty
actions
block. I will get around this by making actions dynamic as well, but ultimately Terraform crashed so I'm reporting it.References
hashicorp/terraform#24098