cloudposse / terraform-aws-vpc-peering-multi-account

Terraform module to provision a VPC peering across multiple VPCs in different accounts by using multiple providers
https://cloudposse.com/accelerate
Apache License 2.0
129 stars 92 forks source link

Refactor requester.tf to use aws_route_tables data source #78

Closed vquie closed 5 months ago

vquie commented 1 year ago

what

why

All my VPCs with more then one subnet raised this error.

Error: query returned no results. Please change your search criteria and try again

  with module.vpc_vpn_vpc_peering.data.aws_route_table.requester[5],
  on .terraform/modules/vpc_vpn_vpc_peering/requester.tf line 124, in data "aws_route_table" "requester":
 124: data "aws_route_table" "requester" {

references

https://sweetops.slack.com/archives/CB6GHNLG0/p1694006033839549

max-lobur commented 1 year ago

/terratest

max-lobur commented 1 year ago

Please run make precommit/terraform and commit the changes, this should fix all the linters

max-lobur commented 1 year ago

I've merged the baseline fixes, and don’t know the fix for the current error yet. It’s also in main branch https://github.com/cloudposse/actions/actions/runs/6216155331/job/16869736066 I thought this PR was to address it but no, it's different. Will recheck this week

vquie commented 1 year ago

Please run make precommit/terraform and commit the changes, this should fix all the linters

Done. Thanks.

tfendt-belong-gg commented 10 months ago

I am getting this same error, can this get merged?

aknysh commented 8 months ago

@vquie thanks for the PR. Please run the following commands and commit the changes:

make init
make github/init
make readme

See https://github.com/cloudposse/terraform-aws-vpc-peering-multi-account/actions/runs/7580845569/job/20665790563?pr=78

vquie commented 8 months ago

@aknysh

Unfortunately this failed on my machine.

❯ make readme
* Installing packages master...
Cloning into '/Users/homefolder/git/github/terraform-aws-vpc-peering-multi-account/build-harness/vendor/packages'...
remote: Enumerating objects: 942, done.
remote: Counting objects: 100% (942/942), done.
remote: Compressing objects: 100% (451/451), done.
remote: Total 942 (delta 335), reused 627 (delta 251), pack-reused 0
Receiving objects: 100% (942/942), 11.23 MiB | 1.36 MiB/s, done.
Resolving deltas: 100% (335/335), done.
* Installing gomplate to /Users/homefolder/git/github/terraform-aws-vpc-peering-multi-account/build-harness/vendor
mkdir -p -m a+rX /Users/homefolder/git/github/terraform-aws-vpc-peering-multi-account/build-harness/vendor
curl --retry 3 --retry-delay 5 --fail -sSL -o /Users/homefolder/git/github/terraform-aws-vpc-peering-multi-account/build-harness/vendor/gomplate https://github.com/hairyhenderson/gomplate/releases/download/v3.11.7/gomplate_darwin-arm64 && chmod +x /Users/homefolder/git/github/terraform-aws-vpc-peering-multi-account/build-harness/vendor/gomplate
* Installing terraform-docs to /Users/homefolder/git/github/terraform-aws-vpc-peering-multi-account/build-harness/vendor
mkdir -p -m a+rX /Users/homefolder/git/github/terraform-aws-vpc-peering-multi-account/build-harness/vendor
[ -n "/tmp" ] && [ -n "terraform-docs" ] && rm -rf "/tmp/terraform-docs"
mkdir -p /tmp/terraform-docs
curl --retry 3 --retry-delay 5 --fail -sSL -o - https://github.com/segmentio/terraform-docs/releases/download/v0.17.0/terraform-docs-v0.17.0-darwin-arm64.tar.gz | tar -zx -C /tmp/terraform-docs
find /tmp/terraform-docs -type f -name terraform-docs | xargs -I {} cp -f {} /Users/homefolder/git/github/terraform-aws-vpc-peering-multi-account/build-harness/vendor/terraform-docs
chmod +x /Users/homefolder/git/github/terraform-aws-vpc-peering-multi-account/build-harness/vendor/terraform-docs
[ -n "/tmp" ] && [ -n "terraform-docs" ] && rm -rf "/tmp/terraform-docs"
make: gomplate: No such file or directory
make: *** [readme/build] Error 1

Any ideas?

aknysh commented 8 months ago

@aknysh

Unfortunately this failed on my machine.

❯ make readme
* Installing packages master...
Cloning into '/Users/homefolder/git/github/terraform-aws-vpc-peering-multi-account/build-harness/vendor/packages'...
remote: Enumerating objects: 942, done.
remote: Counting objects: 100% (942/942), done.
remote: Compressing objects: 100% (451/451), done.
remote: Total 942 (delta 335), reused 627 (delta 251), pack-reused 0
Receiving objects: 100% (942/942), 11.23 MiB | 1.36 MiB/s, done.
Resolving deltas: 100% (335/335), done.
* Installing gomplate to /Users/homefolder/git/github/terraform-aws-vpc-peering-multi-account/build-harness/vendor
mkdir -p -m a+rX /Users/homefolder/git/github/terraform-aws-vpc-peering-multi-account/build-harness/vendor
curl --retry 3 --retry-delay 5 --fail -sSL -o /Users/homefolder/git/github/terraform-aws-vpc-peering-multi-account/build-harness/vendor/gomplate https://github.com/hairyhenderson/gomplate/releases/download/v3.11.7/gomplate_darwin-arm64 && chmod +x /Users/homefolder/git/github/terraform-aws-vpc-peering-multi-account/build-harness/vendor/gomplate
* Installing terraform-docs to /Users/homefolder/git/github/terraform-aws-vpc-peering-multi-account/build-harness/vendor
mkdir -p -m a+rX /Users/homefolder/git/github/terraform-aws-vpc-peering-multi-account/build-harness/vendor
[ -n "/tmp" ] && [ -n "terraform-docs" ] && rm -rf "/tmp/terraform-docs"
mkdir -p /tmp/terraform-docs
curl --retry 3 --retry-delay 5 --fail -sSL -o - https://github.com/segmentio/terraform-docs/releases/download/v0.17.0/terraform-docs-v0.17.0-darwin-arm64.tar.gz | tar -zx -C /tmp/terraform-docs
find /tmp/terraform-docs -type f -name terraform-docs | xargs -I {} cp -f {} /Users/homefolder/git/github/terraform-aws-vpc-peering-multi-account/build-harness/vendor/terraform-docs
chmod +x /Users/homefolder/git/github/terraform-aws-vpc-peering-multi-account/build-harness/vendor/terraform-docs
[ -n "/tmp" ] && [ -n "terraform-docs" ] && rm -rf "/tmp/terraform-docs"
make: gomplate: No such file or directory
make: *** [readme/build] Error 1

Any ideas?

@vquie please run brew install gomplate to install gomplate

https://docs.gomplate.ca/installing/

and then again:

make init
make github/init
make readme
vquie commented 8 months ago

@aknysh, thanks. I should've figured that out myself. 🀦

The command went through successfully and the new changes are pushed.

hans-d commented 7 months ago

/terratest

hans-d commented 7 months ago

/terratest

mergify[bot] commented 6 months ago

πŸ’₯ This pull request now has conflicts. Could you fix it @vquie? πŸ™

mergify[bot] commented 5 months ago

πŸ’₯ This pull request now has conflicts. Could you fix it @vquie? πŸ™

mergify[bot] commented 5 months ago

This PR was closed due to inactivity and merge conflicts. 😭 Please resolve the conflicts and reopen if necessary.