nhs-england-tools / terraform-aws-opennext

🧱 💻 ☁️ A Terraform module for deploying a Next.js application built with OpenNext to AWS
MIT License
75 stars 10 forks source link

Feature: add region explicitly in aws provider to avoid regressions #15

Closed andylamp closed 5 months ago

andylamp commented 8 months ago

Description

This addresses the regression observed in certain configurations as described in issue #14.

The PR refactors the project to take the region from variables but only if and only if provided explicitly. If not, the current behavior is maintained. This refactor means that all modules within the project take the provider region as a parameter which is used for all non aliased (i.e. non-global) ones.

Context

Resolves regressions observed in #14.

Type of changes

Checklist


Sensitive Information Declaration

To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.

andylamp commented 8 months ago

is any maintainer around?

Tomdango commented 7 months ago

Hi @andylamp,

Sorry for the slowness in getting this resolved. There have been other priorities which means this project has slightly slipped - we'll be looking for more maintainers of the project soon.

Could you recreate the branch without the aws_wafv2_web_acl_logging_configuration commented out? The issue with this is being fixed under #17.

andylamp commented 7 months ago

hey @Tomdango! thanks for reaching out and sorry for pestering about this but we needed to deploy the module. Due the issues it had we could not.

Firstly, at first apply - at least with the latest providers and terraform versions - the resource aws_wafv2_web_acl_logging_configuration has a count which cannot be inferred at creation and causes issues. It requires to use target to selectively apply them.

Commenting that was the easiest way to get this running as it was not of high priority to us to have this going, but feel this is a significant issue.

Another is that the concurrency for the lambdas is hardcoded and there is no parameter to tweak it, so I made a change to account for that. Please see the branch here in my own fork.

Note: these again used the philosophy of enhance functionality but not introduce breaking changes, so every change is a drop-in replacement without affecting current functionality.

LMK what you think.

andylamp commented 6 months ago

@Tomdango, just asking again about this for the last time... otherwise, I think I'll just fork and publish my own version in TF repositories...

andylamp commented 5 months ago

Closing this due to the reasons state above.

Tomdango commented 5 months ago

Sorry @andylamp - I'm happy to include these changes. There's not really any active maintainers of this repo outside of myself at the moment, so I'll likely add a note on the main README that we'd be looking for more maintainers on this project.

The count issue was resolved in https://github.com/nhs-england-tools/terraform-aws-opennext/pull/17, minus the commented out changes in modules/opennext-cloudfront/waf.tf. I'm happy to make these changes, and apologise again that it has taken a while to get this sorted.

andylamp commented 5 months ago

@Tomdango thanks a lot for the visibility, sorry was not aware this was not actively maintained... I know the burden open source can bring... Just wanted to have these changes since we are actively using this library in our FE pipelines. BTW, given that we are actively using this perhaps I could chip in to help you maintain this? If that's OK with you as well...

andylamp commented 5 months ago

ah, also - the latest version is v1.0.6 which includes a few other fixes as well... I'll merge these changes an open a new PR regarding this.

Tomdango commented 5 months ago

@andylamp Feel free to send an email over to thomas.judd-cooper1@nhs.net and we'll take it from there 🙂