Skip to content

feat: add AWS integration resources - #100

Open
tinchi wants to merge 2 commits into
cortexapps:mainfrom
tinchi:feat/aws-integration
Open

feat: add AWS integration resources#100
tinchi wants to merge 2 commits into
cortexapps:mainfrom
tinchi:feat/aws-integration

Conversation

@tinchi

@tinchi tinchi commented Apr 18, 2026

Copy link
Copy Markdown

Add aws configurations as tf resource based on the https://docs.cortex.io/api/readme/integrations/aws api

@Cantaley

Cantaley commented Jul 2, 2026

Copy link
Copy Markdown

@tinchi - transferring the comments from the ticket to here:
After review this, the structure looks good overall. There are four blockers we need addressed before merge:

  • Perpetual drift in cortex_aws_integration_types Read (aws_integration_types_resource.go:567). Read replaces local state with the full catalog returned by /aws/types, so every subsequent plan shows a diff. Fix by filtering FromApiModel to entries already in r.Types (or only Configured == true), or restructure as a map keyed by type name with per-key merging in Read.

  • Destructive Delete on cortex_aws_integration_types (line 633). UpdateTypes(ctx, []cortex.AwsType{}) may disable AWS discovery tenant-wide if the API treats an empty list as "unconfigure everything." Please verify the API contract. Safer options: no-op Delete with a comment, or only flip back entries currently in state.

  • Incomplete ImportState (line 640). Sets id but not the required types attribute. With issue #1 unresolved, post-import Read won't match any sensible HCL. Either document the import semantics clearly or drop ResourceWithImportState for now.

-Singleton not enforced. Docs claim cortex_aws_integration_types is a singleton, but multiple instances will silently overwrite each other. Ideally, use a constant resource ID and detect collisions in Create.

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.

2 participants