Table of Contents
Environments allow you to organise your application into separate units, each unit having its own copy of a feature flag. An environemnt allows you to manage the state of your flags throughout the development lifecycle. Most of the time your environments in Floodgate will be the same as the environemnts in your infrastructure that your application is delivered to. For example, Development, QA and Production. You can even create individual environments for each developer in your team allowing them to work independently when necessary.
You can create as many environemnts as you need in your applications, though the number is limited to the subscription plan you are currently on.
When you signed up for Floodgate an application was created for you along with 2 environments, Production and Test. Each environment is created with a unique key called the SDK Key. This key is what allows the Floodgate SDKs to comminicate with the correct configuration data on the Floodgate servers.
As your application is deployed between environments, the SDK Key the application uses will change. This means the flag configuration your application is using can be different for each environemnt.
Your SDK Key should not be hard coded in your application and shoule be loaded in at runtime from environment variables for example.
You can switch between environments in your application by clicking on the environment name from the main navigation on the left.
You can add a new environment to your application from either the Application Dashboard screen or from the Application Management page.
If you don't see the Create Environment button you may not have the necessary access rights to create an environemnt in the current application.
To add a new environment from the Application Management page.
Navigate to Account Settings page from the main navigation menu.
Select Applications from the Account Settings sub menu.
Find the application you want to manage and click the Create Environment button for the application.
Give a name for your environment. This can be anything you want but it's recommended to match the environments in your application delivery pipeline.
Enter a description if needed.
You can give your environments a colour to make identifying them easier. Select a colour of your choice.
For security and audit purposes you can choose to require team members who make changes to flags in the environemnt need to enter a comment before saving their change.
Once everything is completed click Save.