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

v0.12: Resource timeouts being ignored on destroy operations #21528

Closed
alexng-canuck opened this issue May 30, 2019 · 5 comments · Fixed by #21611
Closed

v0.12: Resource timeouts being ignored on destroy operations #21528

alexng-canuck opened this issue May 30, 2019 · 5 comments · Fixed by #21611

Comments

@alexng-canuck
Copy link

alexng-canuck commented May 30, 2019

Terraform Version

terraform version is 0.12.0
provider is based on plugin SDK version 0.12.0-rc1

Terraform Configuration Files

resource oci_core_instance instance {
   timeouts {
    create = "60m"
    delete = "60m"
    update = "60m"
  }
}

Debug Output

Crash Output

Expected Behavior

On Delete calls, the provider calls into ResourceData.Timeout(schema.TimeoutDelete) and expects to get 60 minutes time value back.

This works in v0.11.7 plugin SDKs

Actual Behavior

The ResourceData.Timeout(schema.TimeoutDelete) is returning a default timeout value instead (20m).

Steps to Reproduce

This was found on running acceptance tests, but a simple terraform destroy should be able to repro this.

Additional Context

On Create calls, the timeout values are correct. This seems to only affect Delete operations.

Timeout values that are specified in the resource schema are also ignored even if timeouts block is removed from config. For example, if my resource has the following schema it will still return the default of 20m.

&schema.Resource{
		Timeouts: &schema.ResourceTimeout{
			Create: &OneHour,
			Update: &OneHour,
			Delete: &OneHour,
		},

References

@danawillow
Copy link
Contributor

@jbardin, is it possible there's another place where a fix needs to be made? I vendored 0.12.2 into the Google provider yesterday, but I'm still seeing tests fail due to delete timeouts- here's an example: https://ci-oss.hashicorp.engineering/repository/download/GoogleCloud_ProviderGoogleCloudGoogleProject/61683:id/debug-google-770e78c-TestAccContainerCluster_errorCleanDanglingCluster.log (the delete timeout for container clusters is 30m, but the test timed out after 20m)

@jbardin
Copy link
Member

jbardin commented Jun 19, 2019

Thanks @danawillow! I've replicated the case where individual resource provided defaults are being lost at some point in their lifecycle.

@jbardin
Copy link
Member

jbardin commented Jun 20, 2019

Thanks again @danawillow! I merged #21814 which catches the case I think you were hitting.

@danawillow
Copy link
Contributor

🙌 thanks for the speedy resolution, @jbardin!

@ghost
Copy link

ghost commented Jul 25, 2019

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.

@ghost ghost locked and limited conversation to collaborators Jul 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants