Azure / Azure/azure-dev

Docs: add Bicep and Terraform infrastructure guidance to azd ai CI/CD article

Open
#9,865 1 comment 0 reactions 1 assignee Claimed by @JerryYangKai View on GitHub
area/bicep area/public-docs area/terraform
Dominant language
Go
Stars
569
Forks
364
Avg merge
2d 19h
Merged PRs (30d)
136

Description

## Documentation gap

The Microsoft Learn article [Set up CI/CD for hosted agents with the Azure Developer CLI](https://learn.microsoft.com/azure/foundry/agents/how-to/set-up-ci-cd-cli) currently describes `azd provision` as creating or updating infrastructure from Bicep templates. It does not explain the equivalent CI/CD setup for Terraform or clearly distinguish the provider-specific requirements for azd ai projects.

## Requested update

Add an **Infrastructure as code** section that:

- Covers both Bicep and Terraform for azd ai hosted-agent projects.
- Explains that Bicep is the default IaC provider and shows how Terraform is selected in `azure.yaml`:
```yaml
infra:
provider: terraform
```
- Documents the expected `infra/` layout and the `azd provision` / `azd deploy` pipeline flow for each provider.
- Explains Terraform's remote-state requirement before running `azd pipeline config`.
- Covers non-interactive authentication and required variables or secrets for GitHub Actions and Azure Pipelines.
- Includes provider-specific validation, environment promotion, rollback/recovery, and troubleshooting guidance.
- Links to the existing [Terraform with azd](https://learn.microsoft.com/azure/developer/azure-developer-cli/use-terraform-for-azd) and [azd CI/CD](https://learn.microsoft.com/azure/developer/azure-developer-cli/configure-devops-pipeline) documentation.

## Acceptance criteria

- The hosted-agent CI/CD article has complete Bicep and Terraform paths.
- Each path includes prerequisites, configuration, pipeline behavior, and troubleshooting.
- GitHub Actions and Azure Pipelines are both covered.
- A reader can configure an azd ai project and run its infrastructure deployment in CI/CD without relying on Bicep-only assumptions.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.