Skip to content

Add resource for Code Security (SCA/SAST/Secrets/IaC) repository configuration #3491

@koarakko

Description

@koarakko

What resources or data sources are affected?

resource_datadog_code_security_repository (new resource)

Feature Request

I would like to manage Code Security settings (SCA, SAST, Secrets, IaC) for GitHub repositories via Terraform.

Currently, these settings can only be configured through the Datadog web UI at:
Security > Settings > Code Security > Setup > Manage Repositories

Use Case:

  • Manage Code Security settings as Infrastructure as Code
  • Apply consistent configurations across hundreds of repositories
  • Track configuration changes via version control
  • Automate onboarding of new repositories

Proposed Resource:

resource "datadog_code_security_repository" "example" {
  github_account = "my-org"
  repository     = "my-repo"
  
  sca_enabled     = true
  sast_enabled    = true
  secrets_enabled = true
  iac_enabled     = true
}

This would require a corresponding API endpoint to be available from Datadog.

References

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions