Skip to content

Commit ac85590

Browse files
author
dmytro_velychko3
committed
fix: changed outputs
1 parent e27374d commit ac85590

File tree

4 files changed

+18
-10
lines changed

4 files changed

+18
-10
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ No modules.
9191
| Name | Description |
9292
| ----------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- |
9393
| <a name="output_id"></a> [id](#output\_id) | The ID of the Linux Virtual Machine |
94+
| <a name="output_access_connector_identity"></a> [access\_connector\_identity](#output\_access\_connector\_identity) | linux virtual machine Identities list |
9495
<!-- END_TF_DOCS -->
9596

9697
## License

main.tf

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ resource "azurerm_network_interface" "this" {
2121
tags = var.tags
2222

2323
ip_configuration {
24-
name = "ip-${var.project}-${var.env}-${var.location}"
24+
name = "ip-config-${var.project}-${var.env}-${var.location}"
2525
subnet_id = var.subnet_id
2626
private_ip_address_allocation = var.network_interface.private_ip_address_allocation
2727
public_ip_address_id = var.network_interface.public_ip_enabled ? azurerm_public_ip.this[0].id : ""
@@ -31,12 +31,16 @@ resource "azurerm_network_interface" "this" {
3131
resource "azurerm_linux_virtual_machine" "this" {
3232
name = local.virtual_machine_name
3333
resource_group_name = var.resource_group
34-
location = var.location
34+
location = var.location
3535
size = var.virtual_machine.size
3636
admin_username = var.virtual_machine.admin_username
3737
tags = var.tags
3838
network_interface_ids = [azurerm_network_interface.this.id, ]
3939

40+
identity {
41+
type = "SystemAssigned"
42+
}
43+
4044
admin_ssh_key {
4145
username = var.admin_ssh_key.username
4246
public_key = var.admin_ssh_key.public_key

outputs.tf

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
output "id" {
2-
#value = [for n in databricks_sql_endpoint.this : n.jdbc_url]
32
value = azurerm_linux_virtual_machine.this.id
43
description = "The ID of the Linux Virtual Machine"
54
}
65

6+
output "access_connector_identity" {
7+
value = azurerm_linux_virtual_machine.this.identity.0.principal_id
8+
description = "linux virtual machine Identities list"
9+
}

variables.tf

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,7 @@ variable "env" {
1010

1111
variable "resource_group" {
1212
type = string
13-
description = "The name of the resource group in which to create the virtual machine"
14-
}
15-
16-
variable "location" {
17-
type = string
18-
description = "Azure location"
13+
description = "The name of the resource group in which to create the storage account"
1914
}
2015

2116
variable "suffix" {
@@ -24,6 +19,11 @@ variable "suffix" {
2419
default = ""
2520
}
2621

22+
variable "location" {
23+
type = string
24+
description = "Azure location"
25+
}
26+
2727
variable "custom_virtual_machine_name" {
2828
type = string
2929
description = "Specifies the name of the virtual machine name resource"
@@ -67,7 +67,7 @@ variable "network_interface" {
6767
description = "Objects to configure network interface"
6868
default = {
6969
private_ip_address_allocation = "Dynamic"
70-
public_ip_enabled = true
70+
public_ip_enabled = false
7171
}
7272
}
7373

0 commit comments

Comments
 (0)