LoginSignup
124
75

More than 5 years have passed since last update.

GAE で秘匿したい環境変数を安全に設定する

Last updated at Posted at 2017-06-04

はじめに

  • Google App Engine では app.yaml で環境変数を設定できる
env_variables:
  MY_VAR: 'my value'

秘匿したい環境変数を設定する

  • app.yaml はデプロイなどに必要であるためコミットする必要がある
  • そのため app.yaml にアクセストークンなどの秘匿したい環境変数を設定することはできない
  • そこで別の yaml ファイルに定義して include で読み込み、そのファイルを .gitignore に登録することで秘匿したい環境変数を安全に定義することができる
app.yaml
includes:
- secret.yaml
secret.yaml
env_variables:
  SECRET_TOKEN: "my secret token"
.gitignore
secret.yaml

参考URL

124
75
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
124
75