Skip to content

Commit

Permalink
Remove reg_code variables from omre places
Browse files Browse the repository at this point in the history
  • Loading branch information
mpagot committed Jan 22, 2025
1 parent 08e1883 commit b838588
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 79 deletions.
45 changes: 19 additions & 26 deletions terraform/aws/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -63,19 +63,12 @@ module "common_variables" {
provider_type = "aws"
deployment_name = local.deployment_name
deployment_name_in_hostname = var.deployment_name_in_hostname
reg_code = var.reg_code
reg_email = var.reg_email
reg_additional_modules = var.reg_additional_modules
additional_packages = var.additional_packages
public_key = var.public_key
authorized_keys = var.authorized_keys
authorized_user = var.admin_user
monitoring_enabled = var.monitoring_enabled
monitoring_srv_ip = var.monitoring_enabled ? local.monitoring_ip : ""
hana_hwcct = var.hwcct
hana_sid = var.hana_sid
hana_instance_number = var.hana_instance_number
hana_cost_optimized_sid = var.hana_cost_optimized_sid
hana_cost_optimized_instance_number = var.hana_cost_optimized_instance_number
hana_primary_site = var.hana_primary_site
hana_secondary_site = var.hana_secondary_site
Expand Down Expand Up @@ -104,7 +97,6 @@ module "common_variables" {
netweaver_nfs_share = var.drbd_enabled ? "${local.drbd_cluster_vip}:/${var.netweaver_sid}" : var.netweaver_nfs_share
netweaver_sapmnt_path = var.netweaver_sapmnt_path
netweaver_hana_ip = var.hana_ha_enabled ? local.hana_cluster_vip : element(local.hana_ips, 0)
netweaver_hana_sid = var.hana_sid
netweaver_hana_instance_number = var.hana_instance_number
netweaver_ha_enabled = var.netweaver_ha_enabled
netweaver_cluster_vip_mechanism = "route"
Expand Down Expand Up @@ -152,24 +144,6 @@ module "drbd_node" {
nfs_export_name = var.netweaver_sid
}

module "iscsi_server" {
source = "./modules/iscsi_server"
common_variables = module.common_variables.configuration
name = var.iscsi_name
network_domain = var.iscsi_network_domain == "" ? var.network_domain : var.iscsi_network_domain
iscsi_count = local.iscsi_enabled == true ? var.iscsi_count : 0
availability_zones = data.aws_availability_zones.available.names
subnet_ids = aws_subnet.infra-subnet.*.id
os_image = local.iscsi_os_image
os_owner = local.iscsi_os_owner
vm_size = var.iscsi_instancetype
key_name = aws_key_pair.key-pair.key_name
security_group_id = local.security_group_id
host_ips = local.iscsi_ips
lun_count = var.iscsi_lun_count
iscsi_disk_size = var.iscsi_disk_size
}

module "netweaver_node" {
source = "./modules/netweaver_node"
common_variables = module.common_variables.configuration
Expand Down Expand Up @@ -236,3 +210,22 @@ module "monitoring" {
subnet_ids = aws_subnet.infra-subnet.*.id
timezone = var.timezone
}

module "iscsi_server" {
source = "./modules/iscsi_server"
common_variables = module.common_variables.configuration
name = var.iscsi_name
network_domain = var.iscsi_network_domain == "" ? var.network_domain : var.iscsi_network_domain
iscsi_count = local.iscsi_enabled == true ? var.iscsi_count : 0
availability_zones = data.aws_availability_zones.available.names
subnet_ids = aws_subnet.infra-subnet.*.id
os_image = local.iscsi_os_image
os_owner = local.iscsi_os_owner
vm_size = var.iscsi_instancetype
key_name = aws_key_pair.key-pair.key_name
security_group_id = local.security_group_id
host_ips = local.iscsi_ips
lun_count = var.iscsi_lun_count
iscsi_disk_size = var.iscsi_disk_size
}

12 changes: 0 additions & 12 deletions terraform/azure/terraform.tfvars.example
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,6 @@ subnet_address_range = "10.10.1.0/24"
# The name must be unique among different deployments
deployment_name = "mydeployment"

# If BYOS images are used in the deployment, SCC registration code is required. Set `reg_code` and `reg_email` variables below
# By default, all the images are PAYG, so these next parameters are not needed
#reg_code = "<<REG_CODE>>"
#reg_email = "<<your email>>"

# To add additional modules from SCC. None of them is needed by default
#reg_additional_modules = {
# "sle-module-adv-systems-management/12/x86_64" = ""
# "sle-module-containers/12/x86_64" = ""
# "sle-ha-geo/12.4/x86_64" = "<<REG_CODE>>"
#}

# Default os_image. This value is not used if the specific values are set (e.g.: hana_os_image)
# Run the next command to get the possible options and use the 4th column value (version can be changed by `latest`)
# az vm image list --output table --publisher SUSE --all
Expand Down
11 changes: 0 additions & 11 deletions terraform/libvirt/terraform.tfvars.example
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,6 @@ iprange = "192.168.XXX.Y/24"
# Add the "deployment_name" as a prefix to the hostname.
#deployment_name_in_hostname = true

# SUSE Customer Center Registration parameters.
#reg_code = "<<REG_CODE>>"
#reg_email = "<<your email>>"

# For any sle12 version the additional module sle-module-adv-systems-management/12/x86_64 is mandatory if reg_code is provided
#reg_additional_modules = {
# "sle-module-adv-systems-management/12/x86_64" = ""
# "sle-module-containers/12/x86_64" = ""
# "sle-ha-geo/12.4/x86_64" = "<<REG_CODE>>"
#}

# Authorize additional keys optionally (in this case, the private key is not required)
# Path to local files or keys content
#authorized_keys = ["/home/myuser/.ssh/id_rsa_second_key.pub", "/home/myuser/.ssh/id_rsa_third_key.pub", "ssh-rsa AAAAB3NzaC1yc2EAAAA...."]
Expand Down
30 changes: 0 additions & 30 deletions terraform/libvirt/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -79,36 +79,6 @@ variable "network_domain" {
default = "tf.local"
}

variable "reg_code" {
description = "If informed, register the product using SUSEConnect"
default = ""
}

variable "reg_email" {
description = "Email used for the registration"
default = ""
}

# The module format must follow SUSEConnect convention:
# <module_name>/<product_version>/<architecture>
# Example: Suggested modules for SLES for SAP 15
# - sle-module-basesystem/15/x86_64
# - sle-module-desktop-applications/15/x86_64
# - sle-module-server-applications/15/x86_64
# - sle-ha/15/x86_64 (Need the same regcode as SLES for SAP)
# - sle-module-sap-applications/15/x86_64
variable "reg_additional_modules" {
description = "Map of the modules to be registered. Module name = Regcode, when needed."
type = map(string)
default = {}
}

variable "additional_packages" {
description = "extra packages which should be installed"
type = list(any)
default = []
}

#
# Hana related variables

Expand Down

0 comments on commit b838588

Please sign in to comment.