|
| 1 | +module "wrapper" { |
| 2 | + source = "../" |
| 3 | + |
| 4 | + for_each = var.items |
| 5 | + |
| 6 | + create = try(each.value.create, var.defaults.create, true) |
| 7 | + name = try(each.value.name, var.defaults.name, "") |
| 8 | + ami = try(each.value.ami, var.defaults.ami, "") |
| 9 | + associate_public_ip_address = try(each.value.associate_public_ip_address, var.defaults.associate_public_ip_address, null) |
| 10 | + availability_zone = try(each.value.availability_zone, var.defaults.availability_zone, null) |
| 11 | + capacity_reservation_specification = try(each.value.capacity_reservation_specification, var.defaults.capacity_reservation_specification, null) |
| 12 | + cpu_credits = try(each.value.cpu_credits, var.defaults.cpu_credits, null) |
| 13 | + disable_api_termination = try(each.value.disable_api_termination, var.defaults.disable_api_termination, null) |
| 14 | + ebs_block_device = try(each.value.ebs_block_device, var.defaults.ebs_block_device, []) |
| 15 | + ebs_optimized = try(each.value.ebs_optimized, var.defaults.ebs_optimized, null) |
| 16 | + enclave_options_enabled = try(each.value.enclave_options_enabled, var.defaults.enclave_options_enabled, null) |
| 17 | + ephemeral_block_device = try(each.value.ephemeral_block_device, var.defaults.ephemeral_block_device, []) |
| 18 | + get_password_data = try(each.value.get_password_data, var.defaults.get_password_data, null) |
| 19 | + hibernation = try(each.value.hibernation, var.defaults.hibernation, null) |
| 20 | + host_id = try(each.value.host_id, var.defaults.host_id, null) |
| 21 | + iam_instance_profile = try(each.value.iam_instance_profile, var.defaults.iam_instance_profile, null) |
| 22 | + instance_initiated_shutdown_behavior = try(each.value.instance_initiated_shutdown_behavior, var.defaults.instance_initiated_shutdown_behavior, null) |
| 23 | + instance_type = try(each.value.instance_type, var.defaults.instance_type, "t3.micro") |
| 24 | + ipv6_address_count = try(each.value.ipv6_address_count, var.defaults.ipv6_address_count, null) |
| 25 | + ipv6_addresses = try(each.value.ipv6_addresses, var.defaults.ipv6_addresses, null) |
| 26 | + key_name = try(each.value.key_name, var.defaults.key_name, null) |
| 27 | + launch_template = try(each.value.launch_template, var.defaults.launch_template, null) |
| 28 | + metadata_options = try(each.value.metadata_options, var.defaults.metadata_options, {}) |
| 29 | + monitoring = try(each.value.monitoring, var.defaults.monitoring, false) |
| 30 | + network_interface = try(each.value.network_interface, var.defaults.network_interface, []) |
| 31 | + placement_group = try(each.value.placement_group, var.defaults.placement_group, null) |
| 32 | + private_ip = try(each.value.private_ip, var.defaults.private_ip, null) |
| 33 | + root_block_device = try(each.value.root_block_device, var.defaults.root_block_device, []) |
| 34 | + secondary_private_ips = try(each.value.secondary_private_ips, var.defaults.secondary_private_ips, null) |
| 35 | + source_dest_check = try(each.value.source_dest_check, var.defaults.source_dest_check, true) |
| 36 | + subnet_id = try(each.value.subnet_id, var.defaults.subnet_id, null) |
| 37 | + tags = try(each.value.tags, var.defaults.tags, {}) |
| 38 | + tenancy = try(each.value.tenancy, var.defaults.tenancy, null) |
| 39 | + user_data = try(each.value.user_data, var.defaults.user_data, null) |
| 40 | + user_data_base64 = try(each.value.user_data_base64, var.defaults.user_data_base64, null) |
| 41 | + volume_tags = try(each.value.volume_tags, var.defaults.volume_tags, {}) |
| 42 | + enable_volume_tags = try(each.value.enable_volume_tags, var.defaults.enable_volume_tags, true) |
| 43 | + vpc_security_group_ids = try(each.value.vpc_security_group_ids, var.defaults.vpc_security_group_ids, null) |
| 44 | + timeouts = try(each.value.timeouts, var.defaults.timeouts, {}) |
| 45 | + cpu_core_count = try(each.value.cpu_core_count, var.defaults.cpu_core_count, null) |
| 46 | + cpu_threads_per_core = try(each.value.cpu_threads_per_core, var.defaults.cpu_threads_per_core, null) |
| 47 | + create_spot_instance = try(each.value.create_spot_instance, var.defaults.create_spot_instance, false) |
| 48 | + spot_price = try(each.value.spot_price, var.defaults.spot_price, null) |
| 49 | + spot_wait_for_fulfillment = try(each.value.spot_wait_for_fulfillment, var.defaults.spot_wait_for_fulfillment, null) |
| 50 | + spot_type = try(each.value.spot_type, var.defaults.spot_type, null) |
| 51 | + spot_launch_group = try(each.value.spot_launch_group, var.defaults.spot_launch_group, null) |
| 52 | + spot_block_duration_minutes = try(each.value.spot_block_duration_minutes, var.defaults.spot_block_duration_minutes, null) |
| 53 | + spot_instance_interruption_behavior = try(each.value.spot_instance_interruption_behavior, var.defaults.spot_instance_interruption_behavior, null) |
| 54 | + spot_valid_until = try(each.value.spot_valid_until, var.defaults.spot_valid_until, null) |
| 55 | + spot_valid_from = try(each.value.spot_valid_from, var.defaults.spot_valid_from, null) |
| 56 | + putin_khuylo = try(each.value.putin_khuylo, var.defaults.putin_khuylo, true) |
| 57 | +} |
0 commit comments