Skip to main content

AWS Image ami build

AWS MQ AMI build stage

NOTE: Be aware to use Terraform v1.2.9

MQ image provisioning

Export common variables:

# If you have your .envrc file handy
source ../setup/.envrc_aos-<env-name>

Export common variables (can be exported from env file generated):

# If you have your .envrc file handy
source .envrc_aos-staging

You need to copy or reuse the terraform.tfvars file to define your own variables:

# Global variables
aws_resource_region = "eu-central-1"
additional_resources_tags = { author = "example@epam.com" }

Initialize the backend plan and apply:

terraform init -backend-config "bucket=${TF_VAR_remote_state_bucket}" -backend-config "dynamodb_table=${TF_VAR_remote_state_db_table}"
terraform plan -out /tmp/tf-mq-ami-plan.out
terraform apply -auto-approve /tmp/tf-mq-ami-plan.out