diff --git a/changelog/pending/20221125--docs--exclude-id-output-property-for-component-resources.yaml b/changelog/pending/20221125--docs--exclude-id-output-property-for-component-resources.yaml new file mode 100644 index 000000000000..21406387e3c7 --- /dev/null +++ b/changelog/pending/20221125--docs--exclude-id-output-property-for-component-resources.yaml @@ -0,0 +1,4 @@ +changes: +- type: fix + scope: docs + description: Exclude id output property for component resources diff --git a/pkg/codegen/docs/gen.go b/pkg/codegen/docs/gen.go index 72be15914ec8..bd0212e874f0 100644 --- a/pkg/codegen/docs/gen.go +++ b/pkg/codegen/docs/gen.go @@ -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) diff --git a/pkg/codegen/testing/test/testdata/enum-reference/docs/myModule/iamresource/_index.md b/pkg/codegen/testing/test/testdata/enum-reference/docs/myModule/iamresource/_index.md index d980aa5c52ff..89a93c738392 100644 --- a/pkg/codegen/testing/test/testdata/enum-reference/docs/myModule/iamresource/_index.md +++ b/pkg/codegen/testing/test/testdata/enum-reference/docs/myModule/iamresource/_index.md @@ -310,91 +310,37 @@ All [input](#inputs) properties are implicitly available as output properties. A
-
- -Id - - - string -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -Id - - - string -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - String -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - string -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - str -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - String -
-

The provider-assigned unique ID for this managed resource.

-
+
diff --git a/pkg/codegen/testing/test/testdata/hyphen-url/docs/registrygeoreplication/_index.md b/pkg/codegen/testing/test/testdata/hyphen-url/docs/registrygeoreplication/_index.md index 1f54e593c0e5..128a9fa578c4 100644 --- a/pkg/codegen/testing/test/testdata/hyphen-url/docs/registrygeoreplication/_index.md +++ b/pkg/codegen/testing/test/testdata/hyphen-url/docs/registrygeoreplication/_index.md @@ -325,15 +325,6 @@ All [input](#inputs) properties are implicitly available as output properties. A string

The login server url

-
- -Id - - - string -
-

The provider-assigned unique ID for this managed resource.

@@ -367,15 +358,6 @@ All [input](#inputs) properties are implicitly available as output properties. A string

The login server url

-
- -Id - - - string -
-

The provider-assigned unique ID for this managed resource.

@@ -409,15 +391,6 @@ All [input](#inputs) properties are implicitly available as output properties. A String

The login server url

-
- -id - - - String -
-

The provider-assigned unique ID for this managed resource.

@@ -451,15 +424,6 @@ All [input](#inputs) properties are implicitly available as output properties. A string

The login server url

-
- -id - - - string -
-

The provider-assigned unique ID for this managed resource.

@@ -493,15 +457,6 @@ All [input](#inputs) properties are implicitly available as output properties. A str

The login server url

-
- -id - - - str -
-

The provider-assigned unique ID for this managed resource.

@@ -535,15 +490,6 @@ All [input](#inputs) properties are implicitly available as output properties. A String

The login server url

-
- -id - - - String -
-

The provider-assigned unique ID for this managed resource.

diff --git a/pkg/codegen/testing/test/testdata/other-owned/docs/barresource/_index.md b/pkg/codegen/testing/test/testdata/other-owned/docs/barresource/_index.md index 79560e17107e..c00dfd186723 100644 --- a/pkg/codegen/testing/test/testdata/other-owned/docs/barresource/_index.md +++ b/pkg/codegen/testing/test/testdata/other-owned/docs/barresource/_index.md @@ -310,91 +310,37 @@ All [input](#inputs) properties are implicitly available as output properties. A
-
- -Id - - - string -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -Id - - - string -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - String -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - string -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - str -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - String -
-

The provider-assigned unique ID for this managed resource.

-
+
diff --git a/pkg/codegen/testing/test/testdata/other-owned/docs/fooresource/_index.md b/pkg/codegen/testing/test/testdata/other-owned/docs/fooresource/_index.md index 6f0cbf73c1ce..f31715f17b6d 100644 --- a/pkg/codegen/testing/test/testdata/other-owned/docs/fooresource/_index.md +++ b/pkg/codegen/testing/test/testdata/other-owned/docs/fooresource/_index.md @@ -310,91 +310,37 @@ All [input](#inputs) properties are implicitly available as output properties. A
-
- -Id - - - string -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -Id - - - string -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - String -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - string -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - str -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - String -
-

The provider-assigned unique ID for this managed resource.

-
+
diff --git a/pkg/codegen/testing/test/testdata/other-owned/docs/otherresource/_index.md b/pkg/codegen/testing/test/testdata/other-owned/docs/otherresource/_index.md index 4d68b459d2a9..01a95c4fa06c 100644 --- a/pkg/codegen/testing/test/testdata/other-owned/docs/otherresource/_index.md +++ b/pkg/codegen/testing/test/testdata/other-owned/docs/otherresource/_index.md @@ -310,91 +310,37 @@ All [input](#inputs) properties are implicitly available as output properties. A
-
- -Id - - - string -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -Id - - - string -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - String -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - string -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - str -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - String -
-

The provider-assigned unique ID for this managed resource.

-
+
diff --git a/pkg/codegen/testing/test/testdata/plain-schema-gh6957/docs/staticpage/_index.md b/pkg/codegen/testing/test/testdata/plain-schema-gh6957/docs/staticpage/_index.md index 86a7ad7279bb..3dd33dc646b8 100644 --- a/pkg/codegen/testing/test/testdata/plain-schema-gh6957/docs/staticpage/_index.md +++ b/pkg/codegen/testing/test/testdata/plain-schema-gh6957/docs/staticpage/_index.md @@ -374,15 +374,6 @@ All [input](#inputs) properties are implicitly available as output properties. A Pulumi.Aws.S3.Bucket

The bucket resource.

-
- -Id - - - string -
-

The provider-assigned unique ID for this managed resource.

@@ -407,15 +398,6 @@ All [input](#inputs) properties are implicitly available as output properties. A Bucket

The bucket resource.

-
- -Id - - - string -
-

The provider-assigned unique ID for this managed resource.

@@ -440,15 +422,6 @@ All [input](#inputs) properties are implicitly available as output properties. A Bucket

The bucket resource.

-
- -id - - - String -
-

The provider-assigned unique ID for this managed resource.

@@ -473,15 +446,6 @@ All [input](#inputs) properties are implicitly available as output properties. A pulumiAwss3Bucket

The bucket resource.

-
- -id - - - string -
-

The provider-assigned unique ID for this managed resource.

@@ -506,15 +470,6 @@ All [input](#inputs) properties are implicitly available as output properties. A Bucket

The bucket resource.

-
- -id - - - str -
-

The provider-assigned unique ID for this managed resource.

@@ -539,15 +494,6 @@ All [input](#inputs) properties are implicitly available as output properties. A aws:s3:Bucket

The bucket resource.

-
- -id - - - String -
-

The provider-assigned unique ID for this managed resource.

diff --git a/pkg/codegen/testing/test/testdata/simple-methods-schema-single-value-returns/docs/foo/_index.md b/pkg/codegen/testing/test/testdata/simple-methods-schema-single-value-returns/docs/foo/_index.md index 0a6b3b44de02..1b464672ef35 100644 --- a/pkg/codegen/testing/test/testdata/simple-methods-schema-single-value-returns/docs/foo/_index.md +++ b/pkg/codegen/testing/test/testdata/simple-methods-schema-single-value-returns/docs/foo/_index.md @@ -261,91 +261,37 @@ All [input](#inputs) properties are implicitly available as output properties. A
-
- -Id - - - string -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -Id - - - string -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - String -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - string -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - str -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - String -
-

The provider-assigned unique ID for this managed resource.

-
+
diff --git a/pkg/codegen/testing/test/testdata/simple-methods-schema/docs/foo/_index.md b/pkg/codegen/testing/test/testdata/simple-methods-schema/docs/foo/_index.md index 158e2b2ccda8..2b8c439c704c 100644 --- a/pkg/codegen/testing/test/testdata/simple-methods-schema/docs/foo/_index.md +++ b/pkg/codegen/testing/test/testdata/simple-methods-schema/docs/foo/_index.md @@ -261,91 +261,37 @@ All [input](#inputs) properties are implicitly available as output properties. A
-
- -Id - - - string -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -Id - - - string -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - String -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - string -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - str -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - String -
-

The provider-assigned unique ID for this managed resource.

-
+
diff --git a/pkg/codegen/testing/test/testdata/simple-plain-schema-with-root-package/docs/component/_index.md b/pkg/codegen/testing/test/testdata/simple-plain-schema-with-root-package/docs/component/_index.md index f85d5f592492..b019a3facf21 100644 --- a/pkg/codegen/testing/test/testdata/simple-plain-schema-with-root-package/docs/component/_index.md +++ b/pkg/codegen/testing/test/testdata/simple-plain-schema-with-root-package/docs/component/_index.md @@ -702,91 +702,37 @@ All [input](#inputs) properties are implicitly available as output properties. A
-
- -Id - - - string -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -Id - - - string -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - String -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - string -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - str -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - String -
-

The provider-assigned unique ID for this managed resource.

-
+
diff --git a/pkg/codegen/testing/test/testdata/simple-plain-schema/docs/component/_index.md b/pkg/codegen/testing/test/testdata/simple-plain-schema/docs/component/_index.md index 9fbc94cc270f..bec164f5086e 100644 --- a/pkg/codegen/testing/test/testdata/simple-plain-schema/docs/component/_index.md +++ b/pkg/codegen/testing/test/testdata/simple-plain-schema/docs/component/_index.md @@ -751,91 +751,37 @@ All [input](#inputs) properties are implicitly available as output properties. A
-
- -Id - - - string -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -Id - - - string -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - String -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - string -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - str -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - String -
-

The provider-assigned unique ID for this managed resource.

-
+
diff --git a/pkg/codegen/testing/test/testdata/simple-resource-schema-custom-pypackage-name/docs/otherresource/_index.md b/pkg/codegen/testing/test/testdata/simple-resource-schema-custom-pypackage-name/docs/otherresource/_index.md index 876c0ac9980b..fb5ed5c3c336 100644 --- a/pkg/codegen/testing/test/testdata/simple-resource-schema-custom-pypackage-name/docs/otherresource/_index.md +++ b/pkg/codegen/testing/test/testdata/simple-resource-schema-custom-pypackage-name/docs/otherresource/_index.md @@ -310,91 +310,37 @@ All [input](#inputs) properties are implicitly available as output properties. A
-
- -Id - - - string -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -Id - - - string -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - String -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - string -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - str -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - String -
-

The provider-assigned unique ID for this managed resource.

-
+
diff --git a/pkg/codegen/testing/test/testdata/simple-resource-schema/docs/barresource/_index.md b/pkg/codegen/testing/test/testdata/simple-resource-schema/docs/barresource/_index.md index 50e966eaaa19..e6664316b577 100644 --- a/pkg/codegen/testing/test/testdata/simple-resource-schema/docs/barresource/_index.md +++ b/pkg/codegen/testing/test/testdata/simple-resource-schema/docs/barresource/_index.md @@ -310,91 +310,37 @@ All [input](#inputs) properties are implicitly available as output properties. A
-
- -Id - - - string -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -Id - - - string -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - String -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - string -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - str -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - String -
-

The provider-assigned unique ID for this managed resource.

-
+
diff --git a/pkg/codegen/testing/test/testdata/simple-resource-schema/docs/fooresource/_index.md b/pkg/codegen/testing/test/testdata/simple-resource-schema/docs/fooresource/_index.md index 480bbc9e06a1..c4f4ddb88655 100644 --- a/pkg/codegen/testing/test/testdata/simple-resource-schema/docs/fooresource/_index.md +++ b/pkg/codegen/testing/test/testdata/simple-resource-schema/docs/fooresource/_index.md @@ -310,91 +310,37 @@ All [input](#inputs) properties are implicitly available as output properties. A
-
- -Id - - - string -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -Id - - - string -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - String -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - string -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - str -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - String -
-

The provider-assigned unique ID for this managed resource.

-
+
diff --git a/pkg/codegen/testing/test/testdata/simple-resource-schema/docs/otherresource/_index.md b/pkg/codegen/testing/test/testdata/simple-resource-schema/docs/otherresource/_index.md index 876c0ac9980b..fb5ed5c3c336 100644 --- a/pkg/codegen/testing/test/testdata/simple-resource-schema/docs/otherresource/_index.md +++ b/pkg/codegen/testing/test/testdata/simple-resource-schema/docs/otherresource/_index.md @@ -310,91 +310,37 @@ All [input](#inputs) properties are implicitly available as output properties. A
-
- -Id - - - string -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -Id - - - string -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - String -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - string -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - str -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - String -
-

The provider-assigned unique ID for this managed resource.

-
+
diff --git a/pkg/codegen/testing/test/testdata/simple-yaml-schema/docs/otherresource/_index.md b/pkg/codegen/testing/test/testdata/simple-yaml-schema/docs/otherresource/_index.md index 6dbd8e0bd3d3..44fa10303933 100644 --- a/pkg/codegen/testing/test/testdata/simple-yaml-schema/docs/otherresource/_index.md +++ b/pkg/codegen/testing/test/testdata/simple-yaml-schema/docs/otherresource/_index.md @@ -359,91 +359,37 @@ All [input](#inputs) properties are implicitly available as output properties. A
-
- -Id - - - string -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -Id - - - string -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - String -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - string -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - str -
-

The provider-assigned unique ID for this managed resource.

-
+
-
- -id - - - String -
-

The provider-assigned unique ID for this managed resource.

-
+