File tree Expand file tree Collapse file tree 7 files changed +63
-0
lines changed Expand file tree Collapse file tree 7 files changed +63
-0
lines changed Original file line number Diff line number Diff line change @@ -5,13 +5,22 @@ provider "tfe" {
5
5
hostname = var. tfc_hostname
6
6
}
7
7
8
+ # Data source used to grab the project under which a workspace will be created.
9
+ #
10
+ # https://registry.terraform.io/providers/hashicorp/tfe/latest/docs/data-sources/project
11
+ data "tfe_project" "tfc_project" {
12
+ name = var. tfc_project_name
13
+ organization = var. tfc_organization_name
14
+ }
15
+
8
16
# Runs in this workspace will be automatically authenticated
9
17
# to AWS with the permissions set in the AWS policy.
10
18
#
11
19
# https://registry.terraform.io/providers/hashicorp/tfe/latest/docs/resources/workspace
12
20
resource "tfe_workspace" "my_workspace" {
13
21
name = var. tfc_workspace_name
14
22
organization = var. tfc_organization_name
23
+ project_id = data. tfe_project . tfc_project . id
15
24
}
16
25
17
26
# The following variables must be set to allow runs
Original file line number Diff line number Diff line change @@ -5,13 +5,22 @@ provider "tfe" {
5
5
hostname = var. tfc_hostname
6
6
}
7
7
8
+ # Data source used to grab the project under which a workspace will be created.
9
+ #
10
+ # https://registry.terraform.io/providers/hashicorp/tfe/latest/docs/data-sources/project
11
+ data "tfe_project" "tfc_project" {
12
+ name = var. tfc_project_name
13
+ organization = var. tfc_organization_name
14
+ }
15
+
8
16
# Runs in this workspace will be automatically authenticated
9
17
# to Azure with the permissions set in the Azure policy.
10
18
#
11
19
# https://registry.terraform.io/providers/hashicorp/tfe/latest/docs/resources/workspace
12
20
resource "tfe_workspace" "my_workspace" {
13
21
name = var. tfc_workspace_name
14
22
organization = var. tfc_organization_name
23
+ project_id = data. tfe_project . tfc_project . id
15
24
}
16
25
17
26
# The following variables must be set to allow runs
Original file line number Diff line number Diff line change @@ -5,13 +5,22 @@ provider "tfe" {
5
5
hostname = var. tfc_hostname
6
6
}
7
7
8
+ # Data source used to grab the project under which a workspace will be created.
9
+ #
10
+ # https://registry.terraform.io/providers/hashicorp/tfe/latest/docs/data-sources/project
11
+ data "tfe_project" "tfc_project" {
12
+ name = var. tfc_project_name
13
+ organization = var. tfc_organization_name
14
+ }
15
+
8
16
# Runs in this workspace will be automatically authenticated
9
17
# to GCP with the permissions set in the GCP policy.
10
18
#
11
19
# https://registry.terraform.io/providers/hashicorp/tfe/latest/docs/resources/workspace
12
20
resource "tfe_workspace" "my_workspace" {
13
21
name = var. tfc_workspace_name
14
22
organization = var. tfc_organization_name
23
+ project_id = data. tfe_project . tfc_project . id
15
24
}
16
25
17
26
# The following variables must be set to allow runs
Original file line number Diff line number Diff line change @@ -5,13 +5,22 @@ provider "tfe" {
5
5
hostname = var. tfc_hostname
6
6
}
7
7
8
+ # Data source used to grab the project under which a workspace will be created.
9
+ #
10
+ # https://registry.terraform.io/providers/hashicorp/tfe/latest/docs/data-sources/project
11
+ data "tfe_project" "tfc_project" {
12
+ name = var. tfc_project_name
13
+ organization = var. tfc_organization_name
14
+ }
15
+
8
16
# Runs in this workspace will be automatically authenticated
9
17
# to Vault with the permissions set in the Vault policy.
10
18
#
11
19
# https://registry.terraform.io/providers/hashicorp/tfe/latest/docs/resources/workspace
12
20
resource "tfe_workspace" "my_workspace" {
13
21
name = var. tfc_workspace_name
14
22
organization = var. tfc_organization_name
23
+ project_id = data. tfe_project . tfc_project . id
15
24
}
16
25
17
26
# The following variables must be set to allow runs
Original file line number Diff line number Diff line change @@ -5,13 +5,22 @@ provider "tfe" {
5
5
hostname = var. tfc_hostname
6
6
}
7
7
8
+ # Data source used to grab the project under which a workspace will be created.
9
+ #
10
+ # https://registry.terraform.io/providers/hashicorp/tfe/latest/docs/data-sources/project
11
+ data "tfe_project" "tfc_project" {
12
+ name = var. tfc_project_name
13
+ organization = var. tfc_organization_name
14
+ }
15
+
8
16
# Runs in this workspace will be automatically authenticated
9
17
# to Vault with the permissions set in the Vault policy.
10
18
#
11
19
# https://registry.terraform.io/providers/hashicorp/tfe/latest/docs/resources/workspace
12
20
resource "tfe_workspace" "my_workspace" {
13
21
name = var. tfc_workspace_name
14
22
organization = var. tfc_organization_name
23
+ project_id = data. tfe_project . tfc_project . id
15
24
}
16
25
17
26
# The following variables must be set to allow runs
Original file line number Diff line number Diff line change @@ -5,13 +5,22 @@ provider "tfe" {
5
5
hostname = var. tfc_hostname
6
6
}
7
7
8
+ # Data source used to grab the project under which a workspace will be created.
9
+ #
10
+ # https://registry.terraform.io/providers/hashicorp/tfe/latest/docs/data-sources/project
11
+ data "tfe_project" "tfc_project" {
12
+ name = var. tfc_project_name
13
+ organization = var. tfc_organization_name
14
+ }
15
+
8
16
# Runs in this workspace will be automatically authenticated
9
17
# to Vault with the permissions set in the Vault policy.
10
18
#
11
19
# https://registry.terraform.io/providers/hashicorp/tfe/latest/docs/resources/workspace
12
20
resource "tfe_workspace" "my_workspace" {
13
21
name = var. tfc_workspace_name
14
22
organization = var. tfc_organization_name
23
+ project_id = data. tfe_project . tfc_project . id
15
24
}
16
25
17
26
# The following variables must be set to allow runs
Original file line number Diff line number Diff line change @@ -5,13 +5,22 @@ provider "tfe" {
5
5
hostname = var. tfc_hostname
6
6
}
7
7
8
+ # Data source used to grab the project under which a workspace will be created.
9
+ #
10
+ # https://registry.terraform.io/providers/hashicorp/tfe/latest/docs/data-sources/project
11
+ data "tfe_project" "tfc_project" {
12
+ name = var. tfc_project_name
13
+ organization = var. tfc_organization_name
14
+ }
15
+
8
16
# Runs in this workspace will be automatically authenticated
9
17
# to Vault with the permissions set in the Vault policy.
10
18
#
11
19
# https://registry.terraform.io/providers/hashicorp/tfe/latest/docs/resources/workspace
12
20
resource "tfe_workspace" "my_workspace" {
13
21
name = var. tfc_workspace_name
14
22
organization = var. tfc_organization_name
23
+ project_id = data. tfe_project . tfc_project . id
15
24
}
16
25
17
26
# The following variables must be set to allow runs
You can’t perform that action at this time.
0 commit comments