Use this data source to get information about one or more System Manager parameters in a specific hierarchy.
data "aws_ssm_parameters_by_path" "example" {
path = "/site/newyork/department/" # Trailing slash is optional
}
This data source supports the following arguments:
path
- (Required) The hierarchy for the parameter. Hierarchies start with a forward slash (/). The hierarchy is the parameter name except the last part of the parameter. The last part of the parameter name can't be in the path. A parameter name hierarchy can have a maximum of 15 levels. Note: If the parameter name (e.g., /my-app/my-param
) is specified, the data source will not retrieve any value as designed, unless there are other parameters that happen to use the former path in their hierarchy (e.g., /my-app/my-param/my-actual-param
).with_decryption
- (Optional) Whether to retrieve all parameters in the hierarchy, particularly those of SecureString
type, with their value decrypted. Defaults to true
.recursive
- (Optional) Whether to retrieve all parameters within the hirerachy. Defaults to false
.This data source exports the following attributes in addition to the arguments above:
arns
- A list that contains the Amazon Resource Names (ARNs) of the retrieved parameters.names
- A list that contains the names of the retrieved parameters.types
- A list that contains the types (String
, StringList
, or SecureString
) of retrieved parameters.values
- A list that contains the retrieved parameter values. Note: This value is always marked as sensitive in the Terraform plan output, regardless of whether any retrieved parameters are of SecureString
type. Use the nonsensitive
function to override the behavior at your own risk and discretion, if you are certain that there are no sensitive values being retrieved.