Skip to content

Commit a7536cd

Browse files
authored
docs: clarify action is declarative (#245)
1 parent d518251 commit a7536cd

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

README.md

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ limitations under the License.
1818
This action deploys your function source code to [Cloud Functions](cloud-functions) and makes the URL
1919
available to later build steps via outputs.
2020

21+
**This GitHub Action is _declarative_, meaning it will overwrite any values on
22+
an existing Cloud Function deployment.** If you manually deployed a Cloud
23+
Function, you must specify **all** parameters in this action. Any unspecified
24+
values will be reverted to their default value (which is usually "null").
25+
2126
## Prerequisites
2227

2328
This action requires:
@@ -68,30 +73,27 @@ jobs:
6873

6974
- `region`: (Optional) [Region](https://cloud.google.com/functions/docs/locations) in which the function should be deployed. Defaults to `us-central1`.
7075

71-
- `env_vars`: (Optional) List of key-value pairs to set as environment variables in the format:
72-
`KEY1=VALUE1,KEY2=VALUE2`. All existing environment variables will be
73-
removed, even if this parameter is not passed.
76+
- `env_vars`: (Optional) List of key-value pairs to set as environment variables in the format: `KEY1=VALUE1,KEY2=VALUE2`. All existing environment variables will be removed, even if this parameter is not passed.
7477

75-
- `env_vars_file`: (Optional) Path to a local YAML file with definitions for all environment variables. An example env_vars_file can be found [here](tests/env-var-files/test.good.yaml). Only one of env_vars or env_vars_file can be specified.
78+
- `env_vars_file`: (Optional) Path to a local YAML file with definitions for all environment variables. An example env_vars_file can be found [here](tests/env-var-files/test.good.yaml). All existing environment variables will be removed, even if this parameter is not passed. If `env_vars` is also given, values in `env_vars` take precendence over these values.
7679

77-
- `labels`: (Optional) List of key-value pairs to set as function labels in the form label1=VALUE1,label2=VALUE2.
80+
- `labels`: (Optional) List of key-value pairs to set as function labels in the form `label1=VALUE1,label2=VALUE2`. All existing labels will be removed, even if this parameter is not passed.
7881

7982
- `source_dir`: (Optional) Source directory for the function. Defaults to current directory.
8083

81-
- `project_id`: (Optional) ID of the Google Cloud project. If provided, this
82-
will override the project configured by gcloud.
84+
- `project_id`: (Optional) ID of the Google Cloud project. If provided, this will override the project configured in the environment.
8385

8486
- `description`: (Optional) Description for the Cloud Function.
8587

86-
- `vpc_connector`: (Optional) The VPC Access connector that the function can connect to..
88+
- `vpc_connector`: (Optional) The VPC Access connector that the function can connect to.
8789

8890
- `vpc_connector_egress_settings`: (Optional) The egress settings for the connector, controlling what traffic is diverted through it.
8991

9092
- `ingress_settings`: (Optional) The ingress settings for the function, controlling what traffic can reach it.
9193

9294
- `secret_environment_variables`: (Optional) List of key-value pairs to set as
93-
environment variables at runtime of the format "KEY1=SECRET_VERSION_REF" where
94-
SECRET_VERSION_REF is a full resource name of a Google Secret Manager secret
95+
environment variables at runtime of the format `KEY1=SECRET_VERSION_REF` where
96+
`SECRET_VERSION_REF` is a full resource name of a Google Secret Manager secret
9597
of the format "projects/p/secrets/s/versions/v". If the project is omitted, it
9698
will be inferred from the Cloud Function project ID. If the version is
9799
omitted, it will default to "latest".
@@ -103,6 +105,8 @@ jobs:
103105
secret_environment_variables: 'API_KEY=projects/my-project/secrets/api-key/versions/5'
104106
```
105107

108+
All existing secrets will be removed, even if this parameter is not passed.
109+
106110
- `secret_volumes`: (Optional) List of key-value pairs to mount as volumes at
107111
runtime of the format "PATH=SECRET_VERSION_REF" where PATH is the mount path
108112
inside the container (e.g. "/etc/secrets/my-secret") and SECRET_VERSION_REF is
@@ -118,6 +122,9 @@ jobs:
118122
secret_volumes: '/etc/secrets/api-key=projects/my-project/secrets/api-key'
119123
```
120124

125+
All existing secret volume mounts will be removed, even if this parameter is
126+
not passed.
127+
121128
- `service_account_email`: (Optional) The email address of the IAM service account associated with the function at runtime.
122129

123130
- `timeout`: (Optional) The function execution timeout in seconds. Defaults to 60.

0 commit comments

Comments
 (0)