AWS transit gateway w/ terragrunt error?

im trying to set up a transit gateway start to finish between two seperate accounts. I have created the tgw and the attachment in one account and have created an RAM share of it and have sent the invite over to the other account.

As I cant share variables between accounts, I am attempting to use the data source aws_ram_resource_share on the account i want to accept the invite from so I can then find the incoming share and accpet it.

I am using the following code to do this:

# ------------------------------------- # ACCEPT INCOMING RESOURCE SHARE # ------------------------------------- data "aws_ram_resource_share" "data-tgw" { name = "share-tgw" resource_owner = "OTHER-ACCOUNTS" } 

Note that I have created the share in the name of "share-tgw". however when running this I get the following error:

Refreshing Terraform state in-memory prior to plan... The refreshed state will be used to calculate this plan, but will not be persisted to local or remote state storage. Refreshing state... Error: No matching resource found: %!s(<nil>) on line 40, in data "aws_ram_resource_share" "data-tgw": 40: data "aws_ram_resource_share" "data-tgw" { [terragrunt] 2020/11/18 15:27:12 Hit multiple errors: exit status 1 

Im looking in the console and the share is visible as a pending acception resource, so im not sure why the above isnt finding the resource.

Any ideas?

submitted by /u/Ellz89
[link] [comments]

Read more here:

Content Attribution

This content was originally published by /u/Ellz89 at Terraform, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: