Skip to content

Load balancer Refactor #24

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jvallexm
Copy link

@jvallexm jvallexm commented Aug 4, 2021

  • Enabled module to create only a single listener and single pool. This allows users to make better use of the for_each block when creating load balancers. This way, additional pools and listeners can be added to existing load balancers with the create_load_balancer variable.
  • Simplified logic for using a load balancer from data. This is tracked via a single local variable rather than being calculated for each block.
  • Added validation to variables that only accept a small number of values.
  • Simplified variable to require fewer input variables.
    • While the module now accepts more variables, in the previous version creating the complex objects for pools and listeners, many null fields would have to be added, resulting in adding many unneeded null fields. This change allows users to only use the listener and pool variables they need, rather than having to list ones they do not due to type constraints.
    • Rather than having to specify a type variable, users can now set use_public_load_balancer to false to create a private load balancer
    • The profile field can only support the value "network-fixed". This variable has been removed, profile field will be dynamically added if logging and security_group_ids are not passed
    • The ibm_is_lb_pool_member block now dynamically checks if a value is an ip address or instance id and will assign it to either target_address or target_id respectively
    • The weight value for ibm_is_lb_pool_member is only accepted if the pool algorithm is weighted_round_robin. This will be set to null if it is not, and will use the pool_member_weights variable otherwise.
    • rules blocks created for ibm_is_lb_listener_policy cannot be changed. For easier management and readability, rules blocks are no longer created. All rules are created dynamically from the var.listener_policies.rules list using the ibm_is_lb_listener_policy_rule block
  • Simplified output names so that it is easer to reference them outside of the module
  • Expanded for blocks to have more descriptive arguments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant