azurermAutomationDscNodeconfiguration
Manages a Automation DSC Node Configuration.
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 azurermAutomationDscConfigurationExample =
new azurerm.automationDscConfiguration.AutomationDscConfiguration(
this,
"example_2",
{
automation_account_name: azurermAutomationAccountExample.name,
content_embedded: "configuration test {}",
location: azurermResourceGroupExample.location,
name: "test",
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.*/
azurermAutomationDscConfigurationExample.overrideLogicalId("example");
const azurermAutomationDscNodeconfigurationExample =
new azurerm.automationDscNodeconfiguration.AutomationDscNodeconfiguration(
this,
"example_3",
{
automation_account_name: azurermAutomationAccountExample.name,
content_embedded:
'instance of MSFT_FileDirectoryConfiguration as $MSFT_FileDirectoryConfiguration1ref\n{\n ResourceID = "[File]bla";\n Ensure = "Present";\n Contents = "bogus Content";\n DestinationPath = "c:\\\\bogus.txt";\n ModuleName = "PSDesiredStateConfiguration";\n SourceInfo = "::3::9::file";\n ModuleVersion = "1.0";\n ConfigurationName = "bla";\n};\ninstance of OMI_ConfigurationDocument\n{\n Version="2.0.0";\n MinimumCompatibleVersion = "1.0.0";\n CompatibleVersionAdditionalProperties= {"Omi_BaseResource:ConfigurationName"};\n Author="bogusAuthor";\n GenerationDate="06/15/2018 14:06:24";\n GenerationHost="bogusComputer";\n Name="test";\n};\n',
depends_on: [`\${${azurermAutomationDscConfigurationExample.fqn}}`],
name: "test.localhost",
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.*/
azurermAutomationDscNodeconfigurationExample.overrideLogicalId("example");
Argument Reference
The following arguments are supported:
-
name
- (Required) Specifies the name of the DSC Node Configuration. Changing this forces a new resource to be created. -
resourceGroupName
- (Required) The name of the resource group in which the DSC Node Configuration is created. Changing this forces a new resource to be created. -
automationAccountName
- (Required) The name of the automation account in which the DSC Node Configuration is created. Changing this forces a new resource to be created. -
contentEmbedded
- (Required) The PowerShell DSC Node Configuration (mof content).
Attributes Reference
The following attributes are exported:
id
- The DSC Node Configuration ID.
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 30 minutes) Used when creating the Automation DSC Node Configuration.update
- (Defaults to 30 minutes) Used when updating the Automation DSC Node Configuration.read
- (Defaults to 5 minutes) Used when retrieving the Automation DSC Node Configuration.delete
- (Defaults to 30 minutes) Used when deleting the Automation DSC Node Configuration.
Import
Automation DSC Node Configuration's can be imported using the resourceId
, e.g.