SumoMetrics: Viewing Linux System Activity through log analytics
I. Created an EC2 using a Terraform script.
main.tf
2. Execute the Terraform commands to create the AWS resource:
- terraform init
- terraform validate
This command validates the configuration files for syntactical validity and internal consistency.
Source: https://developer.hashicorp.com/terraform/cli/commands/validate
- terraform fmt
Helps to ensure consistency in code formatting by using standarised styling conventions.
Source: https://developer.hashicorp.com/terraform/cli/commands/fmt
- terraform plan -out=planfile
This command stores "planfile" as a binary file and is not human-readable.
This command must be used in order to execute the next command, "terraform apply planfile".
NOTE: The following command is for isolated use cases, and is not considered a best practice nor is it efficient however, the command may serve a purpose when no tool/service is able to achieve a solution.
Now, execute terraform plan -no-color | tee tfplan.txt to save the output in a human-readable format to a text file. This is more of tool for isolated use cases, when no other tools/service/platform are feasible.
- terraform apply planfile
- terraform output
Comments
Post a Comment