pulumi/pkg/codegen/internal/test/testdata
Justin Van Patten 4e9e017cd2
[codegen/python] Rename conflicting ResourceArgs classes (#7171)
Python resource constructor overloads were recently added that accept a
`<Resource>Args` class for input properties, as an alternative to the
other constructor overload that accepts keyword arguments. The name of
the new args class is the name of the resource concatenated with an
`Args` suffix.

Some providers (e.g. Kubernetes, Azure Native, and Google Native) have
input types with the same name as resources in the same module, which
results in two different `<Resource>Args` classes in the same module.

When you try to use the new args class with the constructor, e.g.:

```python
pulumi_kubernetes.storage.v1.StorageClass(
            resource_name='string',
            args=pulumi_kubernetes.storage.v1.StorageClassArgs(...),
            opts=pulumi.ResourceOptions(...),
)
```

You run into an error, because
`pulumi_kubernetes.storage.v1.StorageClassArgs` is actually referring to
the existing input type rather than the intended `StorageClassArgs`
class for the constructor arguments.

Having the duplicate classes hasn't broken existing usage of the input
type because we "export" all the input types for a module _after_ all
the resources and resource args classes are exported, so the input type
just ends up "overwriting" the duplicate resource args class.

Other languages don't have this problem because the input type is either
in it's own module/namespace (e.g. Node.js and .NET) or a different name
is used for the input type (Go). But with Python, the input types and
resources are all available in the same module.

To address this for Python, when there is an input type in the same
module with the same name as the resource, the args class for the
resource will be emitted as `<Resource>InitArgs` instead of
`<Resource>Args`.
2021-06-10 10:41:49 -07:00
..
external-resource-schema Fix Go init.go codegen to be govet compliant (#7195) 2021-06-04 13:57:04 +03:00
resource-args-python [codegen/python] Rename conflicting ResourceArgs classes (#7171) 2021-06-10 10:41:49 -07:00
schema Add schema support for methods (#7141) 2021-06-10 09:47:25 -07:00
simple-enum-schema Fix Go init.go codegen to be govet compliant (#7195) 2021-06-04 13:57:04 +03:00
simple-plain-schema [codegen/dotnet] Fix plain properties (#7180) 2021-06-04 09:25:20 -07:00
simple-plain-schema-with-root-package Fix Go init.go codegen to be govet compliant (#7195) 2021-06-04 13:57:04 +03:00
simple-resource-schema Fix Go init.go codegen to be govet compliant (#7195) 2021-06-04 13:57:04 +03:00
simple-resource-schema-custom-pypackage-name Permit override of Python package naming (#6971) 2021-05-06 11:18:14 -07:00
aws-eks.pp [codegen/*] Improve range type binding + codegen. (#4552) 2020-05-04 15:04:35 -07:00
aws-eks.pp.cs Initial support for C# program gen (#4611) 2020-05-19 10:18:38 +02:00
aws-eks.pp.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
aws-eks.pp.py Use input/output classes in program gen (#5086) 2020-08-06 15:09:23 -07:00
aws-eks.pp.ts [codegen/nodejs] Await invokes in async contexts. (#4598) 2020-05-11 10:21:56 -07:00
aws-fargate.pp Initial support for C# program gen (#4611) 2020-05-19 10:18:38 +02:00
aws-fargate.pp.cs [codegen/*] Add support for resource options. (#4925) 2020-06-29 16:33:52 -07:00
aws-fargate.pp.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
aws-fargate.pp.py Ensure the correct qualified code is emitted for Python ResourceOptions (#5824) 2020-11-24 02:21:25 +00:00
aws-fargate.pp.ts [codegen/*] Add support for resource options. (#4925) 2020-06-29 16:33:52 -07:00
aws-s3-folder.pp HCL2 updates (#4309) 2020-04-06 19:43:16 -07:00
aws-s3-folder.pp.cs Initial support for C# program gen (#4611) 2020-05-19 10:18:38 +02:00
aws-s3-folder.pp.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
aws-s3-folder.pp.py Use input/output classes in program gen (#5086) 2020-08-06 15:09:23 -07:00
aws-s3-folder.pp.ts [codegen/*] Improve range type binding + codegen. (#4552) 2020-05-04 15:04:35 -07:00
aws-s3-logging.pp Fix output property names in Python codegen. 2020-04-21 10:25:27 -07:00
aws-s3-logging.pp.cs Initial support for C# program gen (#4611) 2020-05-19 10:18:38 +02:00
aws-s3-logging.pp.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
aws-s3-logging.pp.py Use input/output classes in program gen (#5086) 2020-08-06 15:09:23 -07:00
aws-s3-logging.pp.ts [codegen/{nodejs,python}] Parse more proxy applies (#4576) 2020-05-05 21:51:53 -07:00
aws-webserver.pp HCL2 updates (#4309) 2020-04-06 19:43:16 -07:00
aws-webserver.pp.cs Initial support for C# program gen (#4611) 2020-05-19 10:18:38 +02:00
aws-webserver.pp.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
aws-webserver.pp.py Use input/output classes in program gen (#5086) 2020-08-06 15:09:23 -07:00
aws-webserver.pp.ts HCL2/NodeJS: fix proxy apply lowering for promises (#4317) 2020-04-07 09:25:50 -07:00
aws.json Fix inconsistent object type naming. (#6686) 2021-04-15 19:03:28 -07:00
azure-native.json Discriminated unions in schema and programgen 2021-05-05 10:01:22 +02:00
azure-native.pp Discriminated unions in schema and programgen 2021-05-05 10:01:22 +02:00
azure-native.pp.cs Discriminated unions in schema and programgen 2021-05-05 10:01:22 +02:00
azure-native.pp.go Discriminated unions in schema and programgen 2021-05-05 10:01:22 +02:00
azure-native.pp.py Discriminated unions in schema and programgen 2021-05-05 10:01:22 +02:00
azure-native.pp.ts Discriminated unions in schema and programgen 2021-05-05 10:01:22 +02:00
azure-sa.pp Convert config params to outputs only if promise types are seen 2020-10-07 12:29:33 -07:00
azure-sa.pp.cs Convert config params to outputs only if promise types are seen 2020-10-07 12:29:33 -07:00
azure-sa.pp.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
azure-sa.pp.py Convert config params to outputs only if promise types are seen 2020-10-07 12:29:33 -07:00
azure-sa.pp.ts Convert config params to outputs only if promise types are seen 2020-10-07 12:29:33 -07:00
azure.json [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
kubernetes-operator.pp Use a package map where appropriate (#5127) 2020-08-06 19:09:18 -07:00
kubernetes-operator.pp.cs Fix C# program gen for Kubernetes examples (#5129) 2020-08-07 09:31:42 -06:00
kubernetes-operator.pp.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
kubernetes-operator.pp.py Remove UsesIOClasses check. (#5827) 2020-11-24 19:15:37 -06:00
kubernetes-operator.pp.ts Use a package map where appropriate (#5127) 2020-08-06 19:09:18 -07:00
kubernetes-pod.pp Use input/output classes in program gen (#5086) 2020-08-06 15:09:23 -07:00
kubernetes-pod.pp.cs Fix C# program gen for Kubernetes examples (#5129) 2020-08-07 09:31:42 -06:00
kubernetes-pod.pp.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
kubernetes-pod.pp.py Remove UsesIOClasses check. (#5827) 2020-11-24 19:15:37 -06:00
kubernetes-pod.pp.ts tests for kubernetes program generation (#5105) 2020-08-05 09:15:36 -07:00
kubernetes-template.pp [Go Program Gen] Only generate a single literal when traversing a union type (#5154) 2020-08-11 11:43:56 -07:00
kubernetes-template.pp.cs [Go Program Gen] Only generate a single literal when traversing a union type (#5154) 2020-08-11 11:43:56 -07:00
kubernetes-template.pp.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
kubernetes-template.pp.py Remove UsesIOClasses check. (#5827) 2020-11-24 19:15:37 -06:00
kubernetes-template.pp.ts [Go Program Gen] Only generate a single literal when traversing a union type (#5154) 2020-08-11 11:43:56 -07:00
kubernetes.json tests for kubernetes program generation (#5105) 2020-08-05 09:15:36 -07:00
random-pet.pp [Go program gen]: namespaceless resources (#4915) 2020-06-29 18:10:34 -07:00
random-pet.pp.cs [Go program gen]: namespaceless resources (#4915) 2020-06-29 18:10:34 -07:00
random-pet.pp.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
random-pet.pp.py [Go program gen]: namespaceless resources (#4915) 2020-06-29 18:10:34 -07:00
random-pet.pp.ts [Go program gen]: namespaceless resources (#4915) 2020-06-29 18:10:34 -07:00
random.json [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
resource-options.pp [codegen/*] Add support for resource options. (#4925) 2020-06-29 16:33:52 -07:00
resource-options.pp.cs [codegen/*] Add support for resource options. (#4925) 2020-06-29 16:33:52 -07:00
resource-options.pp.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
resource-options.pp.py Ensure the correct qualified code is emitted for Python ResourceOptions (#5824) 2020-11-24 02:21:25 +00:00
resource-options.pp.ts [codegen/*] Add support for resource options. (#4925) 2020-06-29 16:33:52 -07:00
secret.pp [codegen/*] Add support for explicit secrets. (#4927) 2020-06-30 11:35:24 -07:00
secret.pp.cs [codegen/*] Add support for explicit secrets. (#4927) 2020-06-30 11:35:24 -07:00
secret.pp.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
secret.pp.py [codegen/*] Add support for explicit secrets. (#4927) 2020-06-30 11:35:24 -07:00
secret.pp.ts [codegen/*] Add support for explicit secrets. (#4927) 2020-06-30 11:35:24 -07:00