generated from LBHackney-IT/lbh-base-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added Terraform Compliance checks (#75)
* added Terraform Comliance checks * added staging and prod checks
- Loading branch information
1 parent
9b5e795
commit a70a003
Showing
7 changed files
with
227 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
terraform/development/terraform-compliance/opensearch.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
Feature: OpenSearch is used to host the ElasticSearch clusters | ||
In order to improve security | ||
As engineers | ||
We'll use ensure our OpenSearch clusters are configured correctly | ||
|
||
Scenario: Ensure OpenSearch clusters are encrypted at rest | ||
Given I have aws_elasticsearch_domain defined | ||
Then it must contain encrypt_at_rest | ||
And it must contain true | ||
|
||
Scenario: Ensure it is in a VPC | ||
Given I have aws_elasticsearch_domain defined | ||
Then it must contain vpc_options | ||
|
||
Scenario: Ensure minimum instance count is 2 | ||
Given I have aws_elasticsearch_domain defined | ||
Then it must contain cluster_config | ||
And it must contain instance_count | ||
And its value must be greater and equal than 2 | ||
|
||
Scenario: Ensure instance type is t3.small.elasticsearch/t3.medium.elasticsearch | ||
Given I have aws_elasticsearch_domain defined | ||
Then it must contain cluster_config | ||
And it must contain instance_type | ||
And its value must be ^(t3.small.elasticsearch\|t3.medium.elasticsearch)$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#Feature: SSM Parameter store provides a secure way to store config variables for our applications | ||
# In order to improve security | ||
# As engineers | ||
# We'll use AWS SSM Parameter store to store our secrets | ||
# | ||
# | ||
# Scenario: Ensure all SSM Parameters are using the SecureString type | ||
# Given I have aws_ssm_parameter defined | ||
# Then its type must be SecureString |
25 changes: 25 additions & 0 deletions
25
terraform/production/terraform-compliance/opensearch.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
Feature: OpenSearch is used to host the ElasticSearch clusters | ||
In order to improve security | ||
As engineers | ||
We'll use ensure our OpenSearch clusters are configured correctly | ||
|
||
Scenario: Ensure OpenSearch clusters are encrypted at rest | ||
Given I have aws_elasticsearch_domain defined | ||
Then it must contain encrypt_at_rest | ||
And it must contain true | ||
|
||
Scenario: Ensure it is in a VPC | ||
Given I have aws_elasticsearch_domain defined | ||
Then it must contain vpc_options | ||
|
||
Scenario: Ensure minimum instance count is 2 | ||
Given I have aws_elasticsearch_domain defined | ||
Then it must contain cluster_config | ||
And it must contain instance_count | ||
And its value must be greater and equal than 2 | ||
|
||
Scenario: Ensure instance type is t3.small.elasticsearch/t3.medium.elasticsearch | ||
Given I have aws_elasticsearch_domain defined | ||
Then it must contain cluster_config | ||
And it must contain instance_type | ||
And its value must be ^(t3.small.elasticsearch\|t3.medium.elasticsearch)$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#Feature: SSM Parameter store provides a secure way to store config variables for our applications | ||
# In order to improve security | ||
# As engineers | ||
# We'll use AWS SSM Parameter store to store our secrets | ||
# | ||
# | ||
# Scenario: Ensure all SSM Parameters are using the SecureString type | ||
# Given I have aws_ssm_parameter defined | ||
# Then its type must be SecureString |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
Feature: OpenSearch is used to host the ElasticSearch clusters | ||
In order to improve security | ||
As engineers | ||
We'll use ensure our OpenSearch clusters are configured correctly | ||
|
||
Scenario: Ensure OpenSearch clusters are encrypted at rest | ||
Given I have aws_elasticsearch_domain defined | ||
Then it must contain encrypt_at_rest | ||
And it must contain true | ||
|
||
Scenario: Ensure it is in a VPC | ||
Given I have aws_elasticsearch_domain defined | ||
Then it must contain vpc_options | ||
|
||
Scenario: Ensure minimum instance count is 2 | ||
Given I have aws_elasticsearch_domain defined | ||
Then it must contain cluster_config | ||
And it must contain instance_count | ||
And its value must be greater and equal than 2 | ||
|
||
Scenario: Ensure instance type is t3.small.elasticsearch/t3.medium.elasticsearch | ||
Given I have aws_elasticsearch_domain defined | ||
Then it must contain cluster_config | ||
And it must contain instance_type | ||
And its value must be ^(t3.small.elasticsearch\|t3.medium.elasticsearch)$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#Feature: SSM Parameter store provides a secure way to store config variables for our applications | ||
# In order to improve security | ||
# As engineers | ||
# We'll use AWS SSM Parameter store to store our secrets | ||
# | ||
# | ||
# Scenario: Ensure all SSM Parameters are using the SecureString type | ||
# Given I have aws_ssm_parameter defined | ||
# Then its type must be SecureString |