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

Add support for setting default SSM patch baseline #3342

Closed
mjseid opened this issue Feb 12, 2018 · 10 comments · Fixed by #27610
Closed

Add support for setting default SSM patch baseline #3342

mjseid opened this issue Feb 12, 2018 · 10 comments · Fixed by #27610
Assignees
Labels
new-resource Introduces a new resource. service/ssm Issues and PRs that pertain to the ssm service.
Milestone

Comments

@mjseid
Copy link

mjseid commented Feb 12, 2018

Hello,
After creating new SSM patch baselines with terraform, I'd like the ability to also set them as defaults. Basically what this API call is doing:
https://docs.aws.amazon.com/sdk-for-go/api/service/ssm/#SSM.RegisterDefaultPatchBaseline

So I'm not sure if it would make more sense to update the existing aws_ssm_patch_baseline resource with an optional "default" arugment, or to create a whole new resource just for this.

@bflad bflad added the service/ssm Issues and PRs that pertain to the ssm service. label Feb 13, 2018
@KarimDevOps
Copy link

Hi,
I'm facing the same issue, do you have an idea when this setting will be implemented ?
Many thanks in advance.

@nbrys
Copy link
Contributor

nbrys commented Aug 27, 2018

We need this as well

@nbrys
Copy link
Contributor

nbrys commented Dec 5, 2018

Is there any update on this issue?

@claydanford
Copy link
Contributor

For the presentation, this could be implemented with a boolean.

resource "aws_ssm_patch_baseline" "production" {
  name             = "patch-baseline"
  description      = "Patch Baseline Description"
  default          = true

  ...

}

@bbakersmith
Copy link

bbakersmith commented Feb 12, 2019

A possible issue with adding this as an option on the aws_ssm_patch_baseline resource is that you can't delete the resource or change that value after setting it to true, first you would have to set a different baseline as the default.

As a workaround, I used a local-exec provisioner on the resource to make an AWS CLI call to register my baseline as the default.

@claydanford
Copy link
Contributor

A possible issue with adding this as an option on the aws_ssm_patch_baseline resource is that you can't delete the resource or change that value after setting it to true, first you would have to set a different baseline as the default.

As a workaround, I used a local-exec provisioner on the resource to make an AWS CLI call to register my baseline as the default.

Yes, changing the patch baseline as default and then making a change would require a new resource to be made which could cascade down into patch group assignment. It would make sense to create a resource that assigns the default patch baseline, but like you said a local exec execution would also accomplish this.

@rentiak
Copy link

rentiak commented May 14, 2020

One option here would be to use the AWS-provided baselines as the 'safe' default as they exist, can't be deleted and can be filtered out by owner == AWS. Resource destruction or a change in the attribute to false could just revert to the AWS default for the specified OS (AWS-DefaultPatchBaseline for Windows, AWS-${OS}DefaultPatchBaseline for everything else)

@debu99
Copy link

debu99 commented Feb 26, 2021

any update?

@anGie44 anGie44 self-assigned this Mar 28, 2022
@anGie44 anGie44 removed their assignment Apr 21, 2022
@gdavison gdavison self-assigned this Oct 27, 2022
@github-actions github-actions bot added this to the v4.38.0 milestone Nov 3, 2022
@github-actions
Copy link

github-actions bot commented Nov 3, 2022

This functionality has been released in v4.38.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. Thank you!

@github-actions
Copy link

github-actions bot commented Dec 4, 2022

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
new-resource Introduces a new resource. service/ssm Issues and PRs that pertain to the ssm service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.