Create the Infrastructure on the AWS using Terraform
Go to the "iac/terraform-ecs" directory with the following command and after please run the next commands in this directory;
cd iac/terraform-ecs
Note:
Enter your own variable values in the "iac/terraform-ecs/terraform.tfvars" file.
You could download and install the Terraform from the downloads page.
If you have Terraform installed, create your infrastructure with the following below commands;
-
Run the below command in a terminal, to initialize the provider plugins:
terraform init
-
Run the below command in a terminal, to check your configuration is valid:
terraform validate
-
Run the below command in a terminal to create an execution plan;
terraform plan -out=observer-tfplan
-
Run the below command in a terminal to show human-readable output from plan file:
terraform show "observer-tfplan"
-
Run the below command in a terminal, to Create or Update infrastructure on the AWS:
terraform apply -auto-approve "observer-tfplan"
-
Run the below command in a terminal, to Destroy previously-created infrastructure on the AWS:
terraform destroy