Scripts/assets to install required infrastructure stack in AWS
This repository is about deployment of especific version functions to AWS Lambda functions (The images storaged in AWS S3 bucket)
- Lambda Functions (see config.tfvars)
- EC2 instance (Temporary test)
Copy the secret.tf.example file to secret.tf:
- Configure the Terraform S3 backend by adding the
AWS_ACCESS_KEYandAWS_SECRET_KEYof thetfstateuser.
Copy the secret.tf.example file to secret.tf:
- Configure the Terraform S3 backend by adding the
AWS_ACCESS_KEYandAWS_SECRET_KEYof thetfstateuser.
# init providers and backend
terraform init
# check configuration files format
terraform fmt -check -diff -recursive .
# format configuration files
terraform fmt -diff -recursive .
# validate configuration
terraform validateNotes:
- If you update the
ssh_key_idsconfiguration, the instances will be replaced. - If you update a installation script, the corresponding instance will be replaced.
# plan
terraform plan -var-file=config.tfvars -out tfplan
# apply
terraform apply tfplan# plan destroy
terraform plan -destroy -var-file=config.tfvars -out tfplan-destroy
# apply destroy
terraform apply tfplan-destroy