Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VMSS Managed Disk - storage_profile_os_disk.name should be optional #96

Closed
hashibot opened this issue Jun 13, 2017 · 1 comment · Fixed by #129
Closed

VMSS Managed Disk - storage_profile_os_disk.name should be optional #96

hashibot opened this issue Jun 13, 2017 · 1 comment · Fixed by #129
Labels

Comments

@hashibot
Copy link

This issue was originally opened by @tombuildsstuff as hashicorp/terraform#14932. It was migrated here as part of the provider split. The original body of the issue is below.


Currently when creating a Managed Disk in an azurerm_virtual_machine_scale_set - the name field under storage_profile_os_disk is a Required field. However this can't be set at the same time as managed_disk_type, as such it needs to be set to an empty string - instead this would make more sense as an Optional field.

Terraform Version

0.9.6

Affected Resource(s)

  • azurerm_vm_scale_set

Terraform Configuration Files

resource "azurerm_resource_group" "test" {
  name     = "vmss-bug"
  location = "West US 2"
}

resource "azurerm_virtual_network" "test" {
  name                = "vmss-vn"
  address_space       = ["10.0.0.0/16"]
  location            = "West US 2"
  resource_group_name = "${azurerm_resource_group.test.name}"
}

resource "azurerm_subnet" "test" {
  name                 = "vmss-bugsn"
  resource_group_name  = "${azurerm_resource_group.test.name}"
  virtual_network_name = "${azurerm_virtual_network.test.name}"
  address_prefix       = "10.0.2.0/24"
}

resource "azurerm_network_interface" "test" {
  name                = "vmss-bugni"
  location            = "West US 2"
  resource_group_name = "${azurerm_resource_group.test.name}"

  ip_configuration {
    name                          = "testconfiguration1"
    subnet_id                     = "${azurerm_subnet.test.id}"
    private_ip_address_allocation = "dynamic"
  }
}

resource "azurerm_storage_account" "test" {
  name                = "vmssbugsa"
  resource_group_name = "${azurerm_resource_group.test.name}"
  location            = "West US 2"
  account_type        = "Standard_LRS"

  tags {
    environment = "staging"
  }
}

resource "azurerm_storage_container" "test" {
  name                  = "vhds"
  resource_group_name   = "${azurerm_resource_group.test.name}"
  storage_account_name  = "${azurerm_storage_account.test.name}"
  container_access_type = "private"
}

resource "azurerm_virtual_machine_scale_set" "test" {
  name                   = "vmss-bug-vmss"
  location               = "West US 2"
  resource_group_name    = "${azurerm_resource_group.test.name}"
  upgrade_policy_mode    = "Manual"
  single_placement_group = false

  sku {
    name     = "Standard_D1_v2"
    tier     = "Standard"
    capacity = 2
  }

  os_profile {
    computer_name_prefix = "testvm-vmss"
    admin_username       = "myadmin"
    admin_password       = "Passwword1234"
  }

  network_profile {
    name    = "TestNetworkProfile"
    primary = true

    ip_configuration {
      name      = "TestIPConfiguration"
      subnet_id = "${azurerm_subnet.test.id}"
    }
  }

  storage_profile_os_disk {
    name              = ""
    caching           = "ReadWrite"
    create_option     = "FromImage"
    managed_disk_type = "Standard_LRS"
  }

  storage_profile_image_reference {
    publisher = "Canonical"
    offer     = "UbuntuServer"
    sku       = "16.04-LTS"
    version   = "latest"
  }
}

Debug Output

n/a

Panic Output

n/a

Expected Behavior

The name field in the storage_profile_os_disk object should be Optional, rather than Required - given it's only mandatory for non-managed disks.

Actual Behavior

The name field needs to be set to an empty string currently (see the HCL above)

References

@hashibot hashibot added the bug label Jun 13, 2017
@tombuildsstuff tombuildsstuff changed the title provider/azurerm: VMSS Managed Disk - storage_profile_os_disk.name should be optional VMSS Managed Disk - storage_profile_os_disk.name should be optional Jun 14, 2017
tombuildsstuff added a commit that referenced this issue Jun 27, 2017
[MS] Resolve #96, Making Name in VMSS storage_profile_os_disk Optional
tombuildsstuff added a commit that referenced this issue Jul 4, 2017
[MS] Resolve #96, Making Name in VMSS storage_profile_os_disk Optional
@ghost
Copy link

ghost commented Apr 1, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant