github.com/nathanielks/terraform@v0.6.1-0.20170509030759-13e1a62319dc/website/source/docs/providers/circonus/r/contact_group.html.markdown (about)

     1  ---
     2  layout: "circonus"
     3  page_title: "Circonus: circonus_contact_group"
     4  sidebar_current: "docs-circonus-resource-circonus_contact_group"
     5  description: |-
     6    Manages a Circonus Contact Group.
     7  ---
     8  
     9  # circonus\_contact_group
    10  
    11  The ``circonus_contact_group`` resource creates and manages a
    12  [Circonus Contact Group](https://login.circonus.com/user/docs/Alerting/ContactGroups).
    13  
    14  
    15  ## Usage
    16  
    17  ```hcl
    18  resource "circonus_contact_group" "myteam-alerts" {
    19    name = "MyTeam Alerts"
    20  
    21    email {
    22      user = "/user/1234"
    23    }
    24  
    25    email {
    26      user = "/user/5678"
    27    }
    28  
    29    email {
    30      address = "user@example.com"
    31    }
    32  
    33    http {
    34      address = "https://www.example.org/post/endpoint"
    35      format = "json"
    36      method = "POST"
    37    }
    38  
    39    irc {
    40      user = "/user/6331"
    41    }
    42  
    43    slack {
    44      channel = "#myteam"
    45      team = "T038UT13D"
    46    }
    47  
    48    sms {
    49      user = "/user/1234"
    50    }
    51  
    52    sms {
    53      address = "8005551212"
    54    }
    55  
    56    victorops {
    57      api_key = "xxxx"
    58      critical = 2
    59      info = 5
    60      team = "myteam"
    61      warning = 3
    62    }
    63  
    64    xmpp {
    65      user = "/user/9876"
    66    }
    67  
    68    aggregation_window = "5m"
    69  
    70    alert_option {
    71      severity = 1
    72      reminder = "5m"
    73      escalate_to = "/contact_group/4444"
    74    }
    75  
    76    alert_option {
    77      severity = 2
    78      reminder = "15m"
    79      escalate_after = "2h"
    80      escalate_to = "/contact_group/4444"
    81    }
    82  
    83    alert_option {
    84      severity = 3
    85      reminder = "24m"
    86      escalate_after = "3d"
    87      escalate_to = "/contact_group/4444"
    88    }
    89  }
    90  ```
    91  
    92  ## Argument Reference
    93  
    94  * `aggregation_window` - (Optional) The aggregation window for batching up alert
    95    notifications.
    96  
    97  * `alert_option` - (Optional) There is one `alert_option` per severity, where
    98    severity can be any number between 1 (high) and 5 (low).  If configured, the
    99    alerting system will remind or escalate alerts to further contact groups if an
   100    alert sent to this contact group is not acknowledged or resolved.  See below
   101    for details.
   102  
   103  * `email` - (Optional) Zero or more `email` attributes may be present to
   104    dispatch email to Circonus users by referencing their user ID, or by
   105    specifying an email address.  See below for details on supported attributes.
   106  
   107  * `http` - (Optional) Zero or more `http` attributes may be present to dispatch
   108    [Webhook/HTTP requests](https://login.circonus.com/user/docs/Alerting/ContactGroups#WebhookNotifications)
   109    by Circonus.  See below for details on supported attributes.
   110  
   111  * `irc` - (Optional) Zero or more `irc` attributes may be present to dispatch
   112    IRC notifications to users.  See below for details on supported attributes.
   113  
   114  * `long_message` - (Optional) The bulk of the message used in long form alert
   115    messages.
   116  
   117  * `long_subject` - (Optional) The subject used in long form alert messages.
   118  
   119  * `long_summary` - (Optional) The brief summary used in long form alert messages.
   120  
   121  * `name` - (Required) The name of the contact group.
   122  
   123  * `pager_duty` - (Optional) Zero or more `pager_duty` attributes may be present
   124    to dispatch to
   125    [Pager Duty teams](https://login.circonus.com/user/docs/Alerting/ContactGroups#PagerDutyOptions).
   126    See below for details on supported attributes.
   127  
   128  * `short_message` - (Optional) The subject used in short form alert messages.
   129  
   130  * `short_summary` - (Optional) The brief summary used in short form alert
   131    messages.
   132  
   133  * `slack` - (Optional) Zero or more `slack` attributes may be present to
   134    dispatch to Slack teams.  See below for details on supported attributes.
   135  
   136  * `sms` - (Optional) Zero or more `sms` attributes may be present to dispatch
   137    SMS messages to Circonus users by referencing their user ID, or by specifying
   138    an SMS Phone Number.  See below for details on supported attributes.
   139  
   140  * `tags` - (Optional) A list of tags attached to the Contact Group.
   141  
   142  * `victorops` - (Optional) Zero or more `victorops` attributes may be present
   143    to dispatch to
   144    [VictorOps teams](https://login.circonus.com/user/docs/Alerting/ContactGroups#VictorOps).
   145    See below for details on supported attributes.
   146  
   147  ## Supported Contact Group `alert_option` Attributes
   148  
   149  * `escalate_after` - (Optional) How long to wait before escalating an alert that
   150    is received at a given severity.
   151  
   152  * `escalate_to` - (Optional) The Contact Group ID who will receive the
   153    escalation.
   154  
   155  * `reminder` - (Optional) If specified, reminders will be sent after a user
   156    configurable number of minutes for open alerts.
   157  
   158  * `severity` - (Required) An `alert_option` must be assigned to a given severity
   159    level.  Valid severity levels range from 1 (highest severity) to 5 (lowest
   160    severity).
   161  
   162  ## Supported Contact Group `email` Attributes
   163  
   164  Either an `address` or `user` attribute is required.
   165  
   166  * `address` - (Optional) A well formed email address.
   167  
   168  * `user` - (Optional) An email will be sent to the email address of record for
   169    the corresponding user ID (e.g. `/user/1234`).
   170  
   171  A `user`'s email address is automatically maintained and kept up to date by the
   172  recipient, whereas an `address` provides no automatic layer of indirection for
   173  keeping the information accurate (including LDAP and SAML-based authentication
   174  mechanisms).
   175  
   176  ## Supported Contact Group `http` Attributes
   177  
   178  * `address` - (Required) URL to send a webhook request to.
   179  
   180  * `format` - (Optional) The payload of the request is a JSON-encoded payload
   181    when the `format` is set to `json` (the default).  The alternate payload
   182    encoding is `params`.
   183  
   184  * `method` - (Optional) The HTTP verb to use when making a request.  Either
   185    `GET` or `POST` may be specified. The default verb is `POST`.
   186  
   187  ## Supported Contact Group `irc` Attributes
   188  
   189  * `user` - (Required) When a user has configured IRC on their user account, they
   190    will receive an IRC notification.
   191  
   192  ## Supported Contact Group `pager_duty` Attributes
   193  
   194  * `contact_group_fallback` - (Optional) If there is a problem contacting
   195    PagerDuty, relay the notification automatically to the specified Contact Group
   196    (e.g. `/contact_group/1234`).
   197  
   198  * `service_key` - (Required) The PagerDuty Service Key.
   199  
   200  * `webhook_url` - (Required) The PagerDuty webhook URL that PagerDuty uses to
   201    notify Circonus of acknowledged actions.
   202  
   203  ## Supported Contact Group `slack` Attributes
   204  
   205  * `contact_group_fallback` - (Optional) If there is a problem contacting Slack,
   206    relay the notification automatically to the specified Contact Group
   207    (e.g. `/contact_group/1234`).
   208  
   209  * `buttons` - (Optional) Slack notifications can have acknowledgement buttons
   210    built into the notification message itself when enabled.  Defaults to `true`.
   211  
   212  * `channel` - (Required) Specify what Slack channel Circonus should send alerts
   213    to.
   214  
   215  * `team` - (Required) Specify what Slack team Circonus should look in for the
   216    aforementioned `channel`.
   217  
   218  * `username` - (Optional) Specify the username Circonus should advertise itself
   219    as in Slack.  Defaults to `Circonus`.
   220  
   221  ## Supported Contact Group `sms` Attributes
   222  
   223  Either an `address` or `user` attribute is required.
   224  
   225  * `address` - (Optional) SMS Phone Number to send a short notification to.
   226  
   227  * `user` - (Optional) An SMS page will be sent to the phone number of record for
   228    the corresponding user ID (e.g. `/user/1234`).
   229  
   230  A `user`'s phone number is automatically maintained and kept up to date by the
   231  recipient, whereas an `address` provides no automatic layer of indirection for
   232  keeping the information accurate (including LDAP and SAML-based authentication
   233  mechanisms).
   234  
   235  ## Supported Contact Group `victorops` Attributes
   236  
   237  * `contact_group_fallback` - (Optional) If there is a problem contacting
   238    VictorOps, relay the notification automatically to the specified Contact Group
   239    (e.g. `/contact_group/1234`).
   240  
   241  * `api_key` - (Required) The API Key for talking with VictorOps.
   242  
   243  * `critical` - (Required)
   244  * `info` - (Required)
   245  * `team` - (Required)
   246  * `warning` - (Required)
   247  
   248  ## Supported Contact Group `xmpp` Attributes
   249  
   250  Either an `address` or `user` attribute is required.
   251  
   252  * `address` - (Optional) XMPP address to send a short notification to.
   253  
   254  * `user` - (Optional) An XMPP notification will be sent to the XMPP address of
   255    record for the corresponding user ID (e.g. `/user/1234`).
   256  
   257  ## Import Example
   258  
   259  `circonus_contact_group` supports importing resources.  Supposing the following
   260  Terraform:
   261  
   262  ```hcl
   263  provider "circonus" {
   264    alias = "b8fec159-f9e5-4fe6-ad2c-dc1ec6751586"
   265  }
   266  
   267  resource "circonus_contact_group" "myteam" {
   268    name = "My Team's Contact Group"
   269  
   270    email {
   271      address = "myteam@example.com"
   272    }
   273  
   274    slack {
   275      channel = "#myteam"
   276      team = "T024UT03C"
   277    }
   278  }
   279  ```
   280  
   281  It is possible to import a `circonus_contact_group` resource with the following command:
   282  
   283  ```
   284  $ terraform import circonus_contact_group.myteam ID
   285  ```
   286  
   287  Where `ID` is the `_cid` or Circonus ID of the Contact Group
   288  (e.g. `/contact_group/12345`) and `circonus_contact_group.myteam` is the name of
   289  the resource whose state will be populated as a result of the command.