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

     1  ---
     2  layout: "circonus"
     3  page_title: "Circonus: circonus_metric"
     4  sidebar_current: "docs-circonus-resource-circonus_metric"
     5  description: |-
     6    Manages a Circonus metric.
     7  ---
     8  
     9  # circonus\_metric
    10  
    11  The ``circonus_metric`` resource creates and manages a
    12  single [metric resource](https://login.circonus.com/resources/api/calls/metric)
    13  that will be instantiated only once a referencing `circonus_check` has been
    14  created.
    15  
    16  ## Usage
    17  
    18  ```hcl
    19  resource "circonus_metric" "used" {
    20    name  = "_usage`0`_used"
    21    type  = "numeric"
    22    units = "qty"
    23  
    24    tags = {
    25      author = "terraform"
    26      source = "circonus"
    27    }
    28  }
    29  ```
    30  
    31  ## Argument Reference
    32  
    33  * `active` - (Optional) A boolean indicating if the metric is being filtered out
    34    at the `circonus_check`'s collector(s) or not.
    35  
    36  * `name` - (Required) The name of the metric.  A `name` must be unique within a
    37    `circonus_check` and its meaning is `circonus_check.type` specific.
    38  
    39  * `tags` - (Optional) A list of tags assigned to the metric.
    40  
    41  * `type` - (Required) The type of metric.  This value must be present and can be
    42    one of the following values: `numeric`, `text`, `histogram`, `composite`, or
    43    `caql`.
    44  
    45  * `unit` - (Optional) The unit of measurement for this `circonus_metric`.
    46  
    47  ## Import Example
    48  
    49  `circonus_metric` supports importing resources.  Supposing the following
    50  Terraform:
    51  
    52  ```hcl
    53  provider "circonus" {
    54    alias = "b8fec159-f9e5-4fe6-ad2c-dc1ec6751586"
    55  }
    56  
    57  resource "circonus_metric" "usage" {
    58    name = "_usage`0`_used"
    59    type = "numeric"
    60    unit = "qty"
    61    tags = { source = "circonus" }
    62  }
    63  ```
    64  
    65  It is possible to import a `circonus_metric` resource with the following command:
    66  
    67  ```
    68  $ terraform import circonus_metric.usage ID
    69  ```
    70  
    71  Where `ID` is a random, never before used UUID and `circonus_metric.usage` is
    72  the name of the resource whose state will be populated as a result of the
    73  command.