grem11n / terraform-aws-vpc-peering

Terraform module to setup VPC peering connection
https://registry.terraform.io/modules/grem11n/vpc-peering/aws/latest
Apache License 2.0
126 stars 91 forks source link

Move from map to tomap. #70

Closed zelch closed 3 years ago

zelch commented 3 years ago

This is required for support of terraform v0.15.

With this, stuff works, though we are getting warnings about the empty provider blocks.

I can fix that warning, but doing so makes terraform validate fail messily inside the module itself, I suspect that this is a terraform v0.15.0 bug, but that's going to have to be a matter for another day.

simonweil commented 3 years ago

Side note about TF 0.15, the empty providers should change to the new setup in the versions part, this should fix the count and for_each issues

zelch commented 3 years ago

Side note about TF 0.15, the empty providers should change to the new setup in the versions part, this should fix the count and for_each issues

Agreed that we should change to the new setup, but I couldn't make it pass 'terraform validate' in the module at all if I did.

The users of it worked perfectly with no warnings at all, but I assume that we'd like to keep the ability to validate the module inside the module.

zelch commented 3 years ago

Note, the terratest checks appear to simply be broken, they appear to be failing on the main repository, and here they are failing due to a lack of AWS credentials. So I'm not sure how I can get that to pass.

But I did address the format issues causing the rest of the checks to fail.

grem11n commented 3 years ago

Also, regarding the failing tests. GitHub Actions don't expose any secrets outside of the parent repository for security reasons (which makes total sense). So, tests from forks fail. That's why each time someone creates a PR, I have to create a new branch, literally copy-paste the code, and run the tests on my own.

However, these tests are somewhat flaky. Sometimes they fail because AWS peering is still pending. I need to look into it as well. In any case, flaky tests don't impact module's performance in any case