Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tfe_team visibility not being set as defined in Terraform Cloud #1341

Open
Nathan8575 opened this issue Apr 30, 2024 · 1 comment
Open

tfe_team visibility not being set as defined in Terraform Cloud #1341

Nathan8575 opened this issue Apr 30, 2024 · 1 comment
Labels

Comments

@Nathan8575
Copy link

Nathan8575 commented Apr 30, 2024

Terraform Cloud

I am using Terraform Cloud

Terraform version

Terraform Cloud remote apply, workspace version 1.8.2

Terraform Configuration Files

resource "tfe_team" "admin" {
  name        = "TF-${var.project_name}-admins"
  sso_team_id = azuread_group.admins.object_id
}

Debug Output

# module.create_project["cpt"].tfe_team.admin will be updated in-place
  ~ resource "tfe_team" "admin" {
        id          = "team-e1UQs1EFHU2krdoc"
        name        = "TF-cpt-admins"
      ~ visibility  = "organization" -> "secret"
        # (1 unchanged attribute hidden)

        # (1 unchanged block hidden)
    }

Expected Behavior

Teams are created in Terraform Cloud with the documented default visibility of "secret" and can be changed if needed.

Actual Behavior

The team is created with visibility set to "organization" which keeps triggering an "update in-place" when running a plan and apply. The apply produces no error but does not change the visibility of the team in Terraform Cloud.

Explicitly defining the visibility in tfe_team does not change the behaviour.

Additional Context

  • Using provider version 0.54
  • Remote apply using a Terraform Cloud provided agent.
@Nathan8575 Nathan8575 added the bug label Apr 30, 2024
@Nathan8575 Nathan8575 changed the title tfe_team visibility not being set as defined tfe_team visibility not being set as defined in Terraform Cloud Apr 30, 2024
@Nathan8575
Copy link
Author

Managed to find out what was causing my issue. The issue happens when using an organization token. Unsure if this is an issue with the provider or with Terraform Cloud as according to documentation a organization token should have sufficient access.

A ticket was raised with HashiCorp support and they were able to reproduce the behaviour. Internal ticket IPL-6465 was raised.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant