Skip to content

Commit

Permalink
add activation key name
Browse files Browse the repository at this point in the history
  • Loading branch information
SalimKainos committed Jun 27, 2024
1 parent 05a7f2c commit 29f9b7f
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 28 deletions.
10 changes: 0 additions & 10 deletions keyvault.tf
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,4 @@ data "azurerm_key_vault_secret" "nessus_agent_key" {
key_vault_id = data.azurerm_key_vault.soc_vault[0].id
}

data "azurerm_key_vault" "redhat_vault" {
provider = azurerm.cnp
name = var.redhat_vault_name
resource_group_name = var.redhat_vault_rg
}

data "azurerm_key_vault_secret" "redhat_password" {
provider = azurerm.cnp
name = "redhat-portal"
key_vault_id = data.azurerm_key_vault.redhat_vault.id
}
1 change: 0 additions & 1 deletion locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ locals {
NESSUS_SERVER = var.nessus_server == null || var.nessus_server == "" ? local.nessus_server : var.nessus_server
NESSUS_KEY = var.nessus_key == null || var.nessus_key == "" ? (length(data.azurerm_key_vault_secret.nessus_agent_key) > 0 ? data.azurerm_key_vault_secret.nessus_agent_key[0].value : "") : var.nessus_key
NESSUS_GROUPS = var.nessus_groups == null || var.nessus_groups == "" ? "Platform-Operation-Bastions" : var.nessus_groups
ELS_PASSWORD = var.els_password != null || var.els_password == "" ? (length(data.azurerm_key_vault_secret.redhat_password.value) > 0 ? data.azurerm_key_vault_secret.redhat_password.value : "") : var.els_password
}), var.additional_script_path == null ? "" : file("${var.additional_script_path}")))

additional_template_file = var.additional_script_uri != null ? format("%s%s%s", "[ ", "\"${var.additional_script_uri}\"", " ]") : "\"\""
Expand Down
2 changes: 1 addition & 1 deletion scripts/bootstrap_vm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ if [[ "$OS_TYPE" == *"Red Hat Enterprise"* && "$OS_TYPE" == *"7."* ]]; then
echo "This is Red Hat Enterprise Linux 7."

# Register the system and attach a subscription pool
subscription-manager register --auto-attach
subscription-manager register --org=7324337 --activationkey=Rhel-els


# Refresh subscription-manager and verify identity
Expand Down
16 changes: 0 additions & 16 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -317,21 +317,5 @@ variable "soc_vault_name" {
default = "soc-prod"
}

variable "redhat_vault_rg" {
description = "The name of the resource group where the redhat Key Vault is located."
type = string
default = "cnp-core-infra"
}

variable "redhat_vault_name" {
description = "The name of the redhat Key Vault."
type = string
default = "infra-vault-nonprod"
}

variable "els_password" {
description = "Redhat ELS admin password - read input from keyvault."
type = string
default = null
}

0 comments on commit 29f9b7f

Please sign in to comment.