Skip to content

Commit f921c58

Browse files
Added IAP Enable/Disable flag in cloudrunv2 service. (#13575) (#3742)
[upstream:6042c8c999bb48c56a563ca81553df4b881316f4] Signed-off-by: Modular Magician <[email protected]>
1 parent f9791e8 commit f921c58

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ require (
1313
github.com/hashicorp/hcl/v2 v2.23.0
1414
github.com/hashicorp/terraform-json v0.24.0
1515
github.com/hashicorp/terraform-plugin-sdk/v2 v2.36.0
16-
github.com/hashicorp/terraform-provider-google-beta v1.20.1-0.20250410214620-7a2d28a6a66f
16+
github.com/hashicorp/terraform-provider-google-beta v1.20.1-0.20250410233345-1d6273b6cd05
1717
github.com/mitchellh/go-homedir v1.1.0 // indirect
1818
github.com/pkg/errors v0.9.1
1919
github.com/stretchr/testify v1.10.0

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@ github.com/hashicorp/terraform-plugin-sdk/v2 v2.36.0 h1:7/iejAPyCRBhqAg3jOx+4UcA
175175
github.com/hashicorp/terraform-plugin-sdk/v2 v2.36.0/go.mod h1:TiQwXAjFrgBf5tg5rvBRz8/ubPULpU0HjSaVi5UoJf8=
176176
github.com/hashicorp/terraform-plugin-testing v1.5.1 h1:T4aQh9JAhmWo4+t1A7x+rnxAJHCDIYW9kXyo4sVO92c=
177177
github.com/hashicorp/terraform-plugin-testing v1.5.1/go.mod h1:dg8clO6K59rZ8w9EshBmDp1CxTIPu3yA4iaDpX1h5u0=
178-
github.com/hashicorp/terraform-provider-google-beta v1.20.1-0.20250410214620-7a2d28a6a66f h1:5zMN5sO3dG4JzKruhywANwfchR8GjEt1zEP/BSV5IiU=
179-
github.com/hashicorp/terraform-provider-google-beta v1.20.1-0.20250410214620-7a2d28a6a66f/go.mod h1:nebsSmxY8nt9YCIJwjQdfUkFeITR5rGyTAQMfpexkiQ=
178+
github.com/hashicorp/terraform-provider-google-beta v1.20.1-0.20250410233345-1d6273b6cd05 h1:f8VBhGKTx6IpU7pNZzIF7I9/766f4nKXaiKPHylCxls=
179+
github.com/hashicorp/terraform-provider-google-beta v1.20.1-0.20250410233345-1d6273b6cd05/go.mod h1:nebsSmxY8nt9YCIJwjQdfUkFeITR5rGyTAQMfpexkiQ=
180180
github.com/hashicorp/terraform-registry-address v0.2.4 h1:JXu/zHB2Ymg/TGVCRu10XqNa4Sh2bWcqCNyKWjnCPJA=
181181
github.com/hashicorp/terraform-registry-address v0.2.4/go.mod h1:tUNYTVyCtU4OIGXXMDp7WNcJ+0W1B4nmstVDgHMjfAU=
182182
github.com/hashicorp/terraform-svchost v0.1.1 h1:EZZimZ1GxdqFRinZ1tpJwVxxt49xc/S52uzrw4x0jKQ=

tfplan2cai/converters/google/resources/services/cloudrunv2/cloudrunv2_service.go

+10
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,12 @@ func GetCloudRunV2ServiceApiObject(d tpgresource.TerraformResourceData, config *
136136
} else if v, ok := d.GetOkExists("build_config"); !tpgresource.IsEmptyValue(reflect.ValueOf(buildConfigProp)) && (ok || !reflect.DeepEqual(v, buildConfigProp)) {
137137
obj["buildConfig"] = buildConfigProp
138138
}
139+
iapEnabledProp, err := expandCloudRunV2ServiceIapEnabled(d.Get("iap_enabled"), d, config)
140+
if err != nil {
141+
return nil, err
142+
} else if v, ok := d.GetOkExists("iap_enabled"); !tpgresource.IsEmptyValue(reflect.ValueOf(iapEnabledProp)) && (ok || !reflect.DeepEqual(v, iapEnabledProp)) {
143+
obj["iapEnabled"] = iapEnabledProp
144+
}
139145
labelsProp, err := expandCloudRunV2ServiceEffectiveLabels(d.Get("effective_labels"), d, config)
140146
if err != nil {
141147
return nil, err
@@ -1922,6 +1928,10 @@ func expandCloudRunV2ServiceBuildConfigServiceAccount(v interface{}, d tpgresour
19221928
return v, nil
19231929
}
19241930

1931+
func expandCloudRunV2ServiceIapEnabled(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) {
1932+
return v, nil
1933+
}
1934+
19251935
func expandCloudRunV2ServiceEffectiveLabels(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (map[string]string, error) {
19261936
if v == nil {
19271937
return map[string]string{}, nil

0 commit comments

Comments
 (0)