Skip to content

Commit

Permalink
fix: Update public ip default value from "" to null
Browse files Browse the repository at this point in the history
  • Loading branch information
nileshgadgi committed May 19, 2023
1 parent b4a053b commit 69db21f
Show file tree
Hide file tree
Showing 10 changed files with 214 additions and 365 deletions.
19 changes: 0 additions & 19 deletions .github/dependabot.yml

This file was deleted.

13 changes: 0 additions & 13 deletions .github/workflows/changelog.yml

This file was deleted.

11 changes: 0 additions & 11 deletions .github/workflows/tfsec.yml

This file was deleted.

49 changes: 0 additions & 49 deletions CHANGELOG.md

This file was deleted.

9 changes: 3 additions & 6 deletions README.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,9 @@ usage: |-
image_version = "latest"
enable_disk_encryption_set = true
key_vault_id = module.key_vault.id
addtional_capabilities_enabled = true
ultra_ssd_enabled = false
enable_encryption_at_host = true
key_vault_rbac_auth_enabled = false
enable_disk_encryption_set = true
key_vault_id = module.key_vault.id
key_vault_key_id = module.virtual-machine.key_id
data_disks = [
{
Expand Down
60 changes: 23 additions & 37 deletions _example/linux-vm/example.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ provider "azurerm" {

module "resource_group" {
source = "clouddrove/resource-group/azure"
version = "1.0.2"
version = "1.0.0"

name = "vm"
name = "app-test-vm"
environment = "test"
label_order = ["name", "environment"]
location = "Canada Central"
}

module "vnet" {
source = "clouddrove/vnet/azure"
version = "1.0.2"
version = "1.0.0"

name = "app"
environment = "test"
Expand All @@ -27,7 +27,7 @@ module "vnet" {

module "subnet" {
source = "clouddrove/subnet/azure"
version = "1.0.2"
version = "1.0.1"

name = "app"
environment = "test"
Expand All @@ -54,7 +54,7 @@ module "subnet" {

module "security_group" {
source = "clouddrove/network-security-group/azure"
version = "1.0.3"
version = "1.0.0"
## Tags
name = "app"
environment = "test"
Expand Down Expand Up @@ -150,19 +150,18 @@ module "virtual-machine" {
caching = "ReadWrite"
disk_size_gb = 30

disk_encryption_set_id = module.virtual-machine.disk_encryption_set-id
storage_image_reference_enabled = true
image_publisher = "Canonical"
image_offer = "0001-com-ubuntu-server-focal"
image_sku = "20_04-lts"
image_version = "latest"


enable_disk_encryption_set = true
key_vault_id = module.key_vault.id
addtional_capabilities_enabled = true
ultra_ssd_enabled = false
enable_encryption_at_host = true
key_vault_rbac_auth_enabled = false
enable_disk_encryption_set = true
key_vault_id = module.key_vault.id
key_vault_key_id = module.virtual-machine.key_id
enable_encryption_at_host = true

data_disks = [
{
Expand All @@ -178,33 +177,20 @@ module "virtual-machine" {
]

# Extension
extensions = [{
extension_publisher = "Microsoft.Azure.Security"
extension_name = "CustomExt"
extension_type = "IaaSAntimalware"
extension_type_handler_version = "1.3"
auto_upgrade_minor_version = true
automatic_upgrade_enabled = false
settings = <<SETTINGS
{
"AntimalwareEnabled": true,
"RealtimeProtectionEnabled": "true",
"ScheduledScanSettings": {
"isEnabled": "false",
"day": "7",
"time": "120",
"scanType": "Quick"
},
"Exclusions": {
"Extensions": "",
"Paths": "",
"Processes": ""
}
}
SETTINGS
}]

protected_settings = [null]
is_extension_enabled = true
extension_name = ["CustomScript"]
extension_publisher = ["Microsoft.Azure.Extensions"]
extension_type = ["CustomScript"]
extension_type_handler = ["2.0"]
auto_upgrade_minor_version = [true]
automatic_upgrade_enabled = [false]
settings = <<SETTINGS
{
"commandToExecute": "hostname && uptime"
}
SETTINGS
protected_settings = [null]

## protected_settings = <<PROTECTED_SETTINGS
# map values here
Expand Down
80 changes: 36 additions & 44 deletions _example/windows-vm/example.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ provider "azurerm" {

module "resource_group" {
source = "clouddrove/resource-group/azure"
version = "1.0.2"
version = "1.0.0"

name = "vm-windows-1"
name = "app-win-vm"
environment = "test"
label_order = ["name", "environment"]
location = "Canada Central"
}

module "vnet" {
source = "clouddrove/vnet/azure"
version = "1.0.2"
version = "1.0.0"

name = "app"
environment = "test"
Expand All @@ -27,7 +27,7 @@ module "vnet" {

module "subnet" {
source = "clouddrove/subnet/azure"
version = "1.0.2"
version = "1.0.1"

name = "app"
environment = "test"
Expand All @@ -54,7 +54,7 @@ module "subnet" {

module "security_group" {
source = "clouddrove/network-security-group/azure"
version = "1.0.3"
version = "1.0.0"
## Tags
name = "app"
environment = "test"
Expand Down Expand Up @@ -104,22 +104,22 @@ module "virtual-machine" {
label_order = ["environment", "name"]

## Common
is_vm_windows = true
enabled = true
machine_count = 1
resource_group_name = module.resource_group.resource_group_name
location = module.resource_group.resource_group_location
create_option = "Empty"
disk_size_gb = 128
provision_vm_agent = true
is_vm_windows = true
enabled = true
machine_count = 1
resource_group_name = module.resource_group.resource_group_name
location = module.resource_group.resource_group_location
disable_password_authentication = false
create_option = "FromImage"
disk_size_gb = 128


## Network Interface
subnet_id = module.subnet.default_subnet_id
private_ip_address_version = "IPv4"
private_ip_address_allocation = "Dynamic"
private_ip_address_allocation = "Static"
primary = true
# private_ip_addresses = ["10.0.1.4"]
private_ip_addresses = ["10.0.1.4"]
#nsg
network_interface_sg_enabled = true
network_security_group_id = module.security_group.id
Expand Down Expand Up @@ -152,7 +152,6 @@ module "virtual-machine" {
image_offer = "WindowsServer"
image_sku = "2019-Datacenter"
image_version = "latest"
caching = "ReadWrite"


# Boot diagnostics to troubleshoot virtual machines, by default uses managed
Expand All @@ -170,10 +169,10 @@ module "virtual-machine" {
disk_size_gb = 128
storage_account_type = "StandardSSD_LRS"
}
# , {
# ,{
# name = "disk2"
# disk_size_gb = 200
# storage_account_type = "StandardSSD_LRS"
# storage_account_type = "Standard_LRS"
# }
]

Expand All @@ -184,33 +183,26 @@ module "virtual-machine" {
# log_analytics_workspace_primary_shared_key = data.azurerm_log_analytics_workspace.example.primary_shared_key

# Extension
extensions = [{
extension_publisher = "Microsoft.Azure.Security"
extension_name = "CustomExt"
extension_type = "IaaSAntimalware"
extension_type_handler_version = "1.3"
auto_upgrade_minor_version = true
automatic_upgrade_enabled = false
settings = <<SETTINGS
{
"AntimalwareEnabled": true,
"RealtimeProtectionEnabled": "true",
"ScheduledScanSettings": {
"isEnabled": "false",
"day": "7",
"time": "120",
"scanType": "Quick"
},
"Exclusions": {
"Extensions": "",
"Paths": "",
"Processes": ""
}
}
SETTINGS
}]

is_extension_enabled = true
extension_name = ["CustomScript"]
extension_publisher = ["Microsoft.Azure.Extensions"]
extension_type = ["CustomScript"]
extension_type_handler = ["2.0"]
auto_upgrade_minor_version = [true]
automatic_upgrade_enabled = [false]
settings = <<SETTINGS
{
"commandToExecute": "hostname && uptime"
}
SETTINGS
protected_settings = [null]

## protected_settings = <<PROTECTED_SETTINGS
# map values here
# PROTECTED_SETTINGS

#### enable diagnostic setting
diagnostic_setting_enable = false
log_analytics_workspace_id = ""
}
}
Loading

0 comments on commit 69db21f

Please sign in to comment.