Azure Key Vault Deployment with Terraform (Workday API Secret Management)

This project demonstrates my ability to design, build, and automate secure cloud infrastructure in Azure using Terraform, following enterprise‑grade best practices.

Project Overview

The goal of this project was to create a secure, isolated Azure Key Vault for storing Workday API credentials used by multiple client applications. The solution needed to ensure:

  • No secrets stored in code

  • Each application only accesses its own secrets

  • Centralized lifecycle management

  • Least‑privilege access model

  • Fully automated deployment using Infrastructure‑as‑Code (Terraform)

This Key Vault is entirely IaC‑driven and designed for production environments.

Why a Separate Key Vault?

A different Key Vault already existed for SQL Transparent Data Encryption (TDE).
I designed a separate vault to:

  • Avoid mixing database encryption keys with application secrets

  • Reduce blast radius

  • Enforce strict access separation

  • Follow Azure best practices for isolation

This ensures Workday credentials are not exposed to infrastructure admins managing SQL encryption keys.

Architecture

Resource Group
rg-workday-appsecrets-prod

Key Vault
kv-workday-appsecrets

  • RBAC-enabled

  • Soft delete + purge protection

  • Public/off by default (private endpoints optional)

RBAC Design

  • Integration Engineer → Key Vault Secrets Officer (write + rotate secrets)

  • Application A → Key Vault Secrets User (read-only for its secrets)

  • Application B → Key Vault Secrets User

  • Terraform manages all access declaratively

Terraform Highlights

I built the following Terraform modules/files:

providers.tf

Defines AzureRM provider.

versions.tf

Locks Terraform + provider versions for stability.

variables.tf

Inputs for:

  • Resource group

  • Location

  • Integration Engineer Object ID

  • Application identity IDs

  • Workday secret values

main.tf

Creates:

  • Resource Group

  • Key Vault

  • RBAC authorization mode

  • Security hardening (soft‑delete + purge protection)

rbac.tf

Assigns:

  • Integrations Engineer → Key Vault Secrets Officer

  • Applications → Key Vault Secrets User

secrets.tf

Defines secrets for:

  • workday-appA-client-id

  • workday-appA-client-secret

  • workday-appA-endpoint
    …and the same pattern for App B.

Everything is driven by terraform.tfvars so no secrets are stored in code.

What Terraform Deploys

  • Creates Resource Group

  • Deploys secure Key Vault

  • Enables RBAC authorization

  • Applies least‑privilege RBAC

  • Prepares vault for future Workday secret ingestion

  • Outputs the vault URI for application teams

Sample Terraform output:

Apply complete! Resources: 3 added, 0 changed, 0 destroyed.

Outputs:

key_vault_uri = "https://kv-workday-appsecrets.vault.azure.net/"

Secret Management Flow

  1. Integration Engineer creates/rotates secrets in the vault.

  2. Applications authenticate using Managed Identities or App Registrations.

  3. Apps fetch secrets securely at runtime using:

    • Azure Key Vault REST API, or

    • SDKs (DefaultAzureCredential)

No secrets are stored in configuration files.

Validation

Used Azure CLI + Portal to verify:

  • Vault existence

  • RBAC propagation

  • DNS registration

  • Access rules

  • API endpoint availability

Testing verified that RBAC restrictions prevent unauthorized access:
Owners can manage the vault but cannot read secrets without data-plane roles.

Security Best Practices Implemented

  • Dedicated Key Vault for application secrets

  • RBAC-only access model

  • Secret-per-application isolation

  • No direct-sharing of credentials

  • No use of Access Policies (deprecated model)

  • No hardcoded secrets in code

  • Soft-delete + purge protection enabled

  • IaC-driven for reproducibility and auditability

  • Supports future private endpoints

  • Supports future secret rotation automation

 Skills Demonstrated

  • Azure Key Vault

  • Azure RBAC

  • Terraform IaC (AzureRM provider)

  • Secret and credential lifecycle management

  • Secure application integration patterns

  • Cloud architecture & separation of duties

  • CLI validation & troubleshooting

  • Professional documentation & communication

  • Governance alignment with enterprise controls

 What’s next for this project?

I will extend this project with:

  • Private endpoints for network isolation

  • Log Analytics diagnostic logging for auditing

  • Automated secret rotation

  • Terraform modules for multi‑app onboarding

  • Optional Logic App for credential rotation workflows

Next
Next

AWS Projects