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_patch_group - provider produced an unexpected new value for was present, but now absent. #13580

Closed
arq-anthonyw opened this issue Jun 2, 2020 · 2 comments · Fixed by #15213
Labels
bug Addresses a defect in current functionality. service/ssm Issues and PRs that pertain to the ssm service.
Milestone

Comments

@arq-anthonyw
Copy link

arq-anthonyw commented Jun 2, 2020

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

  • Terraform v0.12.26
  • provider.aws v2.64.0

Affected Resource(s)

  • aws_ssm_patch_group

Terraform Configuration Files

resource "aws_ssm_patch_group" "default_patch_group_amazon_linux" {
  count       = var.disable_defaults == false ? length(local.default_patch_groups) : 0
  depends_on  = [aws_ssm_patch_baseline.default]
  baseline_id = aws_ssm_patch_baseline.default[0].id
  patch_group = format(local.default_patch_groups[count.index], upper(lookup(aws_ssm_patch_baseline.default[0], "operating_system")))
}

Debug Output

2020-06-02T14:55:26.795+1000 [DEBUG] plugin.terraform-provider-aws_v2.61.0_x4.exe: 2020/06/02 14:55:26 [DEBUG] [aws-sdk-go] DEBUG: Request ssm/DescribePatchGroups Details:
2020-06-02T14:55:26.795+1000 [DEBUG] plugin.terraform-provider-aws_v2.61.0_x4.exe: ---[ REQUEST POST-SIGN ]-----------------------------
2020-06-02T14:55:26.795+1000 [DEBUG] plugin.terraform-provider-aws_v2.61.0_x4.exe: POST / HTTP/1.1
2020-06-02T14:55:26.795+1000 [DEBUG] plugin.terraform-provider-aws_v2.61.0_x4.exe: Host: ssm.ap-southeast-2.amazonaws.com
2020-06-02T14:55:26.795+1000 [DEBUG] plugin.terraform-provider-aws_v2.61.0_x4.exe: User-Agent: aws-sdk-go/1.30.21 (go1.13.7; windows; amd64) APN/1.0 HashiCorp/1.0 Terraform/0.12.26 (+https://www.terraform.io)
2020-06-02T14:55:26.795+1000 [DEBUG] plugin.terraform-provider-aws_v2.61.0_x4.exe: Content-Length: 2
2020-06-02T14:55:26.795+1000 [DEBUG] plugin.terraform-provider-aws_v2.61.0_x4.exe: Authorization: AWS4-HMAC-SHA256 Credential=AKIAZNGCZMH5GHMLEUAP/20200602/ap-southeast-2/ssm/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-date;x-amz-target, Signature=6dbda7caae9e9d73de15749c4c192652a0e83955acac18c8d099dd4f6420d8e3
2020-06-02T14:55:26.795+1000 [DEBUG] plugin.terraform-provider-aws_v2.61.0_x4.exe: Content-Type: application/x-amz-json-1.1
2020-06-02T14:55:26.795+1000 [DEBUG] plugin.terraform-provider-aws_v2.61.0_x4.exe: X-Amz-Date: 20200602T045526Z
2020-06-02T14:55:26.795+1000 [DEBUG] plugin.terraform-provider-aws_v2.61.0_x4.exe: X-Amz-Target: AmazonSSM.DescribePatchGroups
2020-06-02T14:55:26.795+1000 [DEBUG] plugin.terraform-provider-aws_v2.61.0_x4.exe: Accept-Encoding: gzip
2020-06-02T14:55:26.795+1000 [DEBUG] plugin.terraform-provider-aws_v2.61.0_x4.exe: 
2020-06-02T14:55:26.795+1000 [DEBUG] plugin.terraform-provider-aws_v2.61.0_x4.exe: {}
2020-06-02T14:55:26.795+1000 [DEBUG] plugin.terraform-provider-aws_v2.61.0_x4.exe: -----------------------------------------------------
2020-06-02T14:55:26.908+1000 [DEBUG] plugin.terraform-provider-aws_v2.61.0_x4.exe: 2020/06/02 14:55:26 [DEBUG] [aws-sdk-go] DEBUG: Response ssm/DescribePatchGroups Details:
2020-06-02T14:55:26.908+1000 [DEBUG] plugin.terraform-provider-aws_v2.61.0_x4.exe: ---[ RESPONSE ]--------------------------------------
2020-06-02T14:55:26.908+1000 [DEBUG] plugin.terraform-provider-aws_v2.61.0_x4.exe: HTTP/1.1 200 OK
2020-06-02T14:55:26.908+1000 [DEBUG] plugin.terraform-provider-aws_v2.61.0_x4.exe: Connection: close
2020-06-02T14:55:26.908+1000 [DEBUG] plugin.terraform-provider-aws_v2.61.0_x4.exe: Content-Type: application/x-amz-json-1.1
2020-06-02T14:55:26.908+1000 [DEBUG] plugin.terraform-provider-aws_v2.61.0_x4.exe: Date: Tue, 02 Jun 2020 04:55:25 GMT
2020-06-02T14:55:26.908+1000 [DEBUG] plugin.terraform-provider-aws_v2.61.0_x4.exe: X-Amzn-Requestid: 91d87e21-ede2-458a-af79-01f83cf687d1
2020-06-02T14:55:26.908+1000 [DEBUG] plugin.terraform-provider-aws_v2.61.0_x4.exe: 
2020-06-02T14:55:26.908+1000 [DEBUG] plugin.terraform-provider-aws_v2.61.0_x4.exe: 
2020-06-02T14:55:26.908+1000 [DEBUG] plugin.terraform-provider-aws_v2.61.0_x4.exe: -----------------------------------------------------
2020-06-02T14:55:26.908+1000 [DEBUG] plugin.terraform-provider-aws_v2.61.0_x4.exe: 2020/06/02 14:55:26 [DEBUG] [aws-sdk-go] {"Mappings":[{"BaselineIdentity":{"BaselineDescription":"ARQ Managed patch baseline for ARQ-Managed-AMAZON_LINUX-PatchBaseline-OS servers","BaselineId":"pb-0b65a18532ad52e26","BaselineName":"ARQ-Managed-AMAZON_LINUX-PatchBaseline-OS","DefaultBaseline":false,"OperatingSystem":"AMAZON_LINUX"},"PatchGroup":"AMAZON_LINUX-Catch-All-Patch-Group"},{"BaselineIdentity":{"BaselineDescription":"ARQ Managed patch baseline for ARQ-Managed-AMAZON_LINUX-PatchBaseline-OS servers","BaselineId":"pb-0b65a18532ad52e26","BaselineName":"ARQ-Managed-AMAZON_LINUX-PatchBaseline-OS","DefaultBaseline":false,"OperatingSystem":"AMAZON_LINUX"},"PatchGroup":"AMAZON_LINUX-Dev-Patch-Group"},{"BaselineIdentity":{"BaselineDescription":"ARQ Managed patch baseline for ARQ-Managed-AMAZON_LINUX-PatchBaseline-OS servers","BaselineId":"pb-0b65a18532ad52e26","BaselineName":"ARQ-Managed-AMAZON_LINUX-PatchBaseline-OS","DefaultBaseline":false,"OperatingSystem":"AMAZON_LINUX"},"PatchGroup":"AMAZON_LINUX-Dev-ap-southeast-2a-Patch-Group"},{"BaselineIdentity":{"BaselineDescription":"ARQ Managed patch baseline for ARQ-Managed-AMAZON_LINUX-PatchBaseline-OS servers","BaselineId":"pb-0b65a18532ad52e26","BaselineName":"ARQ-Managed-AMAZON_LINUX-PatchBaseline-OS","DefaultBaseline":false,"OperatingSystem":"AMAZON_LINUX"},"PatchGroup":"AMAZON_LINUX-Dev-ap-southeast-2b-Patch-Group"},{"BaselineIdentity":{"BaselineDescription":"ARQ Managed patch baseline for ARQ-Managed-AMAZON_LINUX-PatchBaseline-OS servers","BaselineId":"pb-0b65a18532ad52e26","BaselineName":"ARQ-Managed-AMAZON_LINUX-PatchBaseline-OS","DefaultBaseline":false,"OperatingSystem":"AMAZON_LINUX"},"PatchGroup":"AMAZON_LINUX-Dev-ap-southeast-2c-Patch-Group"},{"BaselineIdentity":{"BaselineDescription":"ARQ Managed patch baseline for ARQ-Managed-AMAZON_LINUX-PatchBaseline-OS servers","BaselineId":"pb-0b65a18532ad52e26","BaselineName":"ARQ-Managed-AMAZON_LINUX-PatchBaseline-OS","DefaultBaseline":false,"OperatingSystem":"AMAZON_LINUX"},"PatchGroup":"AMAZON_LINUX-Prod-Patch-Group"},{"BaselineIdentity":{"BaselineDescription":"ARQ Managed patch baseline for ARQ-Managed-AMAZON_LINUX-PatchBaseline-OS servers","BaselineId":"pb-0b65a18532ad52e26","BaselineName":"ARQ-Managed-AMAZON_LINUX-PatchBaseline-OS","DefaultBaseline":false,"OperatingSystem":"AMAZON_LINUX"},"PatchGroup":"AMAZON_LINUX-Prod-ap-southeast-2a-Patch-Group"},{"BaselineIdentity":{"BaselineDescription":"ARQ Managed patch baseline for ARQ-Managed-AMAZON_LINUX-PatchBaseline-OS servers","BaselineId":"pb-0b65a18532ad52e26","BaselineName":"ARQ-Managed-AMAZON_LINUX-PatchBaseline-OS","DefaultBaseline":false,"OperatingSystem":"AMAZON_LINUX"},"PatchGroup":"AMAZON_LINUX-Prod-ap-southeast-2b-Patch-Group"},{"BaselineIdentity":{"BaselineDescription":"ARQ Managed patch baseline for ARQ-Managed-AMAZON_LINUX-PatchBaseline-OS servers","BaselineId":"pb-0b65a18532ad52e26","BaselineName":"ARQ-Managed-AMAZON_LINUX-PatchBaseline-OS","DefaultBaseline":false,"OperatingSystem":"AMAZON_LINUX"},"PatchGroup":"AMAZON_LINUX-Prod-ap-southeast-2c-Patch-Group"},{"BaselineIdentity":{"BaselineDescription":"ARQ Managed patch baseline for ARQ-Managed-AMAZON_LINUX-PatchBaseline-OS servers","BaselineId":"pb-0b65a18532ad52e26","BaselineName":"ARQ-Managed-AMAZON_LINUX-PatchBaseline-OS","DefaultBaseline":false,"OperatingSystem":"AMAZON_LINUX"},"PatchGroup":"AMAZON_LINUX-UAT-Patch-Group"},{"BaselineIdentity":{"BaselineDescription":"ARQ Managed patch baseline for ARQ-Managed-AMAZON_LINUX-PatchBaseline-OS servers","BaselineId":"pb-0b65a18532ad52e26","BaselineName":"ARQ-Managed-AMAZON_LINUX-PatchBaseline-OS","DefaultBaseline":false,"OperatingSystem":"AMAZON_LINUX"},"PatchGroup":"AMAZON_LINUX-UAT-ap-southeast-2a-Patch-Group"},{"BaselineIdentity":{"BaselineDescription":"ARQ Managed patch baseline for ARQ-Managed-AMAZON_LINUX-PatchBaseline-OS servers","BaselineId":"pb-0b65a18532ad52e26","BaselineName":"ARQ-Managed-AMAZON_LINUX-PatchBaseline-OS","DefaultBaseline":false,"OperatingSystem":"AMAZON_LINUX"},"PatchGroup":"AMAZON_LINUX-UAT-ap-southeast-2b-Patch-Group"},{"BaselineIdentity":{"BaselineDescription":"ARQ Managed patch baseline for ARQ-Managed-AMAZON_LINUX-PatchBaseline-OS servers","BaselineId":"pb-0b65a18532ad52e26","BaselineName":"ARQ-Managed-AMAZON_LINUX-PatchBaseline-OS","DefaultBaseline":false,"OperatingSystem":"AMAZON_LINUX"},"PatchGroup":"AMAZON_LINUX-UAT-ap-southeast-2c-Patch-Group"},{"BaselineIdentity":{"BaselineDescription":"ARQ Managed patch baseline for ARQ-Managed-AMAZON_LINUX_2-PatchBaseline-OS servers","BaselineId":"pb-0d039962f3dd2aea3","BaselineName":"ARQ-Managed-AMAZON_LINUX_2-PatchBaseline-OS","DefaultBaseline":false,"OperatingSystem":"AMAZON_LINUX_2"},"PatchGroup":"AMAZON_LINUX_2-Catch-All-Patch-Group"},{"BaselineIdentity":{"BaselineDescription":"ARQ Managed patch baseline for ARQ-Managed-AMAZON_LINUX_2-PatchBaseline-OS servers","BaselineId":"pb-0d039962f3dd2aea3","BaselineName":"ARQ-Managed-AMAZON_LINUX_2-PatchBaseline-OS","DefaultBaseline":false,"OperatingSystem":"AMAZON_LINUX_2"},"PatchGroup":"AMAZON_LINUX_2-Dev-Patch-Group"},{"BaselineIdentity":{"BaselineDescription":"ARQ Managed patch baseline for ARQ-Managed-AMAZON_LINUX_2-PatchBaseline-OS servers","BaselineId":"pb-0d039962f3dd2aea3","BaselineName":"ARQ-Managed-AMAZON_LINUX_2-PatchBaseline-OS","DefaultBaseline":false,"OperatingSystem":"AMAZON_LINUX_2"},"PatchGroup":"AMAZON_LINUX_2-Dev-ap-southeast-2a-Patch-Group"},{"BaselineIdentity":{"BaselineDescription":"ARQ Managed patch baseline for ARQ-Managed-AMAZON_LINUX_2-PatchBaseline-OS servers","BaselineId":"pb-0d039962f3dd2aea3","BaselineName":"ARQ-Managed-AMAZON_LINUX_2-PatchBaseline-OS","DefaultBaseline":false,"OperatingSystem":"AMAZON_LINUX_2"},"PatchGroup":"AMAZON_LINUX_2-Dev-ap-southeast-2b-Patch-Group"},{"BaselineIdentity":{"BaselineDescription":"ARQ Managed patch baseline for ARQ-Managed-AMAZON_LINUX_2-PatchBaseline-OS servers","BaselineId":"pb-0d039962f3dd2aea3","BaselineName":"ARQ-Managed-AMAZON_LINUX_2-PatchBaseline-OS","DefaultBaseline":false,"OperatingSystem":"AMAZON_LINUX_2"},"PatchGroup":"AMAZON_LINUX_2-Dev-ap-southeast-2c-Patch-Group"},{"BaselineIdentity":{"BaselineDescription":"ARQ Managed patch baseline for ARQ-Managed-AMAZON_LINUX_2-PatchBaseline-OS servers","BaselineId":"pb-0d039962f3dd2aea3","BaselineName":"ARQ-Managed-AMAZON_LINUX_2-PatchBaseline-OS","DefaultBaseline":false,"OperatingSystem":"AMAZON_LINUX_2"},"PatchGroup":"AMAZON_LINUX_2-Prod-Patch-Group"},{"BaselineIdentity":{"BaselineDescription":"ARQ Managed patch baseline for ARQ-Managed-AMAZON_LINUX_2-PatchBaseline-OS servers","BaselineId":"pb-0d039962f3dd2aea3","BaselineName":"ARQ-Managed-AMAZON_LINUX_2-PatchBaseline-OS","DefaultBaseline":false,"OperatingSystem":"AMAZON_LINUX_2"},"PatchGroup":"AMAZON_LINUX_2-Prod-ap-southeast-2a-Patch-Group"},{"BaselineIdentity":{"BaselineDescription":"ARQ Managed patch baseline for ARQ-Managed-AMAZON_LINUX_2-PatchBaseline-OS servers","BaselineId":"pb-0d039962f3dd2aea3","BaselineName":"ARQ-Managed-AMAZON_LINUX_2-PatchBaseline-OS","DefaultBaseline":false,"OperatingSystem":"AMAZON_LINUX_2"},"PatchGroup":"AMAZON_LINUX_2-Prod-ap-southeast-2b-Patch-Group"},{"BaselineIdentity":{"BaselineDescription":"ARQ Managed patch baseline for ARQ-Managed-AMAZON_LINUX_2-PatchBaseline-OS servers","BaselineId":"pb-0d039962f3dd2aea3","BaselineName":"ARQ-Managed-AMAZON_LINUX_2-PatchBaseline-OS","DefaultBaseline":false,"OperatingSystem":"AMAZON_LINUX_2"},"PatchGroup":"AMAZON_LINUX_2-Prod-ap-southeast-2c-Patch-Group"},{"BaselineIdentity":{"BaselineDescription":"ARQ Managed patch baseline for ARQ-Managed-AMAZON_LINUX_2-PatchBaseline-OS servers","BaselineId":"pb-0d039962f3dd2aea3","BaselineName":"ARQ-Managed-AMAZON_LINUX_2-PatchBaseline-OS","DefaultBaseline":false,"OperatingSystem":"AMAZON_LINUX_2"},"PatchGroup":"AMAZON_LINUX_2-UAT-Patch-Group"},{"BaselineIdentity":{"BaselineDescription":"ARQ Managed patch baseline for ARQ-Managed-AMAZON_LINUX_2-PatchBaseline-OS servers","BaselineId":"pb-0d039962f3dd2aea3","BaselineName":"ARQ-Managed-AMAZON_LINUX_2-PatchBaseline-OS","DefaultBaseline":false,"OperatingSystem":"AMAZON_LINUX_2"},"PatchGroup":"AMAZON_LINUX_2-UAT-ap-southeast-2a-Patch-Group"},{"BaselineIdentity":{"BaselineDescription":"ARQ Managed patch baseline for ARQ-Managed-AMAZON_LINUX_2-PatchBaseline-OS servers","BaselineId":"pb-0d039962f3dd2aea3","BaselineName":"ARQ-Managed-AMAZON_LINUX_2-PatchBaseline-OS","DefaultBaseline":false,"OperatingSystem":"AMAZON_LINUX_2"},"PatchGroup":"AMAZON_LINUX_2-UAT-ap-southeast-2b-Patch-Group"},{"BaselineIdentity":{"BaselineDescription":"ARQ Managed patch baseline for ARQ-Managed-AMAZON_LINUX_2-PatchBaseline-OS servers","BaselineId":"pb-0d039962f3dd2aea3","BaselineName":"ARQ-Managed-AMAZON_LINUX_2-PatchBaseline-OS","DefaultBaseline":false,"OperatingSystem":"AMAZON_LINUX_2"},"PatchGroup":"AMAZON_LINUX_2-UAT-ap-southeast-2c-Patch-Group"},{"BaselineIdentity":{"BaselineDescription":"ARQ Managed patch baseline for ARQ-Managed-UBUNTU-PatchBaseline-OS servers","BaselineId":"pb-04127160dc9121f97","BaselineName":"ARQ-Managed-UBUNTU-PatchBaseline-OS","DefaultBaseline":false,"OperatingSystem":"UBUNTU"},"PatchGroup":"UBUNTU-Catch-All-Patch-Group"},{"BaselineIdentity":{"BaselineDescription":"ARQ Managed patch baseline for ARQ-Managed-UBUNTU-PatchBaseline-OS servers","BaselineId":"pb-04127160dc9121f97","BaselineName":"ARQ-Managed-UBUNTU-PatchBaseline-OS","DefaultBaseline":false,"OperatingSystem":"UBUNTU"},"PatchGroup":"UBUNTU-Dev-Patch-Group"},{"BaselineIdentity":{"BaselineDescription":"ARQ Managed patch baseline for ARQ-Managed-UBUNTU-PatchBaseline-OS servers","BaselineId":"pb-04127160dc9121f97","BaselineName":"ARQ-Managed-UBUNTU-PatchBaseline-OS","DefaultBaseline":false,"OperatingSystem":"UBUNTU"},"PatchGroup":"UBUNTU-Dev-ap-southeast-2a-Patch-Group"},{"BaselineIdentity":{"BaselineDescription":"ARQ Managed patch baseline for ARQ-Managed-UBUNTU-PatchBaseline-OS servers","BaselineId":"pb-04127160dc9121f97","BaselineName":"ARQ-Managed-UBUNTU-PatchBaseline-OS","DefaultBaseline":false,"OperatingSystem":"UBUNTU"},"PatchGroup":"UBUNTU-Dev-ap-southeast-2b-Patch-Group"},{"BaselineIdentity":{"BaselineDescription":"ARQ Managed patch baseline for ARQ-Managed-UBUNTU-PatchBaseline-OS servers","BaselineId":"pb-04127160dc9121f97","BaselineName":"ARQ-Managed-UBUNTU-PatchBaseline-OS","DefaultBaseline":false,"OperatingSystem":"UBUNTU"},"PatchGroup":"UBUNTU-Dev-ap-southeast-2c-Patch-Group"},{"BaselineIdentity":{"BaselineDescription":"ARQ Managed patch baseline for ARQ-Managed-UBUNTU-PatchBaseline-OS servers","BaselineId":"pb-04127160dc9121f97","BaselineName":"ARQ-Managed-UBUNTU-PatchBaseline-OS","DefaultBaseline":false,"OperatingSystem":"UBUNTU"},"PatchGroup":"UBUNTU-Prod-Patch-Group"},{"BaselineIdentity":{"BaselineDescription":"ARQ Managed patch baseline for ARQ-Managed-UBUNTU-PatchBaseline-OS servers","BaselineId":"pb-04127160dc9121f97","BaselineName":"ARQ-Managed-UBUNTU-PatchBaseline-OS","DefaultBaseline":false,"OperatingSystem":"UBUNTU"},"PatchGroup":"UBUNTU-Prod-ap-southeast-2a-Patch-Group"},{"BaselineIdentity":{"BaselineDescription":"ARQ Managed patch baseline for ARQ-Managed-UBUNTU-PatchBaseline-OS servers","BaselineId":"pb-04127160dc9121f97","BaselineName":"ARQ-Managed-UBUNTU-PatchBaseline-OS","DefaultBaseline":false,"OperatingSystem":"UBUNTU"},"PatchGroup":"UBUNTU-Prod-ap-southeast-2b-Patch-Group"},{"BaselineIdentity":{"BaselineDescription":"ARQ Managed patch baseline for ARQ-Managed-UBUNTU-PatchBaseline-OS servers","BaselineId":"pb-04127160dc9121f97","BaselineName":"ARQ-Managed-UBUNTU-PatchBaseline-OS","DefaultBaseline":false,"OperatingSystem":"UBUNTU"},"PatchGroup":"UBUNTU-Prod-ap-southeast-2c-Patch-Group"},{"BaselineIdentity":{"BaselineDescription":"ARQ Managed patch baseline for ARQ-Managed-UBUNTU-PatchBaseline-OS servers","BaselineId":"pb-04127160dc9121f97","BaselineName":"ARQ-Managed-UBUNTU-PatchBaseline-OS","DefaultBaseline":false,"OperatingSystem":"UBUNTU"},"PatchGroup":"UBUNTU-UAT-Patch-Group"},{"BaselineIdentity":{"BaselineDescription":"ARQ Managed patch baseline for ARQ-Managed-UBUNTU-PatchBaseline-OS servers","BaselineId":"pb-04127160dc9121f97","BaselineName":"ARQ-Managed-UBUNTU-PatchBaseline-OS","DefaultBaseline":false,"OperatingSystem":"UBUNTU"},"PatchGroup":"UBUNTU-UAT-ap-southeast-2a-Patch-Group"},{"BaselineIdentity":{"BaselineDescription":"ARQ Managed patch baseline for ARQ-Managed-UBUNTU-PatchBaseline-OS servers","BaselineId":"pb-04127160dc9121f97","BaselineName":"ARQ-Managed-UBUNTU-PatchBaseline-OS","DefaultBaseline":false,"OperatingSystem":"UBUNTU"},"PatchGroup":"UBUNTU-UAT-ap-southeast-2b-Patch-Group"},{"BaselineIdentity":{"BaselineDescription":"ARQ Managed patch baseline for ARQ-Managed-UBUNTU-PatchBaseline-OS servers","BaselineId":"pb-04127160dc9121f97","BaselineName":"ARQ-Managed-UBUNTU-PatchBaseline-OS","DefaultBaseline":false,"OperatingSystem":"UBUNTU"},"PatchGroup":"UBUNTU-UAT-ap-southeast-2c-Patch-Group"},{"BaselineIdentity":{"BaselineDescription":"ARQ Managed patch baseline for ARQ-Managed-WINDOWS-PatchBaseline-OS servers","BaselineId":"pb-08713fe59b92369f7","BaselineName":"ARQ-Managed-WINDOWS-PatchBaseline-OS","DefaultBaseline":false,"OperatingSystem":"WINDOWS"},"PatchGroup":"WINDOWS-Catch-All-Patch-Group"},{"BaselineIdentity":{"BaselineDescription":"ARQ Managed patch baseline for ARQ-Managed-WINDOWS-PatchBaseline-OS servers","BaselineId":"pb-08713fe59b92369f7","BaselineName":"ARQ-Managed-WINDOWS-PatchBaseline-OS","DefaultBaseline":false,"OperatingSystem":"WINDOWS"},"PatchGroup":"WINDOWS-Dev-Patch-Group"},{"BaselineIdentity":{"BaselineDescription":"ARQ Managed patch baseline for ARQ-Managed-WINDOWS-PatchBaseline-OS servers","BaselineId":"pb-08713fe59b92369f7","BaselineName":"ARQ-Managed-WINDOWS-PatchBaseline-OS","DefaultBaseline":false,"OperatingSystem":"WINDOWS"},"PatchGroup":"WINDOWS-Dev-ap-southeast-2a-Patch-Group"},{"BaselineIdentity":{"BaselineDescription":"ARQ Managed patch baseline for ARQ-Managed-WINDOWS-PatchBaseline-OS servers","BaselineId":"pb-08713fe59b92369f7","BaselineName":"ARQ-Managed-WINDOWS-PatchBaseline-OS","DefaultBaseline":false,"OperatingSystem":"WINDOWS"},"PatchGroup":"WINDOWS-Dev-ap-southeast-2b-Patch-Group"},{"BaselineIdentity":{"BaselineDescription":"ARQ Managed patch baseline for ARQ-Managed-WINDOWS-PatchBaseline-OS servers","BaselineId":"pb-08713fe59b92369f7","BaselineName":"ARQ-Managed-WINDOWS-PatchBaseline-OS","DefaultBaseline":false,"OperatingSystem":"WINDOWS"},"PatchGroup":"WINDOWS-Dev-ap-southeast-2c-Patch-Group"},{"BaselineIdentity":{"BaselineDescription":"ARQ Managed patch baseline for ARQ-Managed-WINDOWS-PatchBaseline-OS servers","BaselineId":"pb-08713fe59b92369f7","BaselineName":"ARQ-Managed-WINDOWS-PatchBaseline-OS","DefaultBaseline":false,"OperatingSystem":"WINDOWS"},"PatchGroup":"WINDOWS-Prod-Patch-Group"},{"BaselineIdentity":{"BaselineDescription":"ARQ Managed patch baseline for ARQ-Managed-WINDOWS-PatchBaseline-OS servers","BaselineId":"pb-08713fe59b92369f7","BaselineName":"ARQ-Managed-WINDOWS-PatchBaseline-OS","DefaultBaseline":false,"OperatingSystem":"WINDOWS"},"PatchGroup":"WINDOWS-Prod-ap-southeast-2a-Patch-Group"},{"BaselineIdentity":{"BaselineDescription":"ARQ Managed patch baseline for ARQ-Managed-WINDOWS-PatchBaseline-OS servers","BaselineId":"pb-08713fe59b92369f7","BaselineName":"ARQ-Managed-WINDOWS-PatchBaseline-OS","DefaultBaseline":false,"OperatingSystem":"WINDOWS"},"PatchGroup":"WINDOWS-Prod-ap-southeast-2b-Patch-Group"},{"BaselineIdentity":{"BaselineDescription":"ARQ Managed patch baseline for ARQ-Managed-WINDOWS-PatchBaseline-OS servers","BaselineId":"pb-08713fe59b92369f7","BaselineName":"ARQ-Managed-WINDOWS-PatchBaseline-OS","DefaultBaseline":false,"OperatingSystem":"WINDOWS"},"PatchGroup":"WINDOWS-Prod-ap-southeast-2c-Patch-Group"},{"BaselineIdentity":{"BaselineDescription":"ARQ Managed patch baseline for ARQ-Managed-WINDOWS-PatchBaseline-OS servers","BaselineId":"pb-08713fe59b92369f7","BaselineName":"ARQ-Managed-WINDOWS-PatchBaseline-OS","DefaultBaseline":false,"OperatingSystem":"WINDOWS"},"PatchGroup":"WINDOWS-UAT-Patch-Group"},{"BaselineIdentity":{"BaselineDescription":"ARQ Managed patch baseline for ARQ-Managed-WINDOWS-PatchBaseline-OS servers","BaselineId":"pb-08713fe59b92369f7","BaselineName":"ARQ-Managed-WINDOWS-PatchBaseline-OS","DefaultBaseline":false,"OperatingSystem":"WINDOWS"},"PatchGroup":"WINDOWS-UAT-ap-southeast-2a-Patch-Group"}],"NextToken":"AAEAAdf5oqwGd2eWeBL9x5ebkf8ZRVpWbABwfxLWPp/iAkyaAAAAAF7V276/jm41OhCqHhRucZTxqT2EG53exWuoMtTstt5pZ+siuzCOIlCrZvYHuuoSeHPwVfQyY5HFboNcw+8VBkqQ4Q+y3Ueu9fI0NaPnV0IXNXpz7RV8fp3Re1vUhjqgKM/V0mNS1C+lBA6US/+m1r2yPz11sq/aES40QqEaGjlV4lyYobJCgeXliC/UgMKulo6ZrAo0cLYvq41PA2e5d/aroR5xpmqAs2uVBAU5om+E5SJXVwxE+JjpIV8Z811SKgnBv2NdPrK6Li9LK+3vb1i5soXK1YD0yEs3P7q1Bxv1vAR7yrudj2SOZ+cUXYtA4xcDygUx3KZFYF3Inw8TZT4H910SNfQWG9A2RvHX9IcHpKmaxdexOjbCgob9hpndwuuOvyjZz2C7WmgsZzpoppbYsHj6xHkNIuLeHghCh+kb9r3/m2MyosZo0sIw2sGLhFhz0WRtMiyXjJvQoqktyHuEW27penNTMkAOrXqE3Szlfa0h6enB1OjOjI0KrAlG2LST698gwuJH4NYp7CKKJ6R5DMirAmOsbOf2RuDHavRg+589gPsxsrrGegHUHZPsIelC4wsZCXvnlmOiH/KTHClGJsrOGFRscpZ2mMijMBiE0M4vUB2QnicRKzS73/dmBhzGqYnLbIbEgA1K3zIyqWibOhO6BqMGZQVPggFMQ+PUhLbcs6sfnKL8E/nDVYTYAYtTAfqMRREPOZ/Bi7PzlnndPGGrRRs3CJg9PFKA0jaExnV3aoa2hrWw2OF7ECzV1Ph8BHThcDpsA29Q9uN/lJe3E1LFzz24skFf0kMfblQ2uvqgm4uYnrQbQ2LQlXHuxfA7EBlBAhJZP9oLtkjdooCvYfXy"}
2020-06-02T14:55:26.908+1000 [DEBUG] plugin.terraform-provider-aws_v2.61.0_x4.exe: 2020/06/02 14:55:26 [INFO] Patch Group not found. Removing from state

Expected Behavior

Resource aws_ssm_patch_group should be paginating the results and shouldn't be removing items from the state and be re-creating items that arleady exist

Actual Behavior

  # module.windows.aws_ssm_patch_group.default_patch_group[11] will be created
  + resource "aws_ssm_patch_group" "default_patch_group" {
      + baseline_id = "pb-08713fe59b92369f7"
      + id          = (known after apply)
      + patch_group = "WINDOWS-UAT-ap-southeast-2b-Patch-Group"
    }
  # module.windows.aws_ssm_patch_group.default_patch_group[12] will be created
  + resource "aws_ssm_patch_group" "default_patch_group" {
      + baseline_id = "pb-08713fe59b92369f7"
      + id          = (known after apply)
      + patch_group = "WINDOWS-UAT-ap-southeast-2c-Patch-Group"
    }

resource aws_ssm_patch_group appears to not be paginating the results when it runs DescribePatchGroups so if you have a certain number of patch groups that exceed the first page terraform will think the item doesn't exist in AWS and consequently remove the item from the the state and want to re-create the item but fails with the following since it already exists

Error: Provider produced inconsistent result after apply
When applying changes to
module.windows.aws_ssm_patch_group.default_patch_group[11], provider
"registry.terraform.io/-/aws" produced an unexpected new value for was
present, but now absent.
This is a bug in the provider, which should be reported in the provider's own
issue tracker.

Steps to Reproduce

  1. On your first terraform apply run create a large number of patch groups that exceed the first page of results returned from the API (Should be 50+ patch groups)
  2. Run terraform apply a second time and terraform will want to re-create the patch groups that were not displayed on the first page of the returned results from the API when it runs DescribePatchGroups
@ghost ghost added the service/ssm Issues and PRs that pertain to the ssm service. label Jun 2, 2020
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Jun 2, 2020
@anGie44 anGie44 added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Mar 17, 2021
@anGie44 anGie44 added this to the v3.33.0 milestone Mar 17, 2021
@ghost
Copy link

ghost commented Mar 18, 2021

This has been released in version 3.33.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 Apr 16, 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 Apr 16, 2021
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. service/ssm Issues and PRs that pertain to the ssm service.
Projects
None yet
2 participants