Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Marks template.volumes.secret.items.mode field not required in Cloud Run V2 resources #15638

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changelog/8771.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
```release-note:enhancement
cloudrunv2: Changed `template.volumes.secret.items.mode` field in `google_cloud_run_v2_job` resource to a non-required field.
```
```release-note:enhancement
cloudrunv2: Changed `template.volumes.secret.items.mode` field in `google_cloud_run_v2_service` resource to a non-required field.
```
10 changes: 5 additions & 5 deletions google/services/cloudrunv2/resource_cloud_run_v2_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -477,11 +477,6 @@ A duration in seconds with up to nine fractional digits, ending with 's'. Exampl
Description: `If unspecified, the volume will expose a file whose name is the secret, relative to VolumeMount.mount_path. If specified, the key will be used as the version to fetch from Cloud Secret Manager and the path will be the name of the file exposed in the volume. When items are defined, they must specify a path and a version.`,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"mode": {
Type: schema.TypeInt,
Required: true,
Description: `Integer octal mode bits to use on this file, must be a value between 01 and 0777 (octal). If 0 or not set, the Volume's default mode will be used.`,
},
"path": {
Type: schema.TypeString,
Required: true,
Expand All @@ -492,6 +487,11 @@ A duration in seconds with up to nine fractional digits, ending with 's'. Exampl
Required: true,
Description: `The Cloud Secret Manager secret version. Can be 'latest' for the latest value or an integer for a specific version`,
},
"mode": {
Type: schema.TypeInt,
Optional: true,
Description: `Integer octal mode bits to use on this file, must be a value between 01 and 0777 (octal). If 0 or not set, the Volume's default mode will be used.`,
},
},
},
},
Expand Down
10 changes: 5 additions & 5 deletions google/services/cloudrunv2/resource_cloud_run_v2_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -593,16 +593,16 @@ A duration in seconds with up to nine fractional digits, ending with 's'. Exampl
Description: `If unspecified, the volume will expose a file whose name is the secret, relative to VolumeMount.mount_path. If specified, the key will be used as the version to fetch from Cloud Secret Manager and the path will be the name of the file exposed in the volume. When items are defined, they must specify a path and a version.`,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"mode": {
Type: schema.TypeInt,
Required: true,
Description: `Integer octal mode bits to use on this file, must be a value between 01 and 0777 (octal). If 0 or not set, the Volume's default mode will be used.`,
},
"path": {
Type: schema.TypeString,
Required: true,
Description: `The relative path of the secret in the container.`,
},
"mode": {
Type: schema.TypeInt,
Optional: true,
Description: `Integer octal mode bits to use on this file, must be a value between 01 and 0777 (octal). If 0 or not set, the Volume's default mode will be used.`,
},
"version": {
Type: schema.TypeString,
Optional: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,6 @@ resource "google_cloud_run_v2_service" "default" {
items {
version = "1"
path = "my-secret"
mode = 256 # 0400
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/cloud_run_v2_job.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ The following arguments are supported:
The Cloud Secret Manager secret version. Can be 'latest' for the latest value or an integer for a specific version

* `mode` -
(Required)
(Optional)
Integer octal mode bits to use on this file, must be a value between 01 and 0777 (octal). If 0 or not set, the Volume's default mode will be used.

<a name="nested_cloud_sql_instance"></a>The `cloud_sql_instance` block supports:
Expand Down
3 changes: 1 addition & 2 deletions website/docs/r/cloud_run_v2_service.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,6 @@ resource "google_cloud_run_v2_service" "default" {
items {
version = "1"
path = "my-secret"
mode = 256 # 0400
}
}
}
Expand Down Expand Up @@ -767,7 +766,7 @@ The following arguments are supported:
The Cloud Secret Manager secret version. Can be 'latest' for the latest value or an integer for a specific version

* `mode` -
(Required)
(Optional)
Integer octal mode bits to use on this file, must be a value between 01 and 0777 (octal). If 0 or not set, the Volume's default mode will be used.

<a name="nested_cloud_sql_instance"></a>The `cloud_sql_instance` block supports:
Expand Down