Skip to content

Instantly share code, notes, and snippets.

@bsamuel-ui
Created March 27, 2019 15:28
Show Gist options
  • Save bsamuel-ui/54ccff96a2a1f25d336a62ed152ca73d to your computer and use it in GitHub Desktop.
Save bsamuel-ui/54ccff96a2a1f25d336a62ed152ca73d to your computer and use it in GitHub Desktop.
Test for fix of ECS long ARN GetAttr bug in Cloudformation
AWSTemplateFormatVersion: 2010-09-09
Description: >-
A test case for the GetAttr bug with ECS's long ARNs. When this is fixed,
if you are opted in to long ARNs, the output ServiceName should be 'stack-Service-texttext'
and not equal to ClusterName.
Resources:
DummyCluster:
Type: AWS::ECS::Cluster
DummyService:
Type: AWS::ECS::Service
Properties:
Cluster: !Ref DummyCluster
DeploymentConfiguration:
MaximumPercent: 100
MinimumHealthyPercent: 0
DesiredCount: 0
PlacementStrategies:
- Type: binpack
Field: memory
TaskDefinition: !Ref DummyTaskdef
DummyTaskdef:
Type: AWS::ECS::TaskDefinition
Properties:
Volumes: []
Family: 'testcase'
NetworkMode: bridge
ContainerDefinitions:
- Name: DummyDefinition
Image: python:3.6
Memory: 256
Outputs:
ClusterName:
Value:
!Ref DummyCluster
ServiceName:
Value:
!GetAtt DummyService.Name
ServiceRef:
Value:
!Ref DummyService
@bsamuel-ui
Copy link
Author

Looks like this is fixed, in case anyone is following.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment