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

Update team project access to include additional project roles #826

Merged
merged 5 commits into from
Mar 23, 2023

Conversation

jbonhag
Copy link
Contributor

@jbonhag jbonhag commented Mar 22, 2023

Description

This adds new "maintain" and "write" access levels to the tfe_team_project_access resource.

Testing plan

Sample config:

variable "organization" {
  type = string
}

resource "tfe_project" "this" {
  organization = var.organization
  name         = "test project"
}

resource "tfe_team" "maintain" {
  organization = var.organization
  name         = "maintain-team"
}

resource "tfe_team" "write" {
  organization = var.organization
  name         = "write-team"
}

resource "tfe_team_project_access" "maintain" {
  access     = "maintain"
  team_id    = tfe_team.maintain.id
  project_id = tfe_project.this.id
}

resource "tfe_team_project_access" "write" {
  access     = "write"
  team_id    = tfe_team.write.id
  project_id = tfe_project.this.id
}

External links

Output from acceptance tests

$ TESTARGS="-run TestAccTFETeamProjectAccess" make testacc
TF_ACC=1 TF_LOG_SDK_PROTO=OFF go test $(go list ./... |grep -v 'vendor') -v -run TestAccTFETeamProjectAccess -timeout 15m
?   	github.com/hashicorp/terraform-provider-tfe	[no test files]
?   	github.com/hashicorp/terraform-provider-tfe/version	[no test files]
=== RUN   TestAccTFETeamProjectAccessDataSource_basic
    testing.go:184: Skipping test related to a Terraform Cloud/Enterprise beta feature. Set ENABLE_BETA=1 to run.
--- SKIP: TestAccTFETeamProjectAccessDataSource_basic (0.00s)
=== RUN   TestAccTFETeamProjectAccess
--- PASS: TestAccTFETeamProjectAccess (41.66s)
=== RUN   TestAccTFETeamProjectAccess_import
--- PASS: TestAccTFETeamProjectAccess_import (10.97s)
PASS
ok  	github.com/hashicorp/terraform-provider-tfe/tfe	53.010s

@jbonhag jbonhag requested a review from a team as a code owner March 22, 2023 14:12
@jbonhag jbonhag self-assigned this Mar 22, 2023
Copy link
Member

@nfagerlund nfagerlund left a comment

Choose a reason for hiding this comment

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

OK, this seems straightforward and good.

@nfagerlund nfagerlund merged commit 6437064 into main Mar 23, 2023
@nfagerlund nfagerlund deleted the kirch/additional_project_access_roles branch March 23, 2023 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants