Giter Site home page Giter Site logo

aws-tf-vpc's Introduction

Terraform AWS Infrastructure

This repository contains Terraform code for provisioning AWS infrastructure, including a VPC and EC2 instances.

Prerequisites

  • Terraform >= 1.7.0
  • AWS Provider ~> 5.0

Modules

This Terraform configuration includes the following modules:

VPC Module

The VPC module creates a VPC and related networking components. It takes the following inputs:

  • vpc_config: Configuration for the VPC.
  • sn_config: Configuration for the subnets.
  • igw_config: Configuration for the internet gateway.
  • ngw_config: Configuration for the NAT gateway.
  • rt_config: Configuration for the route tables.
  • rta_config: Configuration for the route table associations.
  • sg_config: Configuration for the security groups.

S3 Module

The S3 module creates an S3 Bucket, it takes the following input:

  • s3_config: Configuration for the S3 Bucket

The S3 Bucket module also expects a policy, please use a aws_iam_policy_document to define a policy for your S3 bucket

EC2 Module

The EC2 module creates EC2 instances. It depends on the VPC module and takes the following input:

  • ec2_instance_config: Configuration for the EC2 instances.

Usage

Before you run, make sure that you have a IAM account in AWS with access and secret keys. Set these as environment variables:

 export AWS_ACCESS_KEY_ID=<ACCES_KEY_ID>
 export AWS_SECRET_ACCESS_KEY=<ACCESS_KEY>

To use this Terraform configuration, first initialize your Terraform workspace:

terraform init

Then, create a plan:

terraform plan

If the plan looks good, apply it:

terraform apply

aws-tf-vpc's People

Contributors

dc-tec avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.