{"action":"opened","issue":{"url":"https://api.github.com/repos/seandst/cfn-pyplates/issues/46","repository_url":"https://api.github.com/repos/seandst/cfn-pyplates","labels_url":"https://api.github.com/repos/seandst/cfn-pyplates/issues/46/labels{/name}","comments_url":"https://api.github.com/repos/seandst/cfn-pyplates/issues/46/comments","events_url":"https://api.github.com/repos/seandst/cfn-pyplates/issues/46/events","html_url":"https://github.com/seandst/cfn-pyplates/issues/46","id":153490218,"number":46,"title":"DependsOn Attribute not always working as expected.","user":{"login":"dsmithwfm","id":13950481,"avatar_url":"https://avatars.githubusercontent.com/u/13950481?v=3","gravatar_id":"","url":"https://api.github.com/users/dsmithwfm","html_url":"https://github.com/dsmithwfm","followers_url":"https://api.github.com/users/dsmithwfm/followers","following_url":"https://api.github.com/users/dsmithwfm/following{/other_user}","gists_url":"https://api.github.com/users/dsmithwfm/gists{/gist_id}","starred_url":"https://api.github.com/users/dsmithwfm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsmithwfm/subscriptions","organizations_url":"https://api.github.com/users/dsmithwfm/orgs","repos_url":"https://api.github.com/users/dsmithwfm/repos","events_url":"https://api.github.com/users/dsmithwfm/events{/privacy}","received_events_url":"https://api.github.com/users/dsmithwfm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-06T16:37:19Z","updated_at":"2016-05-06T16:37:19Z","closed_at":null,"body":"I have two resources that need a DependsOn statement.  One works fine and adds brackets while the other does not and instead adds curly braces.\r\n\r\nHere is my resource that works:\r\n\r\n```\r\ncft.resources.add(Resource('LoadBalancer',\r\n\t'AWS::ElasticLoadBalancing::LoadBalancer',\r\n    {\r\n        'Listeners': [{\r\n            'LoadBalancerPort': '443',\r\n            'Protocol': 'HTTPS',\r\n            'InstancePort': '80',\r\n            'SSLCertificateId': ref('SSLCertificateId')\r\n            },\r\n        ],\r\n        'HealthCheck': {\r\n            'Target': 'HTTP:80/v3/status',\r\n            'HealthyThreshold': '2',\r\n            'UnhealthyThreshold': '4',\r\n            'Interval': '30',\r\n            'Timeout': '15'\r\n        },\r\n        'Instances': [\r\n            ref('Instance1'),\r\n            ref('Instance2')\r\n        ],\r\n        'Subnets': [\r\n            ref('PublicSubnetA'),\r\n            ref('PublicSubnetB')\r\n        ],\r\n        'SecurityGroupIds': ref('LoadBalancerSG'),\r\n        'LoadBalancerName': 'api-' + options['StackRole'] + '-' + options['WfmEnvironment'] + '-vpc-elb',\r\n    },\r\n    DependsOn(ref('PublicRoute'))\r\n    )\r\n)\r\n```\r\n\r\nThis outputs the DependOn properly:\r\n\r\n```\r\n      \"DependsOn\": [\r\n        \"PublicRoute\"\r\n      ]\r\n```\r\n\r\nHere is my resource which does not work:\r\n\r\n```\r\ncft.resources.add(Resource('PublicRoute',\r\n\t'AWS::EC2::Route',\r\n\t{\r\n        'DestinationCidrBlock': '0.0.0.0/0',\r\n        'RouteTableId': ref('PublicRouteTable'),\r\n        'GatewayId': ref('InternetGatewayId'),\r\n    },\r\n    DependsOn(ref('VPCGatewayAttachment'))\r\n    )\r\n)\r\n```\r\n\r\nThis one outputs the DependsOn as:\r\n\r\n```\r\n\"DependsOn\": {\r\n        \"Ref\": \"VPCGatewayAttachment\"\r\n      }\r\n```\r\n\r\n\r\nIs there a bug causing this or am I overlooking something here?"}}