diff --git a/CHANGELOG.md b/CHANGELOG.md index 226ce3ba..c143836f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,24 @@ +## 0.6.37 (July 30, 2024) +* BUGFIX: [#446](https://github.com/opsgenie/terraform-provider-opsgenie/pull/446) + * **Integration Policy** + * Fixed perpetual time drift in the conditions field in Integration policy +## 0.6.36 (July 7, 2024) +* BUGFIX: [#411](https://github.com/opsgenie/terraform-provider-opsgenie/pulls/411), [#440](https://github.com/opsgenie/terraform-provider-opsgenie/pulls/440) + * **API backoff mechanism** + * Add options to customize the API backoff mechanism + * **Integration Action Policy** + * Fixed integration_action filter conditions field by giving support for extra-properties +* IMPROVEMENTS [#296](https://github.com/opsgenie/terraform-provider-opsgenie/pulls/296) + * **Integration Policy** + * Updated Integration request to allow configuration access flag +## 0.6.35 (December 18, 2023) +* BUGFIX: [#413](https://github.com/opsgenie/terraform-provider-opsgenie/pulls/413), [#416](https://github.com/opsgenie/terraform-provider-opsgenie/pulls/416) + * **time_restriction:** + * Fixed drift for empty time_restriction + * Fixed time_restriction argument in team_routing_rule resource documentation +* IMPROVEMENTS: [#405](https://github.com/opsgenie/terraform-provider-opsgenie/pulls/405) + * **README** + * Update the README setup instructions and Make commands ## 0.6.34 (November 06, 2023) * BUGFIX: [#404](https://github.com/opsgenie/terraform-provider-opsgenie/pulls/404) * **Notification Policy:** diff --git a/opsgenie/resource_opsgenie_integration_action.go b/opsgenie/resource_opsgenie_integration_action.go index a6b7fe9b..3c041630 100644 --- a/opsgenie/resource_opsgenie_integration_action.go +++ b/opsgenie/resource_opsgenie_integration_action.go @@ -62,7 +62,7 @@ func resourceOpsgenieIntegrationAction() *schema.Resource { ValidateFunc: validation.StringInSlice([]string{"match-all", "match-any-condition", "match-all-conditions"}, false), }, "conditions": { - Type: schema.TypeList, + Type: schema.TypeSet, Optional: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -237,7 +237,7 @@ func resourceOpsgenieIntegrationAction() *schema.Resource { ValidateFunc: validation.StringInSlice([]string{"match-all", "match-any-condition", "match-all-conditions"}, false), }, "conditions": { - Type: schema.TypeList, + Type: schema.TypeSet, Optional: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -320,7 +320,7 @@ func resourceOpsgenieIntegrationAction() *schema.Resource { ValidateFunc: validation.StringInSlice([]string{"match-all", "match-any-condition", "match-all-conditions"}, false), }, "conditions": { - Type: schema.TypeList, + Type: schema.TypeSet, Optional: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -403,7 +403,7 @@ func resourceOpsgenieIntegrationAction() *schema.Resource { ValidateFunc: validation.StringInSlice([]string{"match-all", "match-any-condition", "match-all-conditions"}, false), }, "conditions": { - Type: schema.TypeList, + Type: schema.TypeSet, Optional: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -486,7 +486,7 @@ func resourceOpsgenieIntegrationAction() *schema.Resource { ValidateFunc: validation.StringInSlice([]string{"match-all", "match-any-condition", "match-all-conditions"}, false), }, "conditions": { - Type: schema.TypeList, + Type: schema.TypeSet, Optional: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -567,20 +567,20 @@ func expandOpsgenieFilter(input []interface{}) integration.Filter { filter := integration.Filter{} for _, r := range input { inputMap := r.(map[string]interface{}) - conditions := expandOpsgenieIntegrationConditions(inputMap["conditions"].([]interface{})) + conditions := expandOpsgenieIntegrationConditions(inputMap["conditions"].(*schema.Set)) filter.Conditions = conditions filter.ConditionMatchType = og.ConditionMatchType(inputMap["type"].(string)) } return filter } -func expandOpsgenieIntegrationConditions(input []interface{}) []og.Condition { - conditions := make([]og.Condition, 0, len(input)) +func expandOpsgenieIntegrationConditions(input *schema.Set) []og.Condition { + conditions := make([]og.Condition, 0, input.Len()) if input == nil { return conditions } - for _, v := range input { + for _, v := range input.List() { inputMap := v.(map[string]interface{}) condition := og.Condition{} key := inputMap["key"].(string)