Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OnCall outgoing webhook requires user field to be populated #1025

Closed
N3X14 opened this issue Sep 8, 2023 · 1 comment
Closed

OnCall outgoing webhook requires user field to be populated #1025

N3X14 opened this issue Sep 8, 2023 · 1 comment
Assignees

Comments

@N3X14
Copy link

N3X14 commented Sep 8, 2023

Terraform Version

  • Terraform: v1.5.6
  • Terraform Grafana Provider: 2.3
  • Grafana OnCall: 1.3.30

Affected Resource(s)

Please list the resources as a list, for example:

  • grafana_oncall_outgoing_webhook

Terraform Configuration Files

resource "grafana_oncall_outgoing_webhook" "integrationxyz_oncall_resolve" {
    provider = grafana.oncall
    name     = "Integration XYZ RESOLVE"

    user     = ""
    password = ""
    data     = "."
    team_id  = data.grafana_oncall_team.team1.id
    url      = var.webhook_url_team1
    
    forward_whole_payload = true    
}

Debug Output

Error: POST https://domain/api/v1/actions/: 400 {user: [This field may not be null.]}

Expected Behavior

The outgoing webhook should have been created. The user field is optional as per the provider's documentation and it wouldn't make sense to require it given other forms of authentication could be used (as in our case).

Actual Behavior

Terraform wasn't able to create the resource as the field was required to be not "NULL" - Note that it works just fine if you provide a string as value there.

Steps to Reproduce

  1. terraform apply

References

Didn't find anything that would mention this behavior.

@N3X14 N3X14 added the bug label Sep 8, 2023
@mderynck mderynck self-assigned this Sep 21, 2023
github-merge-queue bot pushed a commit to grafana/oncall that referenced this issue Sep 26, 2023
# What this PR does
Fixes a regression that was introduced when actions were remapped to new
webhooks. Validation in the serializer was making the user field no
longer accept blank and None values. This PR makes those values accepted
again.

## Which issue(s) this PR fixes
grafana/terraform-provider-grafana#1025

## Checklist

- [x] Unit, integration, and e2e (if applicable) tests updated
- [x] Documentation added (or `pr:no public docs` PR label added if not
required)
- [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
@N3X14
Copy link
Author

N3X14 commented Sep 29, 2023

Thank you @mderynck !

github-merge-queue bot pushed a commit to grafana/oncall that referenced this issue Oct 3, 2023
# What this PR does
Fix update calls made by terraform when user field is empty or not
present.
Should have been part of: #3053

## Which issue(s) this PR fixes
grafana/terraform-provider-grafana#1025

## Checklist

- [x] Unit, integration, and e2e (if applicable) tests updated
- [x] Documentation added (or `pr:no public docs` PR label added if not
required)
- [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants