# Using stack forms to simplify the configuration
In this step we will simplify the creation of our stack by adding Cycloid forms view. This feature allow users to create HTML forms on top of samples files. Those can be from pipeline variables, Terraform and Ansible.
Follow those steps to apply all changes described in this step
By adding a
.forms.yml file into your stack, at the same level as the
.cycloid.yml file, the forms view will be available for stacks users.
default: pipeline: Application-code: - name: "Application git public url" description: "The url of the public GIT repository containing the source code of the application" key: code_git_public_repository widget: simple_text type: string default: "https://github.com/cycloid-community-catalog/docs-step-by-step-stack" - name: "Application git repository branch" description: "The branch of the public GIT repository containing the source code of the application" key: code_git_branch widget: simple_text type: string default: code terraform: configuration: - name: "Azure instance type" description: "The type of instance you want to create" key: instance_type widget: slider_list type: string values: - Standard_DS1_v2 - Standard_DS2_v2 - Standard_DS3_v2 default: Standard_DS1_v2
The second level is the name of the technologie. This is used by Cycloid to know how render your
*.sample files with the variables defined into the
.forms.yml. In our example we use 2 technologies. We defined one pipeline variable and one Terraform variable.
The third level define visual groups
configuration. The goal is to simplify the user understanding of the variables of a stack. You would probably create a group for Cloud provider configuration, one for the source code access and one for the actual configuration of the application. It will visually group the widget in Cycloid dashboard making more easy for a user to read.
The last part are widgets. A widget define the name of a variable (
key) to replace in your
*.sample files and what kind of
widget display to the user. To know more about all kind of widget are available in Cycloid you should have a look to our Cycloid forms guide.
Add and commit those changes in Git:
git add . git commit -m "Step 8" git push origin stacks
You should be able to test forms right away for any new project or environment created with this stack.
To test it you could try to configure a new
After clicking next, you should see the form view that have been configured:
Get back: We will not create an extra environment right now. Let's click on
snowy, our project name on the top menu to get back on our
test environment for the next training step.