hashicorp / terraform-provider-azure-classic

Terraform Azure Classic (Service Management) provider
https://www.terraform.io/docs/providers/azure/
Mozilla Public License 2.0
3 stars 11 forks source link

error creating data disk #25

Closed hashibot closed 6 years ago

hashibot commented 7 years ago

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


I can't find any way to create a data disk.

i always get the following error * azure_data_disk.asdata: Error adding data disk 0 to instance tmxaitas1: Error response from Azure. Code: ResourceNotFound, Message: The deployment name 'tmxaitas1' does not exist.

here is a cutdown version of my tf file:

variable "deployIndex" {}

variable "user" {
    default = "aituser"
}

variable "pass" {
    default = "XXXXXXX"
}

variable "Location" {
    default = "Australia Southeast"
}

variable "StorageSvcName" {
    default = "aitstoragetmx"
}

variable "VirtualNetworkName" {
    default = "ait-network"
}

variable "SubnetName" {
    default = "default"
}

provider "azure" {
  publish_settings = "${file("../creds.publishsettings")}"
}

resource "azure_hosted_service" "as" {
    name = "tmxaitas${var.deployIndex}"
    location = "${var.Location}"
    ephemeral_contents = false
    description = "Hosted service created by Terraform."
    label = "tmx-ait-as"

    lifecycle {
      create_before_destroy = true
    }
}

resource "azure_instance" "as" {
    name = "${azure_hosted_service.as.name}"
    hosted_service_name = "${azure_hosted_service.as.name}"
    image = "as2012.14series.v0.1"
    size = "Standard_D2_v2"
    storage_service_name = "${var.StorageSvcName}"
    location = "${var.Location}"
    time_zone = "Australia/Sydney"

    username = "${var.user}"
    password = "${var.pass}"

    virtual_network = "${var.VirtualNetworkName}"
    subnet = "${var.SubnetName}"

    /*domain_name = "aitWS81"
    domain_ou = "OU=Servers,DC=aitWS81"
    domain_username = "${var.user}"
    domain_password = "${var.pass}"*/

    automatic_updates = true

    endpoint {
        name = "RDP"
        protocol = "tcp"
        public_port = 3389
        private_port = 3389
    }

    endpoint {
        name = "WinRM-SSL"
        protocol = "tcp"
        public_port = 5986
        private_port = 5986
    }

    endpoint {
        name = "WinRM"
        protocol = "tcp"
        public_port = 5985
        private_port = 5985
    }
}

resource "azure_data_disk" "asdata" {
    lun = 0
    size = 100
    name = "streams_data"
    label = "streams_data"
    storage_service_name = "${var.StorageSvcName}"
    virtual_machine = "${azure_hosted_service.as.id}"
}
vancluever commented 6 years ago

Hello!

Thank you for opening this issue and participating in the discussion. Today (December 19, 2017) we’ve announced the deprecation and archival of the Azure Classic Provider. Matching Microsoft’s commitment to gradually remove access to Azure Classic (or Service Management) which is outlined in this blog post, we are closing all open PR's and Issues here. This repository will remain available here on GitHub, but in an archived state, and no longer receiving support or new releases.

The Azure (Resource Manager) Provider remains fully supported and is our recommended approach for managing Azure with Terraform. More information about this process is available in the blog post linked above.

Thanks! The Terraform Team