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

Adding provider information to module dependencies #275

Merged
merged 4 commits into from
Jan 17, 2025

Conversation

diofeher
Copy link
Member

@diofeher diofeher commented Jan 14, 2025

Closes #223

Add provider dependencies information to modules

Example of the json module after the new changes (search for providers)

{"id":"v0.13.0","published":"2022-11-23T11:50:36-03:00","readme":true,"edit_link":"https://github.com/cloudposse/terraform-aws-route53-cluster-hostname/blob/0.13.0/README.md","variables":{"additional_tag_map":{"type":"map of string","default":{},"description":"Additional key-value pairs to add to each map in `tags_as_list_of_maps`. Not added to `tags` or `id`.\nThis is for some rare cases where resources want additional configuration of tags\nand therefore take a list of maps with tag key, value, and additional configuration.\n","sensitive":false,"required":false},"attributes":{"type":"list of string","default":[],"description":"ID element. Additional attributes (e.g. `workers` or `cluster`) to add to `id`,\nin the order they appear in the list. New attributes are appended to the\nend of the list. The elements of the list are joined by the `delimiter`\nand treated as a single ID element.\n","sensitive":false,"required":false},"context":{"type":"dynamic","default":{"additional_tag_map":{},"attributes":[],"delimiter":null,"descriptor_formats":{},"enabled":true,"environment":null,"id_length_limit":null,"label_key_case":null,"label_order":[],"label_value_case":null,"labels_as_tags":["unset"],"name":null,"namespace":null,"regex_replace_chars":null,"stage":null,"tags":{},"tenant":null},"description":"Single object for setting entire context at once.\nSee description of individual variables for details.\nLeave string and numeric variables as `null` to use default value.\nIndividual variable settings (non-null) override settings in context object,\nexcept for attributes, tags, and additional_tag_map, which are merged.\n","sensitive":false,"required":false},"delimiter":{"type":"string","default":null,"description":"Delimiter to be used between ID elements.\nDefaults to `-` (hyphen). Set to `\"\"` to use no delimiter at all.\n","sensitive":false,"required":false},"descriptor_formats":{"type":"dynamic","default":{},"description":"Describe additional descriptors to be output in the `descriptors` output map.\nMap of maps. Keys are names of descriptors. Values are maps of the form\n`{\n   format = string\n   labels = list(string)\n}`\n(Type is `any` so the map values can later be enhanced to provide additional options.)\n`format` is a Terraform format string to be passed to the `format()` function.\n`labels` is a list of labels, in order, to pass to `format()` function.\nLabel values will be normalized before being passed to `format()` so they will be\nidentical to how they appear in `id`.\nDefault is `{}` (`descriptors` output will be empty).\n","sensitive":false,"required":false},"dns_name":{"type":"string","default":"","description":"The name of the DNS record","sensitive":false,"required":false},"enabled":{"type":"bool","default":null,"description":"Set to false to prevent the module from creating any resources","sensitive":false,"required":false},"environment":{"type":"string","default":null,"description":"ID element. Usually used for region e.g. 'uw2', 'us-west-2', OR role 'prod', 'staging', 'dev', 'UAT'","sensitive":false,"required":false},"id_length_limit":{"type":"number","default":null,"description":"Limit `id` to this many characters (minimum 6).\nSet to `0` for unlimited length.\nSet to `null` for keep the existing setting, which defaults to `0`.\nDoes not affect `id_full`.\n","sensitive":false,"required":false},"label_key_case":{"type":"string","default":null,"description":"Controls the letter case of the `tags` keys (label names) for tags generated by this module.\nDoes not affect keys of tags passed in via the `tags` input.\nPossible values: `lower`, `title`, `upper`.\nDefault value: `title`.\n","sensitive":false,"required":false},"label_order":{"type":"list of string","default":null,"description":"The order in which the labels (ID elements) appear in the `id`.\nDefaults to [\"namespace\", \"environment\", \"stage\", \"name\", \"attributes\"].\nYou can omit any of the 6 labels (\"tenant\" is the 6th), but at least one must be present.\n","sensitive":false,"required":false},"label_value_case":{"type":"string","default":null,"description":"Controls the letter case of ID elements (labels) as included in `id`,\nset as tag values, and output by this module individually.\nDoes not affect values of tags passed in via the `tags` input.\nPossible values: `lower`, `title`, `upper` and `none` (no transformation).\nSet this to `title` and set `delimiter` to `\"\"` to yield Pascal Case IDs.\nDefault value: `lower`.\n","sensitive":false,"required":false},"labels_as_tags":{"type":"set of string","default":["default"],"description":"Set of labels (ID elements) to include as tags in the `tags` output.\nDefault is to include all labels.\nTags with empty values will not be included in the `tags` output.\nSet to `[]` to suppress all generated tags.\n**Notes:**\n  The value of the `name` tag, if included, will be the `id`, not the `name`.\n  Unlike other `null-label` inputs, the initial setting of `labels_as_tags` cannot be\n  changed in later chained modules. Attempts to change it will be silently ignored.\n","sensitive":false,"required":false},"name":{"type":"string","default":null,"description":"ID element. Usually the component or solution name, e.g. 'app' or 'jenkins'.\nThis is the only ID element not also included as a `tag`.\nThe \"name\" tag is set to the full `id` string. There is no tag with the value of the `name` input.\n","sensitive":false,"required":false},"namespace":{"type":"string","default":null,"description":"ID element. Usually an abbreviation of your organization name, e.g. 'eg' or 'cp', to help ensure generated IDs are globally unique","sensitive":false,"required":false},"private_zone":{"type":"bool","default":null,"description":"Used with `zone_name` input to get a private Hosted Zone.","sensitive":false,"required":false},"records":{"type":"list of string","default":null,"description":"DNS records to create","sensitive":false,"required":true},"regex_replace_chars":{"type":"string","default":null,"description":"Terraform regular expression (regex) string.\nCharacters matching the regex will be removed from the ID elements.\nIf not set, `\"/[^a-zA-Z0-9-]/\"` is used to remove all characters other than hyphens, letters and digits.\n","sensitive":false,"required":false},"stage":{"type":"string","default":null,"description":"ID element. Usually used to indicate role, e.g. 'prod', 'staging', 'source', 'build', 'test', 'deploy', 'release'","sensitive":false,"required":false},"tags":{"type":"map of string","default":{},"description":"Additional tags (e.g. `{'BusinessUnit': 'XYZ'}`).\nNeither the tag keys nor the tag values will be modified by this module.\n","sensitive":false,"required":false},"tenant":{"type":"string","default":null,"description":"ID element _(Rarely used, not included by default)_. A customer identifier, indicating who this instance of a resource is for","sensitive":false,"required":false},"ttl":{"type":"number","default":300,"description":"The TTL of the record to add to the DNS zone to complete certificate validation","sensitive":false,"required":false},"type":{"type":"string","default":"CNAME","description":"Type of DNS records to create","sensitive":false,"required":false},"zone_id":{"type":"string","default":null,"description":"Route53 DNS Zone ID","sensitive":false,"required":false},"zone_name":{"type":"string","default":null,"description":"The Hosted Zone name of the desired Hosted Zone.","sensitive":false,"required":false},"zone_tags":{"type":"map of string","default":null,"description":"Used with `zone_name` input. A map of tags, each pair of which must exactly match a pair on the desired Hosted Zone.","sensitive":false,"required":false},"zone_vpc_id":{"type":"string","default":null,"description":"Used with `zone_name` input to get a private Hosted Zone associated with the `vpc_id` (in this case, private_zone is not mandatory).","sensitive":false,"required":false}},"outputs":{"hostname":{"sensitive":false,"description":"DNS hostname"}},"schema_error":"","providers":[{"name":"aws","full_name":"registry.opentofu.org/hashicorp/aws","version_constraint":"\u003e= 3.0.0"}],"dependencies":[{"name":"this","version_constraint":"0.25.0","source":"cloudposse/label/null"}],"resources":[{"address":"aws_route53_record.default","type":"aws_route53_record","name":"default"},{"address":"data.aws_route53_zone.default","type":"aws_route53_zone","name":"default"}],"link":"https://github.com/cloudposse/terraform-aws-route53-cluster-hostname/tree/0.13.0","vcs_repository":"","licenses":[{"spdx":"Apache-2.0","confidence":0.98704666,"is_compatible":true,"file":"LICENSE","link":"https://github.com/cloudposse/terraform-aws-route53-cluster-hostname/blob/0.13.0/LICENSE"}],"incompatible_license":false,"examples":{},"submodules":{}}

Checklist

  • I have read the contribution guide.
  • I have not used an AI coding assistant to create this PR.
  • My contribution is compatible with the MPL-2.0 license and I have provided a DCO sign-off on all my commits.
  • I have written all code in this PR myself OR I have marked all code I have not written myself (including modified code, e.g. copied from other places and then modified) with a comment indicating where it came from.

@diofeher diofeher changed the title adding provider information to module dependencies Adding provider information to module dependencies Jan 14, 2025
Signed-off-by: Diogenes Fernandes <[email protected]>
@diofeher diofeher marked this pull request as ready for review January 14, 2025 02:18
Copy link
Contributor

@abstractionfactory abstractionfactory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much! Just a comment for now, I'll review properly later.

@diofeher
Copy link
Member Author

diofeher commented Jan 16, 2025 via email

Signed-off-by: Diogenes Fernandes <[email protected]>
@abstractionfactory abstractionfactory merged commit 964ac49 into opentofu:main Jan 17, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provider Dependencies are always empty
2 participants