-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aws_glue_connection generation issues #126
Comments
@muvaf would appreciate if you can take a look at this issue next week. |
Looks like we're generating the following: // value pairs used as parameters for this connection.
// +kubebuilder:validation:Optional
ConnectionPropertiesSecretRef *map[string]github.com/crossplane/crossplane-runtime/apis/common/v1.SecretKeySelector%!(EXTRA string=v1) `json:"connectionPropertiesSecretRef,omitempty" tf:"-"` for the TF schema given below: "connection_properties": {
Type: schema.TypeMap,
Optional: true,
Sensitive: true,
ValidateFunc: mapKeyInSlice(glue.ConnectionPropertyKey_Values(), false),
Elem: &schema.Schema{Type: schema.TypeString},
}, It's a bug in Upjet that it's confused seeing a map whose values are sensitive. Though I remember we added support for this case. I'll dig more and update this issue. I don't know of a workaround unfortunately, other than marking it as non-sensitive which defeats the purpose. |
One related issue might be the parsing of the This line in the metadata file: connection_properties: – (Optional) A map of key-value pairs used as parameters for this connection. results in this comment (note all the text before // value pairs used as parameters for this connection. If I remove the dash in connection_properties: – (Optional) A map of key value pairs used as parameters for this connection. The full comment is generated: // – A map of key value pairs used as parameters for this connection. |
I opened #135 which fixes the problem but I think the pattern we have there is likely not in line with API conventions #134 . I'd like us consider changing it before publishing v1beta1 of |
@muvaf works for me! |
Fixed with #138 |
What happened?
aws_glue_connection
(see code) is marked in the skip list due to terrajet issue #100, which is marked as being closed. I'm not sure if it is fixed in upjet.When trying to use upjet to generate the APIs for this resource, we get the following issue
It looks like line 44 is causing the issue:
The generated go code for
v1beta1/zz_connection_types.go
is:How can we reproduce it?
aws_glue_connection
from the skip list https://github.com/upbound/provider-aws/blob/8b3887c91c4b44dc14e1123b3a5ae1a70e0e45ed/config/provider.go#L93externalname.go
:"aws_glue_connection": config.TemplatedStringAsIdentifier("name", "{{ .parameters.catalog_id }}:{{ .external_name }}"),
make generate
The text was updated successfully, but these errors were encountered: