Skip to content

Commit

Permalink
fix downloading of terraform registry modules via Terraform
Browse files Browse the repository at this point in the history
  • Loading branch information
VJftw committed Sep 3, 2022
1 parent 3f1c5c3 commit b90c118
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 16 deletions.
1 change: 0 additions & 1 deletion example/1.2/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ terraform_root(
"variables.tf",
],
modules = [
"//example/third_party/terraform/module:cloudposse_null_label_0_12",
"//example/1.2/my_module:my_module",
],
toolchain = "//example/third_party/terraform:1.2",
Expand Down
29 changes: 17 additions & 12 deletions example/1.2/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,25 @@ resource "null_resource" "version" {
}
}

module "label" {
source = "//example/third_party/terraform/module:cloudposse_null_label_0_12"
namespace = "eg"
stage = "prod"
name = "bastion"
attributes = ["public"]
delimiter = "-"
# module "label" {
# source = "//example/third_party/terraform/module:cloudposse_null_label_0_12"
# namespace = "eg"
# stage = "prod"
# name = "bastion"
# attributes = ["public"]
# delimiter = "-"

tags = {
"BusinessUnit" = "XYZ",
"Snapshot" = "true"
}
}
# tags = {
# "BusinessUnit" = "XYZ",
# "Snapshot" = "true"
# }
# }

module "my_label" {
source = "//example/1.2/my_module:my_module"
}

module "label" {
source = "cloudposse/label/null"
version = "0.25.0"
}
6 changes: 3 additions & 3 deletions pkg/root/virtualenv.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ func (c *CommandVirtualEnv) Execute(args []string) error {
return fmt.Errorf("could not create symlink from '%s' to '%s': %w", old, new, err)
}

// set GIT_DIR
fmt.Printf(`GIT_DIR=%s/.git`+"\n", repoRoot)
fmt.Println(`export GIT_DIR`)
// set REPO_ROOT
fmt.Printf(`REPO_ROOT=%s`+"\n", repoRoot)
fmt.Println(`export REPO_ROOT`)

// change user's working directory.
log.Info().Str("path", virtualEnvDir).Msg("working directory")
Expand Down

0 comments on commit b90c118

Please sign in to comment.