-
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
azurerm_automation_module can't import newer versions of default modules #18198
Comments
Hi, @prubis thanks for your feedback. the azurerm version you used seems a little bit old, could you please have a try with the newest version (3.20.0) to see if this issue still exists? |
It is a bit old, I agree! I'm stuck with 2.95.0 until #16103 is resolved. But I did test with 3.20.0, and experienced the same issue. |
@prubis you can create it with a new name but not or you can import this model first, and then do a terraform import azurerm_automation_module.computer_management_dsc /subscriptions/{xxxx-xxxx-xxxx-xxxxx-xxxxxxx}/resourceGroups/{example-resources}providers/Microsoft.Automation/automationAccounts/account1/modules/ComputerManagementDsc
terraform apply # <- this will do an update on this module then the module version should fit your expectation. |
Hi @wuxu92 you actually can't create it with a new name: resource "azurerm_automation_module" "computer_management_dsc" {
name = "ComputerManagementDscTest"
[...]
} produces:
I agree that yes, you can manually import the newer module version into the Automation Account, and then manually import that into your own TF state file...but at that point, surely you would agree we entering into bug territory. I feel like this bug can be resolved by checking the |
@prubis en yes, I think you are right. I'll create a PR to work around this. |
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. |
Is there an existing issue for this?
Community Note
Terraform Version
1.1.7
AzureRM Provider Version
2.95.0
Affected Resource(s)/Data Source(s)
azurerm_automation_module
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
The module should be able to be imported with the newer version (the default supplied with Automation Accounts is (currently) 5.0.0.0).
Actual Behaviour
The module can't be imported, and there's no way to force it to import with a newer version. I suppose you could try to import the existing module and then set it to use a newer version, but that's not a very elegant solution.
Steps to Reproduce
terraform apply
Important Factoids
No response
References
https://docs.microsoft.com/en-us/azure/automation/shared-resources/modules#default-modules
The text was updated successfully, but these errors were encountered: