Skip to content

Commit

Permalink
ran terraform fmt on examples/* (#2176)
Browse files Browse the repository at this point in the history
  • Loading branch information
katbyte authored and tombuildsstuff committed Oct 29, 2018
1 parent 36b8cb3 commit 8ae7711
Show file tree
Hide file tree
Showing 13 changed files with 62 additions and 67 deletions.
41 changes: 21 additions & 20 deletions examples/automation-account/main.tf
@@ -1,32 +1,33 @@

resource "azurerm_resource_group" "rg" {
name = "${var.resource_group_name}"
location = "${var.resource_group_location}"
name = "${var.resource_group_name}"
location = "${var.resource_group_location}"
}

resource "azurerm_automation_account" "account" {
name = "tfex-automation-account"
location = "${azurerm_resource_group.rg.location}"
resource_group_name = "${azurerm_resource_group.rg.name}"
name = "tfex-automation-account"
location = "${azurerm_resource_group.rg.location}"
resource_group_name = "${azurerm_resource_group.rg.name}"

sku {
name = "Basic"
}
sku {
name = "Basic"
}
}

resource "azurerm_automation_schedule" "one-time" {
name = "tfex-automation_schedule-one_time"
resource_group_name = "${azurerm_resource_group.rg.name}"
automation_account_name = "${azurerm_automation_account.account.name}"
frequency = "OneTime"
//defaults start_time to now + 7 min
name = "tfex-automation_schedule-one_time"
resource_group_name = "${azurerm_resource_group.rg.name}"
automation_account_name = "${azurerm_automation_account.account.name}"
frequency = "OneTime"

//defaults start_time to now + 7 min
}

resource "azurerm_automation_schedule" "hour" {
name = "tfex-automation_schedule-hour"
resource_group_name = "${azurerm_resource_group.rg.name}"
automation_account_name = "${azurerm_automation_account.account.name}"
frequency = "Hour"
interval = 2
//timezone defaults to UTC
name = "tfex-automation_schedule-hour"
resource_group_name = "${azurerm_resource_group.rg.name}"
automation_account_name = "${azurerm_automation_account.account.name}"
frequency = "Hour"
interval = 2

//timezone defaults to UTC
}
3 changes: 1 addition & 2 deletions examples/automation-account/outputs.tf
@@ -1,8 +1,7 @@

output "automation_schedule-start_time" {
value = "${azurerm_automation_schedule.one-time.start_time}"
}

output "automation_schedule-week-interval" {
value = "${azurerm_automation_schedule.hour.interval}"
}
}
4 changes: 2 additions & 2 deletions examples/datalake/main.tf
Expand Up @@ -13,7 +13,7 @@ resource "azurerm_data_lake_store" "example" {
resource_group_name = "${azurerm_resource_group.example.name}"
location = "${azurerm_resource_group.example.location}"

tier = "Consumption"
tier = "Consumption"
}

resource "azurerm_data_lake_store_firewall_rule" "test" {
Expand All @@ -39,4 +39,4 @@ resource "azurerm_data_lake_analytics_firewall_rule" "test" {
resource_group_name = "${azurerm_resource_group.example.name}"
start_ip_address = "0.0.0.0"
end_ip_address = "0.0.0.0"
}
}
1 change: 1 addition & 0 deletions examples/datalake/outputs.tf
@@ -0,0 +1 @@

32 changes: 16 additions & 16 deletions examples/eventhub/main.tf
Expand Up @@ -13,8 +13,8 @@ resource "azurerm_eventhub_namespace" "example" {
location = "${azurerm_resource_group.example.location}"
resource_group_name = "${azurerm_resource_group.example.name}"

sku = "Standard"
capacity = 2
sku = "Standard"
capacity = 2

tags {
environment = "Examples"
Expand All @@ -27,29 +27,29 @@ resource "azurerm_eventhub_namespace_authorization_rule" "test" {
eventhub_name = "${azurerm_eventhub.example.name}"
resource_group_name = "${azurerm_resource_group.example.name}"

listen = true
send = true
manage = false
listen = true
send = true
manage = false
}

resource "azurerm_eventhub" "example" {
name = "tfex-eventhub${random_integer.ri.result}"
namespace_name = "${azurerm_eventhub_namespace.example.name}"
resource_group_name = "${azurerm_resource_group.example.name}"

partition_count = 2
message_retention = 1
partition_count = 2
message_retention = 1
}

resource "azurerm_eventhub_authorization_rule" "test" {
name = "tfex-eventhub-authrule"
namespace_name = "${azurerm_eventhub_namespace.example.name}"
eventhub_name = "${azurerm_eventhub.example.name}"
resource_group_name = "${azurerm_resource_group.example.name}"

listen = true
send = true
manage = true
name = "tfex-eventhub-authrule"
namespace_name = "${azurerm_eventhub_namespace.example.name}"
eventhub_name = "${azurerm_eventhub.example.name}"
resource_group_name = "${azurerm_resource_group.example.name}"

listen = true
send = true
manage = true
}

resource "azurerm_eventhub_consumer_group" "example" {
Expand All @@ -58,4 +58,4 @@ resource "azurerm_eventhub_consumer_group" "example" {
eventhub_name = "${azurerm_eventhub.example.name}"
resource_group_name = "${azurerm_resource_group.example.name}"
user_metadata = "some-meta-data"
}
}
1 change: 1 addition & 0 deletions examples/eventhub/outputs.tf
@@ -0,0 +1 @@

2 changes: 1 addition & 1 deletion examples/recoveryservice/main.tf
Expand Up @@ -63,7 +63,7 @@ resource "azurerm_recovery_services_protection_policy_vm" "example" {
}

retention_monthly = {
weeks = ["First","Second"]
weeks = ["First", "Second"]
weekdays = ["Monday", "Wednesday"]
count = 100
}
Expand Down
2 changes: 1 addition & 1 deletion examples/recoveryservice/modules/vm/outputs.tf
Expand Up @@ -4,4 +4,4 @@ output "vm-id" {

output "vm-name" {
value = "${azurerm_virtual_machine.vm.name}"
}
}
1 change: 0 additions & 1 deletion examples/recoveryservice/outputs.tf
@@ -1,4 +1,3 @@
output "vault-id" {
value = "${azurerm_recovery_services_vault.example.id}"
}

2 changes: 0 additions & 2 deletions examples/scheduler-jobs/main.tf
Expand Up @@ -139,7 +139,6 @@ resource "azurerm_scheduler_job" "storage-queue" {
resource_group_name = "${azurerm_resource_group.example.name}"
job_collection_name = "${azurerm_scheduler_job_collection.example.name}"


action_storage_queue = {
storage_account_name = "${azurerm_storage_account.example.name}"
storage_queue_name = "${azurerm_storage_queue.example.name}"
Expand All @@ -156,7 +155,6 @@ resource "azurerm_scheduler_job" "storage-queue" {
start_time = "2019-07-07T07:07:07-07:00"
}


resource "azurerm_scheduler_job" "web-recurring_monthly-error_action" {
name = "tfex-web-recurring_monthly-auth_ad"
resource_group_name = "${azurerm_resource_group.example.name}"
Expand Down
1 change: 0 additions & 1 deletion examples/scheduler-jobs/outputs.tf
Expand Up @@ -5,4 +5,3 @@ output "job_collection-id" {
output "job-web-once-url" {
value = "${azurerm_scheduler_job.web-once-now.action_web.0.url}"
}

18 changes: 9 additions & 9 deletions examples/servicebus/main.tf
Expand Up @@ -20,9 +20,9 @@ resource "azurerm_servicebus_namespace_authorization_rule" "example" {
namespace_name = "${azurerm_servicebus_namespace.example.name}"
resource_group_name = "${azurerm_resource_group.example.name}"

send = true
listen = true
manage = true
send = true
listen = true
manage = true
}

resource "azurerm_servicebus_topic" "source" {
Expand All @@ -39,9 +39,9 @@ resource "azurerm_servicebus_topic_authorization_rule" "example" {
topic_name = "${azurerm_servicebus_topic.source.name}"
resource_group_name = "${azurerm_resource_group.example.name}"

send = true
listen = true
manage = true
send = true
listen = true
manage = true
}

resource "azurerm_servicebus_topic" "forward_to" {
Expand Down Expand Up @@ -75,6 +75,6 @@ resource "azurerm_servicebus_queue_authorization_rule" "example" {
queue_name = "${azurerm_servicebus_queue.example.name}"
resource_group_name = "${azurerm_resource_group.example.name}"

send = true
listen = true
}
send = true
listen = true
}
21 changes: 9 additions & 12 deletions examples/vm-two-nics/main.tf
Expand Up @@ -95,12 +95,11 @@ resource "azurerm_network_interface" "ext-nic" {
}
}


# Create the second network interface card for internal - no PIP and no NSG on this one
resource "azurerm_network_interface" "int-nic" {
name = "${var.prefix}-int-nic"
location = "${azurerm_resource_group.main.location}"
resource_group_name = "${azurerm_resource_group.main.name}"
name = "${var.prefix}-int-nic"
location = "${azurerm_resource_group.main.location}"
resource_group_name = "${azurerm_resource_group.main.name}"

ip_configuration {
name = "primary"
Expand All @@ -110,16 +109,17 @@ resource "azurerm_network_interface" "int-nic" {
}

resource "azurerm_virtual_machine" "main" {
name = "${var.prefix}-vm"
location = "${azurerm_resource_group.main.location}"
resource_group_name = "${azurerm_resource_group.main.name}"
name = "${var.prefix}-vm"
location = "${azurerm_resource_group.main.location}"
resource_group_name = "${azurerm_resource_group.main.name}"
primary_network_interface_id = "${azurerm_network_interface.ext-nic.id}"
network_interface_ids = ["${azurerm_network_interface.ext-nic.id}","${azurerm_network_interface.int-nic.id}"]
vm_size = "Standard_DS1_v2"
network_interface_ids = ["${azurerm_network_interface.ext-nic.id}", "${azurerm_network_interface.int-nic.id}"]
vm_size = "Standard_DS1_v2"

# Uncomment this line to delete the OS disk automatically when deleting the VM
# delete_os_disk_on_termination = true


# Uncomment this line to delete the data disks automatically when deleting the VM
# delete_data_disks_on_termination = true

Expand All @@ -129,20 +129,17 @@ resource "azurerm_virtual_machine" "main" {
sku = "16.04-LTS"
version = "latest"
}

storage_os_disk {
name = "${local.virtual_machine_name}-osdisk"
caching = "ReadWrite"
create_option = "FromImage"
managed_disk_type = "Standard_LRS"
}

os_profile {
computer_name = "${local.virtual_machine_name}"
admin_username = "${var.admin_username}"
admin_password = "${var.admin_password}"
}

os_profile_linux_config {
disable_password_authentication = false
}
Expand Down

0 comments on commit 8ae7711

Please sign in to comment.