/** * {@inheritdoc} */ protected function execute(InputInterface $input, OutputInterface $output) { $environment = $input->getArgument('environment'); $template = $input->getArgument('template'); $scalingProfile = $input->getOption('scaling-profile'); $name = $input->getOption('name'); $stack = $this->configStackMapper->create($template, $environment, $scalingProfile, $name); $output->writeLn('<info>Template</info>'); $output->write($stack->getTemplate()->getBodyJSON()); $output->writeLn(''); $output->writeLn('<info>Parameters</info>'); $table = new Table($output); $table->setHeaders(['Key', 'Value']); foreach ($stack->getParameters() as $key => $value) { $table->addRow([$key, $value]); } $table->render(); $output->writeLn(''); $output->writeLn('<info>Tags</info>'); $table = new Table($output); $table->setHeaders(['Key', 'Value']); foreach ($stack->getTags() as $key => $value) { $table->addRow([$key, $value]); } $table->render(); }
/** * {@inheritdoc} */ protected function execute(InputInterface $input, OutputInterface $output) { $name = $input->getArgument('name'); $scalingProfile = $input->getOption('scaling-profile'); $currentStack = $this->apiStackMapper->create($name); $newStack = $this->configStackMapper->create($currentStack->getTemplate()->getName(), $currentStack->getEnvironment(), $scalingProfile, $name); $this->stackManager->update($newStack); }
/** * {@inheritdoc} */ protected function execute(InputInterface $input, OutputInterface $output) { $environment = $input->getArgument('environment'); $template = $input->getArgument('template'); $name = $input->getOption('name'); $scalingProfile = $input->getOption('scaling-profile'); $stack = $this->configStackMapper->create($template, $environment, $scalingProfile, $name); $this->stackManager->create($stack); }
/** * {@inheritdoc} */ protected function execute(InputInterface $input, OutputInterface $output) { $name = $input->getArgument('name'); $scalingProfile = $input->getOption('scaling-profile'); $stackA = $this->apiStackMapper->create($name); $stackB = $this->configStackMapper->create($stackA->getTemplate()->getName(), $stackA->getEnvironment(), $scalingProfile, $name); $output->writeLn('<info>Changes to the CloudFormation parameters:</info>'); $output->write($this->coloriseUnifiedDiff($this->stackComparisonService->compareParameters($stackA->getParameters(), $stackB->getParameters()))); $output->writeLn('<info>Changes to the CloudFormation template:</info>'); $output->write($this->coloriseUnifiedDiff($this->stackComparisonService->compareTemplate($stackA->getTemplate(), $stackB->getTemplate()))); }