Skip to content
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

[docs] Exclude id output property for component resources #11469

Merged
merged 1 commit into from Nov 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -0,0 +1,4 @@
changes:
- type: fix
scope: docs
description: Exclude id output property for component resources
14 changes: 8 additions & 6 deletions pkg/codegen/docs/gen.go
Expand Up @@ -1558,12 +1558,14 @@ func (mod *modContext) genResource(r *schema.Resource) resourceDocArgs {
filteredOutputProps = filterOutputProperties(r.InputProperties, r.Properties)
}

// All resources have an implicit `id` output property, that we must inject into the docs.
filteredOutputProps = append(filteredOutputProps, &schema.Property{
Name: "id",
Comment: "The provider-assigned unique ID for this managed resource.",
Type: schema.StringType,
})
// All custom resources have an implicit `id` output property, that we must inject into the docs.
if !r.IsComponent {
filteredOutputProps = append(filteredOutputProps, &schema.Property{
Name: "id",
Comment: "The provider-assigned unique ID for this managed resource.",
Type: schema.StringType,
})
}

for _, lang := range dctx.supportedLanguages {
inputProps[lang] = mod.getProperties(r.InputProperties, lang, true, false, r.IsProvider)
Expand Down
Expand Up @@ -310,91 +310,37 @@ All [input](#inputs) properties are implicitly available as output properties. A

<div>
<pulumi-choosable type="language" values="csharp">
<dl class="resources-properties"><dt class="property-"
title="">
<span id="id_csharp">
<a data-swiftype-name="resource-property" data-swiftype-type="text" href="#id_csharp" style="color: inherit; text-decoration: inherit;">Id</a>
</span>
<span class="property-indicator"></span>
<span class="property-type">string</span>
</dt>
<dd><p>The provider-assigned unique ID for this managed resource.</p>
</dd></dl>
<dl class="resources-properties"></dl>
</pulumi-choosable>
</div>

<div>
<pulumi-choosable type="language" values="go">
<dl class="resources-properties"><dt class="property-"
title="">
<span id="id_go">
<a data-swiftype-name="resource-property" data-swiftype-type="text" href="#id_go" style="color: inherit; text-decoration: inherit;">Id</a>
</span>
<span class="property-indicator"></span>
<span class="property-type">string</span>
</dt>
<dd><p>The provider-assigned unique ID for this managed resource.</p>
</dd></dl>
<dl class="resources-properties"></dl>
</pulumi-choosable>
</div>

<div>
<pulumi-choosable type="language" values="java">
<dl class="resources-properties"><dt class="property-"
title="">
<span id="id_java">
<a data-swiftype-name="resource-property" data-swiftype-type="text" href="#id_java" style="color: inherit; text-decoration: inherit;">id</a>
</span>
<span class="property-indicator"></span>
<span class="property-type">String</span>
</dt>
<dd><p>The provider-assigned unique ID for this managed resource.</p>
</dd></dl>
<dl class="resources-properties"></dl>
</pulumi-choosable>
</div>

<div>
<pulumi-choosable type="language" values="javascript,typescript">
<dl class="resources-properties"><dt class="property-"
title="">
<span id="id_nodejs">
<a data-swiftype-name="resource-property" data-swiftype-type="text" href="#id_nodejs" style="color: inherit; text-decoration: inherit;">id</a>
</span>
<span class="property-indicator"></span>
<span class="property-type">string</span>
</dt>
<dd><p>The provider-assigned unique ID for this managed resource.</p>
</dd></dl>
<dl class="resources-properties"></dl>
</pulumi-choosable>
</div>

<div>
<pulumi-choosable type="language" values="python">
<dl class="resources-properties"><dt class="property-"
title="">
<span id="id_python">
<a data-swiftype-name="resource-property" data-swiftype-type="text" href="#id_python" style="color: inherit; text-decoration: inherit;">id</a>
</span>
<span class="property-indicator"></span>
<span class="property-type">str</span>
</dt>
<dd><p>The provider-assigned unique ID for this managed resource.</p>
</dd></dl>
<dl class="resources-properties"></dl>
</pulumi-choosable>
</div>

<div>
<pulumi-choosable type="language" values="yaml">
<dl class="resources-properties"><dt class="property-"
title="">
<span id="id_yaml">
<a data-swiftype-name="resource-property" data-swiftype-type="text" href="#id_yaml" style="color: inherit; text-decoration: inherit;">id</a>
</span>
<span class="property-indicator"></span>
<span class="property-type">String</span>
</dt>
<dd><p>The provider-assigned unique ID for this managed resource.</p>
</dd></dl>
<dl class="resources-properties"></dl>
</pulumi-choosable>
</div>

Expand Down
Expand Up @@ -325,15 +325,6 @@ All [input](#inputs) properties are implicitly available as output properties. A
<span class="property-type">string</span>
</dt>
<dd><p>The login server url</p>
</dd><dt class="property-"
title="">
<span id="id_csharp">
<a data-swiftype-name="resource-property" data-swiftype-type="text" href="#id_csharp" style="color: inherit; text-decoration: inherit;">Id</a>
</span>
<span class="property-indicator"></span>
<span class="property-type">string</span>
</dt>
<dd><p>The provider-assigned unique ID for this managed resource.</p>
</dd><dt class="property-"
title="">
<span id="registry_csharp">
Expand Down Expand Up @@ -367,15 +358,6 @@ All [input](#inputs) properties are implicitly available as output properties. A
<span class="property-type">string</span>
</dt>
<dd><p>The login server url</p>
</dd><dt class="property-"
title="">
<span id="id_go">
<a data-swiftype-name="resource-property" data-swiftype-type="text" href="#id_go" style="color: inherit; text-decoration: inherit;">Id</a>
</span>
<span class="property-indicator"></span>
<span class="property-type">string</span>
</dt>
<dd><p>The provider-assigned unique ID for this managed resource.</p>
</dd><dt class="property-"
title="">
<span id="registry_go">
Expand Down Expand Up @@ -409,15 +391,6 @@ All [input](#inputs) properties are implicitly available as output properties. A
<span class="property-type">String</span>
</dt>
<dd><p>The login server url</p>
</dd><dt class="property-"
title="">
<span id="id_java">
<a data-swiftype-name="resource-property" data-swiftype-type="text" href="#id_java" style="color: inherit; text-decoration: inherit;">id</a>
</span>
<span class="property-indicator"></span>
<span class="property-type">String</span>
</dt>
<dd><p>The provider-assigned unique ID for this managed resource.</p>
</dd><dt class="property-"
title="">
<span id="registry_java">
Expand Down Expand Up @@ -451,15 +424,6 @@ All [input](#inputs) properties are implicitly available as output properties. A
<span class="property-type">string</span>
</dt>
<dd><p>The login server url</p>
</dd><dt class="property-"
title="">
<span id="id_nodejs">
<a data-swiftype-name="resource-property" data-swiftype-type="text" href="#id_nodejs" style="color: inherit; text-decoration: inherit;">id</a>
</span>
<span class="property-indicator"></span>
<span class="property-type">string</span>
</dt>
<dd><p>The provider-assigned unique ID for this managed resource.</p>
</dd><dt class="property-"
title="">
<span id="registry_nodejs">
Expand Down Expand Up @@ -493,15 +457,6 @@ All [input](#inputs) properties are implicitly available as output properties. A
<span class="property-type">str</span>
</dt>
<dd><p>The login server url</p>
</dd><dt class="property-"
title="">
<span id="id_python">
<a data-swiftype-name="resource-property" data-swiftype-type="text" href="#id_python" style="color: inherit; text-decoration: inherit;">id</a>
</span>
<span class="property-indicator"></span>
<span class="property-type">str</span>
</dt>
<dd><p>The provider-assigned unique ID for this managed resource.</p>
</dd><dt class="property-"
title="">
<span id="registry_python">
Expand Down Expand Up @@ -535,15 +490,6 @@ All [input](#inputs) properties are implicitly available as output properties. A
<span class="property-type">String</span>
</dt>
<dd><p>The login server url</p>
</dd><dt class="property-"
title="">
<span id="id_yaml">
<a data-swiftype-name="resource-property" data-swiftype-type="text" href="#id_yaml" style="color: inherit; text-decoration: inherit;">id</a>
</span>
<span class="property-indicator"></span>
<span class="property-type">String</span>
</dt>
<dd><p>The provider-assigned unique ID for this managed resource.</p>
</dd><dt class="property-"
title="">
<span id="registry_yaml">
Expand Down
Expand Up @@ -310,91 +310,37 @@ All [input](#inputs) properties are implicitly available as output properties. A

<div>
<pulumi-choosable type="language" values="csharp">
<dl class="resources-properties"><dt class="property-"
title="">
<span id="id_csharp">
<a data-swiftype-name="resource-property" data-swiftype-type="text" href="#id_csharp" style="color: inherit; text-decoration: inherit;">Id</a>
</span>
<span class="property-indicator"></span>
<span class="property-type">string</span>
</dt>
<dd><p>The provider-assigned unique ID for this managed resource.</p>
</dd></dl>
<dl class="resources-properties"></dl>
</pulumi-choosable>
</div>

<div>
<pulumi-choosable type="language" values="go">
<dl class="resources-properties"><dt class="property-"
title="">
<span id="id_go">
<a data-swiftype-name="resource-property" data-swiftype-type="text" href="#id_go" style="color: inherit; text-decoration: inherit;">Id</a>
</span>
<span class="property-indicator"></span>
<span class="property-type">string</span>
</dt>
<dd><p>The provider-assigned unique ID for this managed resource.</p>
</dd></dl>
<dl class="resources-properties"></dl>
</pulumi-choosable>
</div>

<div>
<pulumi-choosable type="language" values="java">
<dl class="resources-properties"><dt class="property-"
title="">
<span id="id_java">
<a data-swiftype-name="resource-property" data-swiftype-type="text" href="#id_java" style="color: inherit; text-decoration: inherit;">id</a>
</span>
<span class="property-indicator"></span>
<span class="property-type">String</span>
</dt>
<dd><p>The provider-assigned unique ID for this managed resource.</p>
</dd></dl>
<dl class="resources-properties"></dl>
</pulumi-choosable>
</div>

<div>
<pulumi-choosable type="language" values="javascript,typescript">
<dl class="resources-properties"><dt class="property-"
title="">
<span id="id_nodejs">
<a data-swiftype-name="resource-property" data-swiftype-type="text" href="#id_nodejs" style="color: inherit; text-decoration: inherit;">id</a>
</span>
<span class="property-indicator"></span>
<span class="property-type">string</span>
</dt>
<dd><p>The provider-assigned unique ID for this managed resource.</p>
</dd></dl>
<dl class="resources-properties"></dl>
</pulumi-choosable>
</div>

<div>
<pulumi-choosable type="language" values="python">
<dl class="resources-properties"><dt class="property-"
title="">
<span id="id_python">
<a data-swiftype-name="resource-property" data-swiftype-type="text" href="#id_python" style="color: inherit; text-decoration: inherit;">id</a>
</span>
<span class="property-indicator"></span>
<span class="property-type">str</span>
</dt>
<dd><p>The provider-assigned unique ID for this managed resource.</p>
</dd></dl>
<dl class="resources-properties"></dl>
</pulumi-choosable>
</div>

<div>
<pulumi-choosable type="language" values="yaml">
<dl class="resources-properties"><dt class="property-"
title="">
<span id="id_yaml">
<a data-swiftype-name="resource-property" data-swiftype-type="text" href="#id_yaml" style="color: inherit; text-decoration: inherit;">id</a>
</span>
<span class="property-indicator"></span>
<span class="property-type">String</span>
</dt>
<dd><p>The provider-assigned unique ID for this managed resource.</p>
</dd></dl>
<dl class="resources-properties"></dl>
</pulumi-choosable>
</div>

Expand Down