microsoft-foundry / microsoft-foundry/foundry-samples

Question: how to get the deployment endpoint and key using Terraform?

Open
#417 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Bicep
Stars
445
Forks
494
Avg merge
11h 35m
Merged PRs (30d)
38

Description

Hi,

Thanks for setting up this examples repository. It was helpful to quickly get started with Microsoft Foundry.

I was wondering how to get the model endpoint and key for a deployed model using Terraform?

resource "azurerm_cognitive_deployment" "aifoundry_deployment_gpt_4o" {
  depends_on = [
    azurerm_cognitive_account.ai_foundry
  ]

  name                 = "gpt-4o"
  cognitive_account_id = azurerm_cognitive_account.ai_foundry.id

  sku {
    name     = "GlobalStandard"
    capacity = 1
  }

  model {
    format  = "OpenAI"
    name    = "gpt-4o"
    version = "2024-11-20"
  }
}

I would expect to somehow get the Endpoint Target URI (e.g. https://<customSubDomainName>.cognitiveservices.azure.com/openai/deployments/gpt-4o/chat/completions?api-version=2025-01-01-preview) and Endpoint Key in the attributes of the response.

Cheers,
Marius

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is identified in the issue. Start with the azurerm_cognitive_deployment resource shown and determine whether Terraform exposes the deployed model endpoint and key; done means documenting a verified way to retrieve them, or clearly stating the provider limitation and alternative.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, terraform
Domain
cloud, infrastructure
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.