Skip to content

Conversation

jordanconway
Copy link
Contributor

No description provided.

@jordanconway jordanconway requested a review from a team as a code owner August 6, 2025 19:36
Signed-off-by: Jordan Conway <[email protected]>
Copy link

github-actions bot commented Aug 6, 2025

OpenTofu plan for prod

Plan: 5 to add, 0 to change, 0 to destroy.
OpenTofu used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
+   create

OpenTofu will perform the following actions:

  # datadog_role.roles["custom-read-write"] will be created
+   resource "datadog_role" "roles" {
+       id         = (known after apply)
+       name       = "Custom Read Write"
+       user_count = (known after apply)

+       permission {
+           id   = "00c6e8b6-ec8e-11ea-b1df-8b8507179c25"
+           name = (known after apply)
        }
+       permission {
+           id   = "00f5d0ea-ec8e-11ea-b1df-fb0974082b21"
+           name = (known after apply)
        }
+       permission {
+           id   = "1d338140-fda4-11ea-a2bf-b3fa59d1c817"
+           name = (known after apply)
        }
+       permission {
+           id   = "1d3b2260-fda4-11ea-a2bf-0b49d62b8f0b"
+           name = (known after apply)
        }
+       permission {
+           id   = "1d3b2261-fda4-11ea-a2bf-07479564c5f7"
+           name = (known after apply)
        }
+       permission {
+           id   = "362d4fc1-d36c-11eb-8d50-da7ad0900003"
+           name = (known after apply)
        }
+       permission {
+           id   = "8c917700-7a4c-11ed-a23a-da7ad0900003"
+           name = (known after apply)
        }
+       permission {
+           id   = "8c917701-7a4c-11ed-a23a-da7ad0900003"
+           name = (known after apply)
        }
+       permission {
+           id   = "f8a6f1a1-9a59-11ec-8949-da7ad0900003"
+           name = (known after apply)
        }
+       permission {
+           id   = "fbfc04e2-ec8d-11ea-b1df-9793da983de4"
+           name = (known after apply)
        }
+       permission {
+           id   = "fcba538e-ec8d-11ea-b1df-bbdd032f76ba"
+           name = (known after apply)
        }
+       permission {
+           id   = "fcba5f46-ec8d-11ea-b1df-871cca0caaf0"
+           name = (known after apply)
        }
+       permission {
+           id   = "fcc6383e-ec8d-11ea-b1df-7f158956150e"
+           name = (known after apply)
        }
    }

  # datadog_user.users["jconway"] will be created
+   resource "datadog_user" "users" {
+       disabled             = false
+       email                = "[email protected]"
+       id                   = (known after apply)
+       name                 = (known after apply)
+       roles                = [
+           "admin",
        ]
+       send_user_invitation = true
+       user_invitation_id   = (known after apply)
+       verified             = (known after apply)
    }

  # datadog_user.users["rdetjens"] will be created
+   resource "datadog_user" "users" {
+       disabled             = false
+       email                = "[email protected]"
+       id                   = (known after apply)
+       name                 = (known after apply)
+       roles                = [
+           "admin",
        ]
+       send_user_invitation = true
+       user_invitation_id   = (known after apply)
+       verified             = (known after apply)
    }

  # datadog_user.users["rgrigar"] will be created
+   resource "datadog_user" "users" {
+       disabled             = false
+       email                = "[email protected]"
+       id                   = (known after apply)
+       name                 = (known after apply)
+       roles                = [
+           "admin",
        ]
+       send_user_invitation = true
+       user_invitation_id   = (known after apply)
+       verified             = (known after apply)
    }

  # datadog_user.users["tha"] will be created
+   resource "datadog_user" "users" {
+       disabled             = false
+       email                = "[email protected]"
+       id                   = (known after apply)
+       name                 = (known after apply)
+       roles                = [
+           "admin",
        ]
+       send_user_invitation = true
+       user_invitation_id   = (known after apply)
+       verified             = (known after apply)
    }

Plan: 5 to add, 0 to change, 0 to destroy.

❌ Error applying plan in Tofu Apply #22

zxiiro
zxiiro previously approved these changes Aug 6, 2025
zxiiro
zxiiro previously approved these changes Aug 6, 2025
@zxiiro zxiiro requested a review from Copilot August 6, 2025 20:26
Copilot

This comment was marked as outdated.

@zxiiro zxiiro changed the title Add limted role and existing users to datadog. Add limited role and existing users to datadog. Aug 6, 2025
@zxiiro zxiiro changed the title Add limited role and existing users to datadog. Add limited role and existing users to datadog Aug 6, 2025
Signed-off-by: Jordan Conway <[email protected]>
Signed-off-by: Jordan Conway <[email protected]>
Signed-off-by: Jordan Conway <[email protected]>
Signed-off-by: Jordan Conway <[email protected]>
@zxiiro zxiiro requested a review from Copilot August 7, 2025 17:06
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds Datadog user management configuration and creates a new custom role with read-write permissions. The changes replace example configurations with actual user accounts and introduce a standardized role for the team.

  • Adds four specific user accounts with admin roles to the Datadog configuration
  • Creates a new "custom-read-write" role with specific permissions for dashboards, monitors, logs, and other Datadog features
  • Refactors role management to use locals for better separation of default and custom roles

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
datadog-users.tf Removes name field from user variable and adds four actual users with admin roles
datadog-roles.tf Adds permissions data source and creates a custom read-write role with specific permissions
Comments suppressed due to low confidence (2)

datadog-users.tf:6

  • Removing the 'name' field from the variable definition but still using it in the resource configuration (line 35) will cause a Terraform error. The resource block references 'each.value.name' which no longer exists in the variable structure.
    roles    = optional(list(string), [])

datadog-users.tf:36

  • This line references 'each.value.name' but the 'name' field was removed from the variable definition. This will cause a Terraform error when applying the configuration.
  roles    = each.value.roles

@jordanconway jordanconway merged commit ab7028b into main Aug 7, 2025
2 checks passed
@jordanconway jordanconway deleted the roles_users branch August 7, 2025 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants