hashicorp / terraform-provider-chef

Terraform Chef provider
https://www.terraform.io/docs/providers/chef/
Mozilla Public License 2.0
12 stars 34 forks source link

Missing Delete Action for Chef Environment Provider #5

Open hashibot opened 7 years ago

hashibot commented 7 years ago

This issue was originally opened by @rb1whitney as hashicorp/terraform#11805. It was migrated here as part of the provider split. The original body of the issue is below.


I am requesting that we add the missing delete function for chef_environment. Per the code in: https://github.com/hashicorp/terraform/blob/master/vendor/github.com/go-chef/chef/environment.go, there is mention of a delete function. Is it possible to have this missing feature implemented? When you provision a chef_environment with chef nodes, the chef environment sticks around and causes issues if the environment is re-created. I was able to monkey patch this issue locally by just copying the logic from client.go and renaming client to environment (to hit the right rest api for chef) and would like to see it fixed in future versions if possible.

Terraform Version

0.8.6

Affected Resource(s)

Please list the resources as a list, for example:

Expected Behavior

Chef Environment should be able to delete resource when calling terraform destroy

Actual Behavior

Nothing happens since chef_environment is missing a delete function

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply
  2. terraform destroy

References

None

hynd commented 6 years ago

Destroying a chef_environment works as expected for me.

$ terraform version
Terraform v0.11.4
+ provider.chef v0.1.0