Skip to content
This repository was archived by the owner on Jul 11, 2023. It is now read-only.

Commit 61f66ba

Browse files
authoredFeb 11, 2020
using workspace_id (#293)
1 parent 5d49e88 commit 61f66ba

File tree

3 files changed

+5
-14
lines changed

3 files changed

+5
-14
lines changed
 

‎modules/tf-cloud-credential/data.tf

-4
This file was deleted.

‎modules/tf-cloud-credential/main.tf

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
resource "tfe_variable" "workspace_aws_access_key_id" {
2-
workspace_id = data.tfe_workspace.workspace.id
2+
workspace_id = var.workspace_id
33
key = "AWS_ACCESS_KEY_ID"
44
value = var.iam_access_key.id
55
category = "env"
66
sensitive = true
77
}
88

99
resource "tfe_variable" "workspace_aws_secret_access_key_id" {
10-
workspace_id = data.tfe_workspace.workspace.id
10+
workspace_id = var.workspace_id
1111
key = "AWS_SECRET_ACCESS_KEY"
1212
value = var.iam_access_key.secret
1313
category = "env"
1414
sensitive = true
1515
}
1616

1717
resource "tfe_variable" "workspace_aws_default_region" {
18-
workspace_id = data.tfe_workspace.workspace.id
18+
workspace_id = var.workspace_id
1919
key = "AWS_DEFAULT_REGION"
2020
value = var.region
2121
category = "env"

‎modules/tf-cloud-credential/variables.tf

+2-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
1-
variable "name_prefix" {
1+
variable "workspace_id" {
22
type = string
3-
description = "The name prefix to use for the workspace"
4-
}
5-
6-
variable "organization" {
7-
type = string
8-
description = "The workspace organization"
3+
description = "Id of workspace to put variables in."
94
}
105

116
variable "iam_access_key" {

0 commit comments

Comments
 (0)
This repository has been archived.