Azure API Management User
This page shows how to write Terraform and Azure Resource Manager for API Management User and write them securely.
azurerm_api_management_user (Terraform)
The User in API Management can be configured in Terraform with the resource name azurerm_api_management_user
. The following sections describe 6 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "azurerm_api_management_user" "user" {
user_id = var.user_id
api_management_name = var.apim_name
resource_group_name = var.resource_group_name
first_name = var.first_name
resource "azurerm_api_management_user" "user" {
user_id = var.service_settings.user_id
api_management_name = var.service_settings.endpoint_name
resource_group_name = var.context.resource_group_name
first_name = var.service_settings.first_name
resource "azurerm_api_management_user" "user" {
user_id = var.user_id
api_management_name = var.apim_name
resource_group_name = var.resource_group_name
first_name = var.first_name
resource "azurerm_api_management_user" "user" {
for_each = { for apim_users in var.apim_users : apim_users.user_id => apim_users }
api_management_name = var.apim_name
resource_group_name = var.apim_resource_group
user_id = each.value.user_id
first_name = each.value.first_name
resource "azurerm_api_management_user" "this" {
api_management_name = var.api_management_name
confirmation = var.confirmation
email = var.email
first_name = var.first_name
last_name = var.last_name
resource "azurerm_api_management_user" "this" {
api_management_name = var.api_management_name
confirmation = var.confirmation
email = var.email
first_name = var.first_name
last_name = var.last_name
Parameters
-
api_management_name
required - string -
confirmation
optional - string -
email
required - string -
first_name
required - string -
id
optional computed - string -
last_name
required - string -
note
optional - string -
password
optional - string -
resource_group_name
required - string -
state
optional computed - string -
user_id
required - string -
timeouts
single block
Explanation in Terraform Registry
Manages an API Management User.
Microsoft.ApiManagement/service/users (Azure Resource Manager)
The service/users in Microsoft.ApiManagement can be configured in Azure Resource Manager with the resource name Microsoft.ApiManagement/service/users
. The following sections describe how to use the resource and its parameters.
Example Usage from GitHub
An example could not be found in GitHub.
Parameters
apiVersion
required - stringname
required - stringUser identifier. Must be unique in the current API Management service instance.
properties
requiredappType
optional - stringDetermines the type of application which send the create user request. Default is legacy portal.
confirmation
optional - stringDetermines the type of confirmation e-mail that will be sent to the newly created user.
email
required - stringEmail address. Must not be empty and must be unique within the service instance.
firstName
required - stringFirst name.
identities
optional arrayid
optional - stringIdentifier value within provider.
provider
optional - stringIdentity provider name.
lastName
required - stringLast name.
note
optional - stringOptional note about a user set by the administrator.
password
optional - stringUser Password. If no value is provided, a default password is generated.
state
optional - stringAccount state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active.
type
required - string
Frequently asked questions
What is Azure API Management User?
Azure API Management User is a resource for API Management of Microsoft Azure. Settings can be wrote in Terraform.
Where can I find the example code for the Azure API Management User?
For Terraform, the aadi555/azurerm, persistentsystems/terraform-azurerm and markti/terraform-azure source code examples are useful. See the Terraform Example section for further details.