Skip to content

azurermRelayHybridConnectionAuthorizationRule

Manages an Azure Relay Hybrid Connection Authorization Rule.

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 azurermRelayNamespaceExample = new azurerm.relayNamespace.RelayNamespace(
  this,
  "example_1",
  {
    location: azurermResourceGroupExample.location,
    name: "example-relay",
    resource_group_name: azurermResourceGroupExample.name,
    sku_name: "Standard",
    tags: {
      source: "terraform",
    },
  }
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermRelayNamespaceExample.overrideLogicalId("example");
const azurermRelayHybridConnectionExample =
  new azurerm.relayHybridConnection.RelayHybridConnection(this, "example_2", {
    name: "acctestrnhc-%d",
    relay_namespace_name: azurermRelayNamespaceExample.name,
    requires_client_authorization: false,
    resource_group_name: azurermResourceGroupExample.name,
    user_metadata: "testmetadata",
  });
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermRelayHybridConnectionExample.overrideLogicalId("example");
const azurermRelayHybridConnectionAuthorizationRuleExample =
  new azurerm.relayHybridConnectionAuthorizationRule.RelayHybridConnectionAuthorizationRule(
    this,
    "example_3",
    {
      hybrid_connection_name: azurermRelayHybridConnectionExample.name,
      listen: true,
      manage: false,
      name: "example",
      namespace_name: azurermRelayNamespaceExample.name,
      resource_group_name: azurermResourceGroupExample.name,
      send: true,
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermRelayHybridConnectionAuthorizationRuleExample.overrideLogicalId(
  "example"
);

Arguments Reference

The following arguments are supported:

  • name - (Required) The name which should be used for this Azure Relay Hybrid Connection Authorization Rule. Changing this forces a new Azure Relay Hybrid Connection Authorization Rule to be created.

  • hybridConnectionName - (Required) Name of the Azure Relay Hybrid Connection for which this Azure Relay Hybrid Connection Authorization Rule will be created. Changing this forces a new Azure Relay Hybrid Connection Authorization Rule to be created.

  • namespaceName - (Required) Name of the Azure Relay Namespace for which this Azure Relay Hybrid Connection Authorization Rule will be created. Changing this forces a new Azure Relay Hybrid Connection Authorization Rule to be created.

  • resourceGroupName - (Required) The name of the Resource Group where the Azure Relay Hybrid Connection Authorization Rule should exist. Changing this forces a new Azure Relay Hybrid Connection Authorization Rule to be created.


  • listen - (Optional) Grants listen access to this Authorization Rule. Defaults to false.

  • send - (Optional) Grants send access to this Authorization Rule. Defaults to false.

  • manage - (Optional) Grants manage access to this Authorization Rule. When this property is true - both listen and send must be set to true too. Defaults to false.

Attributes Reference

In addition to the Arguments listed above - the following Attributes are exported:

  • id - The ID of the Azure Relay Hybrid Connection Authorization Rule.

  • primaryKey - The Primary Key for the Azure Relay Hybrid Connection Authorization Rule.

  • primaryConnectionString - The Primary Connection String for the Azure Relay Hybrid Connection Authorization Rule.

  • secondaryKey - The Secondary Key for the Azure Relay Hybrid Connection Authorization Rule.

  • secondaryConnectionString - The Secondary Connection String for the Azure Relay Hybrid Connection Authorization Rule.

Timeouts

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

  • create - (Defaults to 30 minutes) Used when creating the Azure Relay Hybrid Connection Authorization Rule.
  • read - (Defaults to 5 minutes) Used when retrieving the Azure Relay Hybrid Connection Authorization Rule.
  • update - (Defaults to 30 minutes) Used when updating the Azure Relay Hybrid Connection Authorization Rule.
  • delete - (Defaults to 30 minutes) Used when deleting the Azure Relay Hybrid Connection Authorization Rule.

Import

Azure Relay Hybrid Connection Authorization Rules can be imported using the resourceId, e.g.

terraform import azurerm_relay_hybrid_connection_authorization_rule.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Relay/namespaces/namespace1/hybridConnections/connection1/authorizationRules/rule1