Skip to content
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

Handle deletion of already deleted or never created resources #89

Merged
merged 5 commits into from
Aug 21, 2018
Merged

Handle deletion of already deleted or never created resources #89

merged 5 commits into from
Aug 21, 2018

Conversation

lanej
Copy link
Contributor

@lanej lanej commented Aug 21, 2018

Detect a not found response with the resource deletion conditions and consider a not found response a success condition.

lanej added 4 commits August 20, 2018 15:50
```
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test $(go list ./... |grep -v 'vendor') -v -run updateInvalidBackend -timeout 120m
?   	github.com/terraform-providers/terraform-provider-fastly	[no test files]
=== RUN   TestAccFastlyServiceV1_updateInvalidBackend
--- FAIL: TestAccFastlyServiceV1_updateInvalidBackend (3.12s)
	testing.go:434: Step 1 error: Error applying: 1 error(s) occurred:

		* fastly_service_v1.foo: 1 error(s) occurred:

		* fastly_service_v1.foo: 404 - Not Found:

		    Title:  Record not found
		    Detail: Couldn't find Backend '{ version => 1, name => tf -test backend, deleted => 0000-00-00 00:00:00, service => 8qUQLdspTiy27v2fmabKZ }'
FAIL
FAIL	github.com/terraform-providers/terraform-provider-fastly/fastly	3.137s
```
Support seamless recovery from an invalid domain name.  This is made
difficult due to the lack of domain tracking as an independent resource.
Otherwise, we could detect the presence of a domain ID that would be set
after successful creation.
Receiving a 404 when deleting a resource is a success condition.
Copy link
Member

@thommahoney thommahoney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@thommahoney thommahoney merged commit 3e42a54 into fastly:master Aug 21, 2018
@lanej lanej deleted the lanej/domain-partial branch August 21, 2018 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants