Parameter
Provides an SSM Parameter resource.
Note:
overwritealso makes it possible to overwrite an existing SSM Parameter that's not created by the provider before. This argument has been deprecated and will be removed in v6.0.0 of the provider. For more information on how this affects the behavior of this resource, see this issue comment.
Example Usage
Basic example
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ssm.Parameter;
import com.pulumi.aws.ssm.ParameterArgs;
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 foo = new Parameter("foo", ParameterArgs.builder()
.type("String")
.value("bar")
.build());
}
}Encrypted string using default SSM KMS key
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.rds.Instance;
import com.pulumi.aws.rds.InstanceArgs;
import com.pulumi.aws.ssm.Parameter;
import com.pulumi.aws.ssm.ParameterArgs;
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 default_ = new Instance("default", InstanceArgs.builder()
.allocatedStorage(10)
.storageType("gp2")
.engine("mysql")
.engineVersion("5.7.16")
.instanceClass("db.t2.micro")
.dbName("mydb")
.username("foo")
.password(var_.database_master_password())
.dbSubnetGroupName("my_database_subnet_group")
.parameterGroupName("default.mysql5.7")
.build());
var secret = new Parameter("secret", ParameterArgs.builder()
.description("The parameter description")
.type("SecureString")
.value(var_.database_master_password())
.tags(Map.of("environment", "production"))
.build());
}
}Import
Using pulumi import, import SSM Parameters using the parameter store name. For example:
$ pulumi import aws:ssm/parameter:Parameter my_param /my_path/my_paramnameProperties
Data type of the parameter. Valid values: text, aws:ssm:integration and aws:ec2:image for AMI format, see the Native parameter support for Amazon Machine Image IDs.
Name of the parameter. If the name contains a path (e.g., any forward slashes (/)), it must be fully qualified with a leading forward slash (/). For additional requirements and constraints, see the AWS SSM User Guide.
Parameter tier to assign to the parameter. If not specified, will use the default parameter tier for the region. Valid tiers are Standard, Advanced, and Intelligent-Tiering. Downgrading an Advanced tier parameter to Standard will recreate the resource. For more information on parameter tiers, see the AWS SSM Parameter tier comparison and guide.