From f6a4b9e42ce9567d866e58149e9fb2b6e160a23e Mon Sep 17 00:00:00 2001 From: Puneeth Date: Mon, 28 Feb 2022 14:23:33 +0100 Subject: [PATCH 1/2] Update main.tf --- sfn/main.tf | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sfn/main.tf b/sfn/main.tf index 861a7f3..08bc2bc 100644 --- a/sfn/main.tf +++ b/sfn/main.tf @@ -34,7 +34,11 @@ resource "aws_sfn_state_machine" "sfn_state_machine" { definition = var.config.definition } +data "aws_region" "current" {} + +data "aws_caller_identity" "current" {} + output "state_machine_arn" { - value = aws_sfn_state_machine.sfn_state_machine.id + value = "arn:aws:states:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:stateMachine:${var.config.name}" description = "AWS step function arn" } From 64c07effd6867b5e07e3d9bda4ae5cc2503ffbcd Mon Sep 17 00:00:00 2001 From: Puneeth-n Date: Mon, 28 Feb 2022 14:28:09 +0100 Subject: [PATCH 2/2] fmt --- sfn/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sfn/main.tf b/sfn/main.tf index 08bc2bc..7e84b28 100644 --- a/sfn/main.tf +++ b/sfn/main.tf @@ -37,7 +37,7 @@ resource "aws_sfn_state_machine" "sfn_state_machine" { data "aws_region" "current" {} data "aws_caller_identity" "current" {} - + output "state_machine_arn" { value = "arn:aws:states:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:stateMachine:${var.config.name}" description = "AWS step function arn"