Skip to content

Commit

Permalink
Modify resource to directly reference orgname
Browse files Browse the repository at this point in the history
  • Loading branch information
simonxmh committed Jan 9, 2025
1 parent 5350677 commit 15be161
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions internal/provider/data_source_project_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,29 +142,15 @@ data "tfe_project" "foobar" {

func testAccTFEProjectDataSourceConfigWithAutoDestroy(rInt int, orgName string, duration string) string {
return fmt.Sprintf(`
data "tfe_organization" "foobar" {
name = "%s"
}
resource "tfe_project" "foobar" {
name = "project-test-%d"
description = "project description"
organization = data.tfe_organization.foobar.id
organization = "%s"
auto_destroy_activity_duration = "%s"
}
data "tfe_project" "foobar" {
name = tfe_project.foobar.name
organization = tfe_project.foobar.organization
# Read the data source after creating the workspace, so counts match
depends_on = [
tfe_workspace.foobar
]
}
resource "tfe_workspace" "foobar" {
name = "workspace-test-%d"
organization = data.tfe_organization.foobar.id
project_id = tfe_project.foobar.id
}`, orgName, rInt, duration, rInt)
}`, rInt, orgName, duration)
}

0 comments on commit 15be161

Please sign in to comment.