opsgenie / terraform-provider-opsgenie

Terraform OpsGenie provider
https://registry.terraform.io/providers/opsgenie/opsgenie/latest/docs
Mozilla Public License 2.0
100 stars 135 forks source link

OpsGenie planned Maintenance window is not showing in the GUI - created via terraform. #407

Open kajal-patel97 opened 10 months ago

kajal-patel97 commented 10 months ago

Hi there,

Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.

Terraform Version

Please note, that i have tried this with the newest version of terraform but this has still occurred. Terraform v1.4.5 on darwin_arm64

Affected Resource(s)

Please list the resources as a list, for example:

If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

Terraform Configuration Files

resource "opsgenie_maintenance" "qualsys_scan" {
    description = "test"
    rules {
        state = "enabled"
        entity { 
            id = "37d69296-98fe-435a-b5b4-6c3bb2d13f8b"
            type = "integration"
        }
    }
    time {
        type = "schedule"
        start_date = "2023-10-23T17:45:00Z"
        end_date = "2023-10-23T17:50:00Z"
    }   
}

provider "opsgenie" {
  api_key = "" << api key is the correct one used.
  api_url = "api.opsgenie.com" #default is api.opsgenie.com
}
terraform {
  required_providers {
    opsgenie = {
      source  = "opsgenie/opsgenie"
      version = "0.6.28"
    }
  }
}

Expected Behavior

What should have happened? The terraform applys and it says that the window has been created, i have validated this through using an API call through CLI and it gives me an id for the window, so i know it is there. The overall aim is to created automated shceduled windows, but for now i am doing a basic test with hardcoded inputs to see if the terraform responds to creating them.

Actual Behavior

What actually happened?

The actual window is not getting created in the Opsgenie GUI, the api key is correct and in the correct environment, the API call shows it is there, but it is not appearing under the team connected to the entity.

Is there a reason why it is not appearing? Is this Normal?