Skip to content

Commit

Permalink
Merge #11469
Browse files Browse the repository at this point in the history
11469: [docs] Exclude id output property for component resources r=justinvp a=justinvp

An `id` output property was being emitted for all resources, but component resources do not have an `id`.

Fixes #11462

Co-authored-by: Justin Van Patten <jvp@justinvp.com>
  • Loading branch information
bors[bot] and justinvp committed Nov 25, 2022
2 parents 35f8427 + 84ccc03 commit 4c8b5b7
Show file tree
Hide file tree
Showing 17 changed files with 90 additions and 894 deletions.
@@ -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

0 comments on commit 4c8b5b7

Please sign in to comment.