How do I build an AWS SSM parameter?
To create an AWS SSM Parameter, we will use the AWS SSM Parameter resource. This resource allows you to store configuration data securely and reference it in your applications.
Here’s a detailed example of how to create an SSM Parameter:
- Provider: We specify the AWS provider with the necessary region and credentials.
- SSM Parameter Resource: We define an SSM parameter to store a piece of configuration data, such as a database connection string or an API key.
Below is a complete example of how to create an AWS SSM Parameter:
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
// Create an SSM parameter
const example = new aws.ssm.Parameter("example", {
name: "/example/parameter",
type: aws.ssm.ParameterType.String,
value: "example_value",
tags: {
Environment: "example_environment",
},
});
export const ssmParameterName = example.name;
In this example:
- We configure the AWS provider to the
us-west-2
region. - We create an SSM Parameter named
/example/parameter
with a typeString
and a value ofexample_value
. - We tag the parameter with an environment label for easier management.
- We export the name of the SSM Parameter as a stack output for reference.
This setup allows you to securely store and manage configuration data in AWS, leveraging the capabilities of AWS Systems Manager Parameter Store.
Deploy this code
Want to deploy this code? Sign up for a free Pulumi account to deploy in a few clicks.
Sign upNew to Pulumi?
Want to deploy this code? Sign up with Pulumi to deploy in a few clicks.
Sign upThank you for your feedback!
If you have a question about how to use Pulumi, reach out in Community Slack.
Open an issue on GitHub to report a problem or suggest an improvement.