Multi-Cloud DevOps on AWS and Azure: One Pipeline, One Set of Guardrails
Most companies don't choose multi-cloud, they end up there. Here is how to run DevOps across AWS, Azure and Google Cloud with one pipeline, short-lived OIDC credentials, one Terraform approach and one set of guardrails.
Most companies don't choose multi-cloud. They end up there:
- production runs on AWS;
- the Microsoft side of the business brings Azure (Entra ID, Microsoft 365, a Dynamics or .NET estate);
- an acquisition arrives on Google Cloud;
- a data team picks whatever their platform runs best on.
The cloud bills are rarely the real problem. The real problem is that each cloud quietly gets its own way of deploying, its own secrets, its own rules and its own dashboards. Two years later, nobody can say with confidence who can deploy what, where, and how.
This guide covers how to run DevOps across AWS, Azure and, where it applies, Google Cloud with one pipeline, one infrastructure-as-code approach and one set of guardrails, while still using each cloud's native services where they are strongest. It includes working examples you can adapt. If you are still deciding between providers, start with our comparison of Azure, AWS and Google Cloud.
A note on the examples: the code, policies and configuration in this guide are simplified illustrations, not production-ready templates. Account IDs, names and settings are placeholders. Review, test and adapt anything you take from here in a non-production environment, with your own security team, before you rely on it. Acqurio Tech accepts no responsibility for any loss, outage or security issue that results from using these examples as published.
In short:
- Decide which kind of multi-cloud you actually have before choosing tools.
- Deploy everything from one CI/CD system that signs into each cloud with short-lived OIDC tokens, not stored keys.
- Use Terraform with separate state per cloud and environment, and the same tags everywhere.
- Write your rules once and enforce them in the pull request, at the cloud boundary and at runtime.
- Send telemetry from every cloud to one place, and recover to a second region before you plan to recover to a second cloud.
1. Decide What "Multi-Cloud" Means for You
Before any tooling, write down which of these you actually have:
- Different workloads on different clouds. For example, customer apps on AWS and internal .NET apps on Azure. This is the most common pattern, and the easiest to run.
- The same workload able to run on two clouds. This is usually driven by regulation or a large customer's requirement. It is much more expensive, because every managed service you use becomes a portability question.
- One primary cloud with a second for specific services, such as Azure OpenAI or Microsoft-centred identity next to an AWS core.
Most teams need the first or third pattern. Designing for the second "just in case" usually doubles the work and halves the use of managed services. Be explicit, because this choice drives everything below.
2. The Service Map: Same Job, Different Names
Most confusion in multi-cloud teams is vocabulary. Agree on one table like this and put it in your engineering handbook:
| Job | AWS | Azure | Google Cloud |
|---|---|---|---|
| Pipeline sign-in without keys | IAM OIDC identity provider + IAM role | Federated identity credential on a managed identity or app registration | Workload Identity Federation + service account |
| Terraform state | S3 backend (native lock file) | Azure Storage backend (blob lease lock) | GCS backend |
| Kubernetes | Amazon EKS | Azure Kubernetes Service (AKS) | Google Kubernetes Engine (GKE) |
| Container registry | Amazon ECR | Azure Container Registry | Artifact Registry |
| Pod identity | IAM Roles for Service Accounts / EKS Pod Identity | Microsoft Entra Workload ID | GKE Workload Identity Federation |
| Secrets | AWS Secrets Manager | Azure Key Vault | Secret Manager |
| Preventive policy | Organizations SCPs, AWS Config rules | Azure Policy at management-group level | Organization Policy Service |
| Security posture | AWS Security Hub | Microsoft Defender for Cloud | Security Command Center |
| Native monitoring | Amazon CloudWatch | Azure Monitor + Application Insights | Cloud Monitoring + Cloud Logging |
| Cost data | Cost Explorer + cost allocation tags | Cost Management + tags | Cloud Billing export + labels |
The table also shows the main design rule of this guide: keep the job the same everywhere and let the implementation differ.
3. One Pipeline, Short-Lived Credentials Into Every Cloud
Run builds and deployments from one CI/CD system rather than one per cloud. GitHub Actions, GitLab CI and Azure DevOps Pipelines all work well. The pipeline then signs into each cloud without stored keys, using OpenID Connect (OIDC) federation: the CI system issues a signed token for each job, and each cloud swaps that token for credentials that expire within the hour.
AWS: A Role That Only One Repository and Environment Can Assume
Register token.actions.githubusercontent.com as an IAM OIDC identity provider, then create one role per environment. The trust policy is where the security lives:
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Principal": {
"Federated": "arn:aws:iam::123456789012:oidc-provider/token.actions.githubusercontent.com"
},
"Action": "sts:AssumeRoleWithWebIdentity",
"Condition": {
"StringEquals": {
"token.actions.githubusercontent.com:aud": "sts.amazonaws.com",
"token.actions.githubusercontent.com:sub": "repo:your-org/payments-api:environment:production"
}
}
}]
}Only jobs from your-org/payments-api that run in the production environment can assume this role. A fork, another repository or a feature branch cannot.
Azure: A Federated Identity Credential With the Same Subject
Create a user-assigned managed identity (or an app registration) and add a federated identity credential with:
- issuer
https://token.actions.githubusercontent.com; - subject
repo:your-org/payments-api:environment:production; - audience
api://AzureADTokenExchange.
Then grant the identity a role on the right subscription or resource group only.
In Azure DevOps, use service connections with workload identity federation instead of client secrets.
Google Cloud: Workload Identity Federation
Create a workload identity pool and a provider for your CI system, with an attribute condition that limits it to your organisation's repositories. Then allow one service account per environment to be used from that pool.
One Workflow, Three Clouds
With the trust set up, one GitHub Actions workflow can deploy to each cloud with no secrets beyond plain IDs:
name: deploy-production
on:
push:
branches: [main]
permissions:
id-token: write # lets the job request an OIDC token
contents: read
jobs:
aws:
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/checkout@v4
- uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::123456789012:role/payments-api-production-deploy
aws-region: eu-west-1
- run: terraform -chdir=infra/aws/production init && terraform -chdir=infra/aws/production apply -auto-approve
azure:
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/checkout@v4
- uses: azure/login@v2
with:
client-id: ${{ vars.AZURE_CLIENT_ID }}
tenant-id: ${{ vars.AZURE_TENANT_ID }}
subscription-id: ${{ vars.AZURE_SUBSCRIPTION_ID }}
- run: terraform -chdir=infra/azure/production init && terraform -chdir=infra/azure/production apply -auto-approve
gcp:
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/checkout@v4
- uses: google-github-actions/auth@v2
with:
workload_identity_provider: projects/123456789/locations/global/workloadIdentityPools/ci/providers/github
service_account: [email protected]Notice what is missing: no AWS_SECRET_ACCESS_KEY, no Azure client secret, no service account JSON key.
The IDs are stored as plain variables because they are not secrets. The production environment in GitHub can require a reviewer, so the same approval gate covers all three clouds.
In a real pipeline, the apply step runs on a plan that was reviewed in the pull request (section 4). The stages themselves are the same as on a single cloud; see our CI/CD pipeline best practices.
4. Infrastructure as Code: One Tool, Separate State, Shared Conventions
Terraform (or OpenTofu) is the usual choice for multi-cloud because one language covers the AWS, AzureRM and Google providers. If Terraform is new to your team, our infrastructure as code guide covers the basics.
Keep state separate per cloud and per environment. One giant state file across clouds turns every plan into a risk. A simple layout:
infra/
modules/
aws/network aws/eks aws/postgres
azure/network azure/aks azure/postgres
aws/
staging/ production/
azure/
staging/ production/Each environment folder has its own backend:
# infra/aws/production/backend.tf
terraform {
backend "s3" {
bucket = "your-org-tfstate-aws"
key = "payments-api/production.tfstate"
region = "eu-west-1"
encrypt = true
use_lockfile = true # native S3 locking, no DynamoDB table needed
}
}
# infra/azure/production/backend.tf
terraform {
backend "azurerm" {
resource_group_name = "rg-tfstate"
storage_account_name = "yourorgtfstate"
container_name = "tfstate"
key = "payments-api/production.tfstate"
use_oidc = true # the pipeline's federated identity, no access key
}
}Don't write "cloud-agnostic" modules that hide the provider.
- Write a small module per cloud for each building block: network, Kubernetes cluster, database and monitoring.
- Keep the interface the same: the same input names, the same tags, the same outputs.
- Engineers get consistency without a leaky abstraction, and each module can use its cloud's best features.
Standard tags everywhere:
- Put
owner,cost-centre,environment,serviceanddata-classificationon every resource in every cloud. On Google Cloud these are labels. - Set them once as provider defaults where the provider allows it, for example
default_tagsin the AWS provider. - This one habit makes cost reports, incident ownership and audits far easier.
Plan in the pipeline, apply after approval. The pull request shows the plan for each cloud it touches, and production applies need a reviewer.
5. Containers: The Same Artefact, Deployed to EKS and AKS
If you run Kubernetes on both clouds, aim for one container image and one deployment definition, promoted through environments:
- Build the image once, scan it, and sign it, for example with Sigstore cosign. Push it to the registry next to each cluster: Amazon ECR and Azure Container Registry. Copy the same digest rather than rebuilding, so production on both clouds runs byte-for-byte the same image.
- Keep one Helm chart or Kustomize base per service. Add small per-cloud overlays only for what differs: load balancer annotations, storage classes and identity bindings.
- Deploy by digest (
image@sha256:...), not by a moving tag likelatest. - Consider GitOps (Argo CD or Flux) so each cluster pulls its desired state from Git, and drift is corrected automatically. Our GitOps explainer covers the model.
Not everything belongs in Kubernetes. Functions, managed queues and managed databases are often the better choice on each cloud. Just deploy them through the same pipeline and Terraform setup.
6. Secrets Stay in Each Cloud's Vault
Don't build a cross-cloud secret store unless you must:
- Keep secrets in AWS Secrets Manager for AWS workloads and Azure Key Vault for Azure workloads.
- Let applications read them at runtime with their cloud identity (an IAM role, a managed identity or Workload ID), not with a copied password in an environment variable.
Some secrets span clouds, for example third-party API keys used everywhere. For those, HashiCorp Vault or one chosen cloud vault with federated access works. Either way:
- CI never prints or stores secrets.
- Rotation is automated where the service supports it, such as database credentials in Secrets Manager.
- Access to production secrets is logged and reviewed.
7. Guardrails: The Same Rules, Enforced in Three Places
Write the rules once and check them at three layers:
- In the pull request. Policy-as-code scans the Terraform plan before anything is created. Open Policy Agent with Conftest, Checkov or similar tools can block public storage, missing encryption, missing tags and open security groups.
- At the cloud boundary. Use AWS Organizations service control policies and AWS Config rules, and Azure Policy assignments at management-group level. These stop someone making the same mistake by hand in the console.
- At runtime. AWS Security Hub and Microsoft Defender for Cloud report what drifted or was created outside the pipeline.
Here is a simplified Conftest rule that blocks any new resource missing the standard tags, in AWS or Azure. Run it against the plan in JSON:
# policy/tags.rego (run with: terraform show -json plan.out > plan.json && conftest test plan.json)
package main
required := {"owner", "cost-centre", "environment", "service"}
deny contains msg if {
rc := input.resource_changes[_]
rc.change.actions[_] == "create"
rc.change.after.tags != null # only resources that support tags
present := {k | some k, _ in rc.change.after.tags}
missing := required - present
count(missing) > 0
msg := sprintf("%s is missing tags: %v", [rc.address, missing])
}The same rule then exists as an Azure Policy ("require a tag on resources") and as an AWS tag policy or Config rule. Keep one list of rules, and map each rule to its check in each layer and each cloud, for example:
- "no public buckets or blob containers";
- "encryption at rest everywhere";
- "only approved regions";
- "standard tags on every resource".
That mapping is what an auditor will ask for.
8. One View of Monitoring, Logs and Incidents
Each cloud has good native monitoring: Amazon CloudWatch, Azure Monitor with Application Insights, and Google Cloud Monitoring. But an on-call engineer should not have to open three consoles at 3 a.m.
- Instrument applications with OpenTelemetry, so traces, metrics and logs use one format whichever cloud the service runs on.
- Run an OpenTelemetry Collector in each cloud and send to one observability backend your team already knows. That can be a managed service such as Grafana Cloud or Datadog, or a self-run stack.
- Use the same alert names, severity levels and runbook links for every service, and route alerts by the
serviceandownertags from section 4. - Keep the native tools for what only they see, such as cloud audit logs and service health notices, and forward their alerts into the same on-call route.
Our guide to logging, monitoring and observability goes deeper on what to alert on.
9. Cost: Tag First, Then Compare Like With Like
Multi-cloud cost problems are mostly visibility problems. With consistent tags you can:
- turn on cost allocation tags in AWS and use tags in Azure Cost Management, then export both into one report by
serviceandenvironment; - set budgets and anomaly alerts per team in each cloud;
- review idle resources, oversized instances and old snapshots every month, using each cloud's own recommendations;
- watch data transfer between clouds, which is the cost line multi-cloud designs most often forget. Keep chatty services and their databases in the same cloud and region.
See our cloud cost optimisation guide for the review checklist.
10. Disaster Recovery: Be Honest About the Second Cloud
"We can fail over to the other cloud" is easy to say and hard to prove.
For most systems, a second region in the same cloud, tested regularly, gives better recovery for less effort than cross-cloud failover. Keep cross-cloud recovery for the few systems where regulation or contracts require it, and test it on a schedule.
Whatever you choose, write down the recovery time and data-loss targets for each system, and check them in every test. Our disaster recovery and high availability guide explains the options.
A Reference Layout
Put together, a two-cloud setup looks like this:
Developers ── pull request ──► Git repository
│
plan + policy checks (Conftest / Checkov)
│ reviewer approves
▼
One CI/CD system (OIDC tokens)
┌──────────────────┴──────────────────┐
▼ ▼
AWS account (IAM role) Azure subscription (federated ID)
Terraform state in S3 Terraform state in Azure Storage
EKS ◄── image by digest ──► ECR AKS ◄── image by digest ──► ACR
Secrets Manager Key Vault
SCPs + Config + Security Hub Azure Policy + Defender for Cloud
└──────────► OpenTelemetry ◄──────────┘
one observability backend
one on-call route, one cost reportCommon Mistakes We See
- A separate pipeline per cloud. Two sets of approvals, two sets of secrets and two release habits. Merge them early. The longer they run apart, the harder it is.
- Long-lived cloud keys in CI variables. These are the single most common way cloud accounts get abused. OIDC removes them entirely.
- Over-broad OIDC trust. A trust policy or federated credential that accepts any branch, or every repository in the organisation (
repo:your-org/*), gives the convenience of OIDC without the safety. Pin it to the repository and environment. - One state file for everything. A single
terraform applyshould never be able to touch both clouds' production. - A "cloud-agnostic" abstraction layer. It hides the features you pay for and leaks the moment something goes wrong. Same interface, different modules.
- Rules that exist in one cloud only. Public storage blocked in Azure Policy but allowed in AWS, or the other way round. The written rules-to-checks map fixes this.
- Untested failover. If the second cloud or region has never taken real traffic, it is not a recovery plan.
Measuring Whether It Works
Track the four DORA measures per service, whichever cloud it runs on:
- deployment frequency;
- lead time for changes;
- change failure rate;
- time to restore service.
Add two multi-cloud measures:
- the number of long-lived cloud credentials (the target is zero);
- the share of resources with all standard tags (the target is close to 100%).
If one cloud's numbers lag, that is usually where the pipeline or guardrails differ.
A 90-Day Starting Plan
| Weeks | Focus | Done when |
|---|---|---|
| 1-2 | Inventory: what runs where, who deploys it, which keys exist | One list of services, owners, clouds and deployment methods |
| 3-4 | OIDC federation from CI into AWS and Azure; remove stored cloud keys | No long-lived cloud credentials in CI |
| 5-8 | Terraform state split per cloud and environment; tag standard; plan in pull requests | Every change shows a plan and a reviewer |
| 9-10 | Policy-as-code in CI plus SCPs and Azure Policy for the top 10 rules | The same 10 rules are blocked in the pull request and in the console |
| 11-12 | OpenTelemetry and one alerting setup for the most critical services | One on-call view for those services |
Need help setting this up? Acqurio Tech's cloud and DevOps team works across AWS, Azure and Google Cloud: pipelines, Terraform, Kubernetes, monitoring and cost reviews. You can also hire DevOps engineers who join your team and work in your tools and time zone.
The examples in this guide are for illustration only and are provided without warranty. Always validate configuration and security settings against your own environment and the cloud providers' current documentation.
Frequently asked questions
Is multi-cloud worth it for a mid-sized company?
Usually only in the "different workloads on different clouds" form, for example AWS for customer products and Azure for Microsoft-centred internal systems. Running the same workload on two clouds rarely pays off unless a regulator or a major customer requires it.
Which CI/CD tool is best for AWS and Azure together?
GitHub Actions, GitLab CI and Azure DevOps Pipelines can all deploy to both clouds using OIDC federation without stored keys. Pick the one that matches where your code and your team already live; consistency matters more than the tool.
How does OIDC federation remove stored cloud keys?
The CI system issues a signed, short-lived token for each job that names the repository and environment. AWS, Azure and Google Cloud are set up to trust that issuer and to accept only tokens with the expected subject. They return temporary credentials that expire within the hour, so there is no long-lived key to leak or rotate.
Should we use Terraform or each cloud's own IaC (CloudFormation, Bicep)?
For more than one cloud, Terraform or OpenTofu keeps one language, one workflow and one review process. Teams that are almost entirely on one cloud can stay with CloudFormation or Bicep and use Terraform only where the second cloud appears.
How do we stop people changing things by hand in the console?
Make the pipeline the easy path, limit console write access in production, and enforce the key rules at the cloud level with AWS service control policies and Azure Policy. Then report drift with AWS Config and Microsoft Defender for Cloud, so manual changes are visible quickly.
Can we use one Kubernetes setup on both EKS and AKS?
Yes, for the application layer: one image, one Helm chart or Kustomize base, and small per-cloud overlays for load balancers, storage classes and workload identity. The clusters themselves are still built with a per-cloud Terraform module, because networking and identity differ.
Do we need DevOps engineers who know both AWS and Azure?
At least one senior engineer should understand both, mainly identity, networking and policy. The rest of the team can specialise, as long as the pipeline, Terraform conventions and monitoring are the same everywhere.
