Skip to content

feat(logs,tfacc): return logGroupClass on DescribeLogGroups; enable kms + logs#374

Merged
vieiralucas merged 1 commit intomainfrom
worktree-tfacc-kms-logs
Apr 14, 2026
Merged

feat(logs,tfacc): return logGroupClass on DescribeLogGroups; enable kms + logs#374
vieiralucas merged 1 commit intomainfrom
worktree-tfacc-kms-logs

Conversation

@vieiralucas
Copy link
Copy Markdown
Member

@vieiralucas vieiralucas commented Apr 14, 2026

Summary

Batch 6 — adds KMS and CloudWatch Logs to the upstream Terraform acceptance harness.

CloudWatch Logs `logGroupClass` round-trip

Real AWS CloudWatch Logs `DescribeLogGroups` always returns `logGroupClass` (defaulting to `STANDARD`), and Terraform's `aws_cloudwatch_log_group` provider asserts on the value. Omitting it surfaced as `expected STANDARD got ""` drift on every refresh in `TestAccLogsGroup_basic`.

  • `LogGroup` state struct now carries `log_group_class` (Option).
  • `CreateLogGroup` captures the parameter, defaulting to `STANDARD` when the caller doesn't specify.
  • `DescribeLogGroups` always emits the field.
  • Cross-crate constructor sites updated: `fakecloud-eventbridge` (auto-create log group on rule target delivery) and `fakecloud-cloudformation` (CFN resource provisioner).

KMS

`TestAccKMSKey_basic` passes against fakecloud out of the box. No fakecloud-side changes needed.

Test plan

  • New e2e test `logs_describe_log_groups_returns_log_group_class` — passes
  • `cargo clippy -p fakecloud-logs -p fakecloud-tfacc -p fakecloud-e2e -p fakecloud-eventbridge -p fakecloud-cloudformation --all-targets -- -D warnings` clean
  • Upstream locally: `TestAccLogsGroup_basic` and `TestAccKMSKey_basic` both pass
  • CI `tfacc kms` green
  • CI `tfacc logs` green
  • Other tfacc jobs still green (regression check)
  • Cubic clean

Summary by cubic

Return logGroupClass from CloudWatch Logs DescribeLogGroups (default STANDARD) to match AWS and stop Terraform drift; enable KMS and Logs in the fakecloud-tfacc harness.

  • Bug Fixes

    • fakecloud-logs: DescribeLogGroups now always includes logGroupClass (default STANDARD); CreateLogGroup captures it; state tracks log_group_class.
    • Updated fakecloud-eventbridge and fakecloud-cloudformation to set log_group_class: STANDARD when auto-creating log groups.
  • New Features

    • fakecloud-tfacc: allowlisted kms and logs suites to run (TestAccKMSKey_basic, TestAccLogsGroup_basic).

Written for commit d25e6a2. Summary will update on new commits.

…ms + logs

Real AWS CloudWatch Logs DescribeLogGroups always returns logGroupClass
(STANDARD by default), and Terraform's aws_cloudwatch_log_group provider
asserts on the value. Omitting it surfaced as 'expected STANDARD got ""'
drift on every refresh in TestAccLogsGroup_basic.

- LogGroup state struct now carries log_group_class (Option<String>).
- CreateLogGroup captures the parameter, defaulting to STANDARD when
  the caller doesn't specify one.
- DescribeLogGroups always emits the field.
- Updated callers in fakecloud-eventbridge (auto-create log group on
  rule target delivery) and fakecloud-cloudformation (CFN provisioner)
  to populate the new field.

New e2e test logs_describe_log_groups_returns_log_group_class.

Adds kms + logs to the tfacc allow-list:
- TestAccKMSKey_basic — passes against fakecloud out of the box
- TestAccLogsGroup_basic — passes after the logGroupClass fix above
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 7 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="crates/fakecloud-cloudformation/src/resource_provisioner.rs">

<violation number="1" location="crates/fakecloud-cloudformation/src/resource_provisioner.rs:749">
P2: The CloudFormation provisioner hardcodes `log_group_class` to `"STANDARD"` instead of respecting the `LogGroupClass` property from the CloudFormation template.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

index_policies: Vec::new(),
transformer: None,
deletion_protection: false,
log_group_class: Some("STANDARD".to_string()),
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot Apr 14, 2026

Choose a reason for hiding this comment

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

P2: The CloudFormation provisioner hardcodes log_group_class to "STANDARD" instead of respecting the LogGroupClass property from the CloudFormation template.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At crates/fakecloud-cloudformation/src/resource_provisioner.rs, line 749:

<comment>The CloudFormation provisioner hardcodes `log_group_class` to `"STANDARD"` instead of respecting the `LogGroupClass` property from the CloudFormation template.</comment>

<file context>
@@ -746,6 +746,7 @@ impl ResourceProvisioner {
             index_policies: Vec::new(),
             transformer: None,
             deletion_protection: false,
+            log_group_class: Some("STANDARD".to_string()),
         };
 
</file context>
Fix with Cubic

@vieiralucas vieiralucas merged commit e819b2f into main Apr 14, 2026
30 checks passed
@vieiralucas vieiralucas deleted the worktree-tfacc-kms-logs branch April 14, 2026 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant