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

Feature Request: Azure Batch #2427

Closed
MHHenriksen opened this issue Dec 3, 2018 · 2 comments · Fixed by #2428
Closed

Feature Request: Azure Batch #2427

MHHenriksen opened this issue Dec 3, 2018 · 2 comments · Fixed by #2428

Comments

@MHHenriksen
Copy link

MHHenriksen commented Dec 3, 2018

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

Description

Add support for Azure Batch service, to create infrastructure components (Batch account and pool).

New or Affected Resource(s)

To support Azure Batch, the following resources need to be created:

  • azurerm_batch_account
  • azurerm_batch_pool

Potential Terraform Configuration

# Configure the Microsoft Azure Provider
provider "azurerm" {
  # if you're using a Service Principal (shared account) then either set the environment variables, or fill these in:  # subscription_id = "..."  # client_id       = "..."  # client_secret   = "..."  # tenant_id       = "..."
}
 
resource "azurerm_resource_group" "rg" {
  name     = "${var.resource_group_name}"
  location = "${var.location}"
}
 
resource "random_integer" "ri" {
  min = 10000
  max = 99999
}
 
resource "azurerm_storage_account" "stor" {
  name                     = "stor${random_integer.ri.result}"
  resource_group_name      = "${azurerm_resource_group.rg.name}"
  location                 = "${azurerm_resource_group.rg.location}"
  account_tier             = "${var.storage_account_tier}"
  account_replication_type = "${var.storage_replication_type}"
}
 
resource "azurerm_batch_account" "batch" {
  name                     = "batch${random_integer.ri.result}"
  resource_group_name      = "${azurerm_resource_group.rg.name}"
  location                 = "${azurerm_resource_group.rg.location}"
  storage_account_name     = "${azurerm_storage_account.stor.name}"
}
 
resource "azurerm_batch_pool" "pool" {
  id                    = "pool${random_integer.ri.result}"
  vm_size               = "${var.batch_pool_nodes_vm_size}"
  target_dedicated_node = "${var.batch_pool_nodes_count}"
  vm_image              = "${var.batch_pool_nodes_vm_image}"
  node_agent_sku_id     = "${var.batch.pool_nodes_agent_sku_id}"
}

References

@jcorioland
Copy link
Contributor

@tombuildsstuff @katbyte - FYI, I am working with @MHHenriksen on this implementation.
Let me know if you have any feedback.

@ghost
Copy link

ghost commented Mar 5, 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 Mar 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants