You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add aws configurations as tf resource based on the https://docs.cortex.io/api/readme/integrations/aws api