Terraform script to setup Apache Flink on AWS EMR.
Please follow these steps for usage.
Create a config.tfvars
file and update the variables:
aws_profile = "<AWS_PROFILE>"
region = "<AWS_REGION>"
## These values are used for AWS resource tags
project = "<PROJECT_NAME>"
owner = "<PROJECT_OWNER_NAME>"
environment = "<ENVIRONMENT>"
## EMR related examples configurations, please update them accordingly
emr_release_label = "emr-6.9.1"
emr_main_instance_type = "m5.xlarge"
emr_core_instance_type = "m5.xlarge"
emr_core_instance_count = "2"
Initialize the terraform:
terraform init
Get the terraform plan:
terraform plan -var-file config.tfvars -out terraform.tfplan
Deploy the plan:
terraform apply -var-file config.tfvars
This will ask your approval. You can also auto approve it, with the following command:
terraform apply -auto-approve -var-file config.tfvars
Please be patient, it will take some time to set up everything.
Create a destroy plan:
terraform plan -destroy -var-file config.tfvars -out terraform.tfplan
Run the destroy action:
terraform apply terraform.tfplan