Skip to content

Commit

Permalink
feat: Add role_definition_name variable
Browse files Browse the repository at this point in the history
  • Loading branch information
tomphp committed Oct 19, 2023
1 parent 9c51069 commit 8d0d13b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,6 @@ data "azurerm_client_config" "current" {}

resource "azurerm_role_assignment" "dev_vm" {
principal_id = azurerm_linux_virtual_machine.dev_vm.identity[0].principal_id
role_definition_name = "Contributor"
role_definition_name = var.role_definition_name
scope = "/subscriptions/${data.azurerm_client_config.current.subscription_id}/resourceGroups/${var.resource_group_name}"
}
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ variable "add_user_to_groups" {
default = []
}

variable "role_definition_name" {
type = string
description = "The name of the role definition to attach to the VM"
default = "Reader"
}

variable "ssh_public_key" {
type = string
description = "The public SSH key used to connect to the VM"
Expand Down

0 comments on commit 8d0d13b

Please sign in to comment.