Skip to content

Blackweather/iac-sample-aws

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

iac-sample-aws

Infrastructure as code repository setting up AWS infrastructure. This project is not complete.

Contents

.                # Root directory with README and .gitignore
|-infrastructure # general directory for all infrastracture as code
|--aws           # AWS infrastructure as code
|-sample-app     # code for a sample node.js application for deployment (empty)

To see more information about infrastructure see the README.md file in infrastructure/ subdirectory - (https://github.com/Blackweather/iac-bright/tree/master/infrastructure)

To see more information about AWS infrastructure see the README.md file in infrastructure/aws/ subdirectory - (https://github.com/Blackweather/iac-bright/tree/master/infrastructure/aws)

Prerequisites

Running the code

export AWS_ACCESS_KEY_ID=<YOUR_AWS_ACCESS_KEY_ID>
export AWS_SECRET_ACCESS_KEY=<YOUR_AWS_SECRET_ACCESS_KEY>
  • initialize the terraform modules and providers
cd infrastructure/aws/
terraform init
  • validate the infrastructure code
terraform validate
  • create a creation plan (make sure to check what is going to be created)
terraform plan -out=tfplan
  • apply the infrastructure plan
terraform apply tfplan

Optional: Destroy the infrastructure

  • show a destruction plan (make sure to check what is going to be destroy)
terraform plan -destroy
  • destroy the infrastructure
terraform destroy

About

Infrastructure as code repository - AWS sample

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published