github.com/khulnasoft-lab/defsec@v1.0.5-0.20230827010352-5e9f46893d95/rules/cloud/policies/aws/apigateway/enable_tracing.tf.go (about) 1 package apigateway 2 3 var terraformEnableTracingGoodExamples = []string{ 4 ` 5 resource "aws_api_gateway_rest_api" "test" { 6 7 } 8 9 resource "aws_api_gateway_stage" "good_example" { 10 stage_name = "prod" 11 rest_api_id = aws_api_gateway_rest_api.test.id 12 deployment_id = aws_api_gateway_deployment.test.id 13 xray_tracing_enabled = true 14 } 15 `, 16 } 17 18 var terraformEnableTracingBadExamples = []string{ 19 ` 20 resource "aws_api_gateway_rest_api" "test" { 21 22 } 23 24 resource "aws_api_gateway_stage" "bad_example" { 25 stage_name = "prod" 26 rest_api_id = aws_api_gateway_rest_api.test.id 27 deployment_id = aws_api_gateway_deployment.test.id 28 xray_tracing_enabled = false 29 } 30 `, 31 } 32 33 var terraformEnableTracingLinks = []string{ 34 `https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/api_gateway_stage#xray_tracing_enabled`, 35 } 36 37 var terraformEnableTracingRemediationMarkdown = ``