Skip to content

Commit 50a496f

Browse files
authored
fix(cloudauth): create gcp key only when present (#489)
1 parent 238519b commit 50a496f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sysdig/resource_sysdig_secure_cloud_auth_account.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ func constructAccountComponents(data *schema.ResourceData) []*cloudauth.AccountC
387387
if data.Get(SchemaCloudProviderType).(string) == cloudauth.Provider_PROVIDER_GCP.String() {
388388
spGcp := &internalServicePrincipalMetadata{}
389389
err = json.Unmarshal([]byte(value.(string)), spGcp)
390-
if len(spGcp.Gcp.Key) >= 0 {
390+
if len(spGcp.Gcp.Key) > 0 {
391391
var spGcpKeyBytes []byte
392392
spGcpKeyBytes, err = base64.StdEncoding.DecodeString(spGcp.Gcp.Key)
393393
if err != nil {

0 commit comments

Comments
 (0)