Search code examples
terraformterraform-provider-awsaws-step-functionsaws-xray

How Terraform local-exec works on Concourse?


I used 'null_resource' and pass aws cli to 'local-exec' to update stepfunction:

resource "null_resource" "enable_step_function_xray" {
  triggers = {
    state_machine_arn = xxxxxxx
  }

  provisioner "local-exec" {
    command     = "aws stepfunctions update-state-machine --state-machine-arn ${self.triggers.state_machine_arn}  --tracing-configuration enabled=true"
  }
}

This works fine when I tested via local Terraform, my question is if this will work if I apply Terraform on Concourse?


Solution

  • It depends entirely on if you have the Concourse job configured to use a container image that has the aws cli tool installed. If the AWS CLI tool is installed and in the path then the local-exec should succeed. If not, then it will obviously fail.