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

Update team id at oncall resources are not effective #854

Closed
project0 opened this issue Mar 17, 2023 · 2 comments · Fixed by #864
Closed

Update team id at oncall resources are not effective #854

project0 opened this issue Mar 17, 2023 · 2 comments · Fixed by #864
Labels

Comments

@project0
Copy link

project0 commented Mar 17, 2023

Terraform Version

  • Terraform: 1.4.1
  • Terraform Grafana Provider: 1.36.1
  • Grafana: cloud

Affected Resource(s)

Please list the resources as a list, for example:

  • grafana_oncall_escalation_chain
  • grafana_oncall_on_call_shift
  • grafana_oncall_schedule

Terraform Configuration Files

data "grafana_oncall_team" "team" {
  name = "Switch team"
}

resource "grafana_oncall_on_call_shift" "platform_oncall" {
  team_id  = data.grafana_oncall_team.team.id
 ....
}

Expected Behavior

Force replace resources or update the team.

Actual Behavior

When updating the team id it never updates.
The plan keeps changing on every run and the resource is never updated with the new team.

  # grafana_oncall_schedule.platform_oncall will be updated in-place
  ~ resource "grafana_oncall_schedule" "platform_oncall" {
        id                 = "SLIWJS4X2UWCE"
        name               = "Platform"
      + team_id            = "TNW1ZIT5HWI1Y"
        # (4 unchanged attributes hidden)
    }

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply
@prajith-nair
Copy link

prajith-nair commented Apr 13, 2023

Your current configuration looks like below :

data "grafana_oncall_team" "team" {
  name = "Switch team"
}

resource "grafana_oncall_on_call_shift" "platform_oncall" {
  team_id  = data.grafana_oncall_team.id
 ....
}

Are you missing below in your config ?

team_id = data.grafana_oncall_team.**team**.id as opposed to
team_id = data.grafana_oncall_team.id

@project0
Copy link
Author

@prajith-nair true, the example was not correct. I have updated the example.

@julienduchesne julienduchesne linked a pull request Jun 5, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants