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

r/aws_cloudwatch_log_group: Remove default value (STANDARD) for log_group_class argument and mark as Computed #34812

Merged
merged 4 commits into from
Dec 8, 2023

Conversation

ewbankkit
Copy link
Contributor

@ewbankkit ewbankkit commented Dec 8, 2023

Description

Change aws_cloudwatch_log_group.log_group_class to Computed as it's not (yet) supported in AWS GovCloud (US) or AWS China.

Relations

Closes #34810.
Closes #34809.

Output from Acceptance Testing

AWS Commercial

% make testacc TESTARGS='-run=TestAccLogsGroup_\|TestAccLogsGroupDataSource_' PKG=logs ACCTEST_PARALLELISM=3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/logs/... -v -count 1 -parallel 3  -run=TestAccLogsGroup_\|TestAccLogsGroupDataSource_ -timeout 360m
=== RUN   TestAccLogsGroupDataSource_basic
=== PAUSE TestAccLogsGroupDataSource_basic
=== RUN   TestAccLogsGroup_basic
=== PAUSE TestAccLogsGroup_basic
=== RUN   TestAccLogsGroup_nameGenerate
=== PAUSE TestAccLogsGroup_nameGenerate
=== RUN   TestAccLogsGroup_namePrefix
=== PAUSE TestAccLogsGroup_namePrefix
=== RUN   TestAccLogsGroup_disappears
=== PAUSE TestAccLogsGroup_disappears
=== RUN   TestAccLogsGroup_tags
=== PAUSE TestAccLogsGroup_tags
=== RUN   TestAccLogsGroup_kmsKey
=== PAUSE TestAccLogsGroup_kmsKey
=== RUN   TestAccLogsGroup_logGroupClass
=== PAUSE TestAccLogsGroup_logGroupClass
=== RUN   TestAccLogsGroup_retentionPolicy
=== PAUSE TestAccLogsGroup_retentionPolicy
=== RUN   TestAccLogsGroup_multiple
=== PAUSE TestAccLogsGroup_multiple
=== RUN   TestAccLogsGroup_skipDestroy
=== PAUSE TestAccLogsGroup_skipDestroy
=== CONT  TestAccLogsGroupDataSource_basic
=== CONT  TestAccLogsGroup_kmsKey
=== CONT  TestAccLogsGroup_namePrefix
--- PASS: TestAccLogsGroupDataSource_basic (15.62s)
=== CONT  TestAccLogsGroup_tags
--- PASS: TestAccLogsGroup_namePrefix (25.85s)
=== CONT  TestAccLogsGroup_nameGenerate
--- PASS: TestAccLogsGroup_nameGenerate (24.97s)
=== CONT  TestAccLogsGroup_multiple
--- PASS: TestAccLogsGroup_kmsKey (62.33s)
=== CONT  TestAccLogsGroup_logGroupClass
--- PASS: TestAccLogsGroup_tags (54.93s)
=== CONT  TestAccLogsGroup_skipDestroy
--- PASS: TestAccLogsGroup_multiple (18.86s)
=== CONT  TestAccLogsGroup_disappears
--- PASS: TestAccLogsGroup_logGroupClass (19.89s)
=== CONT  TestAccLogsGroup_retentionPolicy
--- PASS: TestAccLogsGroup_skipDestroy (21.16s)
=== CONT  TestAccLogsGroup_basic
--- PASS: TestAccLogsGroup_disappears (23.18s)
--- PASS: TestAccLogsGroup_basic (24.58s)
--- PASS: TestAccLogsGroup_retentionPolicy (50.51s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/logs	138.605s

AWS GovCloud (US)

% make testacc TESTARGS='-run=TestAccLogsGroup_\|TestAccLogsGroupDataSource_' PKG=logs ACCTEST_PARALLELISM=3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/logs/... -v -count 1 -parallel 3  -run=TestAccLogsGroup_\|TestAccLogsGroupDataSource_ -timeout 360m
=== RUN   TestAccLogsGroupDataSource_basic
=== PAUSE TestAccLogsGroupDataSource_basic
=== RUN   TestAccLogsGroup_basic
=== PAUSE TestAccLogsGroup_basic
=== RUN   TestAccLogsGroup_nameGenerate
=== PAUSE TestAccLogsGroup_nameGenerate
=== RUN   TestAccLogsGroup_namePrefix
=== PAUSE TestAccLogsGroup_namePrefix
=== RUN   TestAccLogsGroup_disappears
=== PAUSE TestAccLogsGroup_disappears
=== RUN   TestAccLogsGroup_tags
=== PAUSE TestAccLogsGroup_tags
=== RUN   TestAccLogsGroup_kmsKey
=== PAUSE TestAccLogsGroup_kmsKey
=== RUN   TestAccLogsGroup_logGroupClass
=== PAUSE TestAccLogsGroup_logGroupClass
=== RUN   TestAccLogsGroup_retentionPolicy
=== PAUSE TestAccLogsGroup_retentionPolicy
=== RUN   TestAccLogsGroup_multiple
=== PAUSE TestAccLogsGroup_multiple
=== RUN   TestAccLogsGroup_skipDestroy
=== PAUSE TestAccLogsGroup_skipDestroy
=== CONT  TestAccLogsGroupDataSource_basic
=== CONT  TestAccLogsGroup_kmsKey
=== CONT  TestAccLogsGroup_namePrefix
--- PASS: TestAccLogsGroupDataSource_basic (18.43s)
=== CONT  TestAccLogsGroup_disappears
--- PASS: TestAccLogsGroup_namePrefix (22.45s)
=== CONT  TestAccLogsGroup_nameGenerate
--- PASS: TestAccLogsGroup_disappears (18.45s)
=== CONT  TestAccLogsGroup_basic
--- PASS: TestAccLogsGroup_nameGenerate (21.73s)
=== CONT  TestAccLogsGroup_multiple
--- PASS: TestAccLogsGroup_kmsKey (57.87s)
=== CONT  TestAccLogsGroup_skipDestroy
--- PASS: TestAccLogsGroup_basic (22.51s)
=== CONT  TestAccLogsGroup_retentionPolicy
--- PASS: TestAccLogsGroup_multiple (19.95s)
=== CONT  TestAccLogsGroup_logGroupClass
    acctest.go:943: skipping tests; current partition (aws-us-gov) does not equal aws
--- SKIP: TestAccLogsGroup_logGroupClass (0.00s)
=== CONT  TestAccLogsGroup_tags
--- PASS: TestAccLogsGroup_skipDestroy (24.48s)
--- PASS: TestAccLogsGroup_retentionPolicy (57.80s)
--- PASS: TestAccLogsGroup_tags (56.59s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/logs	126.358s

…g_group_class` argument and mark as Computed. This fixes `InvalidParameterException: Only Standard log class is supported` errors in AWS Regions other than AWS Commercial.
Copy link

github-actions bot commented Dec 8, 2023

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • 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.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added the size/XS Managed by automation to categorize the size of a PR. label Dec 8, 2023
@terraform-aws-provider terraform-aws-provider bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Dec 8, 2023
@ewbankkit ewbankkit added bug Addresses a defect in current functionality. enhancement Requests to existing resources that expand the functionality or scope. partition/aws-us-gov Pertains to the aws-us-gov partition. partition/aws-cn Pertains to the aws-cn partition. service/logs Issues and PRs that pertain to the logs service. labels Dec 8, 2023
@ewbankkit ewbankkit force-pushed the b-aws_cloudwatch_log_group.log_group_class branch from 547ade5 to ec7025f Compare December 8, 2023 16:04
@github-actions github-actions bot added size/S Managed by automation to categorize the size of a PR. and removed size/XS Managed by automation to categorize the size of a PR. labels Dec 8, 2023
Copy link
Member

@jar-b jar-b left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

% make testacc TESTARGS='-run=TestAccLogsGroup_\|TestAccLogsGroupDataSource_' PKG=logs
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/logs/... -v -count 1 -parallel 20  -run=TestAccLogsGroup_\|TestAccLogsGroupDataSource_ -timeout 360m

--- PASS: TestAccLogsGroup_skipDestroy (53.28s)
--- PASS: TestAccLogsGroup_logGroupClass (55.78s)
--- PASS: TestAccLogsGroup_disappears (57.11s)
--- PASS: TestAccLogsGroup_basic (59.83s)
--- PASS: TestAccLogsGroup_nameGenerate (60.35s)
--- PASS: TestAccLogsGroup_namePrefix (60.49s)
--- PASS: TestAccLogsGroup_multiple (61.68s)
--- PASS: TestAccLogsGroupDataSource_basic (71.37s)
--- PASS: TestAccLogsGroup_tags (96.51s)
--- PASS: TestAccLogsGroup_retentionPolicy (96.67s)
--- PASS: TestAccLogsGroup_kmsKey (122.83s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/logs       126.177s

@ewbankkit ewbankkit merged commit 1532419 into main Dec 8, 2023
60 of 62 checks passed
@ewbankkit ewbankkit deleted the b-aws_cloudwatch_log_group.log_group_class branch December 8, 2023 18:13
@github-actions github-actions bot added this to the v5.31.0 milestone Dec 8, 2023
github-actions bot pushed a commit that referenced this pull request Dec 8, 2023
@raisullip
Copy link

👍

1 similar comment
@jlmolinyawe
Copy link

👍🏽

blgm added a commit to cloudfoundry/csb-brokerpak-aws that referenced this pull request Dec 11, 2023
An issue was discovered in the AWS terraform provider v5.30.0: hashicorp/terraform-provider-aws#34812

This reverts commit 0336066.
@gabrielmattern
Copy link

gabrielmattern commented Dec 11, 2023

We really need this fixed ASAP. 👍

@karolytanczos-govcio
Copy link

Yesterday and today we tried to deploy an ECS service on GovCloud and it failed with the following message:
- InvalidParameterException: Only Standard log class is supported.

Prior to fail creating the service the following message was printed about the CloudWatch:

# module.xxx-xxx-xxx.aws_cloudwatch_log_group.log-group will be created
  + resource "aws_cloudwatch_log_group" "log-group" {
      + arn               = (known after apply)
      + id                = (known after apply)
      + log_group_class   = "STANDARD"
      + name              = "/ecs/xxxx-xxxx-xxxx"
      + name_prefix       = (known after apply)
      + retention_in_days = 0
      + skip_destroy      = false

I'm confused, should it be Standard or Computed?

zucchinidev pushed a commit to cloudfoundry/csb-brokerpak-aws that referenced this pull request Dec 12, 2023
An issue was discovered in the AWS terraform provider v5.30.0: hashicorp/terraform-provider-aws#34812

This reverts commit 0336066.
@michael-miara
Copy link

Yesterday and today we tried to deploy an ECS service on GovCloud and it failed with the following message: - InvalidParameterException: Only Standard log class is supported.

Prior to fail creating the service the following message was printed about the CloudWatch:

# module.xxx-xxx-xxx.aws_cloudwatch_log_group.log-group will be created
  + resource "aws_cloudwatch_log_group" "log-group" {
      + arn               = (known after apply)
      + id                = (known after apply)
      + log_group_class   = "STANDARD"
      + name              = "/ecs/xxxx-xxxx-xxxx"
      + name_prefix       = (known after apply)
      + retention_in_days = 0
      + skip_destroy      = false

I'm confused, should it be Standard or Computed?

i am still seeing this as well

@karolytanczos-govcio
Copy link

Yesterday and today we tried to deploy an ECS service on GovCloud and it failed with the following message: - InvalidParameterException: Only Standard log class is supported.
Prior to fail creating the service the following message was printed about the CloudWatch:

# module.xxx-xxx-xxx.aws_cloudwatch_log_group.log-group will be created
  + resource "aws_cloudwatch_log_group" "log-group" {
      + arn               = (known after apply)
      + id                = (known after apply)
      + log_group_class   = "STANDARD"
      + name              = "/ecs/xxxx-xxxx-xxxx"
      + name_prefix       = (known after apply)
      + retention_in_days = 0
      + skip_destroy      = false

I'm confused, should it be Standard or Computed?

i am still seeing this as well

We implemented a workaround for this bug. We hardcoded the Terraform version under the required_provider section. The last known stable version was 5.26.0:

  required_providers {
    aws = {
      source = "hashicorp/aws"
      version = "5.26.0"
    }

Version 5.30.0 is still failing.

@github-actions github-actions bot removed the bug Addresses a defect in current functionality. label Dec 15, 2023
Copy link

This functionality has been released in v5.31.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!

Copy link

I'm going to lock this pull request 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 related to this change, 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 Jan 15, 2024
@justinretzolk justinretzolk added the bug Addresses a defect in current functionality. label Feb 10, 2024
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. enhancement Requests to existing resources that expand the functionality or scope. partition/aws-cn Pertains to the aws-cn partition. partition/aws-us-gov Pertains to the aws-us-gov partition. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. service/logs Issues and PRs that pertain to the logs service. size/S Managed by automation to categorize the size of a PR.
Projects
None yet
8 participants