Skip to content

Commit b214cfa

Browse files
Oncall: Stop reading password or auth header (#1020)
Tests are failing because it seems like the API doesn't return the password anymore This makes these attributes sensitive and stops reading them (because the API returns stars instead of the real value)
1 parent 1e4bb79 commit b214cfa

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/resources/oncall_outgoing_webhook.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ resource "grafana_oncall_outgoing_webhook" "test-acc-outgoing_webhook" {
3030

3131
### Optional
3232

33-
- `authorization_header` (String) The auth data of the webhook. Used in Authorization header instead of user/password auth.
33+
- `authorization_header` (String, Sensitive) The auth data of the webhook. Used in Authorization header instead of user/password auth.
3434
- `data` (String) The data of the webhook.
3535
- `forward_whole_payload` (Boolean) Forwards whole payload of the alert to the webhook's url as POST data.
36-
- `password` (String) The auth data of the webhook. Used for Basic authentication
36+
- `password` (String, Sensitive) The auth data of the webhook. Used for Basic authentication
3737
- `team_id` (String) The ID of the OnCall team. To get one, create a team in Grafana, and navigate to the OnCall plugin (to sync the team with OnCall). You can then get the ID using the `grafana_oncall_team` datasource.
3838
- `user` (String) The auth data of the webhook. Used for Basic authentication.
3939

internal/resources/oncall/resource_outgoing_webhook.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,13 @@ func ResourceOutgoingWebhook() *schema.Resource {
5454
Type: schema.TypeString,
5555
Optional: true,
5656
Description: "The auth data of the webhook. Used for Basic authentication",
57+
Sensitive: true,
5758
},
5859
"authorization_header": {
5960
Type: schema.TypeString,
6061
Optional: true,
6162
Description: "The auth data of the webhook. Used in Authorization header instead of user/password auth.",
63+
Sensitive: true,
6264
},
6365
"forward_whole_payload": {
6466
Type: schema.TypeBool,
@@ -134,8 +136,6 @@ func ResourceOutgoingWebhookRead(ctx context.Context, d *schema.ResourceData, m
134136
d.Set("url", outgoingWebhook.Url)
135137
d.Set("data", outgoingWebhook.Data)
136138
d.Set("user", outgoingWebhook.User)
137-
d.Set("password", outgoingWebhook.Password)
138-
d.Set("authorization_header", outgoingWebhook.AuthorizationHeader)
139139
d.Set("forward_whole_payload", outgoingWebhook.ForwardWholePayload)
140140

141141
return nil

0 commit comments

Comments
 (0)