- module
- directory structure
- variable, output
-
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" }
$ cd prod
$ terraform init
$ terraform apply
$ terraform destroy