$ terraform show -json | jq -r '.values.root_module|..|select(.address? != null and .mode? == "managed" and .values.arn? != null)|.values.arn' | head -3
arn:aws:dynamodb:us-east-1:0123456789:table/nicolawdl-table1
arn:aws:s3:::acme-nicolawdl-bucket1
arn:aws:s3:::acme-nicolawdl-bucket2
$ terraform show -json | jq -r '.values.root_module|..|select(.address? != null and .mode? == "data" and .values.arn? != null)|.values.arn' | head -3
arn:aws:iam::0123456789:user/Nicola.Worthington
arn:aws:ec2:us-east-1:0123456789:subnet/subnet-0abcdef1238db99b9
arn:aws:ec2:us-east-1:0123456789:subnet/subnet-0abcdef123c0effe1
$ terraform show -json | jq -r '.values.root_module|..|select(.address? != null and .values.arn? != null)|.values.arn' | head -6
arn:aws:dynamodb:us-east-1:0123456789:table/nicolawdl-table1
arn:aws:s3:::acme-nicolawdl-bucket1
arn:aws:s3:::acme-nicolawdl-bucket2arn:aws:iam::0123456789:user/Nicola.Worthington
arn:aws:ec2:us-east-1:0123456789:subnet/subnet-0abcdef1238db99b9
arn:aws:ec2:us-east-1:0123456789:subnet/subnet-0abcdef123c0effe1
https://www.terraform.io/docs/configuration/meta-arguments/module-providers.html