-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need support of PowerShell7 for azurerm_automation_runbook and azurerm_automation_module #14089
Comments
I'm also facing this issue currently. Powershell 7.1 can also run az commands, which 5.1 cannot. |
Hi all! All up to now published APIs don't have that option unfortunately, thus impossible to enable this at the moment unfortunately. This enum is lacking a specific version 7.1 option |
Still waiting for this! Such a turn off! |
The Azure Portal uses the value "PowerShell7" for this parameter to create a PS7.1 (preview) runbook. API version used by that call is "2017-05-15-preview" if that makes a difference. I'm afraid I don't have the expertise to test if this can work in the codebase, but hopefully that info can help. |
Hi, I had same issue. It's not supported in PowerShell or pretty much anything. As a work around you can get this to work using azapi like below. If you need to upload a script you'll need to create some storage with no IP restrictions, upload your PS to it, generate a SAS and use publishContentLink to upload this.
|
Is there any update about this issue? |
Here's the azapi_rezource I used to import a PowerShell 7.1 module: resource "azapi_resource" "powershell7_module" {
type = "Microsoft.Automation/automationAccounts/powershell7Modules@2019-06-01"
name = "<module name>"
parent_id = "<automation account id>"
location = "<location>"
schema_validation_enabled = false # Required because this resource won't validate
body = jsonencode({
properties = {
contentLink = {
uri = "<url to module version>"
}
}
})
response_export_values = ["*"]
# Not sure if this dependency is needed
depends_on = [
azurerm_automation_account
]
} |
any update? |
bump |
1 similar comment
bump |
For 7.2, the version can be passed as argument These requests were generated using the Azure Portal: 7.1: {
"properties": {
"description": "Test regarding version passed in API during creation",
"draft": {},
"logProgress": false,
"logVerbose": false,
"runbookType": "PowerShell7"
}
} 7.2: {
"properties": {
"description": "Test regarding version passed in API during creation",
"draft": {},
"logProgress": false,
"logVerbose": false,
"runbookType": "PowerShell",
"runtime": "PowerShell-7.2"
}
} |
Hi, can I also ask when this might be rolled out. with the issues with powershell 5.1 they ask to update to later version as a work around. and now I cannot re-rollout my runbooks with a later version. This really needs to be addressed. |
The latest spec contains a runBookType for PowerShell72, which means we could solve the problem. Let me check if I can make this work! |
I could also really do with this feature, I need PowerShell 7. @aristosvo I have faith in you! |
Last bit of this issue is fixed in PR #23980, which is just merged and to be released in the next release. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Community Note
Description
Hi,
The feature is still in preview, but it's look like nice to get support of PowerShell 7.1 runtime for runbook.
As a possible workaround for now, I have this process ->
but this workaround have many limitation, if runbook need to be destroy/recreate that will revert to ps5, and unable to manage PowerShell module with v7 at this time too.
Thanks, have a nice day
Regards
Alex
New or Affected Resource(s)
Potential Terraform Configuration
References
The text was updated successfully, but these errors were encountered: