ECI-1504: Support OC2 (US Gov) and OC3 (US DoD) realms in OCI integration - #190
Merged
EamonBrady1 merged 11 commits intoSep 8, 2026
Merged
Conversation
Contributor
|
Version bumped: Override if needed:
|
rheei
reviewed
Sep 8, 2026
rheei
approved these changes
Sep 8, 2026
macOS ships bash 3.2 which doesn't support associative arrays (declare -A). Replace with a case statement so the gov/dod region detection works on macOS. Previously the lookup silently failed and fell through to the commercial host (<key>.ocir.io).
go.mod requires go >= 1.26.0 but Dockerfiles pinned golang:1.25.9, causing the build to fail with 'go.mod requires go >= 1.26.0 (running go 1.25.9; GOTOOLCHAIN=local)'. Bump all three forwarder Dockerfiles to golang:1.26.
The virtual-vault-count (Default Vault Count) limit is not exposed in the OCI limits API for US Gov (OC2) and US DoD (OC3) realms — the limit name is rejected as InvalidParameter even though DEFAULT vaults are supported and creatable. Skip the quota precheck for these realms; vault creation proceeds and any real quota failure surfaces at apply. The check is realm-based (not per-region) so new gov/dod regions work without code changes.
EamonBrady1
force-pushed
the
EamonBrady1/ECI-1504-support-oc2-oc3-gov-dod-realms
branch
from
September 8, 2026 21:21
3163d8b to
d553bb7
Compare
Contributor
|
Version bumped: Override if needed:
|
EamonBrady1
force-pushed
the
EamonBrady1/ECI-1504-support-oc2-oc3-gov-dod-realms
branch
from
September 8, 2026 21:24
65788cc to
99c077c
Compare
EamonBrady1
deleted the
EamonBrady1/ECI-1504-support-oc2-oc3-gov-dod-realms
branch
September 8, 2026 21:35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds support for OCI US Government (OC2) and US Department of Defense (OC3) realms across the OCI Datadog integration: the
docker-images.shbuild/push script, thedatadog-terraform-onboardingstack, and thedatadog-integrationResource Manager stack.The realm is auto-detected from the tenancy OCID prefix (
ocid1.tenancy.oc2.→ OC2,ocid1.tenancy.oc3.→ OC3, otherwise OC1 commercial). Each realm uses a different OCIR registry host format and a different Datadog-published image namespace (OCIR is realm-isolated):<region-key>.ocir.ioiddfxd5j9l2oocir.<region>.oci.oraclegovcloud.comaxnu2nwmcbsrocir.<region>.oci.oraclegovcloud.comax8ew96ycvtnSpecifics:
datadog-functions/docker-images.sh: realm-aware registry host detection (gov/dod use the full region identifier, not the 3-letter key); fetches bothregion-nameandregion-keyfromoci iam region-subscription list; prints the computed host per region for verification.datadog-terraform-onboarding: added 5 provider aliases + module blocks forus-langley-1,us-luke-1(OC2) andus-gov-ashburn-1,us-gov-chicago-1,us-gov-phoenix-1(OC3). Theregional-stacksmodule now takesimage_namespaceandimage_realmvariables (defaulting to commercial values, so existing commercial blocks are unchanged).docker_image_check.shis realm-aware so gov/dod regions aren't falsely marked unsupported.datadog-integration: same realm detection + realm-awaredocker_image_check.sh;create_apply_regional_stack.shaccepts and forwardsimage_namespace/image_realminto the regional stackVARIABLES_JSON; theregional-stacksmodule gets the same two new variables.datadog-functions/README.md: documented how to rundocker-images.shincluding realm support and gov/dod notes.virtual-vault-countlimit is not exposed in the OCI limits API for gov/dod realms (even thoughDEFAULTvaults are supported and creatable), so the check would fail with "Invalid parameter". The skip is realm-based (not per-region) so new gov/dod regions work without code changes.golang:1.25.9togolang:1.26to matchgo.modrequirement (go 1.26.0).Why
Gov/DoD tenancies could not use the integration: the registry host was hardcoded to the commercial
<region-key>.ocir.iopattern and the image namespace was hardcoded to the commercialiddfxd5j9l2o, neither of which is reachable from a Gov/DoD realm. OCIR is realm-isolated, so each realm needs its own host format and Datadog-published namespace.Testing
terraform validate→ Success! for bothdatadog-terraform-onboardinganddatadog-integration(afterterraform init -backend=false).terraform fmt -check -recursive→ clean for both modules.bash -nsyntax check on all four shell scripts (docker-images.sh, bothdocker_image_check.sh,create_apply_regional_stack.sh) → OK.docker_image_check.shexercised with mock stdin for OC1 (us-ashburn-1/IAD), OC2 (us-langley-1/LFI), and OC3 (us-gov-chicago-1/PIA): commercial returns success, gov/dod build the correctocir.<region>.oci.oraclegovcloud.comhost (returns "failed-to-get" only because the gov endpoint is unreachable from a commercial network — host construction verified correct). Defaults (no namespace/realm) preserve prior commercial behavior.docker-images.shrealm detection verified with mockregion-subscription listJSON:us-langley-1→ocir.us-langley-1.oci.oraclegovcloud.com,us-gov-ashburn-1→ocir.us-gov-ashburn-1.oci.oraclegovcloud.com, commercial unchanged.oc1/iddfxd5j9l2o, and the 5 new gov/dod provider aliases / module blocks are gated bycontains(local.final_regions_for_stacks, ...), so they stay count=0 on commercial tenancies.docker-images.sh.