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

feat: Add outputs #2

Merged
merged 2 commits into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions modules/workspace/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,10 @@
| <a name="input_tags"></a> [tags](#input\_tags) | Workspace tags | `list(string)` | `[]` | no |
| <a name="input_terraform_version"></a> [terraform\_version](#input\_terraform\_version) | Workspace Terraform version | `string` | n/a | yes |
| <a name="input_variable_set"></a> [variable\_set](#input\_variable\_set) | Workspace variable set | `string` | n/a | yes |

## Outputs

| Name | Description |
|------|-------------|
| <a name="output_id"></a> [id](#output\_id) | Workpace ID |
<!-- END_TF_DOCS -->
18 changes: 9 additions & 9 deletions modules/workspace/main.tf
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
resource "tfe_workspace" "this" {
name = var.name
organization = var.organization
tag_names = var.tags
description = var.description
execution_mode = "remote"
terraform_version = var.terraform_version
working_directory = var.dir
project_id = var.project_id
remote_state_consumer_ids = var.share_state_with
name = var.name
organization = var.organization
tag_names = var.tags
description = var.description
execution_mode = "remote"
terraform_version = var.terraform_version
working_directory = var.dir
project_id = var.project_id
remote_state_consumer_ids = var.share_state_with
}

resource "tfe_workspace_variable_set" "this" {
Expand Down
Empty file removed modules/workspace/output.tf
Empty file.
4 changes: 4 additions & 0 deletions modules/workspace/outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
output "id" {
description = "Workpace ID"
value = tfe_workspace.this.id
}