Skip to content

Managing GroupSync and Organizations #230

@calebwashburn

Description

@calebwashburn

If trying to terraform out both an organization, groups and idp sync of users to groups for a given organization, there is a cyclical problem where I cannot map the group under the group_sync of an organization as this requires a groups unique id

resource "coderd_organization" "this" {
  name         = "blueberry"
  display_name = "Blueberry"
  description  = "The organization for blueberries"
  icon         = "/emojis/1fad0.png"

 group_sync {
    field = "groups"
    mapping = {
      org_x_users = [coderd_group.this.id] # cannot reference this as doesn't exist yet
    }
  }

because in order to create the group I need the organization_id.

resource "coderd_group" "this" {
  name            = "org_x_users"
  # needs organization to be created first above before group can be created in the org
  organization_id = coderd_organization.this.id 
  quota_allowance = 5
  members = []
  lifecycle {
    ignore_changes = [members]
  }
}

While I can go into UI and map this after the organization and group is created would prefer to have a different resource to configure group sync settings and allow terraform to manager the dependency of creating org, 1-N groups and then creating group_sync settings for the org

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy