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

docs: Add cts_user_defined_meta option #9561

Merged

Conversation

findkim
Copy link
Contributor

@findkim findkim commented Jan 13, 2021

@findkim findkim added type/docs Documentation needs to be created/updated/clarified theme/consul-terraform-sync Relating to Consul Terraform Sync and Network Infrastructure Automation labels Jan 13, 2021
@findkim findkim requested a review from a team January 13, 2021 23:16
@@ -95,6 +95,8 @@ service {
- `name` - (string: required) The Consul logical name of the service (required).
- `namespace` <EnterpriseAlert inline /> - (string: "default") The namespace of the service. If not provided, the namespace will be inferred from the Consul-Terraform-Sync ACL token, or default to the `default` namespace.
- `tag` - (string) Tag is used to filter nodes based on the tag for the service.
- `cts_user_defined_meta` - (map[string]) User-defined metadata is a map of strings that will be appended to the [service input variable](/docs/nia/installation/requirements#module-specifications) for compatible Terraform modules. Not all modules may use this value. To determine if your task uses metadata or what the expected keys and format are, reference documentation for the module(s) configured for your tasks.
- If multiple tasks depend on the same service but require different metadata, you can declare different sets of metadata for the same service. Define multiple service blocks for the service with unique IDs (and identical names) for those blocks. The metadata can then be separated per task based on the service IDs.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we'll want an example of this somewhere... it makes sense in abstract but I'm still not 100% on what it would look like. Obviously not in here, in the reference section, but somewhere.

Copy link
Contributor Author

@findkim findkim Jan 13, 2021

Choose a reason for hiding this comment

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

+1 an example would be easier to follow. I don't know where I could write an example, if not here. Since we currently don't have a place for these edge case examples, would this section be so terrible as opposed to non-existent -- or do you have suggestions on places?

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure where to put it at this point. I don't think the small examples in the configuration reference should get overloaded with all the different possible options, it gives the impressions that all those settings are needed. I'd say go ahead and merge this for now (ie. this is not a blocker) and we'll try to keep this in mind for the future. Maybe it can be worked into a learn guide or we could think about adding some documented examples.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for starting this discussion. Slept on this and a few ideas came up

  1. Add examples in the PR for the feature. It's linked from the changelog -- it looks like a community member has already expressed interest on the PR! 😄
  2. Start including blogs as a part of our release workflow for features on hashicorp.com/blog
  3. ^ a less official blog in the repro's github wiki

Copy link
Member

Choose a reason for hiding this comment

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

Oooo. I personally like 3 for the less official-ness and potential to organize a 'library' of examples. Another thing to pair with the ideas, I’ve always liked how the Go documentation has the expand/collapse option for go-playground examples. It’s nice for users who are skimming and want a quick example vs. users who want to understand a feature in-depth.

Just threw out the thought! Probably not feasible right now - I couldn’t find precedence in our docs besides the sidebar navigation. And the example you have in mind may be larger than just an expand/collapse section.

Copy link
Member

Choose a reason for hiding this comment

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

Sure! And I wasn't very clear - I was imagining that examples could be in an expand/collapse section in the configuration page (not for us to include our Go docs).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah even better. I like that

Copy link
Contributor

Choose a reason for hiding this comment

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

I like the wiki idea, but wiki's are terribly hard to keep up to date and almost needs a dedicated resource. Probably the best way to make them work is to get the community to do it, but I'm not sure if we'll be allowed to have an publicly editable wiki in a hashicorp repo. Github wiki permissions do support granting wiki edit permissions by themselves... so maybe partners/volunteers?

Another thing I was thinking of working into hashicat was to have the examples all run as tests. To have the examples and enforce keeping them up to date by making them part of the CI test suite.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't understand your difference between wiki / blog / learn guide upkeep? Other products publish blogs on describing new features (Terraform provider source, Vault 1.6) and aren't updated after published. These would be user-facing features and aren't pinned to implementation, and I imagine updates would involve breaking changes.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, I was thinking more along the lines of documentation style examples, not blog posts. Using the wiki for informal blog posts is a much better idea that wouldn't have this sort of issues as people naturally understand that blog posts age.

So 👍 to that idea and sorry for the miscommunication.

@findkim findkim merged commit 3d0f638 into hashicorp:nia/docs-0.1.0-beta Jan 14, 2021
@findkim findkim deleted the cts-user-defined-meta branch January 14, 2021 16:04
findkim added a commit to findkim/consul that referenced this pull request Feb 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme/consul-terraform-sync Relating to Consul Terraform Sync and Network Infrastructure Automation type/docs Documentation needs to be created/updated/clarified
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants