Skip to content

Add ssm patch support #104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 53 commits into from
Jul 2, 2021
Merged

Add ssm patch support #104

merged 53 commits into from
Jul 2, 2021

Conversation

jamengual
Copy link
Contributor

what

  • move ssm to its own file
  • fix invalid resource reference

why

  • patch fix

@jamengual jamengual requested review from a team as code owners June 27, 2021 04:10
@jamengual jamengual requested a review from jhosteny June 27, 2021 04:10
@jamengual
Copy link
Contributor Author

/test all

1 similar comment
@jamengual
Copy link
Contributor Author

/test all

@jamengual
Copy link
Contributor Author

/test all

Copy link

@bridgecrew bridgecrew bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bridgecrew has found 1 infrastructure configuration error in this PR ⬇️

@aknysh
Copy link
Member

aknysh commented Jul 1, 2021

@jamengual

I'd rename

variable "ssm_patch_manager_iam_policy" {
  type        = string
  default     = null
  description = "IAM policy to allow Patch manager to manage the instance"
}

to

variable "ssm_patch_manager_iam_policy_arn" {
  type        = string
  default     = null
  description = "IAM policy ARN to allow Patch Manager to manage the instance. If not provided, `arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore` will be used"
}

ssm_patch.tf Outdated
}

module "label_ssm_patch_s3_log_policy" {
enabled = local.ssm_patch_log_bucket_enabled
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

source and version should be before any other attributes

aknysh
aknysh previously approved these changes Jul 1, 2021
Copy link
Member

@aknysh aknysh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please see comments

Co-authored-by: Andriy Knysh <[email protected]>
Copy link

@bridgecrew bridgecrew bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bridgecrew has found 1 infrastructure configuration error in this PR ⬇️

Copy link

@bridgecrew bridgecrew bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bridgecrew has found 1 infrastructure configuration error in this PR ⬇️

@jamengual
Copy link
Contributor Author

please see comments

Fixed

@jamengual
Copy link
Contributor Author

/test all

@jamengual
Copy link
Contributor Author

/test all

@jamengual
Copy link
Contributor Author

/test all

main.tf Outdated
@@ -1,7 +1,7 @@
locals {
enabled = module.this.enabled
instance_count = local.enabled ? 1 : 0
volume_count = var.ebs_volume_count > 0 && local.instance_count > 0 ? var.ebs_volume_count : 0
volume_count = local.enabled && var.ebs_volume_count > 0 ? var.ebs_volume_count : 0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why removing local.instance_coun > 0 ?
Volumes are attached to instances, so if instance_count = 0 we prob should not try to attach

aknysh
aknysh previously approved these changes Jul 2, 2021
@jamengual
Copy link
Contributor Author

/test all

@jamengual jamengual merged commit f5c4e19 into master Jul 2, 2021
@jamengual jamengual deleted the add_ssm_patch_support branch July 2, 2021 04:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants