mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-04-21 15:56:26 -04:00
openstack implementation
This commit is contained in:
parent
9406fe1502
commit
91627b6326
@ -264,6 +264,14 @@ func openStackTerraformVars(conf *config.Config, imageRef string) (*terraform.Op
|
||||
StateDiskType: group.StateDiskType,
|
||||
}
|
||||
}
|
||||
|
||||
// since openstack does not support tags in the form of key = value, the tags will be converted
|
||||
// to an array of "key=value" strings
|
||||
tags := []string{}
|
||||
for key, value := range conf.Tags {
|
||||
tags = append(tags, fmt.Sprintf("%s=%s", key, value))
|
||||
}
|
||||
|
||||
return &terraform.OpenStackClusterVariables{
|
||||
Name: conf.Name,
|
||||
Cloud: toPtr(conf.Provider.OpenStack.Cloud),
|
||||
@ -275,6 +283,7 @@ func openStackTerraformVars(conf *config.Config, imageRef string) (*terraform.Op
|
||||
CustomEndpoint: conf.CustomEndpoint,
|
||||
InternalLoadBalancer: conf.InternalLoadBalancer,
|
||||
STACKITProjectID: conf.Provider.OpenStack.STACKITProjectID,
|
||||
AdditionalTags: tags,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
@ -303,6 +303,7 @@ type OpenStackClusterVariables struct {
|
||||
CustomEndpoint string `hcl:"custom_endpoint" cty:"custom_endpoint"`
|
||||
// InternalLoadBalancer is true if an internal load balancer should be created.
|
||||
InternalLoadBalancer bool `hcl:"internal_load_balancer" cty:"internal_load_balancer"`
|
||||
AdditionalTags []string `hcl:"additional_tags" cty:"additional_tags"`
|
||||
}
|
||||
|
||||
// GetCreateMAA gets the CreateMAA variable.
|
||||
|
@ -46,7 +46,7 @@ locals {
|
||||
])
|
||||
cidr_vpc_subnet_nodes = "192.168.178.0/24"
|
||||
cidr_vpc_subnet_lbs = "192.168.177.0/24"
|
||||
tags = ["constellation-uid-${local.uid}"]
|
||||
tags = concat(["constellation-uid-${local.uid}"], var.additional_tags)
|
||||
identity_service = [
|
||||
for entry in data.openstack_identity_auth_scope_v3.scope.service_catalog :
|
||||
entry if entry.type == "identity"
|
||||
|
@ -59,6 +59,11 @@ variable "floating_ip_pool_id" {
|
||||
description = "Pool (network name) to use for floating IPs."
|
||||
}
|
||||
|
||||
variable "additional_tags" {
|
||||
type = list
|
||||
description = "Additional tags that should be applied to created resources."
|
||||
}
|
||||
|
||||
# STACKIT-specific variables
|
||||
|
||||
variable "stackit_project_id" {
|
||||
|
Loading…
x
Reference in New Issue
Block a user