Skip to content

Service account is being added to all new teams when the teams are created in terraform using cloudsmith_team #132

@scott-doyland-burrows

Description

@scott-doyland-burrows

Terraform Version

Terraform v1.10.0
on linux_amd64

  • provider registry.terraform.io/cloudsmith-io/cloudsmith v0.0.57

Affected Resource(s)

cloudsmith_team

Terraform Configuration Files

terraform {

  required_providers {
    cloudsmith = {
      source = "cloudsmith-io/cloudsmith"
    }
  }
}

provider "cloudsmith" {
  api_key = "[redacted]"
}

resource "cloudsmith_team" "team" {
  organization = "hogarth"
  slug         = "scott-test"
  name         = "scott-test"
  visibility   = "Visible"
}

Expected Behavior

Team is created without any members.

What actually happened?

Team is created. The service account that ran terraform apply becomes a member of the team.

I see this in the audit logs:

image

I do not know if this is expected behaviour or not? If so I need to update my actual code (above code is simplified) to ignore changes to the service account team membership.

If I remove the service account from the teams, then terraform does not add it back in again. So its only at team creation time that the service accounts gets added to the teams - which is also odd?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions