fixed invalid references

Signed-off-by: Sam Alba <sam.alba@gmail.com>
This commit is contained in:
Sam Alba 2021-04-09 17:41:36 -07:00
parent b13ac200f3
commit d26ed13d88
4 changed files with 18 additions and 33 deletions

View File

@ -72,7 +72,7 @@ backend: {
// Docker image built from source, pushed to ECR
image: #ECRImage & {
source: source
source: backend.source
repository: infra.ecrRepository
tag: slug
awsConfig: infra.awsConfig
@ -92,7 +92,7 @@ backend: {
if infra.ecsTaskRoleArn != _|_ {
taskRoleArn: infra.ecsTaskRoleArn
}
hostname: hostname
hostname: backend.hostname
healthCheck: {
timeout: backend.container.healthCheckTimeout
path: backend.container.healthCheckPath
@ -101,7 +101,7 @@ backend: {
desiredCount: backend.container.desiredCount
container: {
command: backend.container.command
environment: environment
environment: backend.environment
port: backend.container.port
memory: backend.container.memory
"image": image.ref

View File

@ -42,11 +42,8 @@ import (
}
buildArg: buildArgs
},
op.Export & {
format: "string"
source: op.#PushContainer & {
ref: pushTarget
}
op.#PushContainer & {
ref: pushTarget
},
]

View File

@ -9,14 +9,13 @@ import (
)
#ECSApp: {
awsConfig: aws.#Config
slug: string
clusterName: string
vpcId: string
elbListenerArn: string
tlsCertificateArn: string
taskRoleArn: *"" | string
hostname: string
awsConfig: aws.#Config
slug: string
clusterName: string
vpcId: string
elbListenerArn: string
taskRoleArn: *"" | string
hostname: string
healthCheck: {
timeout: *10 | int
path: *"/" | string
@ -45,10 +44,9 @@ import (
stackName: slug
onFailure: "DO_NOTHING"
parameters: {
ELBRulePriority: elbRulePriority.out
ImageRef: container.image
ELBListenerArn: elbListenerArn
TLSCertificateArn: tlsCertificateArn
ELBRulePriority: elbRulePriority.out
ImageRef: container.image
ELBListenerArn: elbListenerArn
}
source: json.Marshal(template)
}
@ -57,19 +55,11 @@ import (
AWSTemplateFormatVersion: "2010-09-09"
Description: "Blocklayer deployed app"
Parameters: {
ELBRulePriority: Type: "Number"
ImageRef: Type: "String"
ELBListenerArn: Type: "String"
TLSCertificateArn: Type: "String"
ELBRulePriority: Type: "Number"
ImageRef: Type: "String"
ELBListenerArn: Type: "String"
}
Resources: {
TLSCertificate: {
Type: "AWS::ElasticLoadBalancingV2::ListenerCertificate"
Properties: {
Certificates: [ {CertificateArn: Ref: "TLSCertificateArn"}]
ListenerArn: Ref: "ELBListenerArn"
}
}
ECSTaskDefinition: {
Type: "AWS::ECS::TaskDefinition"
Properties: {

View File

@ -17,8 +17,6 @@ import (
aws.#Script & {
files: {
"/inputs/aws/access_key": config.accessKey
"/inputs/aws/secret_key": config.secretKey
"/inputs/listenerArn": listenerArn
if vhost != _|_ {
"/inputs/vhost": vhost