terraform-aws-ec2
terraform-aws-ec2 copied to clipboard
fix: Updated the object-based configuration in variable.tf
trafficstars
PLEASE DO NOT MERGE THIS PR
what
- Converted EC2 instance configuration from individual variables to a structured object type
- Introduced new
instance_configurationobject to consolidate all EC2-related settings - Created
spot_configurationobject 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