cr_buildstep_secret: Create a buildstep for using Secret Manager

View source: R/buildsteps_templates.R

cr_buildstep_secretR Documentation

Create a buildstep for using Secret Manager

Description

This is the preferred way to manage secrets for files, rather than cr_buildstep_decrypt, as it stores the encrypted file in the cloud rather than in your project workspace. For single environment values, cr_build_yaml_secrets may be more suitable.

Usage

cr_buildstep_secret(
  secret,
  decrypted,
  version = "latest",
  binary_mode = FALSE,
  ...
)

Arguments

secret

The secret data name in Secret Manager

decrypted

The name of the file the secret will be decrypted into

version

The version of the secret

binary_mode

Should the file be treated in binary/raw format?

...

Other arguments sent to cr_buildstep_bash

Details

This is for downloading encrypted files from Google Secret Manager. You will need to add the Secret Accessor Cloud IAM role to the Cloud Build service account to use it. Once you have uploaded your secret file and named it, it is available for Cloud Build to use.

See Also

How to set up secrets using Secret Manager

cr_build_yaml_secrets let you directly support environment arguments in the buildsteps

Other Cloud Buildsteps: cr_buildstep_bash(), cr_buildstep_decrypt(), cr_buildstep_df(), cr_buildstep_docker(), cr_buildstep_edit(), cr_buildstep_extract(), cr_buildstep_gcloud(), cr_buildstep_gitsetup(), cr_buildstep_mailgun(), cr_buildstep_nginx_setup(), cr_buildstep_packagetests(), cr_buildstep_pkgdown(), cr_buildstep_run(), cr_buildstep_r(), cr_buildstep_slack(), cr_buildstep_targets(), cr_buildstep()

Examples

cr_buildstep_secret("my_secret", decrypted = "/workspace/secret.json")

MarkEdmondson1234/googleCloudRunner documentation built on Feb. 5, 2023, 5:45 p.m.