Skip to content

Commit 8cdacff

Browse files
committed
Rename module resource to 'this'
1 parent 99c8cc8 commit 8cdacff

File tree

31 files changed

+43
-43
lines changed

31 files changed

+43
-43
lines changed

modules/linux_virtual_machine/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
resource "azurerm_linux_virtual_machine" "vm" {
1+
resource "azurerm_linux_virtual_machine" "this" {
22
name = var.name
33
resource_group_name = var.resource_group_name
44
location = var.location
@@ -22,4 +22,4 @@ resource "azurerm_linux_virtual_machine" "vm" {
2222
sku = var.source_image_reference_sku
2323
version = var.source_image_reference_version
2424
}
25-
}
25+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
output "id" {
22
value = azurerm_linux_virtual_machine.vm.id
3-
}
3+
}

modules/linux_virtual_machine/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,4 @@ variable "source_image_reference_version" {
6363
description = "Specifies the version of the image used to create the virtual machines"
6464
type = string
6565
default = "latest"
66-
}
66+
}

modules/managed_disk/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
resource "azurerm_managed_disk" "disk" {
1+
resource "azurerm_managed_disk" "this" {
22
name = var.name
33
location = var.location
44
resource_group_name = var.resource_group_name
@@ -9,4 +9,4 @@ resource "azurerm_managed_disk" "disk" {
99
encryption_settings {
1010
enabled = true
1111
}
12-
}
12+
}

modules/managed_disk/outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
output "id" {
22
value = azurerm_managed_disk.disk.id
3-
}
3+
}

modules/managed_disk/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ variable "create_option" {
2828
variable "disk_size_gb" {
2929
description = "Specifies the size of the managed disk to create in gigabytes"
3030
type = number
31-
}
31+
}

modules/network_interface/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
resource "azurerm_network_interface" "nic" {
1+
resource "azurerm_network_interface" "this" {
22
name = var.name
33
location = var.location
44
resource_group_name = var.resource_group_name
@@ -11,4 +11,4 @@ resource "azurerm_network_interface" "nic" {
1111
private_ip_address = var.ip_configuration_private_ip_address
1212
public_ip_address_id = var.ip_configuration_public_ip_address_id
1313
}
14-
}
14+
}

modules/network_interface/outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ output "resource_group_name" {
88

99
output "location" {
1010
value = azurerm_network_interface.nic.location
11-
}
11+
}

modules/network_interface/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ variable "ip_configuration_public_ip_address_id" {
4545
description = "Reference to a Public IP Address to associate with this NIC"
4646
type = string
4747
default = null
48-
}
48+
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
resource "azurerm_network_interface_security_group_association" "nic_nsg_association" {
1+
resource "azurerm_network_interface_security_group_association" "this" {
22
network_interface_id = var.network_interface_id
33
network_security_group_id = var.network_security_group_id
4-
}
4+
}

modules/network_interface_security_group_association/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ variable "network_interface_id" {
66
variable "network_security_group_id" {
77
description = "The ID of the Network Security Group which should be attached to the Network Interface"
88
type = string
9-
}
9+
}

modules/network_security_group/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
resource "azurerm_network_security_group" "nsg" {
1+
resource "azurerm_network_security_group" "this" {
22
name = var.name
33
location = var.location
44
resource_group_name = var.resource_group_name
@@ -18,4 +18,4 @@ resource "azurerm_network_security_group" "nsg" {
1818
destination_address_prefix = security_rule.value.destination_address_prefix
1919
}
2020
}
21-
}
21+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
output "id" {
22
value = azurerm_network_security_group.nsg.id
3-
}
3+
}

modules/network_security_group/variables.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ variable "resource_group_name" {
1414
}
1515

1616
variable "security_rules" {
17-
description = "List of objects representing security rules"
18-
type = list(object({
17+
description = "Set of objects representing security rules"
18+
type = set(object({
1919
name = string
2020
priority = number
2121
direction = string
@@ -26,4 +26,4 @@ variable "security_rules" {
2626
source_address_prefix = string
2727
destination_address_prefix = string
2828
}))
29-
}
29+
}

modules/public_ip/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
resource "azurerm_public_ip" "pip" {
1+
resource "azurerm_public_ip" "this" {
22
name = var.name
33
resource_group_name = var.resource_group_name
44
location = var.location
55
allocation_method = var.allocation_method
66
sku = var.sku
77
ip_version = var.ip_version
88
domain_name_label = var.domain_name_label
9-
}
9+
}

modules/public_ip/outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
output "id" {
22
value = azurerm_public_ip.pip.id
3-
}
3+
}

modules/public_ip/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ variable "ip_version" {
3434
variable "domain_name_label" {
3535
description = "Label for the Domain Name. Will be used to make up the FQDN. If a domain name label is specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system"
3636
type = string
37-
}
37+
}

modules/resource_group/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
resource "azurerm_resource_group" "rg" {
1+
resource "azurerm_resource_group" "this" {
22
name = var.name
33
location = var.location
4-
}
4+
}

modules/resource_group/outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ output "name" {
44

55
output "location" {
66
value = azurerm_resource_group.rg.location
7-
}
7+
}

modules/resource_group/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ variable "name" {
66
variable "location" {
77
description = "The Azure Region where the Resource Group should exist"
88
type = string
9-
}
9+
}

modules/subnet/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
resource "azurerm_subnet" "snet" {
1+
resource "azurerm_subnet" "this" {
22
name = var.name
33
resource_group_name = var.resource_group_name
44
virtual_network_name = var.virtual_network_name
55
address_prefixes = var.address_prefixes
6-
}
6+
}

modules/subnet/outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ output "name" {
88

99
output "resource_group_name" {
1010
value = azurerm_subnet.snet.resource_group_name
11-
}
11+
}

modules/subnet/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ variable "resource_group_name" {
1616
variable "virtual_network_name" {
1717
description = "The name of the virtual network to which to attach the subnet"
1818
type = string
19-
}
19+
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
resource "azurerm_virtual_machine_data_disk_attachment" "data_disk_attachment" {
1+
resource "azurerm_virtual_machine_data_disk_attachment" "this" {
22
managed_disk_id = var.managed_disk_id
33
virtual_machine_id = var.virtual_machine_id
44
lun = var.lun
55
caching = var.caching
6-
}
6+
}

modules/virtual_machine_data_disk_attachment/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ variable "caching" {
1717
description = "Specifies the caching requirements for this Data Disk. Possible values include None, ReadOnly and ReadWrite"
1818
type = string
1919
default = "ReadWrite"
20-
}
20+
}

modules/virtual_network/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
resource "azurerm_virtual_network" "vnet" {
1+
resource "azurerm_virtual_network" "this" {
22
name = var.name
33
address_space = var.address_space
44
location = var.location
55
resource_group_name = var.resource_group_name
6-
}
6+
}

modules/virtual_network/outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ output "resource_group_name" {
88

99
output "location" {
1010
value = azurerm_virtual_network.vnet.location
11-
}
11+
}

modules/virtual_network/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ variable "resource_group_name" {
1616
variable "location" {
1717
description = "The location/region where the virtual network is created"
1818
type = string
19-
}
19+
}

terraform.tfvars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
location = "west europe"
1+
location = "west europe"

variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
variable "location" {
22
description = "The Azure Region where the resources should exist"
33
type = string
4-
}
4+
}

versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ terraform {
77
version = "3.7.0"
88
}
99
}
10-
}
10+
}

0 commit comments

Comments
 (0)