terraform-provider-azurerm: azurerm_automation_runbook doesn't create python runbook.
Community Note
- Please vote on this issue by adding a π reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave β+1β or βme tooβ comments, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Terraform Version
Terraform v0.11.7
- provider.azurerm v1.8.0
- provider.template v1.0.0
Affected Resource(s)
- azurerm_automation_runbook
Terraform Configuration Files
resource "azurerm_automation_runbook" "runbook" {
name = "test-kitchen-cleanup"
location = "${azurerm_resource_group.autorg.location}"
resource_group_name = "${azurerm_resource_group.autorg.name}"
account_name = "${azurerm_automation_account.account.name}"
log_verbose = "true"
log_progress = "true"
description = "Hello World script, just to get things created"
runbook_type = "Script"
publish_content_link {
uri = "${azurerm_storage_blob.script.url}"
}
}
Expected Behavior
- Creates a runbook in the specified automation account
- The runbook created is of type Python 2 Runbook
Actual Behavior
- Creates the runbook and reports success.
- The resulting runbook is actually a PowerShell Workflow Runbook.
- TF state file show the following:
azurerm_automation_runbook.runbook:
id = /subscriptions/8efe2bb2-0b97-4186-8c1e-c75e6c772a98/resourceGroups/test-kitchen-cleanup-preprod/providers/Microsoft.Automation/automationAccounts/test-kitchen-cleanup-preprod/runbooks/test-kitchen-cleanup
account_name = test-kitchen-cleanup-preprod
description = Hello World script, just to get things created
location = eastus2
log_progress = true
log_verbose = true
name = test-kitchen-cleanup
publish_content_link.# = 1
publish_content_link.0.hash.# = 0
publish_content_link.0.uri = https://crtoutilityusepreprod.blob.core.windows.net/scripts/test-kitchen-cleanup.ps1
publish_content_link.0.version =
resource_group_name = test-kitchen-cleanup-preprod
runbook_type = Script
tags.% = 0
Important Factoids
The documentation is vague on if TF supports creating python based runbooks. It says the following: runbook_type - (Required) The type of the runbook - can be either Graph, GraphPowerShell, GraphPowerShellWorkflow, PowerShellWorkflow, PowerShell or Script.
I would assume that Script is a python runbook since the valid types of runbooks are:
- Powershell
- Python 2 (preview)
- Graphical
- PowerShell Workflow
- Graphical PowerShell Workflow
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 29
- Comments: 17 (2 by maintainers)
Anything?
I reached out Microsoft support regarding this issue and tried to explain the discrepancy between implementation and documentation. the engineer was pretty much sure the api supports type python3 even though not written in the docs. moreover I also provide him this github issue regarding this problem.
They will get back to me soon.
It has been 2 years and Azure is just not doing its job!