Skip to content

Support for MS Teams Workflow URL in conformity_communication_setting Resource #88

@fen9li

Description

@fen9li

Hey Support Team,

As the Microsoft Teams Channel Connector is scheduled for end of service soon, I am transitioning to using MS Teams Workflows instead. However, the Terraform provider fails to accept the new workflow posting URL due to a validation error.

Here’s the error I received when applying the Terraform configuration:

[2025-06-13T05:59:40.099Z] │ Error: {"errors":[{"status":422,"source":{"pointer":"/data/attributes/configuration/url"},"detail":"URL must follow the pattern `https://<organisation-name>.webhook.office.com/webhookb2/`."}]}
[2025-06-13T05:59:40.099Z] │   with conformity_communication_setting.ebs_volumes_unattached,
[2025-06-13T05:59:40.099Z] │   on settings_communication_ms_teams.tf line 1, in resource "conformity_communication_setting" "ebs_volumes_unattached":
[2025-06-13T05:59:40.099Z] │    1: resource "conformity_communication_setting" "ebs_volumes_unattached" {

Based on my investigation, the validation appears to be enforced at the Terraform provider level in this source code:
https://github.com/trendmicro/terraform-provider-conformity/blob/main/conformity/resource_conformity_communication_setting.go#L92-L95

✅ Working (Channel Connector) Configuration

resource "conformity_communication_setting" "ebs_volumes_unattached" {
  ms_teams {
    channel               = "<channel-id>"
    channel_name          = "<my-channel-name>" # must be < 20 chars
    display_extra_data    = true
    display_introduced_by = true
    display_resource      = true
    display_tags          = true
    url                   = "https://onet2.webhook.office.com/webhookb2/<channel-id>/IncomingWebhook/<token>"
  }

  filter {
    rule_ids = ["EBS-003"]
  }

  relationships {
    organisation {
      id = "<org-id>"
    }
  }
}

❌ Not Working (Teams Workflow) Configuration

resource "conformity_communication_setting" "ebs_volumes_unattached" {
  ms_teams {
    channel               = "*@*"
    channel_name          = "<my-channel-name>"
    display_extra_data    = true
    display_introduced_by = true
    display_resource      = true
    display_tags          = true
    url                   = "https://prod-##.australiasoutheast.logic.azure.com:443/workflows/<workflow-id>/triggers/manual/paths/invoke?api-version=2016-06-01&sp=..."
  }

  filter {
    rule_ids = ["EBS-003"]
  }

  relationships {
    organisation {
      id = "<org-id>"
    }
  }
}

❓ Request
Could you please advise on:

  1. How to use MS Teams Workflow URLs with the Terraform provider?
  2. Whether this validation can be relaxed or made configurable, considering Microsoft’s direction to retire the connector-based integration?

Thank you in advance for your support.

Kind regards,
Feng Li
PS: I am paid Cloud One Conformity user. Please let me know if you want me to log a support ticket. Cheers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions