Skip to content

azurermApiManagementOpenidConnectProvider

Manages an OpenID Connect Provider within a API Management Service.

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 azurermApiManagementExample = new azurerm.apiManagement.ApiManagement(
  this,
  "example_1",
  {
    location: azurermResourceGroupExample.location,
    name: "example-apim",
    publisher_email: "company@terraform.io",
    publisher_name: "My Company",
    resource_group_name: azurermResourceGroupExample.name,
    sku_name: "Developer_1",
  }
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermApiManagementExample.overrideLogicalId("example");
const azurermApiManagementOpenidConnectProviderExample =
  new azurerm.apiManagementOpenidConnectProvider.ApiManagementOpenidConnectProvider(
    this,
    "example_2",
    {
      api_management_name: azurermApiManagementExample.name,
      client_id: "00001111-2222-3333-4444-555566667777",
      client_secret: "00001111-423egvwdcsjx-00001111",
      display_name: "Example Provider",
      metadata_endpoint: "https://example.com/example",
      name: "example-provider",
      resource_group_name: azurermResourceGroupExample.name,
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermApiManagementOpenidConnectProviderExample.overrideLogicalId("example");

Argument Reference

The following arguments are supported:

  • name - (Required) the Name of the OpenID Connect Provider which should be created within the API Management Service. Changing this forces a new resource to be created.

  • apiManagementName - (Required) The name of the API Management Service in which this OpenID Connect Provider should be created. Changing this forces a new resource to be created.

  • resourceGroupName - (Required) The name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.

  • clientId - (Required) The Client ID used for the Client Application.

  • clientSecret - (Required) The Client Secret used for the Client Application.

  • displayName - (Required) A user-friendly name for this OpenID Connect Provider.

  • metadataEndpoint - (Required) The URI of the Metadata endpoint.


  • description - (Optional) A description of this OpenID Connect Provider.

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • id - The ID of the API Management OpenID Connect Provider.

Timeouts

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

  • create - (Defaults to 30 minutes) Used when creating the API Management OpenID Connect Provider.
  • update - (Defaults to 30 minutes) Used when updating the API Management OpenID Connect Provider.
  • read - (Defaults to 5 minutes) Used when retrieving the API Management OpenID Connect Provider.
  • delete - (Defaults to 30 minutes) Used when deleting the API Management OpenID Connect Provider.

Import

API Management OpenID Connect Providers can be imported using the resourceId, e.g.

terraform import azurerm_api_management_openid_connect_provider.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ApiManagement/service/instance1/openidConnectProviders/provider1