iac.htora.dev · security templates

Home/Start here/The four clouds side by side

The four clouds side by side

Every cloud has the same handful of building blocks under different names. Learn the mapping once and the other three stop feeling foreign.

AWSOrganizationOrganizational unitAccountAzureTenantManagement groupSubscriptionResource groupGoogle CloudOrganizationFolderProjectOracle CloudTenancyCompartmentChild compartment
Each cloud nests its containers differently. The highlighted level is where resources live, and where most permissions and policies are attached.

How each cloud is organised

Each cloud has a top level for the whole organisation, one or more grouping levels, and a level where resources actually sit. Most permissions and policies attach at that last level, which is why it is the one to learn first.

AWSAzureGoogle CloudOracle Cloud
Top levelOrganizationTenantOrganizationTenancy
GroupingOrganizational unitManagement groupFolderCompartment
Where resources liveAccountResource group, inside a subscriptionProjectCompartment
The ID you paste most12-digit account IDSubscription ID, a GUIDProject ID, a name you choseOCID, a long string starting ocid1.

The same building blocks

AWSAzureGoogle CloudOracle Cloud
Audit logCloudTrailActivity LogCloud Audit LogsAudit
Kept by default90 days of management events90 days400 days of Admin Activity, unchangeable365 days, unchangeable
Object storageS3Blob StorageCloud StorageObject Storage
Write-once lockObject LockImmutability policyRetention policy, lockableRetention rule, lockable
Your own keysKMSKey VaultCloud KMSVault
Command lineawsazgcloudoci
Terraform providerhashicorp/awshashicorp/azurermhashicorp/googleoracle/oci

The default retention row is why the audit log template exists on all four. Each cloud keeps something on its own, and in each case the copy you control can last longer and sits outside the reach of whoever can change the default.

How Terraform signs in to each

Terraform uses whatever the cloud's own command line tool has already set up. Sign in with the tool first, then run Terraform in the same terminal.

CloudRun onceWhat Terraform reads
AWSaws configure sso or aws configureThe profile in AWS_PROFILE, or the default one
Azureaz loginThe CLI sign-in, plus ARM_SUBSCRIPTION_ID, which the provider has required since version 4
Google Cloudgcloud auth application-default loginApplication default credentials. A plain gcloud auth login is a different thing and Terraform will not see it
Oracle Cloudoci setup configThe DEFAULT profile in ~/.oci/config, including the API key and region
The two that catch people

On Google Cloud, gcloud auth login signs in the command line tool, and Terraform ignores it. The command Terraform needs has application-default in it.

On Azure, the provider stopped guessing the subscription in version 4, and version 5 keeps it that way. Without ARM_SUBSCRIPTION_ID or a subscription_id in the provider block, the first plan fails.

One result, four ways

The same template, audit logs nobody can delete, built on each cloud. The idea is identical. The plumbing and the trap are different every time.

AWSAzureGoogle CloudOracle Cloud
What copies the logsThe trail itselfA diagnostic settingA log sinkA Connector Hub connector
First file appearsWithin about 15 minutesWithin the hour, one file per hourWithin the hour, in hourly batchesWithin a few minutes
What the lock applies toEach stored versionThe containerThe bucketThe bucket
The trapA plain delete succeeds by adding a delete markerThe container name, and appendsThe sink's own identity needs write accessLocking has to be scheduled 14 days ahead

Words that change meaning between clouds

Role. In AWS a role is an identity: something you become for a while, with its own permissions. In Azure and Google Cloud a role is a named list of permissions that you grant to someone. Oracle Cloud has no roles at all. Permissions are written as sentences in a policy, such as Allow group auditors to read audit-events in tenancy.

Project. In Google Cloud a project is where resources live and what you are billed against. Azure and AWS use the word for nothing in particular.

Namespace. In Oracle Cloud it is the one fixed string that prefixes every bucket address in your tenancy. In Kubernetes it is a folder for objects inside a cluster. The two have nothing to do with each other.

Tenant. In Azure the tenant is your Entra ID directory, which sits above every subscription. In Oracle Cloud the tenancy is your whole account. Close in spirit, different in what they contain.

One cloud at a time

Each platform page lists everything this site has for one cloud: templates, lessons, refreshers, and the log planner.

Registry 0.23.0. Built 2026-11-17.

Made by Habibullah Tora. Source on GitHub. Code under the MIT licence, writing under CC BY 4.0.