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

Resource-level customizable timeouts not being respected #22810

Closed
ewbankkit opened this issue Sep 16, 2019 · 5 comments · Fixed by #22837
Closed

Resource-level customizable timeouts not being respected #22810

ewbankkit opened this issue Sep 16, 2019 · 5 comments · Fixed by #22837
Labels

Comments

@ewbankkit
Copy link
Contributor

Terraform Version

$ terraform version
Terraform v0.12.8

While working on hashicorp/terraform-provider-aws#10114 I upped the Delete timeout on the aws_security_group resource to 30 minutes.
However during testing I found that the timeout fires at the default value of 20 minutes.

Looking at the Terraform state files for the resource I see that with v0.11.10 the customized values are persisted but with v0.12.8 the timeouts attribute value is null:

Terraform 0.11.10:

"resources": {
    "aws_security_group.example": {
        "type": "aws_security_group",
        "primary": {
            "meta": {
                "e2bfb730-ecaa-11e6-8f88-34363bc7c4c0": {
                    "create": 600000000000,
                    "delete": 1800000000000
                },
                "schema_version": "1"
            },
        }
    }
}

Terraform 0.12.8:

"resources": [{
    "mode": "managed",
    "type": "aws_security_group",
    "name": "example",
    "instances": [
    {
        "schema_version": 1,
        "attributes": {
        "timeouts": null,
        }
    }
    ]
}]
@jbardin
Copy link
Member

jbardin commented Sep 16, 2019

Hi @ewbankkit,

Can you show the configuration and steps you're using that results in not having a timeout value?
The defaults are not expected to be stored in the state, and are inserted when creating the resource data.

@jbardin jbardin added the waiting-response An issue/pull request is waiting for a response from the community label Sep 16, 2019
@obourdon
Copy link

@jbardin as @ewbankkit mentioned, we are working on PR #10114 in terraform-providers/terraform-provider-aws to solve issue #10044 in terraform-providers/terraform-provider-aws

Note that this issue only occurs in AWS regions where new AWS lambda mechanism for
improving VPC performance
has been pushed, in my case eu-west-1 and eu-central-1

When running the AWS provider acceptance tests in these region, the delete timeout of was security group has been moved up over 20mn and also here. However somehow these get reset to the default 20mn timeout

HTH

@ghost ghost removed the waiting-response An issue/pull request is waiting for a response from the community label Sep 17, 2019
@jbardin
Copy link
Member

jbardin commented Sep 17, 2019

Thanks @obourdon,

The "timeouts" field in the state is only representative of the configuration values. Terraform core isn't aware of the default values, as those are looked up at runtime by the provider SDK. The provider SDK does encode the timeouts into the "private" field for later reference however. There was an issue with delete timeout values being lost at one point, but that should only show up with an old AWS provider as it's been fixed for a few months.

The tests we have for this persist both the config values as well as the defaults, so I'm not sure where they are being lost in the AWS provider tests. Does this happen from the command line as well, or is it just in the acceptance tests?

@ewbankkit
Copy link
Contributor Author

@jbardin We noticed this whilst running provider acceptance tests.

@ghost
Copy link

ghost commented Oct 26, 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 Oct 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants