Skip to content

azurermAutomationConnectionClassicCertificate

Manages an Automation Connection with type azureClassicCertificate.

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.*/
new azurerm.provider.AzurermProvider(this, "azurerm", {
  features: [{}],
});
const azurermResourceGroupExample = new azurerm.resourceGroup.ResourceGroup(
  this,
  "example",
  {
    location: "West Europe",
    name: "resourceGroup-example",
  }
);
const dataAzurermClientConfigExample =
  new azurerm.dataAzurermClientConfig.DataAzurermClientConfig(
    this,
    "example_2",
    {}
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
dataAzurermClientConfigExample.overrideLogicalId("example");
const azurermAutomationAccountExample =
  new azurerm.automationAccount.AutomationAccount(this, "example_3", {
    location: azurermResourceGroupExample.location,
    name: "account-example",
    resource_group_name: azurermResourceGroupExample.name,
    sku_name: "Basic",
  });
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermAutomationAccountExample.overrideLogicalId("example");
const azurermAutomationConnectionClassicCertificateExample =
  new azurerm.automationConnectionClassicCertificate.AutomationConnectionClassicCertificate(
    this,
    "example_4",
    {
      automation_account_name: azurermAutomationAccountExample.name,
      certificate_asset_name: "cert1",
      name: "connection-example",
      resource_group_name: azurermResourceGroupExample.name,
      subscription_id: dataAzurermClientConfigExample.subscriptionId,
      subscription_name: "subs1",
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermAutomationConnectionClassicCertificateExample.overrideLogicalId(
  "example"
);

Argument Reference

The following arguments are supported:

  • name - (Required) Specifies the name of the Connection. Changing this forces a new resource to be created.

  • resourceGroupName - (Required) The name of the resource group in which the Connection is created. Changing this forces a new resource to be created.

  • automationAccountName - (Required) The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.

  • certificateAssetName - (Required) The name of the certificate asset.

  • subscriptionName - (Required) The name of subscription.

  • subscriptionId - (Required) The id of subscription.

  • description - (Optional) A description for this Connection.

Attributes Reference

The following attributes are exported:

  • id - The Automation Connection ID.

Timeouts

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

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

Import

Automation Connection can be imported using the resourceId, e.g.

terraform import azurerm_automation_connection_classic_certificate.conn1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/connections/conn1