

Terraform module to provision SSM scheme. Sets up task and patch window to apply to instances tagged with PatchGroup Key and a set value.
It’s 100% Open Source and licensed under the APACHE2.
module "ssmpatching" {
source = "JamesWoolfenden/ssmpatching/aws"
version = "0.1.7"
common_tags = var.common_tags
patchbaseline_arn_id = var.patchbaseline_arn_id
patchgroup = var.patchgroup
cron = var.cron
task = var.task
}
No requirements.
Name | Version |
---|---|
aws | n/a |
No modules.
Name | Type |
---|---|
aws_iam_role.patchaccess | resource |
aws_iam_role_policy.patchaccess | resource |
aws_ssm_maintenance_window.production | resource |
aws_ssm_maintenance_window_target.target | resource |
aws_ssm_maintenance_window_task.task | resource |
aws_ssm_patch_group.patchgroup | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
cron | The Cron statement to control the patch schedule | string |
n/a | yes |
patchbaseline_arn_id | This is an AWS variable that describe the patch baseline | string |
n/a | yes |
patchgroup | A named group of servers to apply tasks to | string |
n/a | yes |
task | Contains the task details and command | map |
{ |
no |
Name | Description |
---|---|
maintenance_window | n/a |
patchgroup | n/a |
task | n/a |
window_target | n/a |
This is the policy required to build this project:
The Terraform resource required is:
resource "aws_iam_policy" "terraform_pike" {
name_prefix = "terraform_pike"
path = "https://github.com/"
description = "Pike Autogenerated policy from IAC"
policy = jsonencode({
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"iam:CreateRole",
"iam:DeleteRole",
"iam:DeleteRolePolicy",
"iam:GetRole",
"iam:GetRolePolicy",
"iam:ListAttachedRolePolicies",
"iam:ListInstanceProfilesForRole",
"iam:ListRolePolicies",
"iam:PutRolePolicy"
],
"Resource": "*"
},
{
"Sid": "VisualEditor1",
"Effect": "Allow",
"Action": [
"ssm:CreateMaintenanceWindow",
"ssm:DeleteMaintenanceWindow",
"ssm:DeregisterPatchBaselineForPatchGroup",
"ssm:DeregisterTargetFromMaintenanceWindow",
"ssm:DeregisterTaskFromMaintenanceWindow",
"ssm:DescribeMaintenanceWindowTargets",
"ssm:DescribeMaintenanceWindowTasks",
"ssm:DescribePatchGroups",
"ssm:GetMaintenanceWindow",
"ssm:ListTagsForResource",
"ssm:RegisterPatchBaselineForPatchGroup",
"ssm:RegisterTargetWithMaintenanceWindow",
"ssm:RegisterTaskWithMaintenanceWindow",
"ssm:UpdateMaintenanceWindow"
],
"Resource": "*"
}
]
})
}
Check out these related projects.
- terraform-aws-s3 – S3 buckets
Got a question?
File a GitHub issue.
Please use the issue tracker to report any bugs or file feature requests.
Copyright © 2019-2022 James Woolfenden
See LICENSE for full details.
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Leave a Reply