Skip to content

Commit

Permalink
add issues for TODOs
Browse files Browse the repository at this point in the history
Signed-off-by: lsviben <sviben.lovro@gmail.com>
  • Loading branch information
lsviben committed Jul 28, 2023
1 parent dddfa44 commit 7a510ca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/terraform/files.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ func NewFileProducer(ctx context.Context, client resource.SecretClient, dir stri
// TODO(lsviben): Currently initProvider fields override forProvider
// fields if set. It should be the other way around.
// merge the initProvider and forProvider parameters
// https://github.com/upbound/upjet/issues/240
err = mergo.Merge(&params, initParams, mergo.WithSliceDeepCopy)
if err != nil {
return nil, errors.Wrap(err, "cannot merge init and forProvider parameters")
Expand Down
1 change: 1 addition & 0 deletions pkg/types/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ func (r *resource) addParameterField(f *Field, field *types.Var) {
// not just the top level ones, due to having all forProvider
// fields now optional. CEL rules should check if a field is
// present either in forProvider or initProvider.
// https://github.com/upbound/upjet/issues/239
if req && !f.Identifier && len(f.CanonicalPaths) == 1 {
req = false
// If the field is not a terraform field, we should not require it in init,
Expand Down

0 comments on commit 7a510ca

Please sign in to comment.