Created
August 23, 2016 20:44
-
-
Save ritasker/f1cdcbde10d35aff90423cbdbe14913b to your computer and use it in GitHub Desktop.
Terraform Files and CLI Output
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Refreshing Terraform state in-memory prior to plan... | |
The refreshed state will be used to calculate this plan, but | |
will not be persisted to local or remote state storage. | |
The Terraform execution plan has been generated and is shown below. | |
Resources are shown in alphabetical order for quick scanning. Green resources | |
will be created (or destroyed and then created if an existing resource | |
exists), yellow resources are being changed in-place, and red resources | |
will be destroyed. Cyan entries are data sources to be read. | |
Note: You didn't specify an "-out" parameter to save this plan, so when | |
"apply" is called, Terraform can't guarantee this is what will execute. | |
+ azurerm_resource_group.test-resource-group | |
location: "northeurope" | |
name: "test-resource-group" | |
+ azurerm_sql_database.test-sql-database | |
collation: "<computed>" | |
create_mode: "Default" | |
creation_date: "<computed>" | |
default_secondary_location: "<computed>" | |
edition: "<computed>" | |
elastic_pool_name: "<computed>" | |
encryption: "<computed>" | |
location: "northeurope" | |
max_size_bytes: "<computed>" | |
name: "EventGenius" | |
requested_service_objective_id: "<computed>" | |
requested_service_objective_name: "<computed>" | |
resource_group_name: "test-resource-group" | |
restore_point_in_time: "<computed>" | |
server_name: "test-sql-dev" | |
source_database_deletion_date: "<computed>" | |
source_database_id: "<computed>" | |
+ azurerm_sql_server.test-sql-server | |
administrator_login: "richierich" | |
administrator_login_password: "qwerty123$%^" | |
fully_qualified_domain_name: "<computed>" | |
location: "northeurope" | |
name: "test-sql-dev" | |
resource_group_name: "test-resource-group" | |
version: "12.0" | |
+ azurerm_storage_account.test-storage-account | |
account_type: "Standard_LRS" | |
location: "northeurope" | |
name: "testdevnortheurope" | |
primary_access_key: "<computed>" | |
primary_blob_endpoint: "<computed>" | |
primary_file_endpoint: "<computed>" | |
primary_location: "<computed>" | |
primary_queue_endpoint: "<computed>" | |
primary_table_endpoint: "<computed>" | |
resource_group_name: "test-resource-group" | |
secondary_access_key: "<computed>" | |
secondary_blob_endpoint: "<computed>" | |
secondary_location: "<computed>" | |
secondary_queue_endpoint: "<computed>" | |
secondary_table_endpoint: "<computed>" | |
+ azurerm_storage_container.test-container | |
container_access_type: "blob" | |
name: "test-container" | |
properties.%: "<computed>" | |
resource_group_name: "test-resource-group" | |
storage_account_name: "testdevnortheurope" | |
+ azurerm_template_deployment.test-azurerm-template | |
deployment_mode: "Complete" | |
name: "test-azurerm-template" | |
outputs.%: "<computed>" | |
resource_group_name: "test-resource-group" | |
template_body: "{\"$schema\":\"http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\"contentVersion\":\"1.0.0.0\",\"resources\":[{\"apiVersion\":\"2014-11-01\",\"location\":\"[variables('location')]\",\"name\":\"[variables('hostingPlanName')]\",\"properties\":{\"name\":\"[variables('hostingPlanName')]\",\"numberOfWorkers\":1,\"sku\":\"Basic\",\"workerSize\":\"0\"},\"type\":\"Microsoft.Web/serverFarms\"},{\"apiVersion\":\"2015-04-01\",\"dependsOn\":[\"[resourceId('Microsoft.Web/serverFarms', variables('hostingPlanName'))]\"],\"location\":\"[variables('location')]\",\"name\":\"rt-test-api\",\"properties\":{\"serverFarmId\":\"[variables('hostingPlanName')]\"},\"type\":\"Microsoft.Web/sites\"}],\"variables\":{\"hostingPlanName\":\"TestHostingPlan\",\"location\":\"[resourceGroup().location]\"}}" | |
Plan: 6 to add, 0 to change, 0 to destroy. | |
C:\Users\ritas\Work\Terraform-Test>terraform apply -var-file=variables.tf | |
azurerm_resource_group.test-resource-group: Creating... | |
location: "" => "northeurope" | |
name: "" => "test-resource-group" | |
azurerm_resource_group.test-resource-group: Creation complete | |
azurerm_storage_account.test-storage-account: Creating... | |
account_type: "" => "Standard_LRS" | |
location: "" => "northeurope" | |
name: "" => "testdevnortheurope" | |
primary_access_key: "" => "<computed>" | |
primary_blob_endpoint: "" => "<computed>" | |
primary_file_endpoint: "" => "<computed>" | |
primary_location: "" => "<computed>" | |
primary_queue_endpoint: "" => "<computed>" | |
primary_table_endpoint: "" => "<computed>" | |
resource_group_name: "" => "test-resource-group" | |
secondary_access_key: "" => "<computed>" | |
secondary_blob_endpoint: "" => "<computed>" | |
secondary_location: "" => "<computed>" | |
secondary_queue_endpoint: "" => "<computed>" | |
secondary_table_endpoint: "" => "<computed>" | |
azurerm_sql_server.test-sql-server: Creating... | |
administrator_login: "" => "richierich" | |
administrator_login_password: "" => "qwerty123$%^" | |
fully_qualified_domain_name: "" => "<computed>" | |
location: "" => "northeurope" | |
name: "" => "test-sql-dev" | |
resource_group_name: "" => "test-resource-group" | |
version: "" => "12.0" | |
azurerm_template_deployment.test-azurerm-template: Creating... | |
deployment_mode: "" => "Complete" | |
name: "" => "test-azurerm-template" | |
outputs.%: "" => "<computed>" | |
resource_group_name: "" => "test-resource-group" | |
template_body: "" => "{\"$schema\":\"http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\"contentVersion\":\"1.0.0.0\",\"resources\":[{\"apiVersion\":\"2014-11-01\",\"location\":\"[variables('location')]\",\"name\":\"[variables('hostingPlanName')]\",\"properties\":{\"name\":\"[variables('hostingPlanName')]\",\"numberOfWorkers\":1,\"sku\":\"Basic\",\"workerSize\":\"0\"},\"type\":\"Microsoft.Web/serverFarms\"},{\"apiVersion\":\"2015-04-01\",\"dependsOn\":[\"[resourceId('Microsoft.Web/serverFarms', variables('hostingPlanName'))]\"],\"location\":\"[variables('location')]\",\"name\":\"rt-test-api\",\"properties\":{\"serverFarmId\":\"[variables('hostingPlanName')]\"},\"type\":\"Microsoft.Web/sites\"}],\"variables\":{\"hostingPlanName\":\"TestHostingPlan\",\"location\":\"[resourceGroup().location]\"}}" | |
azurerm_storage_account.test-storage-account: Still creating... (10s elapsed) | |
azurerm_sql_server.test-sql-server: Still creating... (10s elapsed) | |
azurerm_template_deployment.test-azurerm-template: Still creating... (10s elapsed) | |
azurerm_storage_account.test-storage-account: Still creating... (20s elapsed) | |
azurerm_sql_server.test-sql-server: Still creating... (20s elapsed) | |
azurerm_template_deployment.test-azurerm-template: Still creating... (20s elapsed) | |
azurerm_sql_server.test-sql-server: Creation complete | |
azurerm_sql_database.test-sql-database: Creating... | |
collation: "" => "<computed>" | |
create_mode: "" => "Default" | |
creation_date: "" => "<computed>" | |
default_secondary_location: "" => "<computed>" | |
edition: "" => "<computed>" | |
elastic_pool_name: "" => "<computed>" | |
encryption: "" => "<computed>" | |
location: "" => "northeurope" | |
max_size_bytes: "" => "<computed>" | |
name: "" => "EventGenius" | |
requested_service_objective_id: "" => "<computed>" | |
requested_service_objective_name: "" => "<computed>" | |
resource_group_name: "" => "test-resource-group" | |
restore_point_in_time: "" => "<computed>" | |
server_name: "" => "test-sql-dev" | |
source_database_deletion_date: "" => "<computed>" | |
source_database_id: "" => "<computed>" | |
azurerm_storage_account.test-storage-account: Still creating... (30s elapsed) | |
azurerm_template_deployment.test-azurerm-template: Still creating... (30s elapsed) | |
azurerm_sql_database.test-sql-database: Still creating... (10s elapsed) | |
azurerm_storage_account.test-storage-account: Still creating... (40s elapsed) | |
azurerm_template_deployment.test-azurerm-template: Still creating... (40s elapsed) | |
azurerm_sql_database.test-sql-database: Still creating... (20s elapsed) | |
azurerm_storage_account.test-storage-account: Still creating... (50s elapsed) | |
azurerm_template_deployment.test-azurerm-template: Still creating... (50s elapsed) | |
azurerm_sql_database.test-sql-database: Still creating... (30s elapsed) | |
azurerm_template_deployment.test-azurerm-template: Still creating... (1m0s elapsed) | |
azurerm_template_deployment.test-azurerm-template: Still creating... (1m10s elapsed) | |
azurerm_template_deployment.test-azurerm-template: Still creating... (1m20s elapsed) | |
azurerm_template_deployment.test-azurerm-template: Still creating... (1m30s elapsed) | |
azurerm_template_deployment.test-azurerm-template: Still creating... (1m40s elapsed) | |
azurerm_template_deployment.test-azurerm-template: Still creating... (1m50s elapsed) | |
azurerm_template_deployment.test-azurerm-template: Still creating... (2m0s elapsed) | |
azurerm_template_deployment.test-azurerm-template: Still creating... (2m10s elapsed) | |
azurerm_template_deployment.test-azurerm-template: Still creating... (2m20s elapsed) | |
azurerm_template_deployment.test-azurerm-template: Still creating... (2m30s elapsed) | |
azurerm_template_deployment.test-azurerm-template: Still creating... (2m40s elapsed) | |
azurerm_template_deployment.test-azurerm-template: Still creating... (2m50s elapsed) | |
azurerm_template_deployment.test-azurerm-template: Still creating... (3m0s elapsed) | |
azurerm_template_deployment.test-azurerm-template: Still creating... (3m10s elapsed) | |
azurerm_template_deployment.test-azurerm-template: Still creating... (3m20s elapsed) | |
azurerm_template_deployment.test-azurerm-template: Still creating... (3m30s elapsed) | |
azurerm_template_deployment.test-azurerm-template: Still creating... (3m40s elapsed) | |
azurerm_template_deployment.test-azurerm-template: Still creating... (3m50s elapsed) | |
azurerm_template_deployment.test-azurerm-template: Still creating... (4m0s elapsed) | |
azurerm_template_deployment.test-azurerm-template: Still creating... (4m10s elapsed) | |
azurerm_template_deployment.test-azurerm-template: Still creating... (4m20s elapsed) | |
azurerm_template_deployment.test-azurerm-template: Still creating... (4m30s elapsed) | |
azurerm_template_deployment.test-azurerm-template: Still creating... (4m40s elapsed) | |
azurerm_template_deployment.test-azurerm-template: Still creating... (4m50s elapsed) | |
azurerm_template_deployment.test-azurerm-template: Still creating... (5m0s elapsed) | |
azurerm_template_deployment.test-azurerm-template: Still creating... (5m10s elapsed) | |
azurerm_template_deployment.test-azurerm-template: Still creating... (5m20s elapsed) | |
azurerm_template_deployment.test-azurerm-template: Still creating... (5m30s elapsed) | |
azurerm_template_deployment.test-azurerm-template: Still creating... (5m40s elapsed) | |
azurerm_template_deployment.test-azurerm-template: Still creating... (5m50s elapsed) | |
azurerm_template_deployment.test-azurerm-template: Still creating... (6m0s elapsed) | |
azurerm_template_deployment.test-azurerm-template: Creation complete | |
Error applying plan: | |
2 error(s) occurred: | |
* azurerm_storage_account.test-storage-account: storage.AccountsClient#GetProperties: Failure responding to request: StatusCode=404 -- Original Error: autorest/azure: Service returned an error. Status=404 Code="ResourceNotFound" Message="The Resource 'Microsoft.Storage/storageAccounts/testdevnortheurope' under resource group 'test-resource-group' was not found." | |
* azurerm_sql_database.test-sql-database: Error creating SQL Database: NotFound (404) - Resource not found for the segment 'operationresults'. | |
Terraform does not automatically rollback in the face of errors. | |
Instead, your Terraform state file has been partially updated with | |
any resources that successfully completed. Please address the error | |
above and apply again to incrementally change your infrastructure. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
provider "azurerm" { | |
subscription_id = "${var.subscription_id}" | |
client_id = "${var.client_id}" | |
client_secret = "${var.client_secret}" | |
tenant_id = "${var.tenant_id}" | |
} | |
resource "azurerm_resource_group" "test-resource-group" { | |
name = "test-resource-group" | |
location = "${var.location}" | |
} | |
# Create SQL Server | |
resource "azurerm_sql_server" "test-sql-server" { | |
name = "test-sql-${var.environment}" | |
resource_group_name = "${azurerm_resource_group.test-resource-group.name}" | |
location = "${var.location}" | |
version = "12.0" | |
administrator_login = "${var.sql_username}" | |
administrator_login_password = "${var.sql_password}" | |
} | |
# Create SQL DB | |
resource "azurerm_sql_database" "test-sql-database" { | |
name = "EventGenius" | |
resource_group_name = "${azurerm_resource_group.test-resource-group.name}" | |
location = "${var.location}" | |
server_name = "${azurerm_sql_server.test-sql-server.name}" | |
} | |
# Create Blob Storage Account | |
resource "azurerm_storage_account" "test-storage-account" { | |
name = "test${var.environment}northeurope" | |
resource_group_name = "${azurerm_resource_group.test-resource-group.name}" | |
location = "${var.location}" | |
account_type = "Standard_LRS" | |
} | |
resource "azurerm_storage_container" "test-container" { | |
name = "test-container" | |
resource_group_name = "${azurerm_resource_group.test-resource-group.name}" | |
storage_account_name = "${azurerm_storage_account.test-storage-account.name}" | |
container_access_type = "blob" | |
} | |
# Custom Templates | |
resource "azurerm_template_deployment" "test-azurerm-template" { | |
name = "test-azurerm-template" | |
resource_group_name = "${azurerm_resource_group.test-resource-group.name}" | |
template_body = <<DEPLOY | |
{ | |
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"variables": { | |
"hostingPlanName": "TestHostingPlan", | |
"location": "[resourceGroup().location]" | |
}, | |
"resources": [ | |
{ | |
"apiVersion": "2014-11-01", | |
"name": "[variables('hostingPlanName')]", | |
"type": "Microsoft.Web/serverFarms", | |
"location": "[variables('location')]", | |
"properties": { | |
"name": "[variables('hostingPlanName')]", | |
"sku": "Basic", | |
"workerSize": "0", | |
"numberOfWorkers": 1 | |
} | |
}, | |
{ | |
"apiVersion": "2015-04-01", | |
"name": "rt-test-api", | |
"type": "Microsoft.Web/sites", | |
"location": "[variables('location')]", | |
"dependsOn": [ | |
"[resourceId('Microsoft.Web/serverFarms', variables('hostingPlanName'))]" | |
], | |
"properties": { | |
"serverFarmId": "[variables('hostingPlanName')]" | |
} | |
} | |
] | |
} | |
DEPLOY | |
deployment_mode = "Complete" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Azure Subscription Credentials | |
subscription_id = "<removed>" | |
client_id = "<removed>" | |
client_secret = "<removed>" | |
tenant_id = "<removed>" | |
environment = "dev" | |
location = "North Europe" | |
sql_username = "richierich" | |
sql_password = "qwerty123$%^" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Azure Subscription Credentials | |
variable "subscription_id" {} | |
variable "client_id" {} | |
variable "client_secret" {} | |
variable "tenant_id" {} | |
# Environment | |
variable "environment" {} | |
variable "location" {} | |
# SQL Credentials | |
variable "sql_username" {} | |
variable "sql_password" {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Have you found a solution to this? I am getting the same
Error creating SQL Database: NotFound (404)
error intermittently when trying to deploy to Azure.