Skip to content

azurermLogzMonitor

Manages a logz Monitor.

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-logz",
  }
);
const azurermLogzMonitorExample = new azurerm.logzMonitor.LogzMonitor(
  this,
  "example_1",
  {
    location: azurermResourceGroupExample.location,
    name: "example-monitor",
    plan: [
      {
        billing_cycle: "MONTHLY",
        effective_date: "2022-06-06T00:00:00Z",
        usage_type: "COMMITTED",
      },
    ],
    resource_group_name: azurermResourceGroupExample.name,
    user: [
      {
        email: "user@example.com",
        first_name: "Example",
        last_name: "User",
        phone_number: "+12313803556",
      },
    ],
  }
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermLogzMonitorExample.overrideLogicalId("example");

Arguments Reference

The following arguments are supported:

  • name - (Required) The name which should be used for this logz Monitor. Changing this forces a new logz Monitor to be created.

  • resourceGroupName - (Required) The name of the Resource Group where the logz Monitor should exist. Changing this forces a new logz Monitor to be created.

  • location - (Required) The Azure Region where the logz Monitor should exist. Changing this forces a new logz Monitor to be created.

  • plan - (Required) A plan block as defined below. Changing this forces a new resource to be created.

  • user - (Required) A user block as defined below. Changing this forces a new resource to be created.


  • companyName - (Optional) Name of the Logz organization. Changing this forces a new logz Monitor to be created.

  • enterpriseAppId - (Optional) The ID of the Enterprise App. Changing this forces a new logz Monitor to be created.

\~> NOTE Please follow Set up Logz.io single sign-on to create the ID of the Enterprise App.

  • enabled - (Optional) Whether the resource monitoring is enabled? Defaults to true.

  • tags - (Optional) A mapping of tags which should be assigned to the logz Monitor.


An plan block exports the following:

  • billingCycle - (Required) Different billing cycles. Possible values are monthly or weekly. Changing this forces a new logz Monitor to be created.

  • effectiveDate - (Required) Date when plan was applied. Changing this forces a new logz Monitor to be created.

  • usageType - (Required) Different usage types. Possible values are payg or committed. Changing this forces a new logz Monitor to be created.

  • planId - (Optional) Plan id as published by Logz. The only possible value is 100Gb14Days. Defaults to 100Gb14Days. Changing this forces a new logz Monitor to be created.


An user block exports the following:

  • email - (Required) Email of the user used by Logz for contacting them if needed. Changing this forces a new logz Monitor to be created.

\~> NOTE If you use the Azure CLI to authenticate to Azure, the Email of your Azure account needs to be granted the admin permission in your Logz.io account. Otherwise, you may not be able to delete this resource. There is no such limitation for the Service Principal authentication.

  • firstName - (Required) First Name of the user. Changing this forces a new logz Monitor to be created.

  • lastName - (Required) Last Name of the user. Changing this forces a new logz Monitor to be created.

  • phoneNumber - (Required) Phone number of the user used by Logz for contacting them if needed. Changing this forces a new logz Monitor to be created.

Attributes Reference

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

  • id - The ID of the logz Monitor.

  • singleSignOnUrl - The single sign on url associated with the logz organization of this logz Monitor.

  • logzOrganizationId - The ID associated with the logz organization of this logz Monitor.

Timeouts

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

  • create - (Defaults to 30 minutes) Used when creating the logz Monitor.
  • read - (Defaults to 5 minutes) Used when retrieving the logz Monitor.
  • update - (Defaults to 30 minutes) Used when updating the logz Monitor.
  • delete - (Defaults to 30 minutes) Used when deleting the logz Monitor.

Import

logz Monitors can be imported using the resourceId, e.g.

terraform import azurerm_logz_monitor.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Logz/monitors/monitor1