I am able to initialize and apply terragrunt files from terratest Golang using terraform.TgApplyAll(t, terraformOptions)
But when i use below piece of code , I am unable to fetch value of output variable(s3_bucket_name)
s3BucketName := terraform.Output(t, terraformOptions, “s3_bucket_name”)
Same code is working fine for terraform but not working for terragrunt
In terragrunt., output.tf file is created under .cache folder and under some more sub folders ,Is it the reason I am unable to fetch ?
Because I am able to see output is appearing in the CLI and i also able to populate by running stand alone terraform output command in CLI only from that specific folder wherever output.tf file is present But i am unable to fetch the output Programmatically from Golang script for validation
Or Is there some piece of code am i missing ?
I am getting below Warning message when i am trying to fetch the output value
Warning: No outputs found\n\nThe state file either has no outputs defined, or all the defined outputs are\nempty. Please define an output in your configuration with the output
keyword\nand run terraform refresh
for it to become available. If you are using\ninterpolation, please verify the interpolated value is not empty. You can use\nthe terraform console
command to assist."