Skip to content

masterpointio/terraform-datadog-users

Repository files navigation

terraform-datadog-users

Release

This Terraform module is designed to create and manage Datadog user accounts.

The users are associated with one of the three out-of-the-box roles:

  • Datadog Admin
  • Datadog Standard
  • Datadog Read Only

Usage

module "datadog_users" {
  source  = "masterpointio/datadog/users"
  version = "X.X.X"

  users = [
    {
      roles    = ["standard"],
      email    = "[email protected]",
      name     = "Jane Smith",
      role     = "Editor",
      username = "janesmith"
    }
  ]
}

Check out examples/complete for the full example.

To ensure the secure handling of DataDog sensitive data for datadog/datadog provider, the module's example is designed to work with the SOPS (Secrets OPerationS) provider. SOPS is a tool for encrypting and decrypting files containing sensitive data, often used in conjunction with Terraform to manage secrets. The example also utilizes terraform-secrets-helper module - a helper that provides a standard way of managing secrets from different sources, incuding SOPS files.

❗ We recommend to use AWS KMS, GCP KMS, Azure Key Vault for SOPS files encryption. Don't use the secrets from the example in your real configuration!

Here are some basic SOPS operations that help you to work with the example:

  • Pass age key to SOPS provider configuration:
cd ./example/complete
export SOPS_AGE_KEY_FILE=key.txt
  • Encryption/decryption via SOPS editior
sops example.yaml

Requirements

Name Version
terraform >= 1.3
datadog >= 3.14

Providers

Name Version
datadog >= 3.14

Modules

No modules.

Resources

Name Type
datadog_user.users resource
datadog_role.admin data source
datadog_role.read_only data source
datadog_role.standard data source

Inputs

Name Description Type Default Required
users n/a
list(object({
disabled = optional(bool, false)
email = string
name = string
roles = set(string)
send_user_invitation = optional(bool, true)
username = string
}))
n/a yes

Outputs

Name Description
datadog_users A map of all Datadog user resources keyed by username.

Contributing

Contributions are welcome and appreciated!

Found an issue or want to request a feature? Open an issue

Want to fix a bug you found or add some functionality? Fork, clone, commit, push, and PR and we'll check it out.

If you have any issues or are waiting a long time for a PR to get merged then feel free to ping us at [email protected].

Built By

Masterpoint Logo

About

Terraform module to configure and provision Datadog users.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages