terraform-aws-modules / terraform-aws-apigateway-v2

Terraform module to create AWS API Gateway v2 (HTTP/WebSocket) 🇺🇦
https://registry.terraform.io/modules/terraform-aws-modules/apigateway-v2/aws
Apache License 2.0
144 stars 187 forks source link

Add support for ignore_changes lifecycle Meta argument #104

Closed Crash0v3rrid3 closed 1 month ago

Crash0v3rrid3 commented 1 month ago

I am using the terraform-aws-apigateway-v2 module to manage my API Gateway resources. In my architecture, I am following a Cognito app-based multitenancy approach. Due to this, certain configurations such as authorizer.jwt_configuration.audience and api_gw.cors_configuration.allow_origin need to be dynamic because clients can be added or removed dynamically with their own app client IDs and domains.

Currently, these configurations are tightly managed by the Terraform module, causing unnecessary changes and disruptions on every deployment. To handle this more efficiently, I need support for the ignore_changes lifecycle Meta argument to be added to the module. This would allow specific configurations to be ignored by Terraform, thus preventing them from being updated on each deployment.

Feature Request:

Please add support for the ignore_changes lifecycle Meta argument for the resources included in the module.

By adding this feature, it will allow for dynamic updates to these lists without causing disruptions or requiring manual intervention with each deployment.

Use Case:

In a multitenant environment, the list of clients can change frequently. Without the ability to ignore changes to these configurations, the Terraform module attempts to update them on every deployment, which is not desirable. Enabling ignore_changes for these configurations will improve the flexibility and usability of the module in dynamic environments.

Thank you for considering this feature request. It will greatly enhance the module's applicability in real-world scenarios where dynamic client management is required.

Environment:

Terraform version: v1.8.2 on linux_amd64 Module version: 4.0.0 AWS Provider version: v5.45.0

Please let me know if there is any other workaround for this, I'm open to a different and viable solution.

Crash0v3rrid3 commented 1 month ago

I see that lifecycle settings only allow literal values. Closing issue.

github-actions[bot] commented 1 week ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.