doppler.secretsSync.AwsParameterStore
Explore with Pulumi AI
Manage an AWS Parameter Store Doppler sync.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import * as doppler from "@pulumiverse/doppler";
const dopplerParameterStore = new aws.iam.Role("doppler_parameter_store", {
name: "doppler_parameter_store",
assumeRolePolicy: JSON.stringify({
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>",
},
},
}],
}),
inlinePolicies: [{
name: "doppler_secret_manager",
policy: JSON.stringify({
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: "*",
}],
}),
}],
});
const prod = new doppler.integration.AwsParameterStore("prod", {
name: "Production",
assumeRoleArn: dopplerParameterStore.arn,
});
const backendProd = new doppler.secretssync.AwsParameterStore("backend_prod", {
integration: prod.id,
project: "backend",
config: "prd",
region: "us-east-1",
path: "/backend/",
secureString: true,
tags: {
myTag: "enabled",
},
});
import pulumi
import json
import pulumi_aws as aws
import pulumiverse_doppler as doppler
doppler_parameter_store = aws.iam.Role("doppler_parameter_store",
name="doppler_parameter_store",
assume_role_policy=json.dumps({
"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_policies=[aws.iam.RoleInlinePolicyArgs(
name="doppler_secret_manager",
policy=json.dumps({
"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": "*",
}],
}),
)])
prod = doppler.integration.AwsParameterStore("prod",
name="Production",
assume_role_arn=doppler_parameter_store.arn)
backend_prod = doppler.secrets_sync.AwsParameterStore("backend_prod",
integration=prod.id,
project="backend",
config="prd",
region="us-east-1",
path="/backend/",
secure_string=True,
tags={
"myTag": "enabled",
})
package main
import (
"encoding/json"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-doppler/sdk/go/doppler/integration"
"github.com/pulumiverse/pulumi-doppler/sdk/go/doppler/secretsSync"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
tmpJSON0, err := json.Marshal(map[string]interface{}{
"Version": "2012-10-17",
"Statement": []map[string]interface{}{
map[string]interface{}{
"Effect": "Allow",
"Action": "sts:AssumeRole",
"Principal": map[string]interface{}{
"AWS": "arn:aws:iam::299900769157:user/doppler-integration-operator",
},
"Condition": map[string]interface{}{
"StringEquals": map[string]interface{}{
"sts:ExternalId": "<YOUR_WORKPLACE_SLUG>",
},
},
},
},
})
if err != nil {
return err
}
json0 := string(tmpJSON0)
tmpJSON1, err := json.Marshal(map[string]interface{}{
"Version": "2012-10-17",
"Statement": []map[string]interface{}{
map[string]interface{}{
"Action": []string{
"ssm:PutParameter",
"ssm:LabelParameterVersion",
"ssm:DeleteParameter",
"ssm:RemoveTagsFromResource",
"ssm:GetParameterHistory",
"ssm:AddTagsToResource",
"ssm:GetParametersByPath",
"ssm:GetParameters",
"ssm:GetParameter",
"ssm:DeleteParameters",
},
"Effect": "Allow",
"Resource": "*",
},
},
})
if err != nil {
return err
}
json1 := string(tmpJSON1)
dopplerParameterStore, err := iam.NewRole(ctx, "doppler_parameter_store", &iam.RoleArgs{
Name: pulumi.String("doppler_parameter_store"),
AssumeRolePolicy: pulumi.String(json0),
InlinePolicies: iam.RoleInlinePolicyArray{
&iam.RoleInlinePolicyArgs{
Name: pulumi.String("doppler_secret_manager"),
Policy: pulumi.String(json1),
},
},
})
if err != nil {
return err
}
prod, err := integration.NewAwsParameterStore(ctx, "prod", &integration.AwsParameterStoreArgs{
Name: pulumi.String("Production"),
AssumeRoleArn: dopplerParameterStore.Arn,
})
if err != nil {
return err
}
_, err = secretsSync.NewAwsParameterStore(ctx, "backend_prod", &secretsSync.AwsParameterStoreArgs{
Integration: prod.ID(),
Project: pulumi.String("backend"),
Config: pulumi.String("prd"),
Region: pulumi.String("us-east-1"),
Path: pulumi.String("/backend/"),
SecureString: pulumi.Bool(true),
Tags: pulumi.StringMap{
"myTag": pulumi.String("enabled"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Aws = Pulumi.Aws;
using Doppler = Pulumiverse.Doppler;
return await Deployment.RunAsync(() =>
{
var dopplerParameterStore = new Aws.Iam.Role("doppler_parameter_store", new()
{
Name = "doppler_parameter_store",
AssumeRolePolicy = JsonSerializer.Serialize(new Dictionary<string, object?>
{
["Version"] = "2012-10-17",
["Statement"] = new[]
{
new Dictionary<string, object?>
{
["Effect"] = "Allow",
["Action"] = "sts:AssumeRole",
["Principal"] = new Dictionary<string, object?>
{
["AWS"] = "arn:aws:iam::299900769157:user/doppler-integration-operator",
},
["Condition"] = new Dictionary<string, object?>
{
["StringEquals"] = new Dictionary<string, object?>
{
["sts:ExternalId"] = "<YOUR_WORKPLACE_SLUG>",
},
},
},
},
}),
InlinePolicies = new[]
{
new Aws.Iam.Inputs.RoleInlinePolicyArgs
{
Name = "doppler_secret_manager",
Policy = JsonSerializer.Serialize(new Dictionary<string, object?>
{
["Version"] = "2012-10-17",
["Statement"] = new[]
{
new Dictionary<string, object?>
{
["Action"] = new[]
{
"ssm:PutParameter",
"ssm:LabelParameterVersion",
"ssm:DeleteParameter",
"ssm:RemoveTagsFromResource",
"ssm:GetParameterHistory",
"ssm:AddTagsToResource",
"ssm:GetParametersByPath",
"ssm:GetParameters",
"ssm:GetParameter",
"ssm:DeleteParameters",
},
["Effect"] = "Allow",
["Resource"] = "*",
},
},
}),
},
},
});
var prod = new Doppler.Integration.AwsParameterStore("prod", new()
{
Name = "Production",
AssumeRoleArn = dopplerParameterStore.Arn,
});
var backendProd = new Doppler.SecretsSync.AwsParameterStore("backend_prod", new()
{
Integration = prod.Id,
Project = "backend",
Config = "prd",
Region = "us-east-1",
Path = "/backend/",
SecureString = true,
Tags =
{
{ "myTag", "enabled" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.iam.Role;
import com.pulumi.aws.iam.RoleArgs;
import com.pulumi.aws.iam.inputs.RoleInlinePolicyArgs;
import com.pulumi.doppler.integration.AwsParameterStore;
import com.pulumi.doppler.integration.AwsParameterStoreArgs;
import com.pulumi.doppler.secretsSync.AwsParameterStore;
import com.pulumi.doppler.secretsSync.AwsParameterStoreArgs;
import static com.pulumi.codegen.internal.Serialization.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var dopplerParameterStore = new Role("dopplerParameterStore", RoleArgs.builder()
.name("doppler_parameter_store")
.assumeRolePolicy(serializeJson(
jsonObject(
jsonProperty("Version", "2012-10-17"),
jsonProperty("Statement", jsonArray(jsonObject(
jsonProperty("Effect", "Allow"),
jsonProperty("Action", "sts:AssumeRole"),
jsonProperty("Principal", jsonObject(
jsonProperty("AWS", "arn:aws:iam::299900769157:user/doppler-integration-operator")
)),
jsonProperty("Condition", jsonObject(
jsonProperty("StringEquals", jsonObject(
jsonProperty("sts:ExternalId", "<YOUR_WORKPLACE_SLUG>")
))
))
)))
)))
.inlinePolicies(RoleInlinePolicyArgs.builder()
.name("doppler_secret_manager")
.policy(serializeJson(
jsonObject(
jsonProperty("Version", "2012-10-17"),
jsonProperty("Statement", jsonArray(jsonObject(
jsonProperty("Action", jsonArray(
"ssm:PutParameter",
"ssm:LabelParameterVersion",
"ssm:DeleteParameter",
"ssm:RemoveTagsFromResource",
"ssm:GetParameterHistory",
"ssm:AddTagsToResource",
"ssm:GetParametersByPath",
"ssm:GetParameters",
"ssm:GetParameter",
"ssm:DeleteParameters"
)),
jsonProperty("Effect", "Allow"),
jsonProperty("Resource", "*")
)))
)))
.build())
.build());
var prod = new AwsParameterStore("prod", AwsParameterStoreArgs.builder()
.name("Production")
.assumeRoleArn(dopplerParameterStore.arn())
.build());
var backendProd = new AwsParameterStore("backendProd", AwsParameterStoreArgs.builder()
.integration(prod.id())
.project("backend")
.config("prd")
.region("us-east-1")
.path("/backend/")
.secureString(true)
.tags(Map.of("myTag", "enabled"))
.build());
}
}
resources:
dopplerParameterStore:
type: aws:iam:Role
name: doppler_parameter_store
properties:
name: doppler_parameter_store
assumeRolePolicy:
fn::toJSON:
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>
inlinePolicies:
- name: doppler_secret_manager
policy:
fn::toJSON:
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: '*'
prod:
type: doppler:integration:AwsParameterStore
properties:
name: Production
assumeRoleArn: ${dopplerParameterStore.arn}
backendProd:
type: doppler:secretsSync:AwsParameterStore
name: backend_prod
properties:
integration: ${prod.id}
project: backend
config: prd
region: us-east-1
path: /backend/
secureString: true
tags:
myTag: enabled
Create AwsParameterStore Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AwsParameterStore(name: string, args: AwsParameterStoreArgs, opts?: CustomResourceOptions);
@overload
def AwsParameterStore(resource_name: str,
args: AwsParameterStoreArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AwsParameterStore(resource_name: str,
opts: Optional[ResourceOptions] = None,
config: Optional[str] = None,
integration: Optional[str] = None,
path: Optional[str] = None,
project: Optional[str] = None,
region: Optional[str] = None,
secure_string: Optional[bool] = None,
tags: Optional[Mapping[str, str]] = None)
func NewAwsParameterStore(ctx *Context, name string, args AwsParameterStoreArgs, opts ...ResourceOption) (*AwsParameterStore, error)
public AwsParameterStore(string name, AwsParameterStoreArgs args, CustomResourceOptions? opts = null)
public AwsParameterStore(String name, AwsParameterStoreArgs args)
public AwsParameterStore(String name, AwsParameterStoreArgs args, CustomResourceOptions options)
type: doppler:secretsSync:AwsParameterStore
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args AwsParameterStoreArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args AwsParameterStoreArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args AwsParameterStoreArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AwsParameterStoreArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AwsParameterStoreArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var dopplerAwsParameterStoreResource = new Doppler.SecretsSync.AwsParameterStore("dopplerAwsParameterStoreResource", new()
{
Config = "string",
Integration = "string",
Path = "string",
Project = "string",
Region = "string",
SecureString = false,
Tags =
{
{ "string", "string" },
},
});
example, err := secretsSync.NewAwsParameterStore(ctx, "dopplerAwsParameterStoreResource", &secretsSync.AwsParameterStoreArgs{
Config: pulumi.String("string"),
Integration: pulumi.String("string"),
Path: pulumi.String("string"),
Project: pulumi.String("string"),
Region: pulumi.String("string"),
SecureString: pulumi.Bool(false),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var dopplerAwsParameterStoreResource = new AwsParameterStore("dopplerAwsParameterStoreResource", AwsParameterStoreArgs.builder()
.config("string")
.integration("string")
.path("string")
.project("string")
.region("string")
.secureString(false)
.tags(Map.of("string", "string"))
.build());
doppler_aws_parameter_store_resource = doppler.secrets_sync.AwsParameterStore("dopplerAwsParameterStoreResource",
config="string",
integration="string",
path="string",
project="string",
region="string",
secure_string=False,
tags={
"string": "string",
})
const dopplerAwsParameterStoreResource = new doppler.secretssync.AwsParameterStore("dopplerAwsParameterStoreResource", {
config: "string",
integration: "string",
path: "string",
project: "string",
region: "string",
secureString: false,
tags: {
string: "string",
},
});
type: doppler:secretsSync:AwsParameterStore
properties:
config: string
integration: string
path: string
project: string
region: string
secureString: false
tags:
string: string
AwsParameterStore Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The AwsParameterStore resource accepts the following input properties:
- Config string
- The name of the Doppler config
- Integration string
- The slug of the integration to use for this sync
- Path string
- The path to the parameters in AWS
- Project string
- The name of the Doppler project
- Region string
- The AWS region
- Secure
String bool - Whether or not the parameters are stored as a secure string
- Dictionary<string, string>
- AWS tags to attach to the parameters
- Config string
- The name of the Doppler config
- Integration string
- The slug of the integration to use for this sync
- Path string
- The path to the parameters in AWS
- Project string
- The name of the Doppler project
- Region string
- The AWS region
- Secure
String bool - Whether or not the parameters are stored as a secure string
- map[string]string
- AWS tags to attach to the parameters
- config String
- The name of the Doppler config
- integration String
- The slug of the integration to use for this sync
- path String
- The path to the parameters in AWS
- project String
- The name of the Doppler project
- region String
- The AWS region
- secure
String Boolean - Whether or not the parameters are stored as a secure string
- Map<String,String>
- AWS tags to attach to the parameters
- config string
- The name of the Doppler config
- integration string
- The slug of the integration to use for this sync
- path string
- The path to the parameters in AWS
- project string
- The name of the Doppler project
- region string
- The AWS region
- secure
String boolean - Whether or not the parameters are stored as a secure string
- {[key: string]: string}
- AWS tags to attach to the parameters
- config str
- The name of the Doppler config
- integration str
- The slug of the integration to use for this sync
- path str
- The path to the parameters in AWS
- project str
- The name of the Doppler project
- region str
- The AWS region
- secure_
string bool - Whether or not the parameters are stored as a secure string
- Mapping[str, str]
- AWS tags to attach to the parameters
- config String
- The name of the Doppler config
- integration String
- The slug of the integration to use for this sync
- path String
- The path to the parameters in AWS
- project String
- The name of the Doppler project
- region String
- The AWS region
- secure
String Boolean - Whether or not the parameters are stored as a secure string
- Map<String>
- AWS tags to attach to the parameters
Outputs
All input properties are implicitly available as output properties. Additionally, the AwsParameterStore resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing AwsParameterStore Resource
Get an existing AwsParameterStore resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: AwsParameterStoreState, opts?: CustomResourceOptions): AwsParameterStore
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
config: Optional[str] = None,
integration: Optional[str] = None,
path: Optional[str] = None,
project: Optional[str] = None,
region: Optional[str] = None,
secure_string: Optional[bool] = None,
tags: Optional[Mapping[str, str]] = None) -> AwsParameterStore
func GetAwsParameterStore(ctx *Context, name string, id IDInput, state *AwsParameterStoreState, opts ...ResourceOption) (*AwsParameterStore, error)
public static AwsParameterStore Get(string name, Input<string> id, AwsParameterStoreState? state, CustomResourceOptions? opts = null)
public static AwsParameterStore get(String name, Output<String> id, AwsParameterStoreState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Config string
- The name of the Doppler config
- Integration string
- The slug of the integration to use for this sync
- Path string
- The path to the parameters in AWS
- Project string
- The name of the Doppler project
- Region string
- The AWS region
- Secure
String bool - Whether or not the parameters are stored as a secure string
- Dictionary<string, string>
- AWS tags to attach to the parameters
- Config string
- The name of the Doppler config
- Integration string
- The slug of the integration to use for this sync
- Path string
- The path to the parameters in AWS
- Project string
- The name of the Doppler project
- Region string
- The AWS region
- Secure
String bool - Whether or not the parameters are stored as a secure string
- map[string]string
- AWS tags to attach to the parameters
- config String
- The name of the Doppler config
- integration String
- The slug of the integration to use for this sync
- path String
- The path to the parameters in AWS
- project String
- The name of the Doppler project
- region String
- The AWS region
- secure
String Boolean - Whether or not the parameters are stored as a secure string
- Map<String,String>
- AWS tags to attach to the parameters
- config string
- The name of the Doppler config
- integration string
- The slug of the integration to use for this sync
- path string
- The path to the parameters in AWS
- project string
- The name of the Doppler project
- region string
- The AWS region
- secure
String boolean - Whether or not the parameters are stored as a secure string
- {[key: string]: string}
- AWS tags to attach to the parameters
- config str
- The name of the Doppler config
- integration str
- The slug of the integration to use for this sync
- path str
- The path to the parameters in AWS
- project str
- The name of the Doppler project
- region str
- The AWS region
- secure_
string bool - Whether or not the parameters are stored as a secure string
- Mapping[str, str]
- AWS tags to attach to the parameters
- config String
- The name of the Doppler config
- integration String
- The slug of the integration to use for this sync
- path String
- The path to the parameters in AWS
- project String
- The name of the Doppler project
- region String
- The AWS region
- secure
String Boolean - Whether or not the parameters are stored as a secure string
- Map<String>
- AWS tags to attach to the parameters
Package Details
- Repository
- doppler pulumiverse/pulumi-doppler
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
doppler
Terraform Provider.