########### # Defaults ########## terraform { required_version = ">= 0.13" } resource "random_pet" "name" { prefix = "aws-quickstart" length = 1 } resource "tfe_organization" "quickstart-org" { name = random_pet.name.id email = "admin@your-company.com" } resource "tfe_workspace" "quickstart-workspace-1" { name = "${random_pet.name.id}-workspace-1" organization = tfe_organization.quickstart-org.name working_directory = "./deploy_Publicly_Exposed_Service_with_Private_Networking" } resource "tfe_variable" "AWS_SECRET_ACCESS_KEY" { key = "AWS_SECRET_ACCESS_KEY" value = "" sensitive = true category = "env" workspace_id = tfe_workspace.quickstart-workspace-1.id description = "AWS_SECRET_ACCESS_KEY" } resource "tfe_variable" "AWS_ACCESS_KEY_ID" { key = "AWS_ACCESS_KEY_ID" value = "" category = "env" workspace_id = tfe_workspace.quickstart-workspace-1.id description = "AWS_ACCESS_KEY_ID" } resource "null_resource" "backend_file" { depends_on = [tfe_workspace.quickstart-workspace-1] provisioner "local-exec" { command = "echo workspaces '{' name = \\\"${tfe_workspace.quickstart-workspace-1.name}\\\" '}' >> ../deploy_Publicly_Exposed_Service_with_Private_Networking/backend.hcl" } provisioner "local-exec" { command = "echo hostname = \\\"app.terraform.io\\\" >> ../deploy_Publicly_Exposed_Service_with_Private_Networking/backend.hcl" } provisioner "local-exec" { command = "echo organization = \\\"${tfe_organization.quickstart-org.name}\\\" >> ../deploy_Publicly_Exposed_Service_with_Private_Networking/backend.hcl" } } resource "null_resource" "remote_init" { depends_on = [null_resource.backend_file] provisioner "local-exec" { working_dir = "../deploy_Publicly_Exposed_Service_with_Private_Networking" command = "terraform init -backend-config=backend.hcl" } } output "user_instructions" { value = <