Skip to content

Commit

Permalink
Merge pull request #530 from hashicorp/brandonc/wrong_team_selected
Browse files Browse the repository at this point in the history
fix(d/team): the wrong team can be picked within the "filter by name" fallback
  • Loading branch information
brandonc authored Jun 21, 2022
2 parents 91b0fa9 + 7191b58 commit 9d53e0c
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 9 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 0.32.1 (June 21st, 2022)

BUG FIXES:

* Fixed a bug in the latest release where a team data source could be populated with the wrong team. ([#530](https://github.com/hashicorp/terraform-provider-tfe/pull/530))

## 0.32.0 (June 20th, 2022)

0.32.0 is an impactful release that includes several bug fixes, support for [run tasks](https://www.terraform.io/cloud-docs/workspaces/settings/run-tasks#run-tasks) and several breaking changes that you should review carefully.
Expand Down
35 changes: 28 additions & 7 deletions tfe/data_source_outputs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,34 @@ data "tfe_outputs" "foobar" {
// All of these values reference the outputs in the file
// 'test-fixtures/state-versions/terraform.tfstate
output "test_output_list_string" { value = nonsensitive(data.tfe_outputs.foobar.values.test_output_list_string) }
output "test_output_string" { value = nonsensitive(data.tfe_outputs.foobar.values.test_output_string) }
output "test_output_tuple_number" { value = nonsensitive(data.tfe_outputs.foobar.values.test_output_tuple_number) }
output "test_output_tuple_string" { value = nonsensitive(data.tfe_outputs.foobar.values.test_output_tuple_string) }
output "test_output_object" { value = nonsensitive(data.tfe_outputs.foobar.values.test_output_object) }
output "test_output_number" { value = nonsensitive(data.tfe_outputs.foobar.values.test_output_number) }
output "test_output_bool" { value = nonsensitive(data.tfe_outputs.foobar.values.test_output_bool) }
output "test_output_list_string" {
sensitive = true
value = data.tfe_outputs.foobar.values.test_output_list_string
}
output "test_output_string" {
sensitive = true
value = data.tfe_outputs.foobar.values.test_output_string
}
output "test_output_tuple_number" {
sensitive = true
value = data.tfe_outputs.foobar.values.test_output_tuple_number
}
output "test_output_tuple_string" {
sensitive = true
value = data.tfe_outputs.foobar.values.test_output_tuple_string
}
output "test_output_object" {
sensitive = true
value = data.tfe_outputs.foobar.values.test_output_object
}
output "test_output_number" {
sensitive = true
value = data.tfe_outputs.foobar.values.test_output_number
}
output "test_output_bool" {
sensitive = true
value = data.tfe_outputs.foobar.values.test_output_bool
}
`, rInt, rInt, org, workspace)
}

Expand Down
4 changes: 2 additions & 2 deletions tfe/data_source_team.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ func dataSourceTFETeamRead(d *schema.ResourceData, meta interface{}) error {
for {
for _, team := range tl.Items {
if team.Name == name {
d.SetId(tl.Items[0].ID)
d.Set("sso_team_id", tl.Items[0].SSOTeamID)
d.SetId(team.ID)
d.Set("sso_team_id", team.SSOTeamID)
return nil
}
}
Expand Down

0 comments on commit 9d53e0c

Please sign in to comment.