Create default VPC and subnet for 02-overview #26
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
force_destroyon both resources (see known issues from aws provider below)Related Issue
Addressed VPCIdNotSpecified error mentioned in #7
How Has This Been Tested?
terraform initand verify thathashicorp/aws v4.x.xis used.Destroy complete! Resources: 3 destroyed.Screenshots:
Known issues from terraform-provider-aws
I ran into an issue when destroying the default VPC. The error message is
The vpc 'vpc-xxxxxxxxxxxxxx' has dependencies and cannot be deleted.Other resources are implicit created with theaws_deafult_vpcresources so based on AWS's doc, I detached and deleted the default internet gateway and deleted subnet manually in console. Then, runterraform destroyto tear down the default VPC. (I had to run it twice cause the terraform-provider-aws_v4.67.0_x5 plugin crashed due to resource change request being cancelled.) This is the workaround that worked for me.If you are interested in learning about the root cause, I also found this draft PR and looks like they are working on fixing the default VPC bug caused by IGW. Hope this helps!