doppler.integration.AwsParameterStore
Explore with Pulumi AI
Manage an AWS Parameter Store Doppler integration.
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",
},
deleteBehavior: "leave_in_target",
});
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=[{
"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",
},
delete_behavior="leave_in_target")
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"),
},
DeleteBehavior: pulumi.String("leave_in_target"),
})
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" },
},
DeleteBehavior = "leave_in_target",
});
});
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"))
.deleteBehavior("leave_in_target")
.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
deleteBehavior: leave_in_target
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,
assume_role_arn: Optional[str] = None,
name: Optional[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:integration: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 awsParameterStoreResource = new Doppler.Integration.AwsParameterStore("awsParameterStoreResource", new()
{
AssumeRoleArn = "string",
Name = "string",
});
example, err := integration.NewAwsParameterStore(ctx, "awsParameterStoreResource", &integration.AwsParameterStoreArgs{
AssumeRoleArn: pulumi.String("string"),
Name: pulumi.String("string"),
})
var awsParameterStoreResource = new AwsParameterStore("awsParameterStoreResource", AwsParameterStoreArgs.builder()
.assumeRoleArn("string")
.name("string")
.build());
aws_parameter_store_resource = doppler.integration.AwsParameterStore("awsParameterStoreResource",
assume_role_arn="string",
name="string")
const awsParameterStoreResource = new doppler.integration.AwsParameterStore("awsParameterStoreResource", {
assumeRoleArn: "string",
name: "string",
});
type: doppler:integration:AwsParameterStore
properties:
assumeRoleArn: string
name: 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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The AwsParameterStore resource accepts the following input properties:
- Assume
Role stringArn - The ARN of the AWS role for Doppler to assume
- Name string
- The name of the integration
- Assume
Role stringArn - The ARN of the AWS role for Doppler to assume
- Name string
- The name of the integration
- assume
Role StringArn - The ARN of the AWS role for Doppler to assume
- name String
- The name of the integration
- assume
Role stringArn - The ARN of the AWS role for Doppler to assume
- name string
- The name of the integration
- assume_
role_ strarn - The ARN of the AWS role for Doppler to assume
- name str
- The name of the integration
- assume
Role StringArn - The ARN of the AWS role for Doppler to assume
- name String
- The name of the integration
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,
assume_role_arn: Optional[str] = None,
name: Optional[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.
- Assume
Role stringArn - The ARN of the AWS role for Doppler to assume
- Name string
- The name of the integration
- Assume
Role stringArn - The ARN of the AWS role for Doppler to assume
- Name string
- The name of the integration
- assume
Role StringArn - The ARN of the AWS role for Doppler to assume
- name String
- The name of the integration
- assume
Role stringArn - The ARN of the AWS role for Doppler to assume
- name string
- The name of the integration
- assume_
role_ strarn - The ARN of the AWS role for Doppler to assume
- name str
- The name of the integration
- assume
Role StringArn - The ARN of the AWS role for Doppler to assume
- name String
- The name of the integration
Package Details
- Repository
- doppler pulumiverse/pulumi-doppler
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
doppler
Terraform Provider.