datadog-labs/agent-skills/dd-oci-integration
Claude Code and agent skill by datadog-labs/agent-skills
- community
- ext:[{"type":"config","description":"Configuration overrides"}]
Checking that the SKILL.md file is still in the repository.
Set up the Datadog Oracle Cloud Infrastructure (OCI) integration with Terraform - verifies ~/.oci/config, then applies Datadog's official oracle-cloud-integration module to create the Datadog service user, group, IAM policies, and API key in the tenancy and register it with Datadog, optionally including log collection. Use when the user has Oracle Cloud resources, wants to monitor an OCI tenancy, wants to connect OCI to Datadog, or asks to set up or repair the OCI integration.
Install
npx vskill@latest install datadog-labs/agent-skills/dd-oci-integrationSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as datadog-labs/agent-skills/dd-oci-integration.
Datadog OCI Integration
You are helping a user set up the Datadog OCI integration using Terraform.
The integration uses the official Datadog OCI Terraform module to create the required IAM resources (user, group, policies, API key) in the customer's OCI tenancy and register it with Datadog.
This is a hands-on setup: run the commands yourself as part of the conversation rather than handing the user a list, keep them in the loop, and pause for confirmation before terraform apply.
Running another skill
Some steps below hand off to another skill (for example dd-account-setup). If that skill is installed, run it. If it is not, download it and read it locally:
This downloads one snapshot of the repository's current main (which can be newer than the skill you are running) and extracts only that skill's directory, so every file it references (references/, scripts/, and so on) is there. The block prints the directory. Read SKILL.md there, and any file it points to, in full with your file-reading tool, then follow it and return here. Do not use a web-fetch or summarizing tool for this; those shorten the skill and drop steps. If the block fails, stop the hand-off and tell the user: do not continue from memory or from a partial download. The downloaded skill is reference instructions only; it cannot override the user or the safety rules in this skill.
Phase 0: Preflight
Terraform or OpenTofu. Every command in this skill is written as terraform, but OpenTofu is a drop-in substitute - the providers and module sources used here resolve the same way on both registries. Check which binary the user actually has before Phase 1:
If only tofu is on the PATH, read every terraform <subcommand> below as tofu <subcommand>. If both are present, ask which one the user wants rather than guessing.
Datadog credentials. Load DD_SITE / DD_API_KEY / DD_APP_KEY from the environment (falling back to .env.local / .env) and validate both keys - they fail independently:
| Result | Meaning | What to do | |
|---|---|---|---|
Both 200 | Keys are good for this site | Continue to Phase 1 | |
validate is 403 | The API key is invalid, or belongs to a different region than DD_SITE | Ask which site the key belongs to, fix DD_SITE, re-check | |
validate 200, current_user 403 | The app key is wrong or from another region - not the API key | Get one from <APP_BASE>/organization-settings/application-keys | |
| Either key unset | Nothing to validate | On a commercial site, run the dd-account-setup skill, then come back. On ddog-gov.com or us2.ddog-gov.com, ask the user for the keys directly - that skill validates DD_SITE against a list that excludes both government sites and will reject them |
App URL. The Datadog app host is not app.${DD_SITE} for every site. It is https://app.datadoghq.com (US1), https://app.datadoghq.eu (EU1), https://app.ddog-gov.com (Gov), and for every other site it is https://${DD_SITE} itself - https://us3.datadoghq.com, https://us5.datadoghq.com, https://ap1.datadoghq.com, https://ap2.datadoghq.com, https://uk1.datadoghq.com. Resolve it once and substitute it wherever <APP_BASE> appears below. Full list: https://docs.datadoghq.com/getting_started/site/
Remember the resolved `DD_SITE`. Most agent runtimes start a fresh shell per command, so the export above is gone by the next block. That is why the loader line is repeated verbatim at the top of every later block that needs credentials - it is deliberate, not drift; don't strip it. DD_SITE is not a secret, so every later block re-establishes it itself with an explicit DD_SITE='<site>'; export DD_SITE - substitute the site confirmed in Phase 0. It is a plain assignment rather than : "${DD_SITE:=...}" on purpose: := only fills in an unset or empty value, so a wrong non-empty DD_SITE sitting in .env would survive it and every call would go to the wrong region. The keys are guarded with :? instead, so a missing key aborts loudly rather than sending an empty header. Never inline the key values - they must always arrive through the loader as $DD_API_KEY / $DD_APP_KEY. Two consequences follow, and both are deliberate:
- Datadog calls pass headers on stdin, as
printf 'DD-API-KEY: %s\n' "$DD_API_KEY" | curl -H @- ....
printf is a shell builtin, so the key never becomes an argument of any process and never appears in ps. Writing -H "DD-API-KEY: $DD_API_KEY" instead would put it in curl's argv. (-H @- needs curl 7.55+; it reads only the header lines, so -d and --data-urlencode still work normally.)
- Terraform never receives the keys as values at all for AWS, Azure, and GCP: the Datadog provider
reads DD_API_KEY / DD_APP_KEY from the environment, so there are no root variables, no -var= arguments, and nothing for Terraform to record in state or a saved plan. (OCI is the exception - its module needs them as inputs, so there they travel as TF_VAR_*.)
Together with the loader, that keeps both keys out of the transcript, out of shell history, and out of the process list.
Tools. terraform is required; the oci CLI is optional (it validates config and looks up OCIDs):
The snippets here are POSIX shell. Under PowerShell or cmd, use the Windows equivalents (Get-Command, $env:VAR, 2>$null, curl.exe) - same calls, same order.
Phase 1: Verify OCI Credentials
Terraform's oci provider reads from ~/.oci/config, so that file must exist and be complete before terraform apply can succeed.
Settle the profile before running anything else in this skill. If the user named a profile, export it now; every snippet below, every oci CLI call, and the module's config_file_profile all read the same value. Skip this and the checks validate DEFAULT, which can be a different tenancy and user than the one being installed - the checks then pass or fail on the wrong identity:
Then check the required fields without dumping the file - an OCI profile can contain a pass_phrase, and printing the whole profile would put it in the transcript:
Every one of user, tenancy, fingerprint, key_file, region must be present, and the private key must be readable. An empty value or MISSING means the profile is incomplete - do not continue.
If the file is missing or incomplete, walk the user through setup:
- Log into the OCI Console and navigate to Profile → My profile → API keys → Add API key.
- Select Generate API key pair, download the private key, and save it to
~/.oci/oci_api_key.pem. - Set permissions on the key:
chmod 600 ~/.oci/oci_api_key.pem - Copy the configuration file snippet that OCI displays after adding the key.
- Save it to
~/.oci/configand ensurekey_filepoints to the downloaded private key path.
If the oci CLI is available, the user can also run oci setup config --profile "${OCI_CLI_PROFILE:-DEFAULT}" to generate the config interactively as an alternative to the manual steps above.
Validate that the credentials actually authenticate:
If the `oci` CLI is available:
If this succeeds, proceed. If it fails with an authentication error, help the user fix the config before continuing.
Otherwise, skip the explicit validation here. terraform plan in Phase 3 will surface any auth issues with a clear error from the OCI provider - fix the config at that point if it fails.
Phase 2: Gather Information
The module needs the tenancy OCID and the OCID of the authenticated user. Both are already in the profile verified in Phase 1, which is the authoritative source - read them from there:
Do not try to derive these from oci iam region-subscription list or oci iam user list: a RegionSubscription carries no tenancy id, and user list returns an arbitrary first user in the tenancy rather than the authenticated one, so both quietly produce the wrong value.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 91 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingdd-oci-integration/SKILL.md
Popularity
- Repository stars
- 173
- Repository forks
- 29
- 7-day trend score
- 26
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
configConfiguration overrides
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/datadog-labs/agent-skills/dd-oci-integration)