Skip to content

Commit 58d7c29

Browse files
Support full resource names in autokey_config.folder (#11413)
Co-authored-by: Sarah French <[email protected]> [upstream:ba356a39c6c948916aab77da2dc0cab22b95d70a] Signed-off-by: Modular Magician <[email protected]>
1 parent ffc80ed commit 58d7c29

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ require (
1111
github.com/hashicorp/hcl/v2 v2.20.1
1212
github.com/hashicorp/terraform-json v0.22.1
1313
github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0
14-
github.com/hashicorp/terraform-provider-google-beta v1.20.1-0.20240903230905-7c988086a97b
14+
github.com/hashicorp/terraform-provider-google-beta v1.20.1-0.20240904154629-15db002a7082
1515
github.com/mitchellh/go-homedir v1.1.0 // indirect
1616
github.com/pkg/errors v0.9.1
1717
github.com/stretchr/testify v1.9.0

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0 h1:qHprzXy/As0rxedphECBEQAh
190190
github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0/go.mod h1:H+8tjs9TjV2w57QFVSMBQacf8k/E1XwLXGCARgViC6A=
191191
github.com/hashicorp/terraform-plugin-testing v1.5.1 h1:T4aQh9JAhmWo4+t1A7x+rnxAJHCDIYW9kXyo4sVO92c=
192192
github.com/hashicorp/terraform-plugin-testing v1.5.1/go.mod h1:dg8clO6K59rZ8w9EshBmDp1CxTIPu3yA4iaDpX1h5u0=
193-
github.com/hashicorp/terraform-provider-google-beta v1.20.1-0.20240903230905-7c988086a97b h1:1VLn4VbdSCCc8hOfubs0yyoAaLU300lBb3IudQYgw7Y=
194-
github.com/hashicorp/terraform-provider-google-beta v1.20.1-0.20240903230905-7c988086a97b/go.mod h1:KmhH9vkbqTNYp9g+1yBfb4iK9CCbKNnakASns8SHzXU=
193+
github.com/hashicorp/terraform-provider-google-beta v1.20.1-0.20240904154629-15db002a7082 h1:ySAsCRL945fLuBFCjuWqBFLQet4532PF/ADLLGoeYDs=
194+
github.com/hashicorp/terraform-provider-google-beta v1.20.1-0.20240904154629-15db002a7082/go.mod h1:KmhH9vkbqTNYp9g+1yBfb4iK9CCbKNnakASns8SHzXU=
195195
github.com/hashicorp/terraform-registry-address v0.2.3 h1:2TAiKJ1A3MAkZlH1YI/aTVcLZRu7JseiXNRHbOAyoTI=
196196
github.com/hashicorp/terraform-registry-address v0.2.3/go.mod h1:lFHA76T8jfQteVfT7caREqguFrW3c4MFSPhZB7HHgUM=
197197
github.com/hashicorp/terraform-svchost v0.1.1 h1:EZZimZ1GxdqFRinZ1tpJwVxxt49xc/S52uzrw4x0jKQ=

tfplan2cai/converters/google/resources/services/kms/kms_autokey_config.go

+7
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,18 @@ package kms
1717
import (
1818
"reflect"
1919

20+
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
21+
2022
"github.com/GoogleCloudPlatform/terraform-google-conversion/v5/tfplan2cai/converters/google/resources/cai"
2123
"github.com/hashicorp/terraform-provider-google-beta/google-beta/tpgresource"
2224
transport_tpg "github.com/hashicorp/terraform-provider-google-beta/google-beta/transport"
2325
)
2426

27+
func folderPrefixSuppress(_, old, new string, d *schema.ResourceData) bool {
28+
prefix := "folders/"
29+
return prefix+old == new || prefix+new == old
30+
}
31+
2532
const KMSAutokeyConfigAssetType string = "cloudkms.googleapis.com/AutokeyConfig"
2633

2734
func ResourceConverterKMSAutokeyConfig() cai.ResourceConverter {

0 commit comments

Comments
 (0)