Skip to content

Commit 7a21c70

Browse files
authored
Merge pull request #422 from zhaocongjia/TEAM-10462
Update to AzureRM Terraform Provider Version 4
2 parents cb40383 + 921eeb9 commit 7a21c70

8 files changed

Lines changed: 62 additions & 56 deletions

File tree

terraform/azure/.terraform.lock.hcl

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

terraform/azure/modules/drbd_node/main.tf

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ resource "azurerm_public_ip" "drbd" {
117117
name = "pip-drbd${format("%02d", count.index + 1)}"
118118
location = var.az_region
119119
resource_group_name = var.resource_group_name
120-
allocation_method = "Dynamic"
120+
allocation_method = "Static"
121121
idle_timeout_in_minutes = 30
122122

123123
tags = {
@@ -153,10 +153,11 @@ resource "azurerm_image" "drbd-image" {
153153
resource_group_name = var.resource_group_name
154154

155155
os_disk {
156-
os_type = "Linux"
157-
os_state = "Generalized"
158-
blob_uri = var.drbd_image_uri
159-
size_gb = "32"
156+
os_type = "Linux"
157+
os_state = "Generalized"
158+
blob_uri = var.drbd_image_uri
159+
size_gb = "32"
160+
storage_type = "Premium_LRS"
160161
}
161162

162163
tags = {

terraform/azure/modules/hana_node/main.tf

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ resource "azurerm_public_ip" "hana" {
177177
name = "pip-${var.name}${format("%02d", count.index + 1)}"
178178
location = var.az_region
179179
resource_group_name = var.resource_group_name
180-
allocation_method = "Dynamic"
180+
allocation_method = "Static"
181181
idle_timeout_in_minutes = 30
182182

183183
tags = {
@@ -192,10 +192,11 @@ resource "azurerm_image" "sles4sap" {
192192
resource_group_name = var.resource_group_name
193193

194194
os_disk {
195-
os_type = "Linux"
196-
os_state = "Generalized"
197-
blob_uri = var.sles4sap_uri
198-
size_gb = "32"
195+
os_type = "Linux"
196+
os_state = "Generalized"
197+
blob_uri = var.sles4sap_uri
198+
size_gb = "32"
199+
storage_type = "Premium_LRS"
199200
}
200201

201202
tags = {

terraform/azure/modules/iscsi_server/main.tf

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ resource "azurerm_public_ip" "iscsisrv" {
2929
name = "pip-iscsisrv${format("%02d", count.index + 1)}"
3030
location = var.az_region
3131
resource_group_name = var.resource_group_name
32-
allocation_method = "Dynamic"
32+
allocation_method = "Static"
3333
idle_timeout_in_minutes = 30
3434

3535
tags = {
@@ -46,10 +46,11 @@ resource "azurerm_image" "iscsi_srv" {
4646
resource_group_name = var.resource_group_name
4747

4848
os_disk {
49-
os_type = "Linux"
50-
os_state = "Generalized"
51-
blob_uri = var.iscsi_srv_uri
52-
size_gb = "32"
49+
os_type = "Linux"
50+
os_state = "Generalized"
51+
blob_uri = var.iscsi_srv_uri
52+
size_gb = "32"
53+
storage_type = "Premium_LRS"
5354
}
5455

5556
tags = {

terraform/azure/modules/majority_maker_node/main.tf

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ locals {
66
# majority maker network configuration
77

88
resource "azurerm_network_interface" "majority_maker" {
9-
count = var.node_count
10-
name = "nic-${var.name}majority_maker"
11-
location = var.az_region
12-
resource_group_name = var.resource_group_name
13-
enable_accelerated_networking = var.enable_accelerated_networking
9+
count = var.node_count
10+
name = "nic-${var.name}majority_maker"
11+
location = var.az_region
12+
resource_group_name = var.resource_group_name
13+
accelerated_networking_enabled = var.enable_accelerated_networking
1414

1515
ip_configuration {
1616
name = "ipconf-primary"
@@ -30,7 +30,7 @@ resource "azurerm_public_ip" "majority_maker" {
3030
name = "pip-${var.name}majority_maker"
3131
location = var.az_region
3232
resource_group_name = var.resource_group_name
33-
allocation_method = "Dynamic"
33+
allocation_method = "Static"
3434
idle_timeout_in_minutes = 30
3535

3636
tags = {
@@ -47,10 +47,11 @@ resource "azurerm_image" "sles4sap" {
4747
resource_group_name = var.resource_group_name
4848

4949
os_disk {
50-
os_type = "Linux"
51-
os_state = "Generalized"
52-
blob_uri = var.sles4sap_uri
53-
size_gb = "32"
50+
os_type = "Linux"
51+
os_state = "Generalized"
52+
blob_uri = var.sles4sap_uri
53+
size_gb = "32"
54+
storage_type = "Premium_LRS"
5455
}
5556

5657
tags = {

terraform/azure/modules/monitoring/main.tf

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ resource "azurerm_public_ip" "monitoring" {
2929
count = var.monitoring_enabled ? 1 : 0
3030
location = var.az_region
3131
resource_group_name = var.resource_group_name
32-
allocation_method = "Dynamic"
32+
allocation_method = "Static"
3333
idle_timeout_in_minutes = 30
3434

3535
tags = {
@@ -46,10 +46,11 @@ resource "azurerm_image" "monitoring" {
4646
resource_group_name = var.resource_group_name
4747

4848
os_disk {
49-
os_type = "Linux"
50-
os_state = "Generalized"
51-
blob_uri = var.monitoring_uri
52-
size_gb = "32"
49+
os_type = "Linux"
50+
os_state = "Generalized"
51+
blob_uri = var.monitoring_uri
52+
size_gb = "32"
53+
storage_type = "Premium_LRS"
5354
}
5455

5556
tags = {

terraform/azure/modules/netweaver_node/main.tf

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ resource "azurerm_public_ip" "netweaver" {
194194
name = "pip-netweaver${format("%02d", count.index + 1)}"
195195
location = var.az_region
196196
resource_group_name = var.resource_group_name
197-
allocation_method = "Dynamic"
197+
allocation_method = "Static"
198198
idle_timeout_in_minutes = 30
199199

200200
tags = {
@@ -203,11 +203,11 @@ resource "azurerm_public_ip" "netweaver" {
203203
}
204204

205205
resource "azurerm_network_interface" "netweaver" {
206-
count = local.vm_count
207-
name = "nic-netweaver${format("%02d", count.index + 1)}"
208-
location = var.az_region
209-
resource_group_name = var.resource_group_name
210-
enable_accelerated_networking = count.index < var.xscs_server_count ? var.xscs_accelerated_networking : var.app_accelerated_networking
206+
count = local.vm_count
207+
name = "nic-netweaver${format("%02d", count.index + 1)}"
208+
location = var.az_region
209+
resource_group_name = var.resource_group_name
210+
accelerated_networking_enabled = count.index < var.xscs_server_count ? var.xscs_accelerated_networking : var.app_accelerated_networking
211211

212212
ip_configuration {
213213
name = "ipconf-primary"
@@ -267,10 +267,11 @@ resource "azurerm_image" "netweaver-image" {
267267
resource_group_name = var.resource_group_name
268268

269269
os_disk {
270-
os_type = "Linux"
271-
os_state = "Generalized"
272-
blob_uri = var.netweaver_image_uri
273-
size_gb = "32"
270+
os_type = "Linux"
271+
os_state = "Generalized"
272+
blob_uri = var.netweaver_image_uri
273+
size_gb = "32"
274+
storage_type = "Premium_LRS"
274275
}
275276

276277
tags = {

terraform/azure/version.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
# Configure the Azure Provider
55
azurerm = {
66
source = "hashicorp/azurerm"
7-
version = "~> 3.116.0"
7+
version = "~> 4.54.0"
88
}
99
null = {
1010
source = "hashicorp/null"

0 commit comments

Comments
 (0)