terraform-aws-ec2 icon indicating copy to clipboard operation
terraform-aws-ec2 copied to clipboard

fix: Updated the object-based configuration in variable.tf

Open Bhomesh opened this issue 1 year ago • 0 comments
trafficstars

PLEASE DO NOT MERGE THIS PR

what

  • Converted EC2 instance configuration from individual variables to a structured object type
  • Introduced new instance_configuration object to consolidate all EC2-related settings
  • Created spot_configuration object to group spot instance specific parameters
  • Updated resource configurations to use the new object structure
  • Added default values and optional fields to maintain backward compatibility

why

  • Improves code maintainability by grouping related configurations together
  • Reduces the number of individual variables that need to be managed
  • Makes it easier to validate input configurations with proper type constraints
  • Simplifies module usage by providing a more structured and intuitive interface
  • Follows HashiCorp's recommended practices for variable organization
  • Makes it easier to extend the module with new instance configurations in the future

Bhomesh avatar Nov 18 '24 20:11 Bhomesh