Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: any type is removed #1075

Closed

Conversation

iammuho
Copy link

@iammuho iammuho commented May 9, 2024

workerB

Description

This pull request updates the customer_gateways variable to use an object type instead of any, as outlined in Terraform's best practices. By providing an object structure for map, the configuration becomes clearer and easier to validate, leading to more predictable outcomes.

Official : https://developer.hashicorp.com/terraform/language/expressions/type-constraints#dynamic-types-the-any-constraint

Motivation and Context

  • Simplifies and standardizes the expected structure of customer gateways.
  • Ensures that important attributes like bgp_asn and ip_address are consistently provided.
  • Replaces the any type, which is discouraged due to the absence of specific typing.

Breaking Changes

  • Existing configurations must ensure that all required attributes are specified according to the new object structure.
  • If users haven't explicitly provided the required data (bgp_asn and ip_address), they will encounter validation errors during deployment.
  • Additionally, any optional attributes that are left out will default to null or another specified default value, which should be accounted for in downstream logic.
  • Users should review their existing customer_gateways definitions and update them to match the new object structure to ensure successful deployment.

How Has This Been Tested?

  • I have updated at least one of the examples/* projects to verify this change.

  • I have tested and validated these changes using one or more of the provided examples/* projects:

    • Example 1: examples/complete
  • I have executed pre-commit run -a on this pull request to ensure compliance.

  • I have verified these changes do not introduce breaking errors in deployment.

@iammuho iammuho changed the title any type is removed [fix] any type is removed May 9, 2024
@iammuho iammuho changed the title [fix] any type is removed fix: any type is removed May 9, 2024
@iammuho iammuho closed this May 9, 2024
Copy link

github-actions bot commented Jun 9, 2024

I'm going to lock this pull request 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 related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant