How to create Internet gateway in AWS usng Terraform

0 votes

Hi Guys,

I want to create one Internet gateway in my VPC using Terraform code. Can anyone tell me how can I do this?

Jul 21, 2020 in Terraform by akhtar
• 38,260 points
2,185 views

1 answer to this question.

0 votes

Hi@akhtar,

You can find one resource named aws_internet_gateway. It allows us to create Internet Gateway in AWS. I have attached one example below for your reference.

resource "aws_internet_gateway" "gw" {
  vpc_id = "${aws_vpc.main.id}"
  tags = {
    Name = "My_IGW"
  }
}

For more, join our AWS certification program and learn how to create an internet gateway today.

Thanks!

answered Jul 21, 2020 by MD
• 95,460 points

Related Questions In Terraform

0 votes
1 answer

How to create a VPC in AWS using Terraform?

Hi@akhtar, You can find the script in the ...READ MORE

answered Jul 21, 2020 in Terraform by MD
• 95,460 points
1,360 views
0 votes
1 answer

How to create a route table in AWS using Terraform code?

Hi@akhtar, You can use aws_route_table resources in your ...READ MORE

answered Jul 21, 2020 in Terraform by MD
• 95,460 points
5,854 views
0 votes
1 answer

How to create one S3 bucket in AWS using Terraform?

Hi@akhtar, You need to set aws provider name ...READ MORE

answered Jul 23, 2020 in Terraform by MD
• 95,460 points
1,429 views
0 votes
1 answer

How to create an EFS in AWS from Terraform Code?

Hi@MD, You can use aws_efs_file_system resource in Terraform. ...READ MORE

answered Sep 9, 2020 in Terraform by akhtar
• 38,260 points
1,389 views
0 votes
1 answer

How to create one key in AWS using terraform?

Hi@akhtar, You can use aws_key_pair resource n terraform. ...READ MORE

answered Jun 11, 2020 in Terraform by MD
• 95,460 points
1,571 views
0 votes
1 answer

How to create a rds snapshot from running rds instance in AWS using terraform?

Hi, I think you can use aws_db_instance resource to ...READ MORE

answered Jul 20, 2020 in Terraform by MD
• 95,460 points
2,679 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP