class Pangea::DirectoryRenderer
def render_component(&block)
component is a single resource wrapped in state
def render_component(&block) synthesizer.synthesize(&block) resource_type = synthesizer.synthesis[:resource].keys[0] resource_name = synthesizer.synthesis[:resource][synthesizer.synthesis[:resource].keys[0]].keys[0] dir = File.join(init_dir, resource_type.to_s, resource_name.to_s) create_prepped_state_directory(dir, synthesizer.synthesis) system %(cd #{dir} && #{BIN} apply -auto-approve) synthesizer.clear_synthesis! { resource: resource(dir), state: state(dir), plan: plan(dir) } end