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

New Resource: aws_default_internet_gateway #3999

Closed
wants to merge 1 commit into from

Conversation

ewbankkit
Copy link
Contributor

Fixes #2436.

The default Internet Gateway in an AWS region is the sole attached Internet Gateway in that region's default VPC.

Acceptance tests:

 make testacc TEST=./aws/ TESTARGS='-run=TestAccAwsDefaultInternetGateway_'==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -run=TestAccAwsDefaultInternetGateway_ -timeout 120m
=== RUN   TestAccAwsDefaultInternetGateway_basic
--- PASS: TestAccAwsDefaultInternetGateway_basic (14.24s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	14.255s

@ghost ghost added the size/L Managed by automation to categorize the size of a PR. label Mar 30, 2018
@bflad bflad added new-resource Introduces a new resource. service/ec2 Issues and PRs that pertain to the ec2 service. labels Apr 2, 2018

# aws_default_internet_gateway

Provides a resource to manage a [default VPC Internet Gateway](https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/default-vpc.html#default-vpc-components)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think we should provide a more strict warning, akin to https://www.terraform.io/docs/providers/aws/r/default_route_table.html, about the fact that Terraform cannot destroy this resource?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jen20 I think that's already taken care of in the Removing aws_default_internet_gateway from your configuration section below.

@jen20
Copy link
Contributor

jen20 commented May 25, 2018

Hi @ewbankkit! Thanks for the pull request, and sorry for the delay in getting it reviewed. The code looks good to me - I've left one minor comment on the documentation. If you could let me know your thoughts there we can get this merged.

@ewbankkit
Copy link
Contributor Author

After thinking about this some more I think the most sustainable solution is to use terraform import to manage the default Internet Gateway.
See remarks here: #2436 (comment).

@ewbankkit ewbankkit closed this Aug 3, 2018
@ewbankkit ewbankkit deleted the issue-2436 branch August 3, 2018 13:52
@e-moshaya
Copy link

@ewbankkit any reason why this wasn't merged? Terraform import into each state file is not really an option for us as this a manual step we'd like to avoid.

@ewbankkit
Copy link
Contributor Author

@e-moshaya As I remember my reasoning was:

  • Limit resource sprawl
  • There's a "workaround" via terraform import
  • Unlike the other VPC default resources there's no concept in the AWS API of default IGW - Once the resource is imported it behaves exactly like any other IGW

@e-moshaya
Copy link

@ewbankkit sorry to bring this up again but we've now integrated amazon config and have a rule to check all resources for specific tags. Unfortunately, this is the only resource that is not tagged. importing the resource is really not an option seeing as it's a manual step which defeats the purpose of terraform. Please could you reconsider this pull request?

@ewbankkit
Copy link
Contributor Author

@e-moshaya I'm happy for someone else to pick up the code.

@ghost
Copy link

ghost commented Nov 3, 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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Nov 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
new-resource Introduces a new resource. service/ec2 Issues and PRs that pertain to the ec2 service. size/L Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws_default_internet_gateway is missing
4 participants