Skip to content

Add storage account queue support#197

Merged
nomankhans21 merged 1 commit into
mainfrom
storage-account-queue-support
Jun 9, 2026
Merged

Add storage account queue support#197
nomankhans21 merged 1 commit into
mainfrom
storage-account-queue-support

Conversation

@nomankhans21

Copy link
Copy Markdown
Contributor

Context

CYPD want to use Storage Account queues but the module only supported blob storage. This adds queue support with its own private endpoint, DNS zone wiring and outputs so consuming services can start using queues privately.

Changes proposed in this pull request

Four files touched in aks/storage_account:

  • variables.tf: new queues variable, defaults to empty so existing deployments are unaffected
  • data.tf: data source for the privatelink.queue.core.windows.net DNS zone, gated on use_private_storage
  • resources.tf: azurerm_storage_queue resource and a second private endpoint for the queue sub-resource, follows the same pattern as the existing blob endpoint
  • outputs.tf: storage_private_queue_fqdn and queues outputs

Guidance to review

  • Everything mirrors the existing blob private endpoint pattern. Worth checking:
  • DNS zone data source points to the queue zone
  • Private endpoint uses subresource queue not blob
  • storage_account_id used (not the deprecated storage_account_name)

Before merging

  • Confirm the teacher-services-cloud DNS zone PR is merged and applied.

After merging

Checklist

  • I have performed a self-review of my code, including formatting and typos
  • I have cleaned the commit history
  • I have added the Devops label
  • I have attached the pull request to the trello card

@nomankhans21 nomankhans21 self-assigned this Jun 8, 2026
Comment thread aks/storage_account/resources.tf Outdated
}

resource "azurerm_private_endpoint" "storage_queue" {
count = var.use_private_storage ? 1 : 0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will always create a storage queue if private storage is enabled.
Possibly something like var_use_private_storage true and variable queues is not []
This would have to be added to data and output vars too.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. I've updated the count condition across resources.tf, data.tf and outputs.tf so the queue private endpoint is only created when use_private_storage is true and var.queues is not empty.

@nomankhans21 nomankhans21 requested a review from RMcVelia June 8, 2026 10:47
Comment thread aks/storage_account/outputs.tf Outdated

output "storage_private_blob_fqdn" {
value = var.use_private_storage ? "${azurerm_storage_account.main.name}.privatelink.blob.core.windows.net" : null
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we also need to output the primary_queue_endpoint similar to the primary_blob_endpoint

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added primary_queue_endpoint output to mirror as suggested

@nomankhans21 nomankhans21 force-pushed the storage-account-queue-support branch from 98112d7 to 697fd3f Compare June 9, 2026 12:54
@nomankhans21 nomankhans21 merged commit b1e27f4 into main Jun 9, 2026
3 checks passed
@nomankhans21 nomankhans21 deleted the storage-account-queue-support branch June 9, 2026 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants