Skip to content

Commit

Permalink
Added gen-env make target
Browse files Browse the repository at this point in the history
Enables the .env file to be created from the make file using the Docker container.

A condition has been added to automatically run that as part of "make init" (terraform init) to reduce developer friction.

make clean will also remove that env file for full clean up.
  • Loading branch information
Stephen James committed Oct 26, 2023
1 parent eb6567a commit cb16297
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ DOCKER_RUN_IT := @docker run --rm -it \
$(DOCKER_IMAGE)
export DOCKER_DEFAULT_PLATFORM=linux/amd64
include .env
TERRAFORM_OUTPUTS := `$(MAKE) output OUTPUT_ARGUMENT="--json terraform_outputs"`
DNS_DHCP_VPC_ID := `$(MAKE) output OUTPUT_ARGUMENT="--raw dns_dhcp_vpc_id"`
.PHONY: debug
debug: ## debug
@echo "debug"
$(info target is $@)
.PHONY: aws
aws: ## provide aws cli command as an arg e.g. (make aws AWSCLI_ARGUMENT="s3 ls")
Expand Down

0 comments on commit cb16297

Please sign in to comment.