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

ec2: Allow customizable timeouts for various resources and data sources #26121

Merged
merged 10 commits into from
Aug 4, 2022

Conversation

YakDriver
Copy link
Member

@YakDriver YakDriver commented Aug 3, 2022

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Closes #26026
Closes #11342
Closes #16500
Closes #15921

Output from acceptance testing:

% make testacc TESTS=TestAccEC2InstanceDataSource_timeout PKG=ec2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccEC2InstanceDataSource_timeout'  -timeout 180m
--- PASS: TestAccEC2InstanceDataSource_timeout (125.24s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ec2	126.925s
% make testacc TESTS=TestAccEC2InstancesDataSource_timeout PKG=ec2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccEC2InstancesDataSource_timeout'  -timeout 180m
--- PASS: TestAccEC2InstancesDataSource_timeout (122.64s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ec2	124.032s

@github-actions github-actions bot added size/XL Managed by automation to categorize the size of a PR. service/ec2 Issues and PRs that pertain to the ec2 service. service/ec2ebs Issues and PRs that pertain to the ec2ebs service. service/ec2outposts Issues and PRs that pertain to the ec2outposts service. service/ipam Issues and PRs that pertain to the ipam service. service/transitgateway Issues and PRs that pertain to the transitgateway service. service/vpc Issues and PRs that pertain to the vpc service. service/vpnclient Issues and PRs that pertain to the vpnclient service. service/vpnsite Issues and PRs that pertain to the vpnsite service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Aug 3, 2022
@github-actions github-actions bot added documentation Introduces or discusses updates to documentation. service/elbv2 Issues and PRs that pertain to the elbv2 service. service/s3 Issues and PRs that pertain to the s3 service. skaff Issues and pull requested related to the skaff tool labels Aug 3, 2022
@YakDriver YakDriver changed the title ec2: Allow customizable timeouts for data sources ec2: Allow customizable timeouts for various resources and data sources Aug 3, 2022
@github-actions github-actions bot added the repository Repository modifications; GitHub Actions, developer docs, issue templates, codeowners, changelog. label Aug 4, 2022
@github-actions github-actions bot added service/account Issues and PRs that pertain to the account service. service/acm Issues and PRs that pertain to the acm service. service/acmpca Issues and PRs that pertain to the acmpca service. service/apigatewayv2 Issues and PRs that pertain to the apigatewayv2 service. labels Aug 4, 2022
@github-actions github-actions bot added service/lexmodels Issues and PRs that pertain to the lexmodels service. service/lightsail Issues and PRs that pertain to the lightsail service. service/location Issues and PRs that pertain to the location service. service/memorydb Issues and PRs that pertain to the memorydb service. service/neptune Issues and PRs that pertain to the neptune service. service/opensearch Issues and PRs that pertain to the opensearch service. service/opsworks Issues and PRs that pertain to the opsworks service. service/rds Issues and PRs that pertain to the rds service. service/redshift Issues and PRs that pertain to the redshift service. service/route53domains Issues and PRs that pertain to the route53domains service. service/route53resolver Issues and PRs that pertain to the route53resolver service. service/route53recoveryreadiness Issues and PRs that pertain to the route53recoveryreadiness service. service/s3control Issues and PRs that pertain to the s3control service. service/servicecatalog Issues and PRs that pertain to the servicecatalog service. service/ses Issues and PRs that pertain to the ses service. service/storagegateway Issues and PRs that pertain to the storagegateway service. service/transcribe Issues and PRs that pertain to the transcribe service. service/workspaces Issues and PRs that pertain to the workspaces service. labels Aug 4, 2022
@YakDriver YakDriver merged commit 7bad42c into main Aug 4, 2022
@YakDriver YakDriver deleted the f-instances-data-source-to branch August 4, 2022 02:08
@github-actions github-actions bot added this to the v4.25.0 milestone Aug 4, 2022
github-actions bot pushed a commit that referenced this pull request Aug 4, 2022
@github-actions
Copy link

github-actions bot commented Aug 4, 2022

This functionality has been released in v4.25.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@jwfh
Copy link

jwfh commented Aug 8, 2022

Seeing issues with v4.25.0 provider with hanging plans and crashes, wondering if it could be related to this change. Reverting to v4.24.0 fixes the issues.

MicrosoftTeams-image (8)
MicrosoftTeams-image (9)

@Jpk518
Copy link

Jpk518 commented Aug 8, 2022

Seeing issues with v4.25.0 provider with hanging plans and crashes, wondering if it could be related to this change. Reverting to v4.24.0 fixes the issues.

MicrosoftTeams-image (8) MicrosoftTeams-image (9)

We narrowed this down to be a specific issue with any data lookup performed on provider v4.25.0 with terraform v0.13.1. Other Terraform versions seem to be fine but this specific TF version panics with these new changes.

@ewbankkit
Copy link
Contributor

@jwfh @Jpk518 Could you please raise a new Issue for this? Thanks.

@vavdoshka
Copy link

vavdoshka commented Aug 14, 2022

Hello @YakDriver @ewbankkit

I'm trying to understand what this feature does, please help. Based on the description of the linked issues and what I understood, it now should allow to "wait" for the data resource to come up and fail it won't after 20 minutes (by default).
And so either my understanding is not correct, or it does not work as planned:

terraform {
  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "4.25.0"
    }
  }
}

provider "aws" {
  region = "us-east-1"
}


resource "aws_vpc" "this" {
  cidr_block           = "10.0.0.0/16"
    tags                 = {
        Name = "test"
    }
}

data "aws_vpc" "this" {
  filter {
    name   = "tag:Name"
    values = ["test"]
  }
}
test git:(master) ✗ terraform --version
Terraform v1.2.7
on darwin_amd64
+ provider registry.terraform.io/hashicorp/aws v4.25.0
➜  test git:(master) ✗ terraform plan     
data.aws_vpc.this: Reading...
╷
│ Error: no matching EC2 VPC found
│ 
│   with data.aws_vpc.this,
│   on main.tf line 23, in data "aws_vpc" "this":
│   23: data "aws_vpc" "this" {
│ 

@github-actions
Copy link

I'm going to lock this pull request 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 related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. repository Repository modifications; GitHub Actions, developer docs, issue templates, codeowners, changelog. service/account Issues and PRs that pertain to the account service. service/acm Issues and PRs that pertain to the acm service. service/acmpca Issues and PRs that pertain to the acmpca service. service/apigatewayv2 Issues and PRs that pertain to the apigatewayv2 service. service/autoscaling Issues and PRs that pertain to the autoscaling service. service/backup Issues and PRs that pertain to the backup service. service/cloudformation Issues and PRs that pertain to the cloudformation service. service/cloudsearch Issues and PRs that pertain to the cloudsearch service. service/configservice Issues and PRs that pertain to the configservice service. service/connect Issues and PRs that pertain to the connect service. service/datasync Issues and PRs that pertain to the datasync service. service/dax Issues and PRs that pertain to the dax service. service/directconnect Issues and PRs that pertain to the directconnect service. service/dms Issues and PRs that pertain to the dms service. service/docdb Issues and PRs that pertain to the docdb service. service/dynamodb Issues and PRs that pertain to the dynamodb service. service/ec2ebs Issues and PRs that pertain to the ec2ebs service. service/ec2outposts Issues and PRs that pertain to the ec2outposts service. service/ec2 Issues and PRs that pertain to the ec2 service. service/ecr Issues and PRs that pertain to the ecr service. service/ecrpublic Issues and PRs that pertain to the ecrpublic service. service/ecs Issues and PRs that pertain to the ecs service. service/efs Issues and PRs that pertain to the efs service. service/eks Issues and PRs that pertain to the eks service. service/elasticache Issues and PRs that pertain to the elasticache service. service/elasticsearch Issues and PRs that pertain to the elasticsearch service. service/elbv2 Issues and PRs that pertain to the elbv2 service. service/fsx Issues and PRs that pertain to the fsx service. service/gamelift Issues and PRs that pertain to the gamelift service. service/globalaccelerator Issues and PRs that pertain to the globalaccelerator service. service/glue Issues and PRs that pertain to the glue service. service/guardduty Issues and PRs that pertain to the guardduty service. service/imagebuilder Issues and PRs that pertain to the imagebuilder service. service/ipam Issues and PRs that pertain to the ipam service. service/kafka Issues and PRs that pertain to the kafka service. service/kafkaconnect Issues and PRs that pertain to the kafkaconnect service. service/kendra Issues and PRs that pertain to the kendra service. service/keyspaces Issues and PRs that pertain to the keyspaces service. service/kinesis Issues and PRs that pertain to the kinesis service. service/kinesisanalyticsv2 Issues and PRs that pertain to the kinesisanalyticsv2 service. service/kinesisvideo Issues and PRs that pertain to the kinesisvideo service. service/lambda Issues and PRs that pertain to the lambda service. service/lexmodels Issues and PRs that pertain to the lexmodels service. service/lightsail Issues and PRs that pertain to the lightsail service. service/location Issues and PRs that pertain to the location service. service/memorydb Issues and PRs that pertain to the memorydb service. service/neptune Issues and PRs that pertain to the neptune service. service/opensearch Issues and PRs that pertain to the opensearch service. service/opsworks Issues and PRs that pertain to the opsworks service. service/rds Issues and PRs that pertain to the rds service. service/redshift Issues and PRs that pertain to the redshift service. service/route53domains Issues and PRs that pertain to the route53domains service. service/route53recoveryreadiness Issues and PRs that pertain to the route53recoveryreadiness service. service/route53resolver Issues and PRs that pertain to the route53resolver service. service/s3control Issues and PRs that pertain to the s3control service. service/s3 Issues and PRs that pertain to the s3 service. service/servicecatalog Issues and PRs that pertain to the servicecatalog service. service/ses Issues and PRs that pertain to the ses service. service/storagegateway Issues and PRs that pertain to the storagegateway service. service/transcribe Issues and PRs that pertain to the transcribe service. service/transitgateway Issues and PRs that pertain to the transitgateway service. service/vpc Issues and PRs that pertain to the vpc service. service/vpnclient Issues and PRs that pertain to the vpnclient service. service/vpnsite Issues and PRs that pertain to the vpnsite service. service/workspaces Issues and PRs that pertain to the workspaces service. size/XL Managed by automation to categorize the size of a PR. skaff Issues and pull requested related to the skaff tool tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
5 participants