infrastructure-as-code/openstack-tf/modules/generic_smartgears_service/generic_smartgears_service.tf

28 lines
864 B
Terraform
Raw Normal View History

2023-12-01 17:49:38 +01:00
# Generic smartgears_service instance
resource "openstack_compute_instance_v2" "smartgears_service" {
for_each = var.smartgears_service_instances_map
name = each.value.name
availability_zone_hints = var.availability_zones_names.availability_zone_no_gpu
flavor_name = each.value.flavor
key_pair = module.ssh_settings.ssh_key_name
security_groups = each.value.security_groups
block_device {
uuid = each.value.block_device_uuid
source_type = "image"
volume_size = 10
boot_index = 0
destination_type = "volume"
delete_on_termination = false
}
dynamic "network" {
for_each = each.value.networks
content {
name = network.value
}
}
user_data = file("${var.ubuntu1804_data_file}")
}
2023-12-01 17:49:38 +01:00