Skip to content

Commit c19ae5a

Browse files
Mark location field required in v2 Cloud Run resources (#9292) (#16311)
[upstream:485e6c2e7db6d64288fc505996a8cb0cdca1384c] Signed-off-by: Modular Magician <[email protected]>
1 parent 21ea9bc commit c19ae5a

File tree

5 files changed

+26
-20
lines changed

5 files changed

+26
-20
lines changed

.changelog/9292.txt

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
```release-note:breaking-change
2+
cloudrunv2: marked `location` field as required in resource `google_cloud_run_v2_job`. Any configuration without `location` specified will cause resource creation fail
3+
```
4+
```release-note:breaking-change
5+
cloudrunv2: marked `location` field as required in resource `google_cloud_run_v2_service`. Any configuration without `location` specified will cause resource creation fail
6+
```

google/services/cloudrunv2/resource_cloud_run_v2_job.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ func ResourceCloudRunV2Job() *schema.Resource {
5555
),
5656

5757
Schema: map[string]*schema.Schema{
58+
"location": {
59+
Type: schema.TypeString,
60+
Required: true,
61+
ForceNew: true,
62+
Description: `The location of the cloud run job`,
63+
},
5864
"name": {
5965
Type: schema.TypeString,
6066
Required: true,
@@ -494,12 +500,6 @@ If no value is specified, GA is assumed. Set the launch stage to a preview stage
494500
495501
For example, if ALPHA is provided as input, but only BETA and GA-level features are used, this field will be BETA on output. Possible values: ["UNIMPLEMENTED", "PRELAUNCH", "EARLY_ACCESS", "ALPHA", "BETA", "GA", "DEPRECATED"]`,
496502
},
497-
"location": {
498-
Type: schema.TypeString,
499-
Optional: true,
500-
ForceNew: true,
501-
Description: `The location of the cloud run job`,
502-
},
503503
"conditions": {
504504
Type: schema.TypeList,
505505
Computed: true,

google/services/cloudrunv2/resource_cloud_run_v2_service.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ func ResourceCloudRunV2Service() *schema.Resource {
5555
),
5656

5757
Schema: map[string]*schema.Schema{
58+
"location": {
59+
Type: schema.TypeString,
60+
Required: true,
61+
ForceNew: true,
62+
Description: `The location of the cloud run service`,
63+
},
5864
"name": {
5965
Type: schema.TypeString,
6066
Required: true,
@@ -746,12 +752,6 @@ If no value is specified, GA is assumed. Set the launch stage to a preview stage
746752
747753
For example, if ALPHA is provided as input, but only BETA and GA-level features are used, this field will be BETA on output. Possible values: ["UNIMPLEMENTED", "PRELAUNCH", "EARLY_ACCESS", "ALPHA", "BETA", "GA", "DEPRECATED"]`,
748754
},
749-
"location": {
750-
Type: schema.TypeString,
751-
Optional: true,
752-
ForceNew: true,
753-
Description: `The location of the cloud run service`,
754-
},
755755
"traffic": {
756756
Type: schema.TypeList,
757757
Computed: true,

website/docs/r/cloud_run_v2_job.html.markdown

+4-4
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,10 @@ The following arguments are supported:
357357
The template used to create executions for this Job.
358358
Structure is [documented below](#nested_template).
359359

360+
* `location` -
361+
(Required)
362+
The location of the cloud run job
363+
360364

361365
<a name="nested_template"></a>The `template` block supports:
362366

@@ -679,10 +683,6 @@ The following arguments are supported:
679683
Settings for the Binary Authorization feature.
680684
Structure is [documented below](#nested_binary_authorization).
681685

682-
* `location` -
683-
(Optional)
684-
The location of the cloud run job
685-
686686
* `project` - (Optional) The ID of the project in which the resource belongs.
687687
If it is not provided, the provider project is used.
688688

website/docs/r/cloud_run_v2_service.html.markdown

+4-4
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,10 @@ The following arguments are supported:
367367
The template used to create revisions for this Service.
368368
Structure is [documented below](#nested_template).
369369

370+
* `location` -
371+
(Required)
372+
The location of the cloud run service
373+
370374

371375
<a name="nested_template"></a>The `template` block supports:
372376

@@ -886,10 +890,6 @@ The following arguments are supported:
886890
Specifies how to distribute traffic over a collection of Revisions belonging to the Service. If traffic is empty or not provided, defaults to 100% traffic to the latest Ready Revision.
887891
Structure is [documented below](#nested_traffic).
888892

889-
* `location` -
890-
(Optional)
891-
The location of the cloud run service
892-
893893
* `project` - (Optional) The ID of the project in which the resource belongs.
894894
If it is not provided, the provider project is used.
895895

0 commit comments

Comments
 (0)