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: Improve doc for AWS Sync resources #113

Merged

Conversation

ViacheslavKudinov
Copy link
Contributor

@ViacheslavKudinov ViacheslavKudinov commented Nov 28, 2024

This pull request includes updates to the documentation and codebase to improve the descriptions of certain parameters related to AWS resource tags and metadata updates. The most important changes include clarifying the descriptions of update_resource_tags and update_metadata parameters.

Documentation updates:

Codebase updates:

  • doppler/resource_sync_types.go: Updated the description of the update_metadata parameter in the resourceSyncAWSSecretsManager function to remove redundant information.
  • doppler/resource_sync_types.go: Updated the description of the update_resource_tags parameter in both the resourceSyncAWSSecretsManager and resourceSyncAWSParameterStore functions to use backticks for the possible values (never, upsert, replace). [1] [2]

@ViacheslavKudinov
Copy link
Contributor Author

Hi @nmanoogian @apazzolini
Made small contribution to make doc more clear to know values for update_resource_tags field.

@ViacheslavKudinov ViacheslavKudinov changed the title Improve doc for AWS Sync resources docs: Improve doc for AWS Sync resources Nov 28, 2024
Copy link
Member

@nmanoogian nmanoogian left a comment

Choose a reason for hiding this comment

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

Thanks for submitting these improvements, @ViacheslavKudinov! One minor ask: The docs that you modified are auto-generated from annotations in the code (from make tfdocs). Can you apply the following change to update those annotations to match your proposed changes?

diff --git a/doppler/resource_sync_types.go b/doppler/resource_sync_types.go
index 2d7eed8..8e379d7 100644
--- a/doppler/resource_sync_types.go
+++ b/doppler/resource_sync_types.go
@@ -36,14 +36,14 @@ func resourceSyncAWSSecretsManager() *schema.Resource {
 				ForceNew: true,
 			},
 			"update_metadata": {
-				Description: "If enabled, Doppler will update the AWS secret metadata (e.g. KMS key) during every sync. If disabled, Doppler will only set secret metadata for new AWS secrets. Note that Doppler never updates tags for existing AWS secrets.",
+				Description: "If enabled, Doppler will update the AWS secret metadata (e.g. KMS key) during every sync. If disabled, Doppler will only set secret metadata for new AWS secrets.",
 				Type:        schema.TypeBool,
 				Optional:    true,
 				ForceNew:    true,
 			},
 
 			"update_resource_tags": {
-				Description:  "Behavior for AWS resource tags on updates (never update, upsert tags (leaving non-Doppler tags alone), replace tags (remove non-Doppler tags))",
+				Description:  "Behavior for AWS resource tags on updates (`never` update, `upsert` tags (leaving non-Doppler tags alone), `replace` tags (remove non-Doppler tags))",
 				Type:         schema.TypeString,
 				Optional:     true,
 				ForceNew:     true,
@@ -143,7 +143,7 @@ func resourceSyncAWSParameterStore() *schema.Resource {
 				ForceNew: true,
 			},
 			"update_resource_tags": {
-				Description:  "Behavior for AWS resource tags on updates (never update, upsert tags (leaving non-Doppler tags alone), replace tags (remove non-Doppler tags))",
+				Description:  "Behavior for AWS resource tags on updates (`never` update, `upsert` tags (leaving non-Doppler tags alone), `replace` tags (remove non-Doppler tags))",
 				Type:         schema.TypeString,
 				Optional:     true,
 				ForceNew:     true,

If you aren't familiar with these patches, you can copy and paste them into the git apply CLI command or use pbpaste | git apply if you are on macOS.

@ViacheslavKudinov
Copy link
Contributor Author

ViacheslavKudinov commented Dec 2, 2024

@nmanoogian Ah, i didn't know that it comes from annotation 👍🏻
Recent change i was doing on GitHub provider which has own doc files generated not from code itself.
Thanks for sharing it.
I will patch my PR then.

PS oh, it is there https://github.com/DopplerHQ/terraform-provider-doppler?tab=readme-ov-file#doc-generation.
My bad... i was not paying enough attention by reading readme.

@ViacheslavKudinov ViacheslavKudinov marked this pull request as draft December 2, 2024 15:57
@ViacheslavKudinov ViacheslavKudinov marked this pull request as ready for review December 2, 2024 16:02
@ViacheslavKudinov
Copy link
Contributor Author

Updated

@nmanoogian nmanoogian merged commit 0bb4976 into DopplerHQ:master Dec 2, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants