c
w
Could you link to the Terraform provider this is based on? It looks like there is some duplicated definition here - but unclear where that is coming from?
c
any thoughts?
w
It looks like it's related to the fact that there is a data source and a resource named
Zone
both in the root namespace - and both have a
secondaries
nested substructure. cc @broad-dog-22463 and @microscopic-pilot-97530 who might know how to adjust and/or work around that?
👍 1
m
Interestingly, if the docs were the same for both the data source and resource, we wouldn't hit this assert because the type declarations would be exactly the same. So one way of fixing this would be to tweak the docs of the Terraform provider so that they're the same for both. (In the docs for the resource, the
networks
property has an extra
-
after the
(Computed)
and slightly different text than that of the data source. https://raw.githubusercontent.com/terraform-providers/terraform-provider-ns1/master/website/docs/r/zone.html.markdown vs https://raw.githubusercontent.com/terraform-providers/terraform-provider-ns1/master/website/docs/d/zone.html.markdown Another way of addressing this would be to set the
NestedType
property to override the name of the type we emit for this nested type, either for the data source or resource. Setting it to something like
NS1ZoneDataSourceSecondary
on the data source or
NS1ZoneResourceSecondary
on the resource. Here's an example where we use that to override the name of a nested type in the GCP provider: https://github.com/pulumi/pulumi-gcp/blob/19ca6d1ab783ee3fc18d3c721573a469d45179fe/resources.go#L970-L974
c
Thanks, I will take a look at the second option as I doubt I want to change the upstream provider