Created
April 24, 2020 19:07
-
-
Save valery-zhurbenko/c2eb1226529c868fe954931c5ad4d481 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data "terraform_remote_state" "mainoutput" { | |
backend = "remote" | |
config = { | |
organization = "${trimsuffix("${var.TFC_WORKSPACE_SLUG}", "/${var.TFC_WORKSPACE_NAME}")}" | |
workspaces = { | |
name = "${trimsuffix("${var.TFC_WORKSPACE_NAME}", "-helm")}" | |
} | |
} | |
} | |
variable "TFC_WORKSPACE_NAME" {} | |
variable "TFC_WORKSPACE_SLUG" {} | |
### Use "output" to verify yourself ;-) | |
output "workspace" { | |
value = "${trimsuffix("${var.TFC_WORKSPACE_NAME}", "-helm")}" | |
} | |
output "tfe-org" { | |
value = "${trimsuffix("${var.TFC_WORKSPACE_SLUG}", "/${var.TFC_WORKSPACE_NAME}")}" | |
} | |
output "remote_workspace_output" { | |
value = "${data.terraform_remote_state.mainoutput.output}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment