# Applying changes in a stack

When a stack is deployed, it’s easy to modify the stack itself or only the configuration simply by doing modifications in git and pushing them to the repository.

To give an example: I want to change the instance type for my prod environment of my stack.

  1. Clone the config repository.
  2. Go in the terraform/prod sub directory of my stack.
  3. Modify the value instance_type = 't2.micro'
  4. Commit the change
  5. Push it.

Then the pipeline should be triggered automatically by the push in git and you can follow each step in the pipeline. See Pipeline section.

# Update a pipeline with Cycloid API from the template in git

If you are looking to use Cycloid API to update a running pipeline from the template in your git, this is an example of script to do it : update-pipeline.py

python refresh.py -u my-cycloid-user@foo.bar -p mysecret -t pipeline.yml -v vars.yml -o my-organization --pipeline-name my-pipeline
1

With :

  • my-organization : Is the organization canonical than you can find in the console URL
  • my-pipeline : The name of the pipeline you want to update. Usually the pattern is <projectName>-<envName>
  • pipeline.yml : The pipeline template file located usually in the branch stacks and directory pipeline in the git of the stack definition
  • vars.yml : The pipeline variables that you specified during the project creation using the wizard in the dashboard

# I created a private stack but it is not displayed in the stacks list

As described in the Stack section of this docs, a stack is defined by a .cycloid.yml file. Each time you add, remove or modify the .cycloid.yml file of one of your stack, you have to go on your Catalog Repository page where your stack has been created to and hit the Refresh this repository button.