Code Monkey home page Code Monkey logo

Comments (5)

adikus avatar adikus commented on August 11, 2024 1

@mkochco Thanks for the report!

I think our docs might be wrong on this - try using the content attribute on the field instead of content_after.
Only match_between should be using content_before and content_after, unlike what the docs say.
I'll change the docs if that proves to help.

from terraform-provider-better-uptime.

mkochco avatar mkochco commented on August 11, 2024

I think this might be related to a deeper issue with support for fields. I've worked around #52 and am able to import existing email integrations. Those integrations have been configured with Incident Cause and Alert ID extractions matching the fields above. When I import into the terraform state, the import succeeds, but the field states are empty ( see acknowledged_alert_id_field, cause_field, resolved_alert_id_field, and started_alert_id_field in the tfstate below

    {
      "module": "module.integrations",
      "mode": "managed",
      "type": "betteruptime_email_integration",
      "name": "solarwinds_events",
      "provider": "provider[\"registry.terraform.io/betterstackhq/better-uptime\"]",
      "instances": [
        {
          "schema_version": 0,
          "attributes": {
            "acknowledged_alert_id_field": [],
            "acknowledged_rule_type": "unused",
            "acknowledged_rules": [],
            "call": false,
            "cause_field": [],
            "email": true,
            "email_address": "<redacted>",
            "id": "13293",
            "name": "SolarWinds Events",
            "other_acknowledged_fields": [],
            "other_resolved_fields": [],
            "other_started_fields": [],
            "paused": false,
            "policy_id": "<redacted>",
            "push": true,
            "recovery_period": 0,
            "resolved_alert_id_field": [],
            "resolved_rule_type": "any",
            "resolved_rules": [
              {
                "content": "[AppOptics] Alert REST-API-Lambda-Error-Rate-DEV has cleared",
                "match_type": "contains",
                "rule_target": "subject",
                "target_field": ""
              }
            ],
            "sms": false,
            "started_alert_id_field": [],
            "started_rule_type": "any",
            "started_rules": [
              {
                "content": "[AppOptics] Alert REST-API-Lambda-Error-Rate-DEV has triggered",
                "match_type": "contains",
                "rule_target": "subject",
                "target_field": ""
              }
            ],
            "team_wait": 180
          },
          "sensitive_attributes": [],
          "private": "<redacted>"
        }
      ]
    },

from terraform-provider-better-uptime.

mkochco avatar mkochco commented on August 11, 2024

Yep. That was it. Everything worked as expected when using match_after and content

from terraform-provider-better-uptime.

mkochco avatar mkochco commented on August 11, 2024

I think I found another issue with match_between (I think the content_after and content_before are applied out of order). I'll enter another issue once I have that confirmed.

CONFIRMED - see #54

from terraform-provider-better-uptime.

gyfis avatar gyfis commented on August 11, 2024

@mkochco Hi again Mark! I think this issue can be closed, right?

from terraform-provider-better-uptime.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.