Skip to content

Commit

Permalink
🔧 Remove add-iam-policy-binding from Make init
Browse files Browse the repository at this point in the history
  • Loading branch information
nkmr-jp committed Jul 10, 2022
1 parent 3f290a4 commit 45068bf
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ BUCKET_NAME=$(PROJECT_ID)-fetch
VERSION=$(shell git describe --abbrev=0 --tags)

init:
@echo
@echo "---- add iam policy binding. ----"
-gcloud projects add-iam-policy-binding $(PROJECT_ID) \
--member=serviceAccount:service-$(PROJECT_NUMBER)@gcp-sa-pubsub.iam.gserviceaccount.com \
--role=roles/iam.serviceAccountTokenCreator
@echo
@echo "---- create pubusub topic. ----"
-gcloud pubsub topics create $(TOPIC_NAME)
Expand All @@ -38,6 +33,19 @@ init:
open https://console.cloud.google.com/cloudpubsub/topic/detail/$(FUNC_NAME)-topic
open https://console.cloud.google.com/storage/browser?project=$(PROJECT_ID)


# See: https://cloud.google.com/pubsub/docs/push
# > If your project was created on or before April 8, 2021,
# > you must grant the roles/iam.serviceAccountTokenCreator role to
# > the Google-managed service account service-{PROJECT_NUMBER}@gcp-sa-pubsub.iam.gserviceaccount.com
# > on the project in order to allow Pub/Sub to create tokens.
add-iam-policy-binding:
@echo
@echo "---- add iam policy binding. ----"
-gcloud projects add-iam-policy-binding $(PROJECT_ID) \
--member=serviceAccount:service-$(PROJECT_NUMBER)@gcp-sa-pubsub.iam.gserviceaccount.com \
--role=roles/iam.serviceAccountTokenCreator

test:
export BUCKET_NAME=$(BUCKET_NAME)-test && go test -v

Expand Down

0 comments on commit 45068bf

Please sign in to comment.