mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-09-20 00:06:21 +00:00
cli: set constellation uid and role as instance metadata of OpenStack instances (#1311)
This commit is contained in:
parent
8c171a1b66
commit
4e202fa483
@ -135,6 +135,7 @@ module "instance_group_control_plane" {
|
|||||||
openstack_compute_secgroup_v2.vpc_secgroup.id,
|
openstack_compute_secgroup_v2.vpc_secgroup.id,
|
||||||
]
|
]
|
||||||
tags = local.tags
|
tags = local.tags
|
||||||
|
uid = local.uid
|
||||||
disk_size = var.state_disk_size
|
disk_size = var.state_disk_size
|
||||||
availability_zone = var.availability_zone
|
availability_zone = var.availability_zone
|
||||||
network_id = openstack_networking_network_v2.vpc_network.id
|
network_id = openstack_networking_network_v2.vpc_network.id
|
||||||
@ -149,6 +150,7 @@ module "instance_group_worker" {
|
|||||||
image_id = openstack_images_image_v2.constellation_os_image.image_id
|
image_id = openstack_images_image_v2.constellation_os_image.image_id
|
||||||
flavor_id = var.flavor_id
|
flavor_id = var.flavor_id
|
||||||
tags = local.tags
|
tags = local.tags
|
||||||
|
uid = local.uid
|
||||||
security_groups = [
|
security_groups = [
|
||||||
openstack_compute_secgroup_v2.vpc_secgroup.id,
|
openstack_compute_secgroup_v2.vpc_secgroup.id,
|
||||||
]
|
]
|
||||||
|
@ -48,6 +48,8 @@ resource "openstack_compute_instance_v2" "instance_group_member" {
|
|||||||
delete_on_termination = true
|
delete_on_termination = true
|
||||||
}
|
}
|
||||||
metadata = {
|
metadata = {
|
||||||
|
constellation-role = local.role_dashed
|
||||||
|
constellation-uid = var.uid
|
||||||
constellation-init-secret-hash = var.init_secret_hash
|
constellation-init-secret-hash = var.init_secret_hash
|
||||||
}
|
}
|
||||||
availability_zone_hints = var.availability_zone
|
availability_zone_hints = var.availability_zone
|
||||||
|
@ -3,6 +3,11 @@ variable "name" {
|
|||||||
description = "Base name of the instance group."
|
description = "Base name of the instance group."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "uid" {
|
||||||
|
type = string
|
||||||
|
description = "Unique ID of the Constellation."
|
||||||
|
}
|
||||||
|
|
||||||
variable "role" {
|
variable "role" {
|
||||||
type = string
|
type = string
|
||||||
description = "The role of the instance group."
|
description = "The role of the instance group."
|
||||||
|
Loading…
Reference in New Issue
Block a user