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

     1  ---
     2  layout: "aws"
     3  page_title: "AWS: aws_ssm_maintenance_window_task"
     4  sidebar_current: "docs-aws-resource-ssm-maintenance-window-task"
     5  description: |-
     6    Provides an SSM Maintenance Window Task resource
     7  ---
     8  
     9  # aws_ssm_maintenance_window_task
    10  
    11  Provides an SSM Maintenance Window Task resource
    12  
    13  ## Example Usage
    14  
    15  ```hcl
    16  resource "aws_ssm_maintenance_window" "window" {
    17    name = "maintenance-window-%s"
    18    schedule = "cron(0 16 ? * TUE *)"
    19    duration = 3
    20    cutoff = 1
    21  }
    22  
    23  resource "aws_ssm_maintenance_window_task" "target" {
    24    window_id = "${aws_ssm_maintenance_window.window.id}"
    25    task_type = "RUN_COMMAND"
    26    task_arn = "AWS-RunShellScript"
    27    priority = 1
    28    service_role_arn = "arn:aws:iam::187416307283:role/service-role/AWS_Events_Invoke_Run_Command_112316643"
    29    max_concurrency = "2"
    30    max_errors = "1"
    31    targets {
    32      key = "InstanceIds"
    33      values = ["${aws_instance.instance.id}"]
    34    }
    35  }
    36  
    37  resource "aws_instance" "instance" {
    38    ami = "ami-4fccb37f"
    39  
    40    instance_type = "m1.small"
    41  }
    42  ```
    43  
    44  ## Argument Reference
    45  
    46  The following arguments are supported:
    47  
    48  * `window_id` - (Required) The Id of the maintenance window to register the task with.
    49  * `max_concurrency` - (Required) The maximum number of targets this task can be run for in parallel.
    50  * `max_errors` - (Required) The maximum number of errors allowed before this task stops being scheduled.
    51  * `task_type` - (Required) The type of task being registered. The only allowed value is `RUN_COMMAND`.
    52  * `task_arn` - (Required) The ARN of the task to execute.
    53  * `service_role_arn` - (Required) The role that should be assumed when executing the task.
    54  * `targets` - (Required) The targets (either instances or tags). Instances are specified using Key=instanceids,Values=instanceid1,instanceid2. Tags are specified using Key=tag name,Values=tag value.
    55  * `priority` - (Optional) The priority of the task in the Maintenance Window, the lower the number the higher the priority. Tasks in a Maintenance Window are scheduled in priority order with tasks that have the same priority scheduled in parallel.
    56  * `logging_info` - (Optional) A structure containing information about an Amazon S3 bucket to write instance-level logs to. Documented below.
    57  
    58  `logging_info` supports the following:
    59  
    60  * `s3_bucket_name` - (Required)
    61  * `s3_region` - (Required)
    62  * `s3_bucket_prefix` - (Optional)
    63  
    64  ## Attributes Reference
    65  
    66  The following attributes are exported:
    67  
    68  * `id` - The ID of the maintenance window task.