Skip to content

feat(#645) split name in resources section into resource type and resource name #649

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

edgarsandi
Copy link
Contributor

@edgarsandi edgarsandi commented Nov 4, 2022

Description of your changes

Hi there!

This pull request adds to ascii and markdown document, also to ascii and markdown table the split between the resource type and the resource name

Current

Name Type
aws_iam_role.default resource
aws_partition.default data source

New

Resource Type Resource Name Type
aws_iam_role default resource
aws_partition default data source

All the outputs will be:

ASCII document resources

- foo_resource baz (resource)
- https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource[null_resource] foo (resource)
- https://registry.terraform.io/providers/hashicorp/tls/latest/docs/resources/private_key[tls_private_key] baz (resource)
- https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity[aws_caller_identity] current (data source)
- https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity[aws_caller_identity] ident (data source)

ASCII table resources

|Resource Type |Resource Name |Type
|foo_resource |baz |resource
|https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource[null_resource] |foo |resource
|https://registry.terraform.io/providers/hashicorp/tls/latest/docs/resources/private_key[tls_private_key] |baz |resource
|https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity[aws_caller_identity] |current |data source
|https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity[aws_caller_identity] |ident |data source

Markdown document resources

- foo_resource baz (resource)
- [null_resource](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) foo (resource)
- [tls_private_key](https://registry.terraform.io/providers/hashicorp/tls/latest/docs/resources/private_key) baz (resource)
- [aws_caller_identity](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) current (data source)
- [aws_caller_identity](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) ident (data source)

Markdown table resources

| Resource Type | Resource Name | Type |
|------|------|------|
| foo_resource | baz | resource |
| [null_resource](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | foo | resource |
| [tls_private_key](https://registry.terraform.io/providers/hashicorp/tls/latest/docs/resources/private_key) | baz | resource |
| [aws_caller_identity](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) | current | data source |
| [aws_caller_identity](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) | ident | data source |

All the other output formats continues the same

Fixes #645

I have:

@edgarsandi edgarsandi force-pushed the feat(#645)-split-name-in-resources-section-into-resource-type-and-resource-name branch from 2df5002 to f39bb42 Compare November 4, 2022 12:10
@edgarsandi
Copy link
Contributor Author

@khos2ow hi!

Have some adjust that I need to do here?

…tions in favor of Spec()

Signed-off-by: Edgar R. Sandi <edgar.r.sandi@gmail.com>
…me() functions

Signed-off-by: Edgar R. Sandi <edgar.r.sandi@gmail.com>
Signed-off-by: Edgar R. Sandi <edgar.r.sandi@gmail.com>
…rmats to use the GetResourceType() and the GetResourceName() functions

Signed-off-by: Edgar R. Sandi <edgar.r.sandi@gmail.com>
…and name splitted format

Signed-off-by: Edgar R. Sandi <edgar.r.sandi@gmail.com>
… format

Signed-off-by: Edgar R. Sandi <edgar.r.sandi@gmail.com>
@edgarsandi edgarsandi force-pushed the feat(#645)-split-name-in-resources-section-into-resource-type-and-resource-name branch from f39bb42 to 77ee12d Compare July 20, 2023 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Split Name in resources section into Resource Type and ResourceName
1 participant