Skip to content
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_batch_account pool_allocation_mode "UserSubscription" fails #2793

Closed
ghost opened this issue Jan 29, 2019 · 8 comments
Closed

azurerm_batch_account pool_allocation_mode "UserSubscription" fails #2793

ghost opened this issue Jan 29, 2019 · 8 comments

Comments

@ghost
Copy link

ghost commented Jan 29, 2019

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 (and AzureRM Provider) Version

Terraform v0.11.10

  • provider.azurerm v1.21.0
  • provider.random v2.0.0

Affected Resource(s)

  • azurerm_batch_account

Terraform Configuration Files

azurerm_storage_account and azurerm_batch_account substanzas hcl omitted for brevity.

resource "azurerm_batch_account" "main" {
  name                 = "phtestbatch"
  resource_group_name  = "rg-dev-ph-test"
  location             = "northeurope"
  pool_allocation_mode = "UserSubscription"
  storage_account_id   = "${azurerm_storage_account.main.id}"

<snip>

Debug Output

1 error(s) occurred:

module.demo-batch.azurerm_batch_account.main: 1 error(s) occurred:

azurerm_batch_account.main: Error creating Batch account "phtestbatch" (Resource Group "rg-dev-ph-test"): 
batch.AccountClient#Create: Failure sending request: StatusCode=400 -- 
Original Error: Code="InvalidRequestBody" Message="The specified Request Body is not syntactically valid.\nRequestId:27c0b0f8-f459-ae12-8712-d0c5a084d03\nTime:2019-01-29T10:49:13.3297421Z" 
Target="BatchAccount" Details=[{"code":"Reason","message":"keyVaultReference must be set if poolAllocationMode is specified as 'UserSubscription' on a PUT request"}]

Judging from the ref below, there is no need to supply detailed debug.

Panic Output

N/A

Expected Behavior

Terraform to error because no references to KeyVault resource supplied in the configuration, or, if one were to be, then success output should have resulted.

Actual Behavior

Error as per the above debug output.

Steps to Reproduce

  1. Write a azurerm_batch_account resource, and specify pool_allocation_mode = "UserSubscription", including a supporting azurerm_storage_account resource
  2. terraform apply

Important Factoids

The tests conducted on this resource only covered BatchService not UserSubscription and I am in a corporate environment requiring private node IPs. I thus need to use UserSubscription.

References

@ghost

This comment has been minimized.

@ghost

This comment has been minimized.

@jcorioland
Copy link
Contributor

@tombuildsstuff I will also have a look on this one.

@ghost
Copy link
Author

ghost commented Jun 20, 2019

Could I bump this please if it's not too much weight on the 2.0.0 proceedings?

@mikeclearbank
Copy link

any news on this one?

thanks

katbyte pushed a commit that referenced this issue Jul 12, 2019
This PR will fix the bug described in #2793 when user try to create an Azure Batch account with UserSubscription allocation mode.

The resource / data source did not defined the Azure Keyvault reference which is required for that mode.
@katbyte katbyte added this to the v1.32.0 milestone Jul 12, 2019
@tombuildsstuff
Copy link
Contributor

Fixed via #3535 - thanks @jcorioland :)

@ghost
Copy link

ghost commented Jul 30, 2019

This has been released in version 1.32.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.32.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Aug 21, 2019

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!

@ghost ghost locked and limited conversation to collaborators Aug 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants