ADOT (AWS Distro for OpenTelemetry) Implementation for Simple Golang RESTful API Application (Bookstore)
-
Goto
terraform/environment/providers/aws/infra/resources/ampfoldercd terraform/environment/providers/aws/infra/resources/amp -
Cleanup Cache Terraform
rm -rf .terraform .terraform.lock.hcl terraform.amp.d
terraform init
-
Production Environment
WORKSPACE_ENV=prod terraform workspace select $WORKSPACE_ENV || terraform workspace new $WORKSPACE_ENV -
Staging Environment
WORKSPACE_ENV=staging terraform workspace select $WORKSPACE_ENV || terraform workspace new $WORKSPACE_ENV -
Lab Environment
WORKSPACE_ENV=lab terraform workspace select $WORKSPACE_ENV || terraform workspace new $WORKSPACE_ENV
-
Save Binary Plan
terraform plan --out tfplan.binary -
Export to JSON
terraform show -json tfplan.binary > tfplan.json
-
Using:
terrascanterrascan init terrascan scan -o human -
Using:
tfsectfsec . -
Using:
checkovcheckov -f tfplan.json
-
Using:
infracostinfracost breakdown --path tfplan.json
terraform apply -auto-approve
-
Cleanup Terraform Cache
rm -rf .terraform .terraform.lock.hcl terraform.amp.d -
Destroy All Managed Services Prometheus (AMP)
terraform destroy -auto-approve