The Azure Resource Manager Provider documentation page https://www.terraform.io/docs/providers/azurerm/index.html does not describe the 4 arguments required in the Argument Reference section.
I do not know what client_id, client_secret and tenant_id values to use. It would be useful do describe where to find these values.
This is an interesting question - sadly Azure makes it unnecessarily difficult to obtain the credentials necessary to use API clients. The docs are here and appear to have been updated recently. I think we should consider linking to this rather than trying to keep up with the moving target of the Azure portal for setup.
+1
Trying to get this working makes one :disappointed: . Even following the microsoft documentation, it is still confusing trying to figure out how to get:
+1
I was able to retrieve the required credentials, but I don't think my AAD application is configured correctly. I get * autorest:DoErrorUnlessStatusCode 403 POST https://management.azure.com/subscriptions/{subscription_id}/providers/Microsoft.Network/register?api-version=2014-04-01-preview failed with 403 Forbidden when trying to run terraform apply.
@ryanl-ee I had exactly the same error. The key for me was flipping to the "New Portal" and following the steps 'Assign application to role' https://azure.microsoft.com/en-us/documentation/articles/resource-group-create-service-principal-portal/#assign-application-to-role, I set 'Contributor' at the Subscription level which allowed Terraform to generate the new resource group I had specified in main.tf
MS have taken MVP to a new level with application OATH token generation integration with Resource Manager, it should _NOT_ require an elaborate river dance between portals to simply get and configure a client secret.
Hi @JamesFenton
Thanks to @AwaNoodle - there is no some documentation for how to create the correct credentials - https://www.terraform.io/docs/providers/azurerm/index.html
Please try and make sure that the correct credentials are specified and let me know if there are still issues for you
Thanks
Paul
Hi @JamesFenton
I haven't heard if this solved the issue for you. I am going to go ahead and close this out - please let me know if it hasn't
Paul
hi,
I followed below Url to Configure Azurerm.
https://www.terraform.io/docs/providers/azurerm/index.html
But when i am trying for deployment, i m getting below error. can any one please help.
''''
Error refreshing state: 1 error(s) occurred:
Thanks and regards
Krishna
Same issue with Azure ARM as @bhvkrishna90. Perhaps we can reopen the bug?
I'm running into the same issue. Any idea on how to get around this?
I found the error. I will try to fix it.
This HTTP call is returning 404 https://github.com/jen20/riviera/blob/master/azure/token.go#L83
My bad, I was using the wrong tenant id value. 😛
Ok ignore what I said. It works fine for me.
I accidentally copied the full oauth2 url as the tenant id, instead of the GUID.
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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Most helpful comment
@ryanl-ee I had exactly the same error. The key for me was flipping to the "New Portal" and following the steps 'Assign application to role' https://azure.microsoft.com/en-us/documentation/articles/resource-group-create-service-principal-portal/#assign-application-to-role, I set 'Contributor' at the Subscription level which allowed Terraform to generate the new resource group I had specified in main.tf
MS have taken MVP to a new level with application OATH token generation integration with Resource Manager, it should _NOT_ require an elaborate river dance between portals to simply get and configure a client secret.