Skip to content

AWS resources to manage terraform state and locking

License

Notifications You must be signed in to change notification settings

hegerath/terraform-remote-state-aws

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

terraform-remote-state-aws

Terraform

This project involves the creation of key AWS resources using Terraform. The aim is to establish a central repository for managing the state of application AWS resources and facilitating resource locking for collaborative editing. The variable PROJECT_ENV can be employed to distinguish between different stages (DEV, TEST, PROD). These resources are intended to be created only once within the account.

Initialize Terraform

Create environment vars

export AWS_ACCESS_KEY_ID=<access_key>
export AWS_SECRET_ACCESS_KEY=<secret_access_key>

The access key can be generated in the IAM console in the security information tab.
More Information on Terraform AWS Provider

#cd into project dir (in which main.cf is located)  
terraform init

Create AWS resources

Verify connection and creation of AWS resources

terraform plan

The AWS region could be specified with "aws_region=<REGION>". Default is "eu-central-1"

terraform plan -var="AWS_REGION=<region>"

The Environment (DEV, TEST, PROD) can be specified with "PROJECT_ENV=<environment>". Default is "DEV"

terraform plan -var="PROJECT_ENV=<environment>" 

If terraform plan is successfull, you can apply the changes

terraform apply

Links

Getting started Guide
Terraform AWS Provider

About

AWS resources to manage terraform state and locking

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages