Skip to content

feat: add V2 feed support - #18

Merged
ben-f3 merged 4 commits into
form3tech-oss:masterfrom
b3ngriffiths:claude/add-v2-feed-2026
Feb 6, 2026
Merged

feat: add V2 feed support#18
ben-f3 merged 4 commits into
form3tech-oss:masterfrom
b3ngriffiths:claude/add-v2-feed-2026

Conversation

@b3ngriffiths

@b3ngriffiths b3ngriffiths commented Feb 2, 2026

Copy link
Copy Markdown
Contributor

Note

Claude Code Implementation: This PR was developed using Claude Code, which implemented new Chronicle V2 feed resources with complete CRUD operations, comprehensive test coverage including unit tests and acceptance tests for all feed types, and proper schema validation following Terraform provider best practices. All code was iteratively reviewed and refined through Claude Code's autonomous feedback loop, with particular attention to authentication handling, state management, and error scenarios, before final human review as part of this PR.

Summary

This PR implements support for Chronicle's GA-released V2 feed connectors, which use Google Cloud Storage Transfer Service for improved performance and reliability.

Release Notes: https://docs.cloud.google.com/chronicle/docs/secops/release-notes#January_30_2026

Screenshot 2026-02-02 at 22 07 00

New Resources

  • chronicle_feed_amazon_s3_v2 - S3 bucket ingestion via STS
  • chronicle_feed_amazon_sqs_v2 - SQS-based push ingestion from S3
  • chronicle_feed_google_cloud_storage_v2 - GCS bucket ingestion via STS
  • chronicle_feed_google_cloud_storage_event_driven - Event-driven GCS ingestion
  • chronicle_feed_azure_blobstore_v2 - Azure Blob Storage ingestion via STS

Key Features

  • Modern Authentication: Support for federated authentication (AWS IAM roles, Azure Workload Identity, GCP service accounts)
  • Enhanced Control: Configurable source deletion options and lookback periods (1-180 days)
  • Resource Tagging: Namespace and labels support for asset correlation and organization
  • API Compliance: All implementations match Chronicle Feed Management API GA specifications

Quick Examples

AWS S3 V2 with IAM Role:

resource "chronicle_feed_amazon_s3_v2" "example" {
  display_name = "AWS S3 V2 Feed"
  log_type     = "AWS_CLOUDTRAIL"
  
  details {
    s3_uri                = "s3://my-logs/cloudtrail/"
    source_delete_options = "ON_SUCCESS"
    
    authentication {
      aws_iam_role_arn = "arn:aws:iam::123456789012:role/chronicle-role"
    }
  }
}

Important Notes

  • V2 feeds require appropriate IAM permissions for cross-cloud access
  • Federated authentication is recommended for production environments
  • See examples/resources/ for complete configuration examples
  • All feeds include comprehensive acceptance tests

References

@b3ngriffiths
b3ngriffiths requested a review from a team as a code owner February 2, 2026 18:32
@ben-f3

ben-f3 commented Feb 5, 2026

Copy link
Copy Markdown
Contributor

Acceptance Test Report – Terraform Provider Chronicle (V1 & V2)

Test Scope:
Acceptance testing of Chronicle Terraform provider feeds using make testacc-v1 and make testacc-v2, including runs with real credentials and real source details.

V1 Feed Tests (make testacc-v1)

Result:Pass

  • All V1 acceptance tests completed successfully.
  • Create, update, import, and destroy behaviour aligns with expectations.
  • Authentication fields are intentionally excluded from import verification due to API non-round-tripping.
  • Test harness behaviour is well understood and stable.
  • Confirms V1 provider implementation is correct and production-ready.

V2 Feed Tests (make testacc-v2)

Result:Functionally Correct; Test Harness Limitations Observed

  • With real credentials and valid source configuration:
    • V2 feeds were successfully created and updated.
    • Confirms correct request schema, authentication handling, and live Chronicle API interaction.
  • Observed failures relate to acceptance test mechanics, not provider functionality:
    • ImportStateVerify differences for optional authentication fields (e.g. aws_iam_role_arn) that are not returned by the API.
    • Post-test destroy warnings caused by simplistic state-based destroy checks rather than API verification.
  • These behaviours are consistent with existing V1 test patterns and reflect known limitations of the test framework rather than issues in the V2 implementation.

Conclusion

  • V1 remains the proven baseline with stable acceptance coverage.
  • V2 implementation is functionally sound and behaves consistently with V1 when interacting with the live Chronicle service.
  • Acceptance testing confirms that V2 feeds are correctly created and managed by the API.
  • Remaining test failures are attributable to expected import and teardown semantics, not defects in provider logic.

Overall: Acceptance testing is complete and effective. The V2 Terraform implementation is working as intended and aligns with established V1 behaviour.

@markhowardform3 markhowardform3 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Could you commit the docs - make docs should generate them.

Comment thread client/feed_amazon_s3_v2.go Outdated
b3ngriffiths and others added 4 commits February 6, 2026 16:34
Corrected two field names in the SQS V2 feed implementation to match the actual Chronicle API response captured via browser dev tools:

1. Property key: "amazon_sqs_v2_settings" → "amazonSqsV2Settings"
2. Authentication field: "accessKeySecretAuth" → "sqsV2AccessKeySecretAuth"

The live Chronicle API expects "sqsV2AccessKeySecretAuth" for SQS V2 feeds, whereas S3 V2 feeds use just "accessKeySecretAuth". This discrepancy was not documented in Google's API documentation.

Previous behaviour resulted in API errors:
"Invalid JSON payload received. Unknown name 'accessKeySecretAuth' at 'feed.details.amazon_sqs_v2_settings.authentication': Cannot find field."

This fix resolves the schema validation errors and allows SQS V2 feeds to be created successfully via Terraform.
@b3ngriffiths
b3ngriffiths force-pushed the claude/add-v2-feed-2026 branch from bee9098 to f168ddc Compare February 6, 2026 16:35
@ben-f3
ben-f3 merged commit cb71318 into form3tech-oss:master Feb 6, 2026
2 checks passed
@b3ngriffiths
b3ngriffiths deleted the claude/add-v2-feed-2026 branch July 1, 2026 08:44
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.

3 participants