Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make ecs images be able to be strings #980

Merged
merged 2 commits into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/engine/testdata/ecs_rds.expect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ resources:
- Name: RDS_INSTANCE_2_RDS_USERNAME
Value: aws:rds_instance:rds-instance-2#Username
Essential: true
Image: aws:ecr_image:ecs_service_0-ecs_service_0
Image: aws:ecr_image:ecs_service_0-ecs_service_0#ImageName
LogConfiguration:
LogDriver: awslogs
Options:
Expand Down
2 changes: 1 addition & 1 deletion pkg/engine/testdata/idempotent_constraints.expect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ resources:
- Name: RDS_INSTANCE_2_RDS_USERNAME
Value: aws:rds_instance:rds-instance-2#Username
Essential: true
Image: aws:ecr_image:ecs_service_0-ecs_service_0
Image: aws:ecr_image:ecs_service_0-ecs_service_0#ImageName
LogConfiguration:
LogDriver: awslogs
Options:
Expand Down
2 changes: 1 addition & 1 deletion pkg/engine/testdata/idempotent_constraints.input.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ resources:
- Name: RDS_INSTANCE_2_RDS_USERNAME
Value: aws:rds_instance:rds-instance-2#Username
Essential: true
Image: aws:ecr_image:ecs_service_0-ecs_service_0
Image: aws:ecr_image:ecs_service_0-ecs_service_0#ImageName
LogConfiguration:
LogDriver: awslogs
Options:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
},
{{- end }}
{{- if $cd.Image }}
image: {{ getVar $cd.Image }}.imageName,
image: {{ modelCase $cd.Image }},
{{- end }}
{{- if $cd.LogConfiguration }}
logConfiguration: {
Expand Down
3 changes: 2 additions & 1 deletion pkg/templates/aws/resources/ecs_task_definition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,15 @@ properties:
min_value: 2
max_value: 60
Image:
type: resource(aws:ecr_image)
type: string
required: true
operational_rule:
step:
direction: downstream
resources:
- aws:ecr_image:{{ .Self.Name }}-{{ if pathAncestorExists .Path 1}}{{ if hasField (printf "%s.Name" (pathAncestor .Path 1)) .Self}}{{ fieldValue (printf "%s.Name" (pathAncestor .Path 1)) .Self}}{{else}}image{{end}}{{else}}image{{end}}
unique: true
use_property_ref: ImageName
description: Reference to an Amazon Elastic Container Registry (ECR) image that
will be used for the container within the task
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably update this to reflect the type change (and probably hint at being a property ref).

LogConfiguration:
Expand Down
Loading