File tree Expand file tree Collapse file tree 4 files changed +18
-10
lines changed
Expand file tree Collapse file tree 4 files changed +18
-10
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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" {
3131resource "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
Original file line number Diff line number Diff line change 11output "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+ }
Original file line number Diff line number Diff line change @@ -10,12 +10,7 @@ variable "env" {
1010
1111variable "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
2116variable "suffix" {
@@ -24,6 +19,11 @@ variable "suffix" {
2419 default = " "
2520}
2621
22+ variable "location" {
23+ type = string
24+ description = " Azure location"
25+ }
26+
2727variable "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
You can’t perform that action at this time.
0 commit comments