Skip to content

azurermAppConfigurationFeature

Manages an Azure App Configuration Feature.

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
const azurermResourceGroupExample = new azurerm.resourceGroup.ResourceGroup(
  this,
  "example",
  {
    location: "West Europe",
    name: "example-resources",
  }
);
const azurermAppConfigurationAppconf =
  new azurerm.appConfiguration.AppConfiguration(this, "appconf", {
    location: azurermResourceGroupExample.location,
    name: "appConf1",
    resource_group_name: azurermResourceGroupExample.name,
  });
new azurerm.appConfigurationFeature.AppConfigurationFeature(this, "test", {
  configuration_store_id: azurermAppConfigurationAppconf.id,
  description: "test description",
  enabled: true,
  label: "acctest-ackeylabel-%d",
  name: "acctest-ackey-%d",
});

Argument Reference

The following arguments are supported:

  • configurationStoreId - (Required) Specifies the id of the App Configuration. Changing this forces a new resource to be created.

  • description - (Optional) The description of the App Configuration Feature.

  • enabled - (Optional) The status of the App Configuration Feature. By default, this is set to false.

  • label - (Optional) The label of the App Configuration Feature. Changing this forces a new resource to be created.

  • locked - (Optional) Should this App Configuration Feature be Locked to prevent changes?

  • name - (Required) The name of the App Configuration Feature. Changing this forces a new resource to be created.

  • percentageFilterValue - (Optional) A list of one or more numbers representing the value of the percentage required to enable this feature.

  • tags - (Optional) A mapping of tags to assign to the resource.

  • targetingFilter - (Optional) A targetingFilter block as defined below.

  • timewindowFilter - (Optional) A timewindowFilter block as defined below.


A targetingFilter block represents a feature filter of type microsoftTargeting and takes the following attributes:

  • defaultRolloutPercentage - (Required) A number representing the percentage of the entire user base.

  • groups - (Optional) One or more blocks of type groups as defined below.

  • users - (Optional) A list of users to target for this feature.


A groups block represents a group that can be used in a targetingFilter and takes the following attributes:

  • name - (Required) The name of the group.

  • rolloutPercentage - (Required) Rollout percentage of the group.


A timewindowFilter block represents a feature filter of type microsoftTimeWindow and takes the following attributes:

  • start - (Optional) The earliest timestamp the feature is enabled. The timestamp must be in RFC3339 format.

  • end - (Optional) The latest timestamp the feature is enabled. The timestamp must be in RFC3339 format.


Attributes Reference

The following attributes are exported:

  • id - The App Configuration Feature ID.

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • create - (Defaults to 45 minutes) Used when creating the App Configuration Feature.
  • update - (Defaults to 30 minutes) Used when updating the App Configuration Feature.
  • read - (Defaults to 5 minutes) Used when retrieving the App Configuration Feature.
  • delete - (Defaults to 30 minutes) Used when deleting the App Configuration Feature.

Import

App Configuration Features can be imported using the resourceId, e.g.

terraform import azurerm_app_configuration_feature.test https://appconfname1.azconfig.io/kv/.appconfig.featureflag%2FkeyName?label=labelName

If you wish to import with an empty label then simply leave the label's name blank:

terraform import azurerm_app_configuration_feature.test https://appconfname1.azconfig.io/kv/.appconfig.featureflag%2FkeyName?label=