Method: GoogleSslCert::CLI::Create#save_secret
- Defined in:
- lib/google_ssl_cert/cli/create.rb
#save_secret ⇒ Object
The secret name is expected to be static/predictable The secret value is the changed/updated google ssl cert
Example:
secret_name = demo_ssl-cert-name
secret_value = google-ssl-cert-20211013231005
gcloud compute ssl-certificates list
NAME TYPE CREATION_TIMESTAMP EXPIRE_TIME MANAGED_STATUS
google-ssl-cert-20211013231005 SELF_MANAGED 2021-10-13T16:10:05.795-07:00 2022-10-12T17:22:01.000-07:00
gcloud secrets list
NAME CREATED REPLICATION_POLICY LOCATIONS
demo_ssl-cert-name 2021-10-13T23:10:06 automatic
35 36 37 38 |
# File 'lib/google_ssl_cert/cli/create.rb', line 35 def save_secret secret_value = @cert_name.generated_name # @cert_name the value because it will be referenced. the @cert_name or 'key' will be the same secret.save(@secret_name, secret_value) end |