Skip to content

Commit

Permalink
Merge pull request #398 from danpaul81/issue-397-mac
Browse files Browse the repository at this point in the history
symlink .terraform directory
  • Loading branch information
andrewh1978 authored Aug 1, 2023
2 parents 68d175d + cdcfbee commit 32ac414
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions px-deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,9 @@ func create_deployment(config Config) int {
exec.Command("cp", "-a", `/px-deploy/terraform/aws/cloud-init.tpl`, `/px-deploy/.px-deploy/tf-deployments/`+config.Name).Run()
exec.Command("cp", "-a", `/px-deploy/terraform/aws/aws-returns.tpl`, `/px-deploy/.px-deploy/tf-deployments/`+config.Name).Run()
// also copy terraform modules
exec.Command("cp", "-a", `/px-deploy/terraform/aws/.terraform`, `/px-deploy/.px-deploy/tf-deployments/`+config.Name).Run()
//exec.Command("cp", "-a", `/px-deploy/terraform/aws/.terraform`, `/px-deploy/.px-deploy/tf-deployments/`+config.Name).Run()
// creating symlink for .terraform as performance on mac significantly improves when not on bind mount issue #397
exec.Command("ln", "-s", `/px-deploy/terraform/aws/.terraform`, `/px-deploy/.px-deploy/tf-deployments/`+config.Name+`/.terraform`).Run()
exec.Command("cp", "-a", `/px-deploy/terraform/aws/.terraform.lock.hcl`, `/px-deploy/.px-deploy/tf-deployments/`+config.Name).Run()

switch config.Platform {
Expand Down Expand Up @@ -1052,7 +1054,9 @@ func create_deployment(config Config) int {
exec.Command("cp", "-a", `/px-deploy/terraform/azure/variables.tf`, `/px-deploy/.px-deploy/tf-deployments/`+config.Name).Run()
exec.Command("cp", "-a", `/px-deploy/terraform/azure/cloud-init.tpl`, `/px-deploy/.px-deploy/tf-deployments/`+config.Name).Run()
// also copy terraform modules
exec.Command("cp", "-a", `/px-deploy/terraform/azure/.terraform`, `/px-deploy/.px-deploy/tf-deployments/`+config.Name).Run()
//exec.Command("cp", "-a", `/px-deploy/terraform/azure/.terraform`, `/px-deploy/.px-deploy/tf-deployments/`+config.Name).Run()
// creating symlink for .terraform as performance on mac significantly improves when not on bind mount issue #397
exec.Command("ln", "-s", `/px-deploy/terraform/azure/.terraform`, `/px-deploy/.px-deploy/tf-deployments/`+config.Name+`/.terraform`).Run()
exec.Command("cp", "-a", `/px-deploy/terraform/azure/.terraform.lock.hcl`, `/px-deploy/.px-deploy/tf-deployments/`+config.Name).Run()

switch config.Platform {
Expand Down

0 comments on commit 32ac414

Please sign in to comment.