Skip to content

Commit

Permalink
Merge pull request #53 from tenable/ssmparameters
Browse files Browse the repository at this point in the history
added sample files for ssm parameters
  • Loading branch information
tlikhar authored Dec 13, 2023
2 parents c5ef4d4 + 4d27022 commit 1724a25
Show file tree
Hide file tree
Showing 2 changed files with 140 additions and 0 deletions.
91 changes: 91 additions & 0 deletions cft/ssm/output.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
{
"aws_instance": [
{
"id": "aws_instance.myinstance",
"name": "myinstance",
"source": "common.yml",
"line": 1,
"type": "aws_instance",
"config": {
"tags": null,
"name": "myinstance",
"ami": "",
"instance_type": "",
"ebs_optimized": false,
"hibernation": false,
"monitoring": false,
"iam_instance_profile": "",
"vpc_security_group_ids": null,
"network_interface": []
},
"skip_rules": [],
"max_severity": "",
"min_severity": ""
}
],
"aws_ssm_parameter": [
{
"id": "aws_ssm_parameter.AdvancedParameter",
"name": "AdvancedParameter",
"source": "common.yml",
"line": 1,
"type": "aws_ssm_parameter",
"config": {
"tags": null,
"name": "AnotherName",
"description": "",
"type": "String",
"value": "anothervalue",
"tier": "",
"policies": "",
"allowed_pattern": ""
},
"skip_rules": [],
"max_severity": "",
"min_severity": ""
},
{
"id": "aws_ssm_parameter.BasicParameter",
"name": "BasicParameter",
"source": "common.yml",
"line": 1,
"type": "aws_ssm_parameter",
"config": {
"tags": null,
"name": "AvailabilityZone",
"description": "",
"type": "String",
"value": "somevalue",
"tier": "",
"policies": "",
"allowed_pattern": ""
},
"skip_rules": [],
"max_severity": "",
"min_severity": ""
},
{
"id": "aws_ssm_parameter.BasicParameterWithPolicieis",
"name": "BasicParameterWithPolicieis",
"source": "common.yml",
"line": 1,
"type": "aws_ssm_parameter",
"config": {
"tags": {
"Environment": "DEV"
},
"name": "command",
"description": "SSM Parameter for running date command.",
"type": "String",
"value": "date",
"tier": "Advanced",
"policies": "[{\"Type\":\"Expiration\",\"Version\":\"1.0\",\"Attributes\":{\"Timestamp\":\"2020-05-13T00:00:00.000Z\"}},{\"Type\":\"ExpirationNotification\",\"Version\":\"1.0\",\"Attributes\":{\"Before\":\"5\",\"Unit\":\"Days\"}},{\"Type\":\"NoChangeNotification\",\"Version\":\"1.0\",\"Attributes\":{\"After\":\"60\",\"Unit\":\"Days\"}}]",
"allowed_pattern": "^[a-zA-Z]{1,10}$"
},
"skip_rules": [],
"max_severity": "",
"min_severity": ""
}
]
}

49 changes: 49 additions & 0 deletions cft/ssm/parameters/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
AWSTemplateFormatVersion: '2010-09-09'
Parameters:
AvailabilityZone:
Description: Amazon EC2 instance Availability Zone
Type: String
AMIId:
Description: The Amazon Machine Image id
Type: String
InstanceType:
Description: The Type of instance
Type: String
Resources:
myinstance:
Type: AWS::EC2::Instance
Properties:
AvailabilityZone:
Fn::GetAtt:
- BasicParameter
- Value
ImageId:
Ref: AMIId
InstanceType:
Ref: InstanceType
BasicParameter:
Type: AWS::SSM::Parameter
Properties:
Name: AvailabilityZone
Type: String
Value: somevalue
AdvancedParameter:
Type: AWS::SSM::Parameter
Properties:
Name: AnotherName
Type: String
Value: anothervalue

BasicParameterWithPolicieis:
Type: AWS::SSM::Parameter
Properties:
Name: command
Type: String
Value: date
Tier: Advanced
Policies: '[{"Type":"Expiration","Version":"1.0","Attributes":{"Timestamp":"2020-05-13T00:00:00.000Z"}},{"Type":"ExpirationNotification","Version":"1.0","Attributes":{"Before":"5","Unit":"Days"}},{"Type":"NoChangeNotification","Version":"1.0","Attributes":{"After":"60","Unit":"Days"}}]'
Description: SSM Parameter for running date command.
AllowedPattern: "^[a-zA-Z]{1,10}$"
Tags:
Environment: DEV

0 comments on commit 1724a25

Please sign in to comment.