Skip to content
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

Can't use patch source(s) with ssm_patch_baseline #4748

Closed
karnauskas opened this issue Jun 5, 2018 · 7 comments · Fixed by #11879
Closed

Can't use patch source(s) with ssm_patch_baseline #4748

karnauskas opened this issue Jun 5, 2018 · 7 comments · Fixed by #11879
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/ssm Issues and PRs that pertain to the ssm service.
Milestone

Comments

@karnauskas
Copy link

Looks like terraform module is missing configuration parameters to specify alternative patch sources/repositories.

This is available via sdk/api: https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/SSM/Types/PatchSource.html.

@radeksimko radeksimko added new-resource Introduces a new resource. service/ssm Issues and PRs that pertain to the ssm service. labels Jun 13, 2018
@vpadronblanco
Copy link
Contributor

Any reason why put this as a separate resource rather than a nested attribute?

@egirard78
Copy link

egirard78 commented Jan 9, 2019

Any news on this fix?? Currently we have to use a script with Boto3 (or AWS SDK) or the AWS CLI to configure the SSM patch baseline sources.

@bflad bflad added enhancement Requests to existing resources that expand the functionality or scope. and removed new-resource Introduces a new resource. labels Jan 9, 2019
@jdheyburn
Copy link
Contributor

This is feasible - although it is only for Linux OSs - I trust AWS are validating this against their API.

Proposed configuration:

resource "aws_ssm_patch_baseline" "production" {
  name             = "patch-baseline"
  description      = "Patch Baseline Description"
  operating_system = "CENTOS"

  # New param below
  patch_sources = ["abc123.com"]

  ...
}

Will try to pick this up in next few weeks.

@jdheyburn
Copy link
Contributor

jdheyburn commented Feb 3, 2020

Revising the proposed configuration for this:

resource "aws_ssm_patch_baseline" "production" {
  name             = "patch-baseline"
  description      = "Patch Baseline Description"
  operating_system = "CENTOS"

  # New param below
  patch_source {
    configuration = <<EOF
        <configuration_here>
    EOF

    name = "name123"
    products = ["Ubuntu..", "OtherProduct"]
  }

patch_source {
    ... # Another patch source
  }
  ...
}

These will then translate to a list of patch_sources. Validation to be performed on:

patch_source

  • type array of PatchSource objects
  • Max of 20 defined

PatchSource.Configuration

  • type string
  • Max length of 1024

PatchSource.Name

  • type string
  • regex: ^[a-zA-Z0-9_\-.]{3,50}$

PatchSource.Products

@bflad
Copy link
Contributor

bflad commented Feb 12, 2021

This functionality has been merged and will release with version 3.28.0 of the Terraform AWS Provider, later today. Thank you to @jdheyburn for the implementation. 👍

@ghost
Copy link

ghost commented Feb 12, 2021

This has been released in version 3.28.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!

@ghost
Copy link

ghost commented Mar 14, 2021

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Mar 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/ssm Issues and PRs that pertain to the ssm service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants