ExportResource interface

Specified resources to be exported by their ids.

Extends

Properties

includeResourceGroup

Includes the resource group in the exported Terraform resources. Defaults to false.

namePattern

The id prefix for the exported Terraform resources. Defaults to res-.

recursive

Recursively includes child resources. Defaults to false.

resourceIds

The id(s) of the resource to be exported. Example: `["/subscriptions/12345678-1234-1234-1234-1234567890ab/resourceGroups/my-rg"].

resourceName

The Terraform id of the exported resource. Only effective when resourceIds contains only one item. Defaults to res-0.

resourceType

The Terraform resource type to map to. Only effective when resourceIds has one item. Example: azurerm_virtual_network. Automatic type mapping will be performed if not provided.

type

Has to be ExportResource to distinguish from other types.

Inherited Properties

excludeAzureResource

Excludes specified Azure Resource Ids. Case-insensitive Azure Resource ID regular expression. Example: ["/subscriptions/[0-9a-f-]+/resourceGroups/my-rg.*"].

excludeTerraformResource

Excludes specified Terraform resource types. Example: ["azurerm_virtual_network"].

fullProperties

Whether to output all non-computed properties in the generated Terraform configuration. If set to false empty-valued properties will be omitted from the configuration. Defaults to true.

includeExtensions

Include extension resource types directly associated to the resources exported

includeManagedResource

Whether to include internal resources managed by Azure in the exported configuration. Defaults to false.

includeRoleAssignment

Whether to include role assignments assigned to the resources exported. Defaults to false. This is deprecated in favor of includeExtensions (with role-assignments specified).

maskSensitive

Mask sensitive attributes in the Terraform configuration. Defaults to true.

targetProvider

The target Azure Terraform provider. Defaults to azurerm.

Property Details

includeResourceGroup

Includes the resource group in the exported Terraform resources. Defaults to false.

includeResourceGroup?: boolean

Property Value

boolean

namePattern

The id prefix for the exported Terraform resources. Defaults to res-.

namePattern?: string

Property Value

string

recursive

Recursively includes child resources. Defaults to false.

recursive?: boolean

Property Value

boolean

resourceIds

The id(s) of the resource to be exported. Example: `["/subscriptions/12345678-1234-1234-1234-1234567890ab/resourceGroups/my-rg"].

resourceIds: string[]

Property Value

string[]

resourceName

The Terraform id of the exported resource. Only effective when resourceIds contains only one item. Defaults to res-0.

resourceName?: string

Property Value

string

resourceType

The Terraform resource type to map to. Only effective when resourceIds has one item. Example: azurerm_virtual_network. Automatic type mapping will be performed if not provided.

resourceType?: string

Property Value

string

type

Has to be ExportResource to distinguish from other types.

type: "ExportResource"

Property Value

"ExportResource"

Inherited Property Details

excludeAzureResource

Excludes specified Azure Resource Ids. Case-insensitive Azure Resource ID regular expression. Example: ["/subscriptions/[0-9a-f-]+/resourceGroups/my-rg.*"].

excludeAzureResource?: string[]

Property Value

string[]

Inherited From BaseExportModel.excludeAzureResource

excludeTerraformResource

Excludes specified Terraform resource types. Example: ["azurerm_virtual_network"].

excludeTerraformResource?: string[]

Property Value

string[]

Inherited From BaseExportModel.excludeTerraformResource

fullProperties

Whether to output all non-computed properties in the generated Terraform configuration. If set to false empty-valued properties will be omitted from the configuration. Defaults to true.

fullProperties?: boolean

Property Value

boolean

Inherited From BaseExportModel.fullProperties

includeExtensions

Include extension resource types directly associated to the resources exported

includeExtensions?: string[]

Property Value

string[]

Inherited From BaseExportModel.includeExtensions

includeManagedResource

Whether to include internal resources managed by Azure in the exported configuration. Defaults to false.

includeManagedResource?: boolean

Property Value

boolean

Inherited From BaseExportModel.includeManagedResource

includeRoleAssignment

Whether to include role assignments assigned to the resources exported. Defaults to false. This is deprecated in favor of includeExtensions (with role-assignments specified).

includeRoleAssignment?: boolean

Property Value

boolean

Inherited From BaseExportModel.includeRoleAssignment

maskSensitive

Mask sensitive attributes in the Terraform configuration. Defaults to true.

maskSensitive?: boolean

Property Value

boolean

Inherited From BaseExportModel.maskSensitive

targetProvider

The target Azure Terraform provider. Defaults to azurerm.

targetProvider?: string

Property Value

string

Inherited From BaseExportModel.targetProvider