Skip to content

lsh23/terraform-example-code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terraform example code

Content

  • module
  • directory structure
  • variable, output

Usage

1. Set access key and secret key

  • main.tf

    provider "aws" {
    region = var.region
    access_key = "your key"
    secret_key = "your key"
    
  • Environment variable

    $ export AWS_ACCESS_KEY_ID="your key"
    $ export AWS_SECRET_ACCESS_KEY="your key"
    
    provider "aws" {
      region = var.region
      # access_key = "your key" 
      # secret_key = "your key"
    }  
    

2. Terraform CLI

$ cd prod
$ terraform init
$ terraform apply
$ terraform destroy

Reference

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published