Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions pkg/registry/reference/references.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
"github.com/upbound/upjet/pkg/config"
"github.com/upbound/upjet/pkg/registry"
"github.com/upbound/upjet/pkg/types"
"github.com/upbound/upjet/pkg/types/name"
)

const (
Expand Down Expand Up @@ -51,7 +50,7 @@ func getExtractorFuncPath(r *config.Resource, sourceAttr string) string {
if !ok {
return ""
}
return fmt.Sprintf(fmtExtractParamFuncPath, name.NewFromSnake(sourceAttr).LowerCamelComputed, types.IsObservation(s))
return fmt.Sprintf(fmtExtractParamFuncPath, sourceAttr, types.IsObservation(s))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

So, we used to give fieldName but now field_name. How is this working without a change in other places that processes the output here? Am I missing something?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

What Terraformed.GetObservation and Terraformed.GetParameters both return is a map keyed with Terraform argument & attribute names (although they are serialized from spec.forProvider and status.atProvider of the respective CRDs).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Got it, so it wasn't working before anyway I guess. Thanks for the explanation!

}
}

Expand Down