-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fd6754b
commit 7654a53
Showing
31 changed files
with
236 additions
and
31 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
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
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 @@ | ||
import * as aws from '@pulumi/aws' | ||
|
||
interface Args { | ||
Name: string | ||
} | ||
|
||
function create(args: Args): aws.acm.Certificate { | ||
return new aws.acm.Certificate(args.Name, {}) | ||
} |
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 @@ | ||
{ | ||
"name": "ami", | ||
"dependencies": { | ||
"@pulumi/aws": "^5.37.0" | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
pkg/infra/iac3/templates/aws/listener_certificate/factory.ts
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,15 @@ | ||
import * as aws from '@pulumi/aws' | ||
|
||
interface Args { | ||
Name: string | ||
Listener: aws.lb.Listener | ||
Certificate: aws.acm.Certificate | ||
} | ||
|
||
// noinspection JSUnusedLocalSymbols | ||
function create(args: Args): aws.lb.LoadBalancer { | ||
return new aws.lb.ListenerCertificate('exampleListenerCertificate', { | ||
listenerArn: args.Listener.arn, | ||
certificateArn: args.Certificate.arn, | ||
}) | ||
} |
6 changes: 6 additions & 0 deletions
6
pkg/infra/iac3/templates/aws/listener_certificate/package.json
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 @@ | ||
{ | ||
"name": "load_balancer", | ||
"dependencies": { | ||
"@pulumi/aws": "^5.37.0" | ||
} | ||
} |
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
5 changes: 5 additions & 0 deletions
5
pkg/templates/aws/edges/listener_certificate-acm_certificate.yaml
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,5 @@ | ||
source: aws:listener_certificate | ||
target: aws:acm_certificate | ||
|
||
unique: | ||
source: true |
13 changes: 13 additions & 0 deletions
13
pkg/templates/aws/edges/load_balancer-load_balancer_listener.yaml
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 |
---|---|---|
@@ -1,3 +1,16 @@ | ||
source: aws:load_balancer | ||
target: aws:load_balancer_listener | ||
deployment_order_reversed: true | ||
operational_rules: | ||
- if: '{{eq (fieldValue "Type" .Source) "application"}}' | ||
configuration_rules: | ||
- resource: '{{ .Target }}' | ||
configuration: | ||
field: Protocol | ||
value: HTTP | ||
- if: '{{ eq (fieldValue "Type" .Source) "network" }}' | ||
configuration_rules: | ||
- resource: '{{ .Target }}' | ||
configuration: | ||
field: Protocol | ||
value: TCP |
13 changes: 13 additions & 0 deletions
13
pkg/templates/aws/edges/load_balancer_listener-listener_certificate.yaml
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,13 @@ | ||
source: aws:load_balancer_listener | ||
target: aws:listener_certificate | ||
deployment_order_reversed: true | ||
operational_rules: | ||
- configuration_rules: | ||
- resource: '{{ .Target }}' | ||
configuration: | ||
field: Listener | ||
value: '{{ .Source }}' | ||
|
||
unique: | ||
source: true | ||
target: true |
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 |
---|---|---|
@@ -1,3 +1,16 @@ | ||
source: aws:security_group | ||
target: aws:load_balancer | ||
deployment_order_reversed: true | ||
deployment_order_reversed: true | ||
operational_rules: | ||
- if: '{{ eq (fieldValue "Scheme" .Target) "internet-facing"}}' | ||
configuration_rules: | ||
- resource: '{{ .Source }}' | ||
configuration: | ||
field: IngressRules | ||
value: | ||
- Description: Allow ingress traffic from within the same security group | ||
FromPort: 0 | ||
Protocol: '-1' | ||
ToPort: 0 | ||
CidrBlocks: | ||
- 0.0.0.0/0 |
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,11 @@ | ||
qualified_type_name: aws:acm_certificate | ||
display_name: ACM Certificate | ||
|
||
classification: | ||
is: | ||
- certificate | ||
|
||
delete_context: | ||
requires_no_upstream: true | ||
views: | ||
dataflow: small |
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
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 @@ | ||
qualified_type_name: aws:listener_certificate | ||
display_name: Listener Certificate | ||
|
||
properties: | ||
Certificate: | ||
type: resource(aws:acm_certificate) | ||
operational_rule: | ||
steps: | ||
- direction: downstream | ||
resources: | ||
- aws:acm_certificate | ||
required: true | ||
Listener: | ||
type: resource(aws:load_balancer_listener) | ||
required: true | ||
|
||
|
||
delete_context: | ||
requires_no_upstream_or_downstream: true | ||
views: | ||
dataflow: small |
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
Oops, something went wrong.