docs
docs copied to clipboard
"Import" section unexpectedly at top of page, and often presents incorrect information
The "Import" section is intended to be at the bottom of resource docs pages, and for most resources it is. However, on https://www.pulumi.com/docs/reference/pkg/docker/service/, the "Import" section is at the top of the page - which looks very out of place. This is true for 2 of the 10 resources in this package.
Also on https://www.pulumi.com/docs/reference/pkg/aws/ec2/tag/.
This feels pretty important to fix.
Another wonky Docker page at https://www.pulumi.com/docs/reference/pkg/docker/container/, though this one looks like there's some Markdown getting spliced somehow.
Another case like this is https://www.pulumi.com/registry/packages/vsphere/api-docs/hostportgroup/#importing, which has this section at the top of the page, but also somehow shows a multi-lang example section with no content instead of an import statement.
There are also cases where the import section goes missing entirely - like https://www.pulumi.com/registry/packages/vsphere/api-docs/computecluster/.
there seems to be more brokenness on this now
Seeing the same thing for snowflake.GrantPrivilegesToRole
:
Checking out the description in the schema:
"description": "{{% examples %}}\n## Example Usage\n### global privileges\n##################################\n\n# list of privileges\nresource \"snowflake_grant_privileges_to_role\" \"g1\" {\n privileges = [\"MODIFY\", \"USAGE\"]\n role_name = snowflake_role.r.name\n on_account = true\n}\n\n# all privileges + grant option\nresource \"snowflake_grant_privileges_to_role\" \"g2\" {\n role_name = snowflake_role.r.name\n on_account = true\n all_privileges = true\n with_grant_option = true\n}\n\n##################################\n### account object privileges\n##################################\n\n# list of privileges\nresource \"snowflake_grant_privileges_to_role\" \"g3\" {\n privileges = [\"CREATE\", \"MONITOR\"]\n role_name = snowflake_role.r.name\n on_account_object {\n object_type = \"DATABASE\"\n object_name = snowflake_database.d.name\n }\n}\n\n# all privileges + grant option\nresource \"snowflake_grant_privileges_to_role\" \"g4\" {\n role_name = snowflake_role.r.name\n on_account_object {\n object_type = \"DATABASE\"\n object_name = snowflake_database.d.name\n }\n all_privileges = true\n with_grant_option = true\n}\n\n##################################\n### schema privileges\n##################################\n\n# list of privileges\nresource \"snowflake_grant_privileges_to_role\" \"g5\" {\n privileges = [\"MODIFY\", \"CREATE TABLE\"]\n role_name = snowflake_role.r.name\n on_schema {\n schema_name = \"\\\"my_db\\\".\\\"my_schema\\\"\" # note this is a fully qualified name!\n }\n}\n\n# all privileges + grant option\nresource \"snowflake_grant_privileges_to_role\" \"g6\" {\n role_name = snowflake_role.r.name\n on_schema {\n schema_name = \"\\\"my_db\\\".\\\"my_schema\\\"\" # note this is a fully qualified name!\n }\n all_privileges = true\n with_grant_option = true\n}\n\n# all schemas in database\nresource \"snowflake_grant_privileges_to_role\" \"g7\" {\n privileges = [\"MODIFY\", \"CREATE TABLE\"]\n role_name = snowflake_role.r.name\n on_schema {\n all_schemas_in_database = snowflake_database.d.name\n }\n}\n\n# future schemas in database\nresource \"snowflake_grant_privileges_to_role\" \"g8\" {\n privileges = [\"MODIFY\", \"CREATE TABLE\"]\n role_name = snowflake_role.r.name\n on_schema {\n future_schemas_in_database = snowflake_database.d.name\n }\n}\n\n##################################\n{{% /examples %}}\n\n## Import\n\nformat is role_name (string) | privileges (comma-delimited string) | all_privileges (bool) |with_grant_option (bool) | on_account (bool) | on_account_object (bool) | on_schema (bool) | on_schema_object (bool) | all (bool) | future (bool) | object_type (string) | object_name (string) | object_type_plural (string) | in_schema (bool) | schema_name (string) | in_database (bool) | database_name (string)\n\n```sh\n $ pulumi import snowflake:index/grantPrivilegesToRole:GrantPrivilegesToRole \"test_role|MANAGE GRANTS,MONITOR USAGE|false|false|true|false|false|false|false|false||||false||false|\"\n```\n\n ",
I noticed a couple of possibly interesting conditions:
- There's no description - it just jumps right into examples.
- The examples do not render either.
Given this comment:
Closing as dupe of https://github.com/pulumi/docs/issues/4793. Though the problem itself is most likely in tfbridge or docsgen.
Does this ticket need to be transferred to a different repo? Is a separate ticket needed to investigate in docsgen or tfbridge? cc @mikhailshilkov @justinvp
Most of the occurrences here are still an issue.
@mnlumi I think this is the right place for now. If it turns out the issue is something outside the scope of docs rendering, we'll transfer to another repo.
Another one: https://www.pulumi.com/registry/packages/pulumiservice/api-docs/deploymentsettings/
Also https://www.pulumi.com/registry/packages/databricks/api-docs/permissions/
Does this ticket need to be transferred to a different repo? Is a separate ticket needed to investigate in docsgen or tfbridge? cc @mikhailshilkov @justinvp
I have a feeling this issue likely resides in the bridge since the content that is rendered on these pages is embedded directly in the description property of that resource in the provider's schema file (and I do see the description beginning with the "Import" section first in these cases). Should this get transferred to the terraform bridge repo perhaps?