diff --git a/cSpell.json b/cSpell.json index 258b40e7531d..72a4cc10767d 100644 --- a/cSpell.json +++ b/cSpell.json @@ -1743,6 +1743,13 @@ "azapi" ] }, + { + "filename": "**/specification/terraform/Microsoft.AzureTerraform.Management/**/*.tsp", + "words": [ + "azurerm", + "azapi" + ] + }, { "filename": "**/specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/**/*.json", "words": [ diff --git a/specification/terraform/Microsoft.AzureTerraform.Management/models.tsp b/specification/terraform/Microsoft.AzureTerraform.Management/models.tsp index 154a5b737b3c..2d967fb2608e 100644 --- a/specification/terraform/Microsoft.AzureTerraform.Management/models.tsp +++ b/specification/terraform/Microsoft.AzureTerraform.Management/models.tsp @@ -33,6 +33,23 @@ union targetProvider { azapi: "azapi", } +@doc("The Azure Resource Graph Authorization Scope Filter parameter") +union authorizationScopeFilter { + string, + + @doc("Returns assignments for the given scope and all child scopes.") + AtScopeAndBelow: "AtScopeAndBelow", + + @doc("Returns assignments for the given scope and all parent scopes, but not child scopes.") + AtScopeAndAbove: "AtScopeAndAbove", + + @doc("Returns assignments for the given scope, all parent scopes, and all child scopes.") + AtScopeAboveAndBelow: "AtScopeAboveAndBelow", + + @doc("Returns assignments only for the given scope; no parent or child scopes are included.") + AtScopeExact: "AtScopeExact", +} + @doc("The base export parameter") @discriminator("type") model BaseExportModel { @@ -62,6 +79,12 @@ model ExportQuery extends BaseExportModel { @doc("The parameter type") type: "ExportQuery"; + + @doc("The ARG table name") + table?: string = "Resources"; + + @doc("The ARG Scope Filter parameter") + authorizationScopeFilter?: authorizationScopeFilter; } @doc("Export parameter for individual resources.") @@ -102,6 +125,9 @@ model ExportResult { @doc("The Terraform configuration content") configuration?: string; + @doc("The Terraform import blocks for the current export, which users can use to run \"terraform plan\" with to import the resources") + `import`?: string; + @doc("A list of Azure resources which are not exported to Terraform due to there is no corresponding resources in Terraform") skippedResources?: armResourceIdentifier[]; diff --git a/specification/terraform/resource-manager/Microsoft.AzureTerraform/preview/2023-07-01-preview/export.json b/specification/terraform/resource-manager/Microsoft.AzureTerraform/preview/2023-07-01-preview/export.json index 8a22f75e9007..566512e521b6 100644 --- a/specification/terraform/resource-manager/Microsoft.AzureTerraform/preview/2023-07-01-preview/export.json +++ b/specification/terraform/resource-manager/Microsoft.AzureTerraform/preview/2023-07-01-preview/export.json @@ -248,6 +248,15 @@ "type": "boolean", "description": "Whether to recursively list child resources of the query result", "default": false + }, + "table": { + "type": "string", + "description": "The ARG table name", + "default": "Resources" + }, + "authorizationScopeFilter": { + "$ref": "#/definitions/authorizationScopeFilter", + "description": "The ARG Scope Filter parameter" } }, "required": [ @@ -330,6 +339,10 @@ "type": "string", "description": "The Terraform configuration content" }, + "import": { + "type": "string", + "description": "The Terraform import blocks for the current export, which users can use to run \"terraform plan\" with to import the resources" + }, "skippedResources": { "type": "array", "description": "A list of Azure resources which are not exported to Terraform due to there is no corresponding resources in Terraform", @@ -426,6 +439,42 @@ } ] } + }, + "authorizationScopeFilter": { + "type": "string", + "description": "The Azure Resource Graph Authorization Scope Filter parameter", + "enum": [ + "AtScopeAndBelow", + "AtScopeAndAbove", + "AtScopeAboveAndBelow", + "AtScopeExact" + ], + "x-ms-enum": { + "name": "authorizationScopeFilter", + "modelAsString": true, + "values": [ + { + "name": "AtScopeAndBelow", + "value": "AtScopeAndBelow", + "description": "Returns assignments for the given scope and all child scopes." + }, + { + "name": "AtScopeAndAbove", + "value": "AtScopeAndAbove", + "description": "Returns assignments for the given scope and all parent scopes, but not child scopes." + }, + { + "name": "AtScopeAboveAndBelow", + "value": "AtScopeAboveAndBelow", + "description": "Returns assignments for the given scope, all parent scopes, and all child scopes." + }, + { + "name": "AtScopeExact", + "value": "AtScopeExact", + "description": "Returns assignments only for the given scope; no parent or child scopes are included." + } + ] + } } }, "parameters": {}