Skip to content

Commit

Permalink
docs - add example
Browse files Browse the repository at this point in the history
  • Loading branch information
hbuckle authored and tombuildsstuff committed Sep 7, 2018
1 parent ad6d359 commit ba12631
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions website/docs/r/automation_runbook.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,43 @@ resource "azurerm_automation_runbook" "example" {
}
```

## Example Usage - custom content

```hcl
resource "azurerm_resource_group" "example" {
name = "resourceGroup1"
location = "West Europe"
}
resource "azurerm_automation_account" "example" {
name = "account1"
location = "${azurerm_resource_group.example.location}"
resource_group_name = "${azurerm_resource_group.example.name}"
sku {
name = "Basic"
}
}
data "local_file" "example" {
filename = "${path.module}/example.ps1"
}
resource "azurerm_automation_runbook" "example" {
name = "Get-AzureVMTutorial"
location = "${azurerm_resource_group.example.location}"
resource_group_name = "${azurerm_resource_group.example.name}"
account_name = "${azurerm_automation_account.example.name}"
log_verbose = "true"
log_progress = "true"
description = "This is an example runbook"
runbook_type = "PowerShell"
publish_content_link {
uri = "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-automation-runbook-getvms/Runbooks/Get-AzureVMTutorial.ps1"
}
content = "${data.local_file.example.content}"
}
```

## Argument Reference

The following arguments are supported:
Expand Down

0 comments on commit ba12631

Please sign in to comment.