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

tests/provider: DB Instance Max VPCs reached (GovCloud) #15777

Closed
YakDriver opened this issue Oct 21, 2020 · 2 comments
Closed

tests/provider: DB Instance Max VPCs reached (GovCloud) #15777

YakDriver opened this issue Oct 21, 2020 · 2 comments
Labels
partition/aws-us-gov Pertains to the aws-us-gov partition. service/ec2 Issues and PRs that pertain to the ec2 service. service/rds Issues and PRs that pertain to the rds service. stale Old or inactive issues managed by automation, if no further action taken these will get closed. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.

Comments

@YakDriver
Copy link
Member

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue 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 issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

These tests fails on GovCloud:

TestAccAWSDBInstance_ReplicateSourceDb_DbSubnetGroupName
TestAccAWSDBInstance_ReplicateSourceDb_DbSubnetGroupName_VpcSecurityGroupIds

With this error: VpcLimitExceeded: The maximum number of VPCs has been reached..

Account limit may need to be increased or better VPC sweeping performed.

New or Affected Resource(s)

  • aws_db_instance
  • aws_vpc

Terraform Configuration Files

Initial config:

data "aws_availability_zones" "alternate" {
  provider = "awsalternate"

  state = "available"

  filter {
    name   = "opt-in-status"
    values = ["opt-in-not-required"]
  }
}

resource "aws_vpc" "alternate" {
  provider = "awsalternate"

  cidr_block = "10.1.0.0/16"

  tags = {
    Name = "yakdriver"
  }
}

resource "aws_vpc" "test" {
  cidr_block = "10.0.0.0/16"

  tags = {
    Name = "yakdriver"
  }
}

resource "aws_subnet" "alternate" {
  count    = 2
  provider = "awsalternate"

  availability_zone = data.aws_availability_zones.alternate.names[count.index]
  cidr_block        = "10.1.${count.index}.0/24"
  vpc_id            = aws_vpc.alternate.id

  tags = {
    Name = "yakdriver"
  }
}

resource "aws_subnet" "test" {
  count = 2

  availability_zone = data.aws_availability_zones.available.names[count.index]
  cidr_block        = "10.0.${count.index}.0/24"
  vpc_id            = aws_vpc.test.id

  tags = {
    Name = "yakdriver"
  }
}

resource "aws_db_subnet_group" "alternate" {
  provider = "awsalternate"

  name       = "yakdriver"
  subnet_ids = aws_subnet.alternate[*].id
}

resource "aws_db_subnet_group" "test" {
  name       = "yakdriver"
  subnet_ids = aws_subnet.test[*].id
}

data "aws_rds_orderable_db_instance" "test" {
  provider = "awsalternate"

  engine         = "mysql"
  engine_version = "5.6.35"
  license_model  = "general-public-license"
  storage_type   = "standard"

  preferred_instance_classes = ["db.t3.micro", "db.t2.micro", "db.t2.medium"]
}

resource "aws_db_instance" "source" {
  provider = "awsalternate"

  allocated_storage       = 5
  backup_retention_period = 1
  db_subnet_group_name    = aws_db_subnet_group.alternate.name
  engine                  = data.aws_rds_orderable_db_instance.test.engine
  identifier              = "yakdriver-source"
  instance_class          = data.aws_rds_orderable_db_instance.test.instance_class
  password                = "avoid-plaintext-passwords"
  username                = "tfacctest"
  skip_final_snapshot     = true
}

resource "aws_db_instance" "test" {
  db_subnet_group_name = aws_db_subnet_group.test.name
  identifier           = "yakdriver"
  instance_class       = aws_db_instance.source.instance_class
  replicate_source_db  = aws_db_instance.source.arn
  skip_final_snapshot  = true
}

Debug Output

TestAccAWSDBInstance_ReplicateSourceDb_DbSubnetGroupName_VpcSecurityGroupIds: 
resource_aws_db_instance_test.go:840: Step 1/1 error: Error running apply: 2020/10/20 18:32:24 [DEBUG] Using
modified User-Agent: Terraform/0.12.29 HashiCorp-terraform-exec/0.10.0
        
        Error: Error creating VPC: VpcLimitExceeded: The maximum number of VPCs has been reached.
        	status code: 400, request id: d8e82d73-fb5b-47ea-b57b-faa3c3cf7ecf

--- FAIL: TestAccAWSDBInstance_ReplicateSourceDb_DbSubnetGroupName_VpcSecurityGroupIds (11.70s)

References

@YakDriver YakDriver added the enhancement Requests to existing resources that expand the functionality or scope. label Oct 21, 2020
@ghost ghost added service/ec2 Issues and PRs that pertain to the ec2 service. service/rds Issues and PRs that pertain to the rds service. labels Oct 21, 2020
@YakDriver YakDriver added partition/aws-us-gov Pertains to the aws-us-gov partition. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. and removed enhancement Requests to existing resources that expand the functionality or scope. labels Oct 21, 2020
@github-actions
Copy link

Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label.

If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!

@github-actions github-actions bot added the stale Old or inactive issues managed by automation, if no further action taken these will get closed. label Oct 12, 2022
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 12, 2022
@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
partition/aws-us-gov Pertains to the aws-us-gov partition. service/ec2 Issues and PRs that pertain to the ec2 service. service/rds Issues and PRs that pertain to the rds service. stale Old or inactive issues managed by automation, if no further action taken these will get closed. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

No branches or pull requests

1 participant