-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Open
Labels
enhancementRequests to existing resources that expand the functionality or scope.Requests to existing resources that expand the functionality or scope.needs-triageWaiting for first response or review from a maintainer.Waiting for first response or review from a maintainer.service/ec2Issues and PRs that pertain to the ec2 service.Issues and PRs that pertain to the ec2 service.service/vpcIssues and PRs that pertain to the vpc service.Issues and PRs that pertain to the vpc service.
Description
Description
Deleting subnets and security groups often fails because ENIs are created outside of terraform for various resources.
It would be nice to be able to create the ENIs within terraform, which would allow deleting the resources properly. Alternatively, perhaps terraform could delete the associated ENIs first before attempting to destroy the resources.
Affected Resource(s) and/or Data Source(s)
aws_vpc_endpoint (type "Interface")
aws_eks_cluster
Potential Terraform Configuration
resource "aws_vpc" "example" {
instance_tenancy = "default"
enable_dns_support = true
enable_dns_hostnames = true
cidr_block = "10.0.0.0/16"
}
data "aws_availability_zone" "example" {
zone_id = "euc1-az1"
}
resource "aws_subnet" "example" {
for_each = toset(var.network_config.availability_zones)
vpc_id = aws_vpc.example.ud
availability_zone_id = data.aws_availability_zone.example.id
cidr_block = "10.1.0.0/24"
}
data "aws_vpc_endpoint_service" "ecr_api" {
service = "ecr.api"
service_type = "Interface"
}
resource "aws_vpc_endpoint" "ecr_api" {
vpc_id = aws_vpc.example.id
service_name = data.aws_vpc_endpoint_service.ecr_api.service_name
vpc_endpoint_type = "Interface"
private_dns_enabled = true
subnet_ids = [aws_subnet.example.id]
}References
Would you like to implement a fix?
No
benabineri, jas-invaris and aakash-acquia
Metadata
Metadata
Assignees
Labels
enhancementRequests to existing resources that expand the functionality or scope.Requests to existing resources that expand the functionality or scope.needs-triageWaiting for first response or review from a maintainer.Waiting for first response or review from a maintainer.service/ec2Issues and PRs that pertain to the ec2 service.Issues and PRs that pertain to the ec2 service.service/vpcIssues and PRs that pertain to the vpc service.Issues and PRs that pertain to the vpc service.