Skip to content

A module used to simplify the generation of image Azure marketplace image which contain the a dedicated Plan, such as CIS images. It works by passing a simple variable to this module will output the config items. Design to work with the CyberScot Linux VM module 🚀

License

Notifications You must be signed in to change notification settings

cyber-scot/terraform-azurerm-linux-virtual-machine-os-sku-with-plan-calculator

 
 

Repository files navigation

terraform-azurerm-os-calculator

Heavily inspired form Terraform Azure Compute Module

Designed to be used with Libre DevOps VM modules, and will simplify the way of getting SKUs for your VM images without having to look it up.

Simple pass the OS you want to the variable, and it will output the values of the publisher, offer and SKU. All versions are latest

module "os_calculator" {
  source = "github.com/libre-devops/terraform-azurerm-linux-os-sku-with-plan-calculator"

  vm_os_simple = "CISUbuntu20.04L1" // will give you CIS Ubuntu20.04l1 sku properties, to be used in linux-vm module
}

For a full example build, check out the Libre DevOps Website

Requirements

No requirements.

Providers

Name Version
azurerm n/a

Modules

No modules.

Resources

Name Type
azurerm_storage_account.sa resource

Inputs

Name Description Type Default Required
standard_os n/a map
{
"CISCentOS7L1": "center-for-internet-security-inc,cis-centos-7-v2-1-1-l1,cis-centos7-l1",
"CISCentOS8L1": "center-for-internet-security-inc,cis-centos-8-l1,cis-centos8-l1",
"CISDebian10L1": "center-for-internet-security-inc,cis-debian-linux-10-l1,cis-debian10-l1",
"CISDebian9L1": "center-for-internet-security-inc,cis-debian-linux-9-l1,cis-debian9-l1",
"CISOracleLinux7L1": "center-for-internet-security-inc,cis-oracle-linux-7-v2-0-0-l1,cis-oracle7-l1-for-cis",
"CISOracleLinux8L1": "center-for-internet-security-inc,cis-oracle-linux-8-l1,cis-oracle8-l1",
"CISRHEL7L1": "center-for-internet-security-inc,cis-rhel-7-v2-2-0-l1,cis-rhel7-l1",
"CISRHEL7L2": "center-for-internet-security-inc,cis-rhel-7-l2,cis-rhel7-l2",
"CISRHEL8L1": "center-for-internet-security-inc,cis-rhel-8-l1,cis-rhel8-l1",
"CISRHEL8L2": "center-for-internet-security-inc,cis-rhel-8-l2,cis-rhel8-l2",
"CISSUSE15L1": "center-for-internet-security-inc,cis-suse15-l1,cis-suse15-l1",
"CISUbuntu18.04L1": "center-for-internet-security-inc,cis-ubuntu-linux-1804-l1,cis-ubuntu1804-l1",
"CISUbuntu20.04L1": "center-for-internet-security-inc,cis-ubuntu-linux-2004-l1,cis-ubuntu2004-l1"
}
no
vm_os_simple If using this module, pass one of the keys as the variable to get that image properties string "" no

Outputs

Name Description
calculated_value_os_offer Gets the offer value
calculated_value_os_publisher Gets the offer value
calculated_value_os_sku Gets the OS value

Requirements

No requirements.

Providers

No providers.

Modules

No modules.

Resources

No resources.

Inputs

Name Description Type Default Required
standard_os n/a map
{
"CISCentOS7L1": "center-for-internet-security-inc,cis-centos-7-v2-1-1-l1,cis-centos7-l1",
"CISCentOS8L1": "center-for-internet-security-inc,cis-centos-8-l1,cis-centos8-l1",
"CISDebian10L1": "center-for-internet-security-inc,cis-debian-linux-10-l1,cis-debian10-l1",
"CISDebian9L1": "center-for-internet-security-inc,cis-debian-linux-9-l1,cis-debian9-l1",
"CISOracleLinux7L1": "center-for-internet-security-inc,cis-oracle-linux-7-v2-0-0-l1,cis-oracle7-l1-for-cis",
"CISOracleLinux8L1": "center-for-internet-security-inc,cis-oracle-linux-8-l1,cis-oracle8-l1",
"CISRHEL7L1": "center-for-internet-security-inc,cis-rhel-7-v2-2-0-l1,cis-rhel7-l1",
"CISRHEL7L2": "center-for-internet-security-inc,cis-rhel-7-l2,cis-rhel7-l2",
"CISRHEL8L1": "center-for-internet-security-inc,cis-rhel-8-l1,cis-rhel8-l1",
"CISRHEL8L2": "center-for-internet-security-inc,cis-rhel-8-l2,cis-rhel8-l2",
"CISSUSE15L1": "center-for-internet-security-inc,cis-suse15-l1,cis-suse15-l1",
"CISUbuntu18.04L1": "center-for-internet-security-inc,cis-ubuntu-linux-1804-l1,cis-ubuntu1804-l1",
"CISUbuntu20.04L1": "center-for-internet-security-inc,cis-ubuntu-linux-2004-l1,cis-ubuntu2004-l1",
"RockyLinux8FreeGen2": "erockyenterprisesoftwarefoundationinc1653071250513,rockylinux,free"
}
no
vm_os_simple If using this module, pass one of the keys as the variable to get that image properties string "" no

Outputs

Name Description
calculated_value_os_offer Gets the offer value
calculated_value_os_publisher Gets the offer value
calculated_value_os_sku Gets the OS value

About

A module used to simplify the generation of image Azure marketplace image which contain the a dedicated Plan, such as CIS images. It works by passing a simple variable to this module will output the config items. Design to work with the CyberScot Linux VM module 🚀

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 85.8%
  • HCL 10.5%
  • PowerShell 3.7%