Manages a Hybrid Compute Machine Extension.
resource "azurerm_resource_group" "example" {
name = "example"
location = "West Europe"
}
data "azurerm_arc_machine" "example" {
name = "existing-hcmachine"
resource_group_name = azurerm_resource_group.example.name
}
resource "azurerm_arc_machine_extension" "example" {
name = "example"
location = "West Europe"
arc_machine_id = data.azurerm_arc_machine.example.id
publisher = "Microsoft.Azure.Monitor"
type = "AzureMonitorLinuxAgent"
}
The following arguments are supported:
arc_machine_id
- (Required) The ID of the Hybrid Compute Machine Extension. Changing this forces a new Hybrid Compute Machine Extension to be created.
location
- (Required) The Azure Region where the Hybrid Compute Machine Extension should exist. Changing this forces a new Hybrid Compute Machine Extension to be created.
name
- (Required) The name which should be used for this Hybrid Compute Machine Extension. Changing this forces a new Hybrid Compute Machine Extension to be created.
publisher
- (Required) The name of the extension handler publisher, such as Microsoft.Azure.Monitor
. Changing this forces a new Hybrid Compute Machine Extension to be created.
type
- (Required) Specifies the type of the extension. For example CustomScriptExtension
or AzureMonitorLinuxAgent
. Changing this forces a new Hybrid Compute Machine Extension to be created.
automatic_upgrade_enabled
- (Optional) Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. Supported values are true
and false
. Defaults to true
.force_update_tag
- (Optional) How the extension handler should be forced to update even if the extension configuration has not changed.
protected_settings
- (Optional) Json formatted protected settings for the extension.
settings
- (Optional) Json formatted public settings for the extension.
tags
- (Optional) A mapping of tags which should be assigned to the Hybrid Compute Machine Extension.
type_handler_version
- (Optional) Specifies the version of the script handler.
In addition to the Arguments listed above - the following Attributes are exported:
id
- The ID of the Hybrid Compute Machine Extension.The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 30 minutes) Used when creating the Hybrid Compute Machine Extension.read
- (Defaults to 5 minutes) Used when retrieving the Hybrid Compute Machine Extension.update
- (Defaults to 30 minutes) Used when updating the Hybrid Compute Machine Extension.delete
- (Defaults to 30 minutes) Used when deleting the Hybrid Compute Machine Extension.Hybrid Compute Machine Extensions can be imported using the resource id
, e.g.
terraform import azurerm_arc_machine_extension.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.HybridCompute/machines/hcmachine1/extensions/ext1