azurermAutomationCertificate
Manages an Automation Certificate.
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 azurermAutomationAccountExample =
new azurerm.automationAccount.AutomationAccount(this, "example_1", {
location: azurermResourceGroupExample.location,
name: "account1",
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 azurermAutomationCertificateExample =
new azurerm.automationCertificate.AutomationCertificate(this, "example_2", {
automation_account_name: azurermAutomationAccountExample.name,
base64: '${filebase64("certificate.pfx")}',
description: "This is an example certificate",
exportable: true,
name: "certificate1",
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.*/
azurermAutomationCertificateExample.overrideLogicalId("example");
Argument Reference
The following arguments are supported:
-
name
- (Required) Specifies the name of the Certificate. Changing this forces a new resource to be created. -
resourceGroupName
- (Required) The name of the resource group in which the Certificate is created. Changing this forces a new resource to be created. -
automationAccountName
- (Required) The name of the automation account in which the Certificate is created. Changing this forces a new resource to be created. -
base64
- (Required) Base64 encoded value of the certificate. Changing this forces a new resource to be created. -
description
- (Optional) The description of this Automation Certificate. -
exportable
- (Optional) The is exportable flag of the certificate.
Attributes Reference
The following attributes are exported:
-
id
- The Automation Certificate ID. -
thumbprint
- The thumbprint for the certificate.
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 30 minutes) Used when creating the Automation Certificate.update
- (Defaults to 30 minutes) Used when updating the Automation Certificate.read
- (Defaults to 5 minutes) Used when retrieving the Automation Certificate.delete
- (Defaults to 30 minutes) Used when deleting the Automation Certificate.
Import
Automation Certificates can be imported using the resourceId
, e.g.