IBM Cloud App Configuration
App Configuration is a centralized feature management and configuration service for use with web and mobile applications, microservices, and distributed environments. You can define feature flags, which are organized into collections and targeted to segments. Change feature flag states in the cloud to activate or deactivate features in your application or environment, often without restarting.
The App Configuration destination helps you toggle the feature flags by leveraging various Event Notifications capabilities. For example, you can use the Periodic Timer source that is provided by Event Notifications to schedule the toggling of feature flags.
Configuring an App Configuration destination
You can configure an App Configuration destination in the Destinations
tab.
Before you begin
Before you begin, make sure that you have the following prerequisites in place:
-
An App Configuration instance with the environments and feature flags created. See Creating an App Configuration instance to learn the process of creating an App Configuration instance.
-
You need to create a service-to-service authorization between Event Notifications and App Configuration service and assign the role of Config Operator.
Configuration
To configure App Configuration as a destination, perform the following steps:
-
From your Event Notifications instance dashboard, click Destinations.
-
Click Add + to add a new destination.
-
In the Add a destination side panel, provide the following details.
- Name - Enter a name for your destination.
- Description - Optionally, enter a description for your destination.
- Type - Under Destination > Type, select App Configuration. Select the account that your App Configuration instance is located in.
- This account - If your App Configuration instance is located in the same account as your Event Notifications instance, select This account. Select the Instance name, Environments and Feature Flag to be toggled. All 3 fields must be populated to create the instance.
- Specific account - If your App Configuration instance and Event Notifications instance are in different accounts, select Specific account. Provide a valid App Configuration instance **CRN, select the Environments and Feature Flag to be toggled. All 3 fields must be populated to create the instance.
-
Click Add.
-
Create a topic with a source of your choice. See Creating an Event Notifications topic to learn the process of creating a topic.
-
To create a subscription, navigate to the Subscriptions dashboard from the left navigation pane and click Create.
- Provide the Name, an optional Description, and select the Topic and Destination created previously.
- You can choose to send the notification based on Attributes or on a Template. While creating the App Configuration subscription, either the attribute or template must be defined. These define the state
of the feature flag while sending a notification.
- Attributes - If you choose to send the notification based on attributes, you can choose to enable the feature flag or disable it when a notification is sent.
- Template - If you choose to send the notification based on a template, you need to define the template under the Templates section of the left navigation pane. See App Configuration Notification Template to learn the process of creating a template to send notifications to App Configuration.
-
Click Create.
Testing App Configuration destination configuration
You can test an App Configuration destination in the options menu that is provided against the destination. You can effortlessly test a destination, whether the provided configuration is correct or not with a single click.
-
Navigate to the Destinations tab on the left navigation pane of your Event Notifications instance.
-
On the destination you want to test, click the overflow menu
and select Test Destination.
-
Navigate to the Feature Flags tab in your App Configuration instance and if the destination is configured correctly the feature flag should be enabled. This indicates that your destination configuration is successful.
For more information on testing a destination, see Testing Destinations.