-
Notifications
You must be signed in to change notification settings - Fork 9.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to destroy logentries_logset and logentries_log that have already been deleted #13805
Comments
Fixes: #13805 Before the fix: ``` Error refreshing state: 1 error(s) occurred: * logentries_logset.logset: logentries_logset.logset: No such log set with key 278e7344-1201-43ba-9804-77b9a72fe7d6 ``` After the fix: ``` % terraform plan ✚ ✭ [WARN] /Users/stacko/Code/go/bin/terraform-provider-logentries overrides an internal plugin for logentries-provider. If you did not expect to see this message you will need to remove the old plugin. See https://www.terraform.io/docs/internals/internal-plugins.html Refreshing Terraform state in-memory prior to plan... The refreshed state will be used to calculate this plan, but will not be persisted to local or remote state storage. logentries_logset.logset: Refreshing state... (ID: 278e7344-...a72fe7d6) logentries_log.log: Refreshing state... (ID: 2ae1e8ae-...e932d25c) The Terraform execution plan has been generated and is shown below. Resources are shown in alphabetical order for quick scanning. Green resources will be created (or destroyed and then created if an existing resource exists), yellow resources are being changed in-place, and red resources will be destroyed. Cyan entries are data sources to be read. Note: You didn't specify an "-out" parameter to save this plan, so when "apply" is called, Terraform can't guarantee this is what will execute. + logentries_log.log logset_id: "${logentries_logset.logset.id}" name: "test-log" retention_period: "ACCOUNT_DEFAULT" source: "token" token: "<computed>" + logentries_logset.logset location: "nonlocation" name: "testing-terraform-destroy" Plan: 2 to add, 0 to change, 0 to destroy. ``` Test Run: ``` % make testacc TEST=./builtin/providers/logentries ✚ ✭ ==> Checking that code complies with gofmt requirements... go generate $(go list ./... | grep -v /terraform/vendor/) 2017/04/20 20:36:20 Generated command/internal_plugin_list.go TF_ACC=1 go test ./builtin/providers/logentries -v -timeout 120m === RUN TestProvider --- PASS: TestProvider (0.00s) === RUN TestProvider_impl --- PASS: TestProvider_impl (0.00s) === RUN TestAccLogentriesLog_Token --- PASS: TestAccLogentriesLog_Token (39.03s) === RUN TestAccLogentriesLog_SourceApi --- PASS: TestAccLogentriesLog_SourceApi (28.46s) === RUN TestAccLogentriesLog_SourceAgent --- PASS: TestAccLogentriesLog_SourceAgent (6.19s) === RUN TestAccLogentriesLog_RetentionPeriod1M --- PASS: TestAccLogentriesLog_RetentionPeriod1M (3.04s) === RUN TestAccLogentriesLog_RetentionPeriodAccountDefault --- PASS: TestAccLogentriesLog_RetentionPeriodAccountDefault (2.71s) === RUN TestAccLogentriesLog_RetentionPeriodAccountUnlimited --- PASS: TestAccLogentriesLog_RetentionPeriodAccountUnlimited (2.65s) === RUN TestAccLogentriesLogSet_Basic --- PASS: TestAccLogentriesLogSet_Basic (1.54s) === RUN TestAccLogentriesLogSet_NoLocation --- PASS: TestAccLogentriesLogSet_NoLocation (1.54s) PASS ok github.com/hashicorp/terraform/builtin/providers/logentries 85.177s ```
Hi @fillup Apologies for the error here - this has been resolved (in the linked PR) and will be part of Terraform 0.9.4 Thanks Paul |
) Fixes: #13805 Before the fix: ``` Error refreshing state: 1 error(s) occurred: * logentries_logset.logset: logentries_logset.logset: No such log set with key 278e7344-1201-43ba-9804-77b9a72fe7d6 ``` After the fix: ``` % terraform plan ✚ ✭ [WARN] /Users/stacko/Code/go/bin/terraform-provider-logentries overrides an internal plugin for logentries-provider. If you did not expect to see this message you will need to remove the old plugin. See https://www.terraform.io/docs/internals/internal-plugins.html Refreshing Terraform state in-memory prior to plan... The refreshed state will be used to calculate this plan, but will not be persisted to local or remote state storage. logentries_logset.logset: Refreshing state... (ID: 278e7344-...a72fe7d6) logentries_log.log: Refreshing state... (ID: 2ae1e8ae-...e932d25c) The Terraform execution plan has been generated and is shown below. Resources are shown in alphabetical order for quick scanning. Green resources will be created (or destroyed and then created if an existing resource exists), yellow resources are being changed in-place, and red resources will be destroyed. Cyan entries are data sources to be read. Note: You didn't specify an "-out" parameter to save this plan, so when "apply" is called, Terraform can't guarantee this is what will execute. + logentries_log.log logset_id: "${logentries_logset.logset.id}" name: "test-log" retention_period: "ACCOUNT_DEFAULT" source: "token" token: "<computed>" + logentries_logset.logset location: "nonlocation" name: "testing-terraform-destroy" Plan: 2 to add, 0 to change, 0 to destroy. ``` Test Run: ``` % make testacc TEST=./builtin/providers/logentries ✚ ✭ ==> Checking that code complies with gofmt requirements... go generate $(go list ./... | grep -v /terraform/vendor/) 2017/04/20 20:36:20 Generated command/internal_plugin_list.go TF_ACC=1 go test ./builtin/providers/logentries -v -timeout 120m === RUN TestProvider --- PASS: TestProvider (0.00s) === RUN TestProvider_impl --- PASS: TestProvider_impl (0.00s) === RUN TestAccLogentriesLog_Token --- PASS: TestAccLogentriesLog_Token (39.03s) === RUN TestAccLogentriesLog_SourceApi --- PASS: TestAccLogentriesLog_SourceApi (28.46s) === RUN TestAccLogentriesLog_SourceAgent --- PASS: TestAccLogentriesLog_SourceAgent (6.19s) === RUN TestAccLogentriesLog_RetentionPeriod1M --- PASS: TestAccLogentriesLog_RetentionPeriod1M (3.04s) === RUN TestAccLogentriesLog_RetentionPeriodAccountDefault --- PASS: TestAccLogentriesLog_RetentionPeriodAccountDefault (2.71s) === RUN TestAccLogentriesLog_RetentionPeriodAccountUnlimited --- PASS: TestAccLogentriesLog_RetentionPeriodAccountUnlimited (2.65s) === RUN TestAccLogentriesLogSet_Basic --- PASS: TestAccLogentriesLogSet_Basic (1.54s) === RUN TestAccLogentriesLogSet_NoLocation --- PASS: TestAccLogentriesLogSet_NoLocation (1.54s) PASS ok github.com/hashicorp/terraform/builtin/providers/logentries 85.177s ```
Wow, that was fast, thank you! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Terraform Version
v0.9.3
Affected Resource(s)
Terraform Configuration Files
Debug Output
https://gist.github.com/fillup/f57874134bd4031790200e2edcbb2c5f
Expected Behavior
Terraform should determine resource is already in desired state (destroyed) and complete destroy successfully.
Actual Behavior
Destroy fails with error that resource cannot be found.
Steps to Reproduce
terraform apply
terraform destroy
- Watch for failureImportant Factoids
I discovered this problem because a destroy on a larger set of resources failed part way through, but after destroying the logentries set and then on subsequent runs of destroy it would fail because it could not find the log set.
References
GH-5876 looks really similar although for a different resource.
The text was updated successfully, but these errors were encountered: