backport of commit d634700c9e80871c607f894ae31a1b6187777e6c (#22966)

Co-authored-by: Ryan Cragun <me@ryan.ec>
This commit is contained in:
hc-github-team-secure-vault-core 2023-09-11 14:27:51 -04:00 committed by GitHub
parent 3b5636d911
commit 79ec31895e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 27 deletions

View File

@ -6,26 +6,12 @@ locals {
// file name extensions for the install packages of vault for the various architectures, distributions and editions
package_extensions = {
amd64 = {
ubuntu = {
# "oss" = "-1_amd64.deb"
"ent" = "-1_amd64.deb"
"ent.hsm" = "-1_amd64.deb"
}
rhel = {
# "oss" = "-1.x86_64.rpm"
"ent" = "-1.x86_64.rpm"
"ent.hsm" = "-1.x86_64.rpm"
}
ubuntu = "-1_amd64.deb"
rhel = "-1.x86_64.rpm"
}
arm64 = {
ubuntu = {
# "oss" = "-1_arm64.deb"
"ent" = "-1_arm64.deb"
}
rhel = {
# "oss" = "-1.aarch64.rpm"
"ent" = "-1.aarch64.rpm"
}
ubuntu = "-1_arm64.deb"
rhel = "-1.aarch64.rpm"
}
}
@ -35,19 +21,21 @@ locals {
// file name prefixes for the install packages of vault for the various distributions and artifact types (package or bundle)
artifact_package_release_names = {
ubuntu = {
"oss" = "vault_"
"ent" = "vault-enterprise_",
"ent.hsm" = "vault-enterprise-hsm_",
"oss" = "vault_"
"ent" = "vault-enterprise_",
"ent.fips1402" = "vault-enterprise-fips1402_",
"ent.hsm" = "vault-enterprise-hsm_",
"ent.hsm.fips1402" = "vault-enterprise-hsm-fips1402_",
},
rhel = {
"oss" = "vault-"
"ent" = "vault-enterprise-",
"ent.hsm" = "vault-enterprise-hsm-",
"oss" = "vault-"
"ent" = "vault-enterprise-",
"ent.fips1402" = "vault-enterprise-fips1402-",
"ent.hsm" = "vault-enterprise-hsm-",
"ent.hsm.fips1402" = "vault-enterprise-hsm-fips1402-",
}
}
artifact_types = ["package", "bundle"]
// edition --> artifact name edition
artifact_name_edition = {
"oss" = ""
@ -58,6 +46,6 @@ locals {
}
artifact_name_prefix = var.artifact_type == "package" ? local.artifact_package_release_names[var.distro][var.edition] : "vault_"
artifact_name_extension = var.artifact_type == "package" ? local.package_extensions[var.arch][var.distro][var.edition] : "_linux_${var.arch}.zip"
artifact_name_extension = var.artifact_type == "package" ? local.package_extensions[var.arch][var.distro] : "_linux_${var.arch}.zip"
artifact_name = var.artifact_type == "package" ? "${local.artifact_name_prefix}${replace(local.artifact_version, "-", "~")}${local.artifact_name_extension}" : "${local.artifact_name_prefix}${var.product_version}${local.artifact_name_extension}"
}