Skip to content

Commit

Permalink
Fix pdc network Id check
Browse files Browse the repository at this point in the history
  • Loading branch information
aangelisc committed Jan 7, 2025
1 parent 3487011 commit 3c4fddf
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions internal/resources/grafana/resource_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -366,10 +366,12 @@ func stateToDatasourceConfig(d *schema.ResourceData) (map[string]interface{}, ma
return nil, nil, err
}

pdcNetworkID := d.Get("private_datasource_connect_network_id").(string)
if pdcNetworkID != "" {
jd["enableSecureSocksProxy"] = true
jd["secureSocksProxyUsername"] = pdcNetworkID
pdcNetworkID := d.Get("private_datasource_connect_network_id")
if pdcNetworkID != nil {
if id := pdcNetworkID.(string); id != "" {
jd["enableSecureSocksProxy"] = true
jd["secureSocksProxyUsername"] = pdcNetworkID
}
}

sd, err := makeSecureJSONData(d)
Expand Down

0 comments on commit 3c4fddf

Please sign in to comment.