Skip to content

Commit

Permalink
fix templates for ecs -> efs (#799)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhsinger-klotho authored Dec 1, 2023
1 parent a85ee54 commit 4c020a0
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 3 deletions.
1 change: 1 addition & 0 deletions pkg/infra/iac3/templates/aws/efs_file_system/factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,6 @@ function create(args: Args): aws.efs.FileSystem {
function properties(object: aws.efs.FileSystem, args: Args) {
return {
Id: object.id,
Arn: object.arn,
}
}
17 changes: 17 additions & 0 deletions pkg/templates/aws/edges/iam_role-efs_file_system.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
source: aws:iam_role
target: aws:efs_file_system
operational_rules:
- configuration_rules:
- resource: '{{ .Source }}'
configuration:
field: InlinePolicies
value:
- Name: '{{ .Target.Name }}-policy'
Policy:
Version: '2012-10-17'
Statement:
- Action:
- efs:Client*
Effect: Allow
Resource:
- '{{ .Target }}#Arn'
6 changes: 3 additions & 3 deletions pkg/templates/aws/resources/ecs_task_definition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ properties:
- aws:ecr_image:{{ .Self.Name }}-image
unique: true
MountPoints:
type: list
type: set
properties:
ContainerPath:
type: string
Expand Down Expand Up @@ -57,7 +57,7 @@ properties:
type: string
default_value: awsvpc
PortMappings:
type: list
type: set
default_value:
- ContainerPort: 80
HostPort: 80
Expand All @@ -74,7 +74,7 @@ properties:
default_value:
- FARGATE
EfsVolumes:
type: list
type: set
properties:
Name:
type: string
Expand Down
5 changes: 5 additions & 0 deletions pkg/templates/aws/resources/efs_file_system.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,16 @@ properties:
type: string
configuration_disabled: true
deploy_time: true
Arn:
type: string
configuration_disabled: true
deploy_time: true

path_satisfaction:
as_target:
- network
- efs_access
- permissions

classification:
is:
Expand Down
4 changes: 4 additions & 0 deletions pkg/templates/aws/resources/subnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ properties:
type: bool
default_value: false

path_satisfaction:
as_source:
- network

classification:
is:
- network
Expand Down

0 comments on commit 4c020a0

Please sign in to comment.