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

Cleanly Define Metadata #38

Open
dlahn opened this issue Mar 20, 2017 · 2 comments
Open

Cleanly Define Metadata #38

dlahn opened this issue Mar 20, 2017 · 2 comments

Comments

@dlahn
Copy link
Contributor

dlahn commented Mar 20, 2017

Currently, it is only possible to define Metadata for a resource as an argument as such:

resource :instances, 
  "AWS::AutoScaling::LaunchConfiguration",  
  "Metadata": {

  } do

However, these sections can get quite large, especially is they are being used to define CloudFormation Init metadata.

It would be nice if this metadata could be defined in blocks similar to properties.

@JCotton1123
Copy link
Contributor

@dlahn one solution to this:

resource :instances, 'AWS::AutoScaling::LaunchConfiguration' do
some_property some_value

self[:MetaData] = <<-EOS
EOS
end

@dlahn
Copy link
Contributor Author

dlahn commented Apr 20, 2017

@JCotton1123 Thanks for the response. That solution isn't working in my testing, but also, it's just moving the JSON from one part of the definition to another. My thought was it would be nicer if it were something like this:

resource :instances,  "AWS::AutoScaling::LaunchConfiguration" do
  some_property some_value
  metadata, "AWS::CloudFormation::Init" do
    config_sets do
      setup_services ["ecs", "efs"]
    end
  end
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants