From b8474138083fe109c552661909ea685939fcf26f Mon Sep 17 00:00:00 2001 From: Joel Watson Date: Mon, 8 Jan 2024 14:27:38 -0600 Subject: [PATCH] Add tag support to doppler_secrets_sync_aws_secrets_manager --- docs/resources/secrets_sync_aws_secrets_manager.md | 6 ++++++ doppler/resource_sync_types.go | 10 ++++++++++ examples/resources/integration_aws_secrets_manager.tf | 1 + 3 files changed, 17 insertions(+) diff --git a/docs/resources/secrets_sync_aws_secrets_manager.md b/docs/resources/secrets_sync_aws_secrets_manager.md index b4bc3e8..d79b249 100644 --- a/docs/resources/secrets_sync_aws_secrets_manager.md +++ b/docs/resources/secrets_sync_aws_secrets_manager.md @@ -71,10 +71,12 @@ resource "doppler_secrets_sync_aws_secrets_manager" "backend_prod" { region = "us-east-1" path = "/backend/" + tags = { myTag = "enabled" } } ``` + ## Schema ### Required @@ -85,6 +87,10 @@ resource "doppler_secrets_sync_aws_secrets_manager" "backend_prod" { - `project` (String) The name of the Doppler project - `region` (String) The AWS region +### Optional + +- `tags` (Map of String) AWS tags to attach to the secrets + ### Read-Only - `id` (String) The ID of this resource. diff --git a/doppler/resource_sync_types.go b/doppler/resource_sync_types.go index 4eef25e..48885a8 100644 --- a/doppler/resource_sync_types.go +++ b/doppler/resource_sync_types.go @@ -19,11 +19,21 @@ func resourceSyncAWSSecretsManager() *schema.Resource { Required: true, ForceNew: true, }, + "tags": { + Description: "AWS tags to attach to the secrets", + Type: schema.TypeMap, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Optional: true, + ForceNew: true, + }, }, DataBuilder: func(d *schema.ResourceData) IntegrationData { return map[string]interface{}{ "region": d.Get("region"), "path": d.Get("path"), + "tags": d.Get("tags"), } }, } diff --git a/examples/resources/integration_aws_secrets_manager.tf b/examples/resources/integration_aws_secrets_manager.tf index 074403e..f05badf 100644 --- a/examples/resources/integration_aws_secrets_manager.tf +++ b/examples/resources/integration_aws_secrets_manager.tf @@ -57,5 +57,6 @@ resource "doppler_secrets_sync_aws_secrets_manager" "backend_prod" { region = "us-east-1" path = "/backend/" + tags = { myTag = "enabled" } }