-
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
When provisioning VMs which require legal terms to be accepted, provide an option to accept that. #1283
Comments
hey @JonTheNiceGuy Thanks for opening this issue :) Taking a brief look into this - support for this is available in the Go SDK and there's an example API call available in this Swagger example. It's possible this could make sense as a separate resource (since it could also belong on the VMSS resource) - but it may make sense as an independent resource (this needs some experimentation to determine if it makes sense on the VM/VMSS resources or as an independent resource [since it's not possible to revoke licence acceptance, this may not make sense]). Thanks! |
Talking some more about this internally the other day - our initial suggestion is this is a separate resource; but we need to experiment to see if licence revocation is possible as outlined above. |
Ran into this while trying to create BYOL on PaloAlto's as well. |
@tombuildsstuff through powershell it is possible to reject marketplace items after you've accepted them https://docs.microsoft.com/en-us/powershell/module/azurerm.marketplaceordering/set-azurermmarketplaceterms?view=azurermps-6.2.0 |
I added a reaction to the OP, but also wanted to state that are use case is also accepting the BYOL t&c with the PaloAlto images. Would be really good if we could eliminate this one manual step. |
Just found out this issue the hard way. Be really nice to see some action on this. |
quick PowerShell command to fix this error |
Example az cli command to accept marketplace terms for a Cisco CSR: for urn in $(az vm image list --all --publisher cisco --offer cisco-csr-1000v --sku 16_6 --query '[].urn' --output tsv)
do az vm image accept-terms --urn $urn
done Could be useful in a local-exec as a workaround? |
This'll be fixed via #4305 |
This has been released in version 1.34.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example: provider "azurerm" {
version = "~> 1.34.0"
}
# ... other configuration ... |
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. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
Community Note
Description
When provisioning a FortiGate BYOL 6.0.0 machine using a template (I can supply the template, if required), I received the following message:
User failed validation to purchase resources. Error message: 'Legal terms have not been accepted for this item on this subscription. To accept legal terms using PowerShell, please use Get-AzureRmMarketplaceTerms and Set-AzureRmMarketplaceTerms API (https://go.microsoft.com/fwlink/?linkid=862451) or deploy via the Azure portal to accept the terms'
It would be convenient to indicate that the legal terms have been accepted on this item. There is a potential work-around which is to run this command first:
az vm image accept-terms --urn ${azurerm_virtual_machine.fw01.storage_image_reference.publisher}:${azurerm_virtual_machine.fw01.storage_image_reference.offer}:${azurerm_virtual_machine.fw01.storage_image_reference.sku}:${azurerm_virtual_machine.fw01.storage_image_reference.version}
however, this can't be specified as adepends_on
action as anull_resource.*.local-exec
command, as there is a cycle here which prevents it from running.New or Affected Resource(s)
Potential Terraform Configuration
https://gist.github.com/JonTheNiceGuy/4f009c4e92f11dee42e4b5abba3e972e
References
The text was updated successfully, but these errors were encountered: