-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from DopplerHQ/terraform-integrations-config-s…
…yncs Add integration and sync resources for AWS Secrets Manager and AWS Parameter Store
- Loading branch information
Showing
31 changed files
with
1,234 additions
and
169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,3 +63,6 @@ override.tf.json | |
.terraformrc | ||
terraform.rc | ||
terraform | ||
|
||
# IDEs | ||
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
--- | ||
page_title: "doppler_integration_aws_parameter_store Resource - terraform-provider-doppler" | ||
subcategory: "" | ||
description: |- | ||
Manage an AWS Parameter Store Doppler integration. | ||
--- | ||
|
||
# doppler_integration_aws_parameter_store (Resource) | ||
|
||
Manage an AWS Parameter Store Doppler integration. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "aws_iam_role" "doppler_parameter_store" { | ||
name = "doppler_parameter_store" | ||
assume_role_policy = jsonencode({ | ||
Version = "2012-10-17" | ||
Statement = [ | ||
{ | ||
Effect = "Allow" | ||
Action = "sts:AssumeRole" | ||
Principal = { | ||
AWS = "arn:aws:iam::299900769157:user/doppler-integration-operator" | ||
}, | ||
Condition = { | ||
StringEquals = { | ||
"sts:ExternalId" = "<YOUR_WORKPLACE_SLUG>" | ||
} | ||
} | ||
}, | ||
] | ||
}) | ||
inline_policy { | ||
name = "doppler_secret_manager" | ||
policy = jsonencode({ | ||
Version = "2012-10-17" | ||
Statement = [ | ||
{ | ||
Action = [ | ||
"ssm:PutParameter", | ||
"ssm:LabelParameterVersion", | ||
"ssm:DeleteParameter", | ||
"ssm:RemoveTagsFromResource", | ||
"ssm:GetParameterHistory", | ||
"ssm:AddTagsToResource", | ||
"ssm:GetParametersByPath", | ||
"ssm:GetParameters", | ||
"ssm:GetParameter", | ||
"ssm:DeleteParameters" | ||
] | ||
Effect = "Allow" | ||
Resource = "*" | ||
# Limit Doppler to only access certain names | ||
}, | ||
] | ||
}) | ||
} | ||
} | ||
resource "doppler_integration_aws_parameter_store" "prod" { | ||
name = "Production" | ||
assume_role_arn = aws_iam_role.doppler_parameter_store.arn | ||
} | ||
resource "doppler_secrets_sync_aws_parameter_store" "backend_prod" { | ||
integration = doppler_integration_aws_parameter_store.prod.id | ||
project = "backend" | ||
config = "prd" | ||
region = "us-east-1" | ||
path = "/backend/" | ||
secure_string = true | ||
tags = { myTag = "enabled" } | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `assume_role_arn` (String) The ARN of the AWS role for Doppler to assume | ||
- `name` (String) The name of the integration | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The ID of this resource. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
--- | ||
page_title: "doppler_integration_aws_secrets_manager Resource - terraform-provider-doppler" | ||
subcategory: "" | ||
description: |- | ||
Manage an AWS Secrets Manager Doppler integration. | ||
--- | ||
|
||
# doppler_integration_aws_secrets_manager (Resource) | ||
|
||
Manage an AWS Secrets Manager Doppler integration. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "aws_iam_role" "doppler_secrets_manager" { | ||
name = "doppler_secrets_manager" | ||
assume_role_policy = jsonencode({ | ||
Version = "2012-10-17" | ||
Statement = [ | ||
{ | ||
Effect = "Allow" | ||
Action = "sts:AssumeRole" | ||
Principal = { | ||
AWS = "arn:aws:iam::299900769157:user/doppler-integration-operator" | ||
}, | ||
Condition = { | ||
StringEquals = { | ||
"sts:ExternalId" = "<YOUR_WORKPLACE_SLUG>" | ||
} | ||
} | ||
}, | ||
] | ||
}) | ||
inline_policy { | ||
name = "doppler_secret_manager" | ||
policy = jsonencode({ | ||
Version = "2012-10-17" | ||
Statement = [ | ||
{ | ||
Action = [ | ||
"secretsmanager:GetSecretValue", | ||
"secretsmanager:DescribeSecret", | ||
"secretsmanager:PutSecretValue", | ||
"secretsmanager:CreateSecret", | ||
"secretsmanager:DeleteSecret", | ||
"secretsmanager:TagResource", | ||
"secretsmanager:UpdateSecret" | ||
] | ||
Effect = "Allow" | ||
Resource = "*" | ||
# Limit Doppler to only access certain secret names | ||
}, | ||
] | ||
}) | ||
} | ||
} | ||
resource "doppler_integration_aws_secrets_manager" "prod" { | ||
name = "Production" | ||
assume_role_arn = aws_iam_role.doppler_secrets_manager.arn | ||
} | ||
resource "doppler_secrets_sync_aws_secrets_manager" "backend_prod" { | ||
integration = doppler_integration_aws_secrets_manager.prod.id | ||
project = "backend" | ||
config = "prd" | ||
region = "us-east-1" | ||
path = "/backend/" | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `assume_role_arn` (String) The ARN of the AWS role for Doppler to assume | ||
- `name` (String) The name of the integration | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The ID of this resource. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.