Manual Installation - Terraform Configuration#
Create S3 Bucket for AWS Cloud#
Warning
Use only the AWS CLI for bucket creation. Do not create a bucket through the AWS Management Console.
Use AWS CLI to create a new S3 bucket.
Note the bucket name, region, and key.
Create a Directory and Set Up Terraform Configuration#
In a terminal, navigate to the environment’s main directory.
Create a new directory with the S3 bucket name:
mkdir -p buckets/environments/<bucket_name>
Copy the
backend.tf
andvariable.tfvar
files from the example directory into the new bucket directory:cp example-config/buckets/{backend.tf,variable.tfvar} buckets/environments/<bucket_name>
The
backend.tf
file specifies where to store the Terraform state for this bucket deployment. Store the Terraform state with thebackend.tf
andvariable.tfvar
file here. See the following example:path="environments/<bucket_name>/terraform.tfstate"
Edit the
variable.tfvar
file.Change the
path
,region
andbucket
to match the AWS S3 bucket settings. See the following example:variable.tfvar example#path="path_to_tfstate" region="us-west-2" bucket="<bucket_name>"
Apply the Terraform configuration with the bucket name. This applies the configuration for the
buckets
module with the <bucket_name> from thebackend.tf
andvariable.tfvar
:make apply module=buckets env=<bucket_name>
Type
yes
to complete the configuration.