ArmTerraformModelFactory.ExportResourceTerraform Method

Definition

Specified resources to be exported by their ids.

public static Azure.ResourceManager.Terraform.Models.ExportResourceTerraform ExportResourceTerraform(Azure.ResourceManager.Terraform.Models.TargetTerraformProvider? targetProvider = default, bool? isOutputFullPropertiesEnabled = default, bool? isMaskSensitiveEnabled = default, bool? includeRoleAssignment = default, bool? includeManagedResource = default, System.Collections.Generic.IEnumerable<string> azureResourcesToExclude = default, System.Collections.Generic.IEnumerable<string> terraformResourcesToExclude = default, System.Collections.Generic.IEnumerable<Azure.Core.ResourceIdentifier> resourceIds = default, string resourceName = default, string resourceType = default, string namePattern = default, bool? recursive = default, bool? includeResourceGroup = default);
static member ExportResourceTerraform : Nullable<Azure.ResourceManager.Terraform.Models.TargetTerraformProvider> * Nullable<bool> * Nullable<bool> * Nullable<bool> * Nullable<bool> * seq<string> * seq<string> * seq<Azure.Core.ResourceIdentifier> * string * string * string * Nullable<bool> * Nullable<bool> -> Azure.ResourceManager.Terraform.Models.ExportResourceTerraform
Public Shared Function ExportResourceTerraform (Optional targetProvider As Nullable(Of TargetTerraformProvider) = Nothing, Optional isOutputFullPropertiesEnabled As Nullable(Of Boolean) = Nothing, Optional isMaskSensitiveEnabled As Nullable(Of Boolean) = Nothing, Optional includeRoleAssignment As Nullable(Of Boolean) = Nothing, Optional includeManagedResource As Nullable(Of Boolean) = Nothing, Optional azureResourcesToExclude As IEnumerable(Of String) = Nothing, Optional terraformResourcesToExclude As IEnumerable(Of String) = Nothing, Optional resourceIds As IEnumerable(Of ResourceIdentifier) = Nothing, Optional resourceName As String = Nothing, Optional resourceType As String = Nothing, Optional namePattern As String = Nothing, Optional recursive As Nullable(Of Boolean) = Nothing, Optional includeResourceGroup As Nullable(Of Boolean) = Nothing) As ExportResourceTerraform

Parameters

targetProvider
Nullable<TargetTerraformProvider>

The target Azure Terraform provider. Defaults to azurerm.

isOutputFullPropertiesEnabled
Nullable<Boolean>

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.

isMaskSensitiveEnabled
Nullable<Boolean>

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

includeRoleAssignment
Nullable<Boolean>

Whether to include RBAC role assignments assigned to the resources exported. Only resource-scoped role assignments are supported. Defaults to false.

includeManagedResource
Nullable<Boolean>

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

azureResourcesToExclude
IEnumerable<String>

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

terraformResourcesToExclude
IEnumerable<String>

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

resourceIds
IEnumerable<ResourceIdentifier>

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

resourceName
String

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

resourceType
String

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.

namePattern
String

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

recursive
Nullable<Boolean>

Recursively includes child resources. Defaults to false.

includeResourceGroup
Nullable<Boolean>

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

Returns

A new ExportResourceTerraform instance for mocking.

Applies to