Skip to content

Commit

Permalink
fix: change streams to be a SetNestedAttribute
Browse files Browse the repository at this point in the history
This commit modifies the connection resource's `streams` attribute to be
a `SetNestedAttribute` instead of a List. This is so that we can
properly compute plan's that treat re-ordering of elements (streams) as
a noop (if no attributes of the stream have been changed).

Previously if you added a new stream to a connection resource in the
middle of the list, or changed the order, the provider would compute
that as a change that had to be applied.

Additionally, we use a customer SetPlanModifier that may be
parameterized with a `key` which is used to uniquely identify the
elements in the set.

NOTE: the current implementation of the plan modifier `uniqueByKey`
assumes that the elements of the set are Objects. Since this is the only
use case for this modifier, this seems reasonable for now.
  • Loading branch information
perangel committed Jul 17, 2024
1 parent 4834a12 commit 2114aca
Show file tree
Hide file tree
Showing 5 changed files with 1,253 additions and 1,116 deletions.
2 changes: 2 additions & 0 deletions .genignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
internal/provider/connection_resource.go
internal/provider/connection_data_resource.go
Loading

0 comments on commit 2114aca

Please sign in to comment.