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

AWS SSM DoesNotExistException for missing Patch Baseline #4612

Closed
ghost opened this issue May 22, 2018 · 4 comments · Fixed by #5438
Closed

AWS SSM DoesNotExistException for missing Patch Baseline #4612

ghost opened this issue May 22, 2018 · 4 comments · Fixed by #5438
Labels
bug Addresses a defect in current functionality. good first issue Call to action for new contributors looking for a place to start. Smaller or straightforward issues. service/ssm Issues and PRs that pertain to the ssm service.
Milestone

Comments

@ghost
Copy link

ghost commented May 22, 2018

This issue was originally opened by @wjburn as hashicorp/terraform#18099. It was migrated here as a result of the provider split. The original body of the issue is below.


Terraform Version

Terraform v0.11.7
+ provider.aws v1.19.0
+ provider.random v1.1.0
+ provider.template v1.0.0

Terraform Configuration Files

resource "aws_ssm_patch_baseline" "patch-baseline" {
  provider         = "aws.proxy"
  name             = "${var.ssm_patch_baseline_name}"
  description      = "${var.ssm_patch_baseline_name}-${var.ssm_patch_baseline_os}"
  operating_system = "${var.ssm_patch_baseline_os}"

  approval_rule {
    approve_after_days = 7
    compliance_level   = "HIGH"

    patch_filter {
      key    = "PRODUCT"
      values = ["${var.ssm_patch_product_key}"]
    }
  }
}

resource "aws_ssm_patch_group" "patch-group" {
  provider    = "aws.proxy"
  baseline_id = "${aws_ssm_patch_baseline.patch-baseline.id}"
  patch_group = "${var.ssm_patch_baseline_group}"
}

Debug Output

Crash Output

* module.main.module.linux_baseline_patching.aws_ssm_patch_baseline.patch-baseline: aws_ssm_patch_baseline.patch-baseline: DoesNotExistException: Patch Baseline to be retrieved does not exist.
	status code: 400, request id: 51a0f33a-b940-4b95-a518-9eeeb0ee105f

Expected Behavior

terraform should re-create the missing aws patch baseline.

Actual Behavior

terraform crashes at 'terraform apply'

Steps to Reproduce

create an aws patch baseline
delete the patch baseline outside of terraform
terraform init (passes)
terraform apply (crash with above crash output)

Additional Context

References

@bflad bflad added service/ssm Issues and PRs that pertain to the ssm service. bug Addresses a defect in current functionality. good first issue Call to action for new contributors looking for a place to start. Smaller or straightforward issues. labels May 29, 2018
@jseiser
Copy link
Contributor

jseiser commented Jul 26, 2018

Same issue with Maintenance Windows.

* module.network.aws_ssm_maintenance_window.scan_window: 1 error(s) occurred:

* module.network.aws_ssm_maintenance_window.scan_window: aws_ssm_maintenance_window.scan_window: DoesNotExistException: Maintenance window mw-0967d3367d6166725 does not exist
	status code: 400, request id: 26b96960-0ec1-48d1-828a-c12d1fad40cf
* module.network.aws_ssm_maintenance_window.install_window: 1 error(s) occurred:

* module.network.aws_ssm_maintenance_window.install_window: aws_ssm_maintenance_window.install_window: DoesNotExistException: Maintenance window mw-0029976ce921415ef does not exist
	status code: 400, request id: c1dab474-986f-468b-8ef5-993aac875c05

@bflad
Copy link
Contributor

bflad commented Jul 26, 2018

@jseiser can you please open a separate issue? It ensures we cover each resource as necessary. Thanks!

@bflad
Copy link
Contributor

bflad commented Aug 9, 2018

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

@bflad bflad added this to the v1.31.0 milestone Aug 9, 2018
@ghost
Copy link
Author

ghost commented Apr 4, 2020

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 and limited conversation to collaborators Apr 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. good first issue Call to action for new contributors looking for a place to start. Smaller or straightforward issues. service/ssm Issues and PRs that pertain to the ssm service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants