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

Continuous diff due to different order of conditions in IntegrationAction resource. #286

Open
ringods opened this issue Jan 15, 2024 · 2 comments
Labels
blocked The issue cannot be resolved without 3rd party action. bug/diff kind/bug related to Pulumi generating wrong diffs on preview or up. kind/bug Some behavior is incorrect or out of spec

Comments

@ringods
Copy link
Member

ringods commented Jan 15, 2024

What happened?

Customer reported that Pulumi reports a diff every time because the order of the conditions is not stable:

image

Example

new IntegrationActionCreateArgs
{
    Name = "p5-create-action",
    Tags = new[]
    {
        "ResourceHealth",
        "Informational",
    },
    ExtraProperties =
    {
        { "Cause", "{{cause}}" },
        { "Current Health Status", "{{currentHealthStatus}}" },
        { "Previous Health Status", "{{previousHealthStatus}}" },
        { "Status", "{{activityLogStatus}}" },
        { "Subscription Id", "{{subscriptionId}}" },
    },
    User = "AzureResourceHealth",
    Alias = "{{resourceId}}-"+name,
    Priority = "P5",
    Source = "{{signalType}}",
    Message = "[Azure Resource Health]: {{resourceId.extract(/([^/]*)$/)}} {{title}}",
    Description = "{{details}}",
    Filters = new[]
    {
        new IntegrationActionCreateFilterArgs
        {
            Type = "match-all-conditions",
            Conditions = new[]
            {
                new IntegrationActionCreateFilterConditionArgs
                {
                    Field = "activityLogStatus",
                    Not = true,
                    Operation = "equals",
                    ExpectedValue = "Resolved",
                },
                new IntegrationActionCreateFilterConditionArgs
                {
                    Field = "level",
                    Operation = "equals",
                    ExpectedValue = "Informational",
                },
            },
        },
    },
    Responders = new[]
    {
        new IntegrationActionCreateResponderArgs
        {
            Id = responder.Id,
            Type = responder.Type,
        },
    },
}

Output of pulumi about

Dependencies:
NAME                                      VERSION
Azure.Security.KeyVault.Secrets           4.5.0
Microsoft.Extensions.DependencyInjection  8.0.0
Pulumi.Opsgenie                           1.3.2
CLI
Version      3.101.1
Go Version   go1.21.5
Go Compiler  gc

Plugins
NAME          VERSION
azure         5.57.0
azure-native  2.20.1
azuread       5.45.0
azuredevops   2.5.0
dotnet        unknown
opsgenie      1.3.2
random        4.14.0
time          0.0.16

Host
OS       Microsoft Windows 11 Pro
Version  10.0.22631 Build 22631
Arch     x86_64

Customer also tried with OpsGenie package v1.3.4 but with the same outcome.

Additional context

https://www.pulumi.com/registry/packages/opsgenie/api-docs/integrationaction/

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@ringods ringods added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Jan 15, 2024
@iwahbe iwahbe added bug/diff kind/bug related to Pulumi generating wrong diffs on preview or up. and removed needs-triage Needs attention from the triage team labels Jan 17, 2024
@iwahbe
Copy link
Member

iwahbe commented Jan 17, 2024

Thanks for reporting this @ringods. Notes on the issue: It is possible this is an upstream bug. Upstream has opsgenie/terraform-provider-opsgenie#418 which is related in behavior, but on a different resource.

@VenelinMartinov VenelinMartinov self-assigned this Mar 22, 2024
@VenelinMartinov
Copy link

Trying to sort out access - looks like our account does not have permissions on this resource so I can not test this. Will update once I sort that out.

@VenelinMartinov VenelinMartinov added the blocked The issue cannot be resolved without 3rd party action. label Apr 9, 2024
@mjeffryes mjeffryes modified the milestone: 0.107 Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked The issue cannot be resolved without 3rd party action. bug/diff kind/bug related to Pulumi generating wrong diffs on preview or up. kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

4 participants