-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
24 lines (23 loc) · 1.75 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
PROJECT_DIRECTORY ?= "pulumi-poc"
STACK ?= "pulumi-poc-dev"
CONTAINER_GCP_NAME = "pulumi:gcp"
PULUMI_USER ?= "pollosp"
STACK_TYPE ?= "gcp-go"
#Init is for doc propouse, it is only need once when you are creating the project
init:
docker run -ti -e PULUMI_ACCESS_TOKEN="$$PULUMI_ACCESS_TOKEN" -v $$PWD:/app -ti pulumi/actions new gcp-go --dir $(PROJECT_DIRECTORY)
build-gcp:
docker build . -t $(CONTAINER_GCP_NAME)
pulumi-update:
docker run -ti -e PULUMI_ACCESS_TOKEN="$$PULUMI_ACCESS_TOKEN" -e GREETING="$$GREETING" -e GOOGLE_PROJECT="$$GOOGLE_PROJECT" -e GOOGLE_CREDENTIALS="$$CREDENTIALS" $(CONTAINER_GCP_NAME) update -s $(STACK)
pulumi-preview:
docker run -ti -e PULUMI_ACCESS_TOKEN="$$PULUMI_ACCESS_TOKEN" -e GREETING="$$GREETING" -e GOOGLE_PROJECT="$$GOOGLE_PROJECT" -e GOOGLE_CREDENTIALS="$$CREDENTIALS" $(CONTAINER_GCP_NAME) preview -s $(STACK)
pulumi-destroy:
docker run -ti -e PULUMI_ACCESS_TOKEN="$$PULUMI_ACCESS_TOKEN" -e GREETING="$$GREETING" -e GOOGLE_PROJECT="$$GOOGLE_PROJECT" -e GOOGLE_CREDENTIALS="$$CREDENTIALS" $(CONTAINER_GCP_NAME) destroy -s $(STACK)
pulumi-rm-stack:
docker run -ti -e PULUMI_ACCESS_TOKEN="$$PULUMI_ACCESS_TOKEN" -e GREETING="$$GREETING" -e GOOGLE_PROJECT="$$GOOGLE_PROJECT" -e GOOGLE_CREDENTIALS="$$CREDENTIALS" $(CONTAINER_GCP_NAME) stack rm $(STACK)
pulumi-new-stack:
docker run -ti -e PULUMI_ACCESS_TOKEN="$$PULUMI_ACCESS_TOKEN" -e GREETING="$$GREETING" -e GOOGLE_PROJECT="$$GOOGLE_PROJECT" -e GOOGLE_CREDENTIALS="$$CREDENTIALS" $(CONTAINER_GCP_NAME) new gcp-go -s $(PULUMI_USER)/$(STACK)
#Due a bug using ENV vars described in https://github.com/pulumi/pulumi-gcp/issues/25 for 0.15.1
config:
docker run -ti -e PULUMI_ACCESS_TOKEN="$$PULUMI_ACCESS_TOKEN"-v $$PWD:/app -e GOOGLE_CREDENTIALS="$$CREDENTIALS" pulumi:gcp config set gcp:project