commands in terraform

Terraform cmds  which I used:


export AWS_ACCOUNT=071137033942

export AWS_PROFILE=bis-dev

export AWS_REGION=us-east-1


export ENV=[devops|dev|test|qa]

export REGION=us1



export TF_STATE_KEY=”terraform/bis/bis-$ENV-$REGION.tfstate”

export TF_LOCK_TABLE=”bis-$ENV-tf-state-lock-$REGION”


cd bis-$ENV-$REGION


terraform init \

-lock=”true” \

-backend-config=”bucket=$TF_STATE_BUCKET” \

-backend-config=”key=$TF_STATE_KEY” \

-backend-config=”dynamodb_table=$TF_LOCK_TABLE” \

-backend-config=”profile=$AWS_PROFILE” \

-backend-config=”region=$AWS_REGION” \

-backend-config=”encrypt=true” \



terraform get -update=true ..

terraform refresh ..

terraform plan ..

terraform apply ..


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s