Skip to content

Commit

Permalink
Properly case Sentry attributes and pass them to client
Browse files Browse the repository at this point in the history
Signed-off-by: Leandro López (inkel) <leandro.lopez@grafana.com>
  • Loading branch information
inkel committed Feb 4, 2022
1 parent 8885d69 commit bd4fb65
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions grafana/resource_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ source selected (via the 'type' argument).
Optional: true,
Description: "(MySQL, PostgreSQL and MSSQL) Maximum number of open connections to the database (Grafana v5.4+).",
},
"orgSlug": {
"org_slug": {
Type: schema.TypeString,
Optional: true,
Description: "(Sentry) Organization slug.",
Expand Down Expand Up @@ -356,7 +356,7 @@ source selected (via the 'type' argument).
Sensitive: true,
Description: "(Github) The access token to use to access the data source",
},
"authToken": {
"auth_token": {
Type: schema.TypeString,
Optional: true,
Sensitive: true,
Expand Down Expand Up @@ -586,6 +586,7 @@ func makeJSONData(d *schema.ResourceData) gapi.JSONData {
MaxConcurrentShardRequests: int64(d.Get("json_data.0.max_concurrent_shard_requests").(int)),
MaxIdleConns: int64(d.Get("json_data.0.max_idle_conns").(int)),
MaxOpenConns: int64(d.Get("json_data.0.max_open_conns").(int)),
OrgSlug: d.Get("json_data.0.org_slug").(string),
OutputLocation: d.Get("json_data.0.output_location").(string),
PostgresVersion: int64(d.Get("json_data.0.postgres_version").(int)),
Profile: d.Get("json_data.0.profile").(string),
Expand Down Expand Up @@ -613,6 +614,7 @@ func makeJSONData(d *schema.ResourceData) gapi.JSONData {
func makeSecureJSONData(d *schema.ResourceData) gapi.SecureJSONData {
return gapi.SecureJSONData{
AccessKey: d.Get("secure_json_data.0.access_key").(string),
AuthToken: d.Get("secure_json_data.0.auth_token").(string),
BasicAuthPassword: d.Get("secure_json_data.0.basic_auth_password").(string),
Password: d.Get("secure_json_data.0.password").(string),
PrivateKey: d.Get("secure_json_data.0.private_key").(string),
Expand Down

0 comments on commit bd4fb65

Please sign in to comment.