-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into update_golang_docs
- Loading branch information
Showing
17 changed files
with
1,180 additions
and
0 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
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,6 @@ | ||
Loading policies ... | ||
Loading payload ... | ||
Pre processing ... | ||
Running ( evaluating 3 resources against 1 policy ) ... | ||
- required-container-insights / required-container-insights / (unknown) PASSED | ||
Done |
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,20 @@ | ||
apiVersion: json.kyverno.io/v1alpha1 | ||
kind: ValidatingPolicy | ||
metadata: | ||
name: required-container-insights | ||
spec: | ||
rules: | ||
- name: required-container-insights | ||
match: | ||
any: | ||
- type: aws_ecs_cluster | ||
assert: | ||
all: | ||
- message: "Container insights should be enabled on ECS cluster" | ||
check: | ||
values: | ||
~.setting: | ||
name: containerInsights | ||
value: enabled | ||
|
||
|
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,6 @@ | ||
Loading policies ... | ||
Loading payload ... | ||
Pre processing ... | ||
Running ( evaluating 3 resources against 1 policy ) ... | ||
- ecs-cluster-enable-logging / ecs-cluster-enable-logging / (unknown) PASSED | ||
Done |
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,21 @@ | ||
apiVersion: json.kyverno.io/v1alpha1 | ||
kind: ValidatingPolicy | ||
metadata: | ||
name: ecs-cluster-enable-logging | ||
spec: | ||
rules: | ||
- name: ecs-cluster-enable-logging | ||
match: | ||
any: | ||
- type: aws_ecs_cluster | ||
context: | ||
- name: forbidden_values | ||
variable: ["NONE"] | ||
assert: | ||
all: | ||
- message: "ECS Cluster should enable logging of ECS Exec" | ||
check: | ||
values: | ||
~.configuration: | ||
~.execute_command_configuration: | ||
(contains($forbidden_values, @.logging)): false |
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,29 @@ | ||
resource "aws_kms_key" "example" { | ||
description = "example" | ||
deletion_window_in_days = 7 | ||
} | ||
|
||
resource "aws_cloudwatch_log_group" "example" { | ||
name = "example" | ||
} | ||
|
||
resource "aws_ecs_cluster" "test" { | ||
name = "example" | ||
|
||
configuration { | ||
execute_command_configuration { | ||
kms_key_id = aws_kms_key.example.arn | ||
logging = "OVERRIDE" | ||
|
||
log_configuration { | ||
cloud_watch_encryption_enabled = true | ||
cloud_watch_log_group_name = aws_cloudwatch_log_group.example.name | ||
} | ||
} | ||
} | ||
|
||
setting { | ||
name = "containerInsights" | ||
value = "enabled" | ||
} | ||
} |
Oops, something went wrong.