Hello, I have a batch account created and am trying to deploy batch pools in the account and getting the below error:
**creating Pool: (Name “nf-tower-batch-account-primary-pool-tst” / Batch Account Name “nfbatchaccounttst” / Resource Group “ncezid-amdp-tst-low-rg”): batch.PoolClient#Create: Failure responding to request: StatusCode=400 – Original Error: autorest/azure: Service returned an error. Status=400 Code=“FeatureDisabled” Message=“Feature is disabled\nRequestId:b5fe8c4e-fd05-403f-8c2b-7ffea0ab10f6\nTime:2023-05-04T18:56:36.4412618Z” Target=“BatchAccount” Details=[{“code”:“Reason”,“message”:"Feature NoPublicIPAddresses is not **
enabled for account nfbatchaccounttst"}]
here is my code as well:
resource “azurerm_batch_account” “nf_batch_account” {
name = “nfbatchaccount${local.env}”
resource_group_name = local.resource_group_name
location = local.location
pool_allocation_mode = “BatchService”
storage_account_id = azurerm_storage_account.nf_tower_storage_account.id
storage_account_authentication_mode = “StorageKeys” ## BatchAccountManagedIdentity is better for security, but we have to contact OCIO for creating that role.
public_network_access_enabled = false
identity {
identity_ids =
type = “SystemAssigned”
}
tags = merge(local.tags, local.descriptions)
}
resource “azurerm_private_endpoint” “nf_tower_batch_account_endpoint” {
name = “nf-tower-batch-account-endpoint-${local.env}”
location = local.location
resource_group_name = local.resource_group_name
subnet_id = azurerm_subnet.privatelink_subnet.id
private_dns_zone_group {
name = “privatednszonegroup”
private_dns_zone_ids = [azurerm_private_dns_zone.nf_batch_account_private_dns_zone.id]
}
private_service_connection {
name = “nf-tower-batch-account-endpoint-${local.env}”
is_manual_connection = false
private_connection_resource_id = azurerm_batch_account.nf_batch_account.id
subresource_names = [“batchAccount”]
}
ip_configuration {
name = “nf-tower-batch-account-endpoint-ip-${local.env}”
private_ip_address =
subresource_name = “batchAccount”
}
tags = merge(local.tags, local.descriptions)
}
resource “azurerm_private_endpoint” “nf_tower_batch_node_management_endpoint” {
name = “nf-tower-batch-node-management-endpoint-${local.env}”
location = local.location
resource_group_name = local.resource_group_name
subnet_id = azurerm_subnet.privatelink_subnet.id
private_dns_zone_group {
name = “privatednszonegroup”
private_dns_zone_ids = [azurerm_private_dns_zone.nf_batch_account_private_dns_zone.id]
}
private_service_connection {
name = “nf-tower-batch-node-management-endpoint-${local.env}”
is_manual_connection = false
private_connection_resource_id = azurerm_batch_account.nf_batch_account.id
subresource_names = [“nodeManagement”]
}
ip_configuration {
name = “nf-tower-batch-node-management-endpoint-ip-${local.env}”
private_ip_address =
subresource_name = “nodeManagement”
}
tags = merge(local.tags, local.descriptions)
}
resource “azurerm_batch_pool” “nf_batch_account_pool” {
name = “nf-tower-batch-account-primary-pool-{local.env}-large"
resource_group_name = local.resource_group_name
account_name = azurerm_batch_account.nf_batch_account.name
display_name = "Nextflow Tower Primary Pool {local.env} large”
inter_node_communication = “Disabled”
max_tasks_per_node = 4
metadata = {}
node_agent_sku_id = “batch.node.centos 7”
vm_size = “STANDARD_D16_V3”
storage_image_reference {
publisher = “microsoft-azure-batch”
offer = “centos-container”
sku = “7-8”
version = “latest”
}
container_configuration {
type = “DockerCompatible”
container_registries =
container_image_names = [
“Quay”
]
}
network_configuration {
subnet_id = azurerm_subnet.batch_subnet.id
public_address_provisioning_type = “NoPublicIPAddresses”
public_ips =
}
start_task {
command_line = "bash -c "chmod +x azcopy && mkdir $AZ_BATCH_NODE_SHARED_DIR/bin/ && cp azcopy $AZ_BATCH_NODE_SHARED_DIR/bin/" "
task_retry_maximum = 1
wait_for_success = true
common_environment_properties = {}
resource_file {
http_url = “https://nf-xpack.seqera.io/azcopy/linux_amd64_10.8.0/azcopy”
file_path = “azcopy”
}
user_identity {
auto_user {
elevation_level = "NonAdmin"
scope = "Pool"
}
}
}
task_scheduling_policy {
node_fill_type = “Pack”
}
resource “azurerm_batch_pool” “nf_phoenix_batch_account_pool” {
name = “nf-tower-phoenix-batch-account-primary-pool-{local.env}"
resource_group_name = local.resource_group_name
account_name = azurerm_batch_account.nf_batch_account.name
display_name = "Nextflow Tower Phoenix Pool {local.env}”
inter_node_communication = “Disabled”
max_tasks_per_node = 4
metadata = {}
node_agent_sku_id = “batch.node.centos 7”
vm_size = “STANDARD_D4_V3”
fixed_scale {
resize_timeout = “PT15M”
target_dedicated_nodes = 4
target_low_priority_nodes = 0
}
storage_image_reference {
publisher = “microsoft-azure-batch”
offer = “centos-container”
sku = “7-8”
version = “latest”
}
container_configuration {
type = “DockerCompatible”
container_registries =
container_image_names = [
“Quay”
]
}
network_configuration {
subnet_id = azurerm_subnet.batch_subnet.id
public_address_provisioning_type = “NoPublicIPAddresses”
public_ips =
}
start_task {
command_line = "bash -c "chmod +x azcopy && mkdir $AZ_BATCH_NODE_SHARED_DIR/bin/ && cp azcopy $AZ_BATCH_NODE_SHARED_DIR/bin/" "
task_retry_maximum = 1
wait_for_success = true
common_environment_properties = {}
resource_file {
http_url = “https://nf-xpack.seqera.io/azcopy/linux_amd64_10.8.0/azcopy”
file_path = “azcopy”
}
user_identity {
auto_user {
elevation_level = "NonAdmin"
scope = "Pool"
}
}
}
task_scheduling_policy {
node_fill_type = “Pack”
}
}
resource “azurerm_batch_pool” “nf_phoenix_batch_account_pool_large” {
name = “nf-tower-phoenix-batch-account-primary-pool-{local.env}-large"
resource_group_name = local.resource_group_name
account_name = azurerm_batch_account.nf_batch_account.name
display_name = "Nextflow Tower Phoenix Pool {local.env} large”
inter_node_communication = “Disabled”
max_tasks_per_node = 4
metadata = {}
node_agent_sku_id = “batch.node.centos 7”
vm_size = “STANDARD_D16_V3”
fixed_scale {
resize_timeout = “PT15M”
target_dedicated_nodes = 4
target_low_priority_nodes = 0
}
storage_image_reference {
publisher = “microsoft-azure-batch”
offer = “centos-container”
sku = “7-8”
version = “latest”
}
container_configuration {
type = “DockerCompatible”
container_registries =
container_image_names = [
“Quay”
]
}
network_configuration {
subnet_id = azurerm_subnet.batch_subnet.id
public_address_provisioning_type = “NoPublicIPAddresses”
public_ips =
}
start_task {
command_line = "bash -c "chmod +x azcopy && mkdir $AZ_BATCH_NODE_SHARED_DIR/bin/ && cp azcopy $AZ_BATCH_NODE_SHARED_DIR/bin/" "
task_retry_maximum = 1
wait_for_success = true
common_environment_properties = {}
resource_file {
http_url = “https://nf-xpack.seqera.io/azcopy/linux_amd64_10.8.0/azcopy”
file_path = “azcopy”
}
user_identity {
auto_user {
elevation_level = "NonAdmin"
scope = "Pool"
}
}
}
task_scheduling_policy {
node_fill_type = “Pack”
}