Set the snake case translation for provider input properties
Fixes
@@ -948,6 +948,13 @@ func (mod *modContext) genPropertyConversionTables() string {
// Once all resources have been emitted, the table is written out to a format usable for implementations of
// translate_input_property and translate_output_property.
func buildCaseMappingTables(pkg *schema.Package, snakeCaseToCamelCase, camelCaseToSnakeCase map[string]string, seenTypes codegen.Set) {
+ // Add provider input properties to translation table - this is unique to Python codegen.
+ if pkg.Provider != nil { // Can pkg.Provider even be nil?
+ for _, p := range pkg.Provider.InputProperties {
+ recordProperty(p, snakeCaseToCamelCase, camelCaseToSnakeCase, seenTypes)
+ }
+ }
+
for _, r := range pkg.Resources {
// Calculate casing tables. We do this up front because our docstring generator (which is run during
// genResource) requires them.
