Skip to content

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

@alexng-canuck

Description

@alexng-canuck

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions