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

     1  ---
     2  layout: "aws"
     3  page_title: "AWS: aws_ssm_document"
     4  sidebar_current: "docs-aws-resource-ssm-document"
     5  description: |-
     6    Provides an SSM Document resource
     7  ---
     8  
     9  # aws\_ssm\_document
    10  
    11  Provides an SSM Document resource
    12  
    13  ~> **NOTE on updating SSM documents:** Only documents with a schema version of 2.0
    14  or greater can update their content once created, see [SSM Schema Features][1]. To update a document with an older
    15  schema version you must recreate the resource.
    16  
    17  ## Example Usage
    18  
    19  ```hcl
    20  resource "aws_ssm_document" "foo" {
    21    name          = "test_document"
    22    document_type = "Command"
    23  
    24    content = <<DOC
    25    {
    26      "schemaVersion": "1.2",
    27      "description": "Check ip configuration of a Linux instance.",
    28      "parameters": {
    29  
    30      },
    31      "runtimeConfig": {
    32        "aws:runShellScript": {
    33          "properties": [
    34            {
    35              "id": "0.aws:runShellScript",
    36              "runCommand": ["ifconfig"]
    37            }
    38          ]
    39        }
    40      }
    41    }
    42  DOC
    43  }
    44  ```
    45  
    46  ## Argument Reference
    47  
    48  The following arguments are supported:
    49  
    50  * `name` - (Required) The name of the document.
    51  * `content` - (Required) The json content of the document.
    52  * `document_type` - (Required) The type of the document. Valid document types include: `Command`, `Policy` and `Automation`
    53  * `permissions` - (Optional) Additional Permissions to attach to the document. See [Permissions](#permissions) below for details.
    54  
    55  ## Attributes Reference
    56  
    57  The following attributes are exported:
    58  
    59  * `name` - The name of the document.
    60  * `content` -  The json content of the document.
    61  * `created_date` - The date the document was created.
    62  * `description` - The description of the document.
    63  * `schema_version` - The schema version of the document.
    64  * `document_type` - The type of document created.
    65  * `default_version` - The default version of the document.
    66  * `hash` - The sha1 or sha256 of the document content
    67  * `hash_type` - "Sha1" "Sha256". The hashing algorithm used when hashing the content.
    68  * `latest_version` - The latest version of the document.
    69  * `owner` - The AWS user account of the person who created the document.
    70  * `status` - "Creating", "Active" or "Deleting". The current status of the document.
    71  * `parameter` - The parameters that are available to this document.
    72  * `permissions` - The permissions of how this document should be shared.
    73  * `platform_types` - A list of OS platforms compatible with this SSM document, either "Windows" or "Linux".
    74  
    75  [1]: http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-ssm-docs.html#document-schemas-features
    76  
    77  ## Permissions
    78  
    79  The permissions attribute specifies how you want to share the document. If you share a document privately,
    80  you must specify the AWS user account IDs for those people who can use the document. If you share a document
    81  publicly, you must specify All as the account ID.
    82  
    83  The permissions mapping supports the following:
    84  
    85  * `type` - The permission type for the document. The permission type can be `Share`.
    86  * `account_ids` - The AWS user accounts that should have access to the document. The account IDs can either be a group of account IDs or `All`.