1. Packages
  2. AzAPI
  3. API Docs
  4. UpdateResource
AzAPI v1.12.2 published on Saturday, May 11, 2024 by dirien

azapi.UpdateResource

Explore with Pulumi AI

This resource can manage a subset of any existing Azure resource manager resource’s properties.

Note This resource is used to add or modify properties on an existing resource. When delete azapi.UpdateResource, no operation will be performed, and these properties will stay unchanged. If you want to restore the modified properties to some values, you must apply the restored properties before deleting.

Example Usage

terraform {
  required_providers {
    azapi = {
      source = "Azure/azapi"
    }
  }
}

provider "azapi" {
}

provider "azurerm" {
  features {}
}

resource "azurerm_resource_group" "example" {
  name     = "example-rg"
  location = "west europe"
}

resource "azurerm_public_ip" "example" {
  name                = "example-ip"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name
  allocation_method   = "Static"
}

resource "azurerm_lb" "example" {
  name                = "example-lb"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name

  frontend_ip_configuration {
    name                 = "PublicIPAddress"
    public_ip_address_id = azurerm_public_ip.example.id
  }
}

resource "azurerm_lb_nat_rule" "example" {
  resource_group_name            = azurerm_resource_group.example.name
  loadbalancer_id                = azurerm_lb.example.id
  name                           = "RDPAccess"
  protocol                       = "Tcp"
  frontend_port                  = 3389
  backend_port                   = 3389
  frontend_ip_configuration_name = "PublicIPAddress"
}

resource "azapi_update_resource" "example" {
  type        = "Microsoft.Network/loadBalancers@2021-03-01"
  resource_id = azurerm_lb.example.id

  body = jsonencode({
    properties = {
      inboundNatRules = [
        {
          properties = {
            idleTimeoutInMinutes = 15
          }
        }
      ]
    }
  })

  depends_on = [
    azurerm_lb_nat_rule.example,
  ]
}
Copy

Create UpdateResource Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new UpdateResource(name: string, args: UpdateResourceArgs, opts?: CustomResourceOptions);
@overload
def UpdateResource(resource_name: str,
                   args: UpdateResourceArgs,
                   opts: Optional[ResourceOptions] = None)

@overload
def UpdateResource(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   type: Optional[str] = None,
                   body: Optional[str] = None,
                   ignore_body_changes: Optional[Sequence[str]] = None,
                   ignore_casing: Optional[bool] = None,
                   ignore_missing_property: Optional[bool] = None,
                   locks: Optional[Sequence[str]] = None,
                   name: Optional[str] = None,
                   parent_id: Optional[str] = None,
                   resource_id: Optional[str] = None,
                   response_export_values: Optional[Sequence[str]] = None)
func NewUpdateResource(ctx *Context, name string, args UpdateResourceArgs, opts ...ResourceOption) (*UpdateResource, error)
public UpdateResource(string name, UpdateResourceArgs args, CustomResourceOptions? opts = null)
public UpdateResource(String name, UpdateResourceArgs args)
public UpdateResource(String name, UpdateResourceArgs args, CustomResourceOptions options)
type: azapi:UpdateResource
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. UpdateResourceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. UpdateResourceArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. UpdateResourceArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. UpdateResourceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. UpdateResourceArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var updateResourceResource = new Azapi.UpdateResource("updateResourceResource", new()
{
    Type = "string",
    Body = "string",
    IgnoreBodyChanges = new[]
    {
        "string",
    },
    IgnoreCasing = false,
    IgnoreMissingProperty = false,
    Locks = new[]
    {
        "string",
    },
    Name = "string",
    ParentId = "string",
    ResourceId = "string",
    ResponseExportValues = new[]
    {
        "string",
    },
});
Copy
example, err := azapi.NewUpdateResource(ctx, "updateResourceResource", &azapi.UpdateResourceArgs{
	Type: pulumi.String("string"),
	Body: pulumi.String("string"),
	IgnoreBodyChanges: pulumi.StringArray{
		pulumi.String("string"),
	},
	IgnoreCasing:          pulumi.Bool(false),
	IgnoreMissingProperty: pulumi.Bool(false),
	Locks: pulumi.StringArray{
		pulumi.String("string"),
	},
	Name:       pulumi.String("string"),
	ParentId:   pulumi.String("string"),
	ResourceId: pulumi.String("string"),
	ResponseExportValues: pulumi.StringArray{
		pulumi.String("string"),
	},
})
Copy
var updateResourceResource = new UpdateResource("updateResourceResource", UpdateResourceArgs.builder()
    .type("string")
    .body("string")
    .ignoreBodyChanges("string")
    .ignoreCasing(false)
    .ignoreMissingProperty(false)
    .locks("string")
    .name("string")
    .parentId("string")
    .resourceId("string")
    .responseExportValues("string")
    .build());
Copy
update_resource_resource = azapi.UpdateResource("updateResourceResource",
    type="string",
    body="string",
    ignore_body_changes=["string"],
    ignore_casing=False,
    ignore_missing_property=False,
    locks=["string"],
    name="string",
    parent_id="string",
    resource_id="string",
    response_export_values=["string"])
Copy
const updateResourceResource = new azapi.UpdateResource("updateResourceResource", {
    type: "string",
    body: "string",
    ignoreBodyChanges: ["string"],
    ignoreCasing: false,
    ignoreMissingProperty: false,
    locks: ["string"],
    name: "string",
    parentId: "string",
    resourceId: "string",
    responseExportValues: ["string"],
});
Copy
type: azapi:UpdateResource
properties:
    body: string
    ignoreBodyChanges:
        - string
    ignoreCasing: false
    ignoreMissingProperty: false
    locks:
        - string
    name: string
    parentId: string
    resourceId: string
    responseExportValues:
        - string
    type: string
Copy

UpdateResource Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The UpdateResource resource accepts the following input properties:

Type This property is required. string
It is in a format like <resource-type>@<api-version>. <resource-type> is the Azure resource type, for example, Microsoft.Storage/storageAccounts. <api-version> is version of the API used to manage this azure resource.
Body string
A JSON object that contains the request body used to add on an existing azure resource.
IgnoreBodyChanges List<string>
A list of properties that should be ignored when comparing the body with its current state.
IgnoreCasing bool
Whether ignore incorrect casing returned in body to suppress plan-diff. Defaults to false.
IgnoreMissingProperty bool
Whether ignore not returned properties like credentials in body to suppress plan-diff. Defaults to true.
Locks List<string>
A list of ARM resource IDs which are used to avoid create/modify/delete azapi resources at the same time.
Name Changes to this property will trigger replacement. string
Specifies the name of the azure resource. Changing this forces a new resource to be created.
ParentId Changes to this property will trigger replacement. string

The ID of the azure resource in which this resource is created. Changing this forces a new resource to be created. It supports different kinds of deployment scope for top level resources:

  • resource group scope: parent_id should be the ID of a resource group, it's recommended to manage a resource group by azurerm_resource_group.
  • management group scope: parent_id should be the ID of a management group, it's recommended to manage a management group by azurerm_management_group.
  • extension scope: parent_id should be the ID of the resource you're adding the extension to.
  • subscription scope: parent_id should be like /subscriptions/00000000-0000-0000-0000-000000000000
  • tenant scope: parent_id should be /

For child level resources, the parent_id should be the ID of its parent resource, for example, subnet resource's parent_id is the ID of the vnet.

ResourceId Changes to this property will trigger replacement. string

The ID of an existing azure source. Changing this forces a new azure resource to be created.

Note: Configuring name and parent_id is an alternative way to configure resource_id.

ResponseExportValues List<string>
A list of path that needs to be exported from response body. Setting it to ["*"] will export the full response body. Here's an example. If it sets to ["properties.loginServer", "properties.policies.quarantinePolicy.status"], it will set the following json to computed property output.

{
"properties" : {
"loginServer" : "registry1.azurecr.io"
"policies" : {
"quarantinePolicy" = {
"status" = "disabled"
}
}
}
}
Type This property is required. string
It is in a format like <resource-type>@<api-version>. <resource-type> is the Azure resource type, for example, Microsoft.Storage/storageAccounts. <api-version> is version of the API used to manage this azure resource.
Body string
A JSON object that contains the request body used to add on an existing azure resource.
IgnoreBodyChanges []string
A list of properties that should be ignored when comparing the body with its current state.
IgnoreCasing bool
Whether ignore incorrect casing returned in body to suppress plan-diff. Defaults to false.
IgnoreMissingProperty bool
Whether ignore not returned properties like credentials in body to suppress plan-diff. Defaults to true.
Locks []string
A list of ARM resource IDs which are used to avoid create/modify/delete azapi resources at the same time.
Name Changes to this property will trigger replacement. string
Specifies the name of the azure resource. Changing this forces a new resource to be created.
ParentId Changes to this property will trigger replacement. string

The ID of the azure resource in which this resource is created. Changing this forces a new resource to be created. It supports different kinds of deployment scope for top level resources:

  • resource group scope: parent_id should be the ID of a resource group, it's recommended to manage a resource group by azurerm_resource_group.
  • management group scope: parent_id should be the ID of a management group, it's recommended to manage a management group by azurerm_management_group.
  • extension scope: parent_id should be the ID of the resource you're adding the extension to.
  • subscription scope: parent_id should be like /subscriptions/00000000-0000-0000-0000-000000000000
  • tenant scope: parent_id should be /

For child level resources, the parent_id should be the ID of its parent resource, for example, subnet resource's parent_id is the ID of the vnet.

ResourceId Changes to this property will trigger replacement. string

The ID of an existing azure source. Changing this forces a new azure resource to be created.

Note: Configuring name and parent_id is an alternative way to configure resource_id.

ResponseExportValues []string
A list of path that needs to be exported from response body. Setting it to ["*"] will export the full response body. Here's an example. If it sets to ["properties.loginServer", "properties.policies.quarantinePolicy.status"], it will set the following json to computed property output.

{
"properties" : {
"loginServer" : "registry1.azurecr.io"
"policies" : {
"quarantinePolicy" = {
"status" = "disabled"
}
}
}
}
type This property is required. String
It is in a format like <resource-type>@<api-version>. <resource-type> is the Azure resource type, for example, Microsoft.Storage/storageAccounts. <api-version> is version of the API used to manage this azure resource.
body String
A JSON object that contains the request body used to add on an existing azure resource.
ignoreBodyChanges List<String>
A list of properties that should be ignored when comparing the body with its current state.
ignoreCasing Boolean
Whether ignore incorrect casing returned in body to suppress plan-diff. Defaults to false.
ignoreMissingProperty Boolean
Whether ignore not returned properties like credentials in body to suppress plan-diff. Defaults to true.
locks List<String>
A list of ARM resource IDs which are used to avoid create/modify/delete azapi resources at the same time.
name Changes to this property will trigger replacement. String
Specifies the name of the azure resource. Changing this forces a new resource to be created.
parentId Changes to this property will trigger replacement. String

The ID of the azure resource in which this resource is created. Changing this forces a new resource to be created. It supports different kinds of deployment scope for top level resources:

  • resource group scope: parent_id should be the ID of a resource group, it's recommended to manage a resource group by azurerm_resource_group.
  • management group scope: parent_id should be the ID of a management group, it's recommended to manage a management group by azurerm_management_group.
  • extension scope: parent_id should be the ID of the resource you're adding the extension to.
  • subscription scope: parent_id should be like /subscriptions/00000000-0000-0000-0000-000000000000
  • tenant scope: parent_id should be /

For child level resources, the parent_id should be the ID of its parent resource, for example, subnet resource's parent_id is the ID of the vnet.

resourceId Changes to this property will trigger replacement. String

The ID of an existing azure source. Changing this forces a new azure resource to be created.

Note: Configuring name and parent_id is an alternative way to configure resource_id.

responseExportValues List<String>
A list of path that needs to be exported from response body. Setting it to ["*"] will export the full response body. Here's an example. If it sets to ["properties.loginServer", "properties.policies.quarantinePolicy.status"], it will set the following json to computed property output.

{
"properties" : {
"loginServer" : "registry1.azurecr.io"
"policies" : {
"quarantinePolicy" = {
"status" = "disabled"
}
}
}
}
type This property is required. string
It is in a format like <resource-type>@<api-version>. <resource-type> is the Azure resource type, for example, Microsoft.Storage/storageAccounts. <api-version> is version of the API used to manage this azure resource.
body string
A JSON object that contains the request body used to add on an existing azure resource.
ignoreBodyChanges string[]
A list of properties that should be ignored when comparing the body with its current state.
ignoreCasing boolean
Whether ignore incorrect casing returned in body to suppress plan-diff. Defaults to false.
ignoreMissingProperty boolean
Whether ignore not returned properties like credentials in body to suppress plan-diff. Defaults to true.
locks string[]
A list of ARM resource IDs which are used to avoid create/modify/delete azapi resources at the same time.
name Changes to this property will trigger replacement. string
Specifies the name of the azure resource. Changing this forces a new resource to be created.
parentId Changes to this property will trigger replacement. string

The ID of the azure resource in which this resource is created. Changing this forces a new resource to be created. It supports different kinds of deployment scope for top level resources:

  • resource group scope: parent_id should be the ID of a resource group, it's recommended to manage a resource group by azurerm_resource_group.
  • management group scope: parent_id should be the ID of a management group, it's recommended to manage a management group by azurerm_management_group.
  • extension scope: parent_id should be the ID of the resource you're adding the extension to.
  • subscription scope: parent_id should be like /subscriptions/00000000-0000-0000-0000-000000000000
  • tenant scope: parent_id should be /

For child level resources, the parent_id should be the ID of its parent resource, for example, subnet resource's parent_id is the ID of the vnet.

resourceId Changes to this property will trigger replacement. string

The ID of an existing azure source. Changing this forces a new azure resource to be created.

Note: Configuring name and parent_id is an alternative way to configure resource_id.

responseExportValues string[]
A list of path that needs to be exported from response body. Setting it to ["*"] will export the full response body. Here's an example. If it sets to ["properties.loginServer", "properties.policies.quarantinePolicy.status"], it will set the following json to computed property output.

{
"properties" : {
"loginServer" : "registry1.azurecr.io"
"policies" : {
"quarantinePolicy" = {
"status" = "disabled"
}
}
}
}
type This property is required. str
It is in a format like <resource-type>@<api-version>. <resource-type> is the Azure resource type, for example, Microsoft.Storage/storageAccounts. <api-version> is version of the API used to manage this azure resource.
body str
A JSON object that contains the request body used to add on an existing azure resource.
ignore_body_changes Sequence[str]
A list of properties that should be ignored when comparing the body with its current state.
ignore_casing bool
Whether ignore incorrect casing returned in body to suppress plan-diff. Defaults to false.
ignore_missing_property bool
Whether ignore not returned properties like credentials in body to suppress plan-diff. Defaults to true.
locks Sequence[str]
A list of ARM resource IDs which are used to avoid create/modify/delete azapi resources at the same time.
name Changes to this property will trigger replacement. str
Specifies the name of the azure resource. Changing this forces a new resource to be created.
parent_id Changes to this property will trigger replacement. str

The ID of the azure resource in which this resource is created. Changing this forces a new resource to be created. It supports different kinds of deployment scope for top level resources:

  • resource group scope: parent_id should be the ID of a resource group, it's recommended to manage a resource group by azurerm_resource_group.
  • management group scope: parent_id should be the ID of a management group, it's recommended to manage a management group by azurerm_management_group.
  • extension scope: parent_id should be the ID of the resource you're adding the extension to.
  • subscription scope: parent_id should be like /subscriptions/00000000-0000-0000-0000-000000000000
  • tenant scope: parent_id should be /

For child level resources, the parent_id should be the ID of its parent resource, for example, subnet resource's parent_id is the ID of the vnet.

resource_id Changes to this property will trigger replacement. str

The ID of an existing azure source. Changing this forces a new azure resource to be created.

Note: Configuring name and parent_id is an alternative way to configure resource_id.

response_export_values Sequence[str]
A list of path that needs to be exported from response body. Setting it to ["*"] will export the full response body. Here's an example. If it sets to ["properties.loginServer", "properties.policies.quarantinePolicy.status"], it will set the following json to computed property output.

{
"properties" : {
"loginServer" : "registry1.azurecr.io"
"policies" : {
"quarantinePolicy" = {
"status" = "disabled"
}
}
}
}
type This property is required. String
It is in a format like <resource-type>@<api-version>. <resource-type> is the Azure resource type, for example, Microsoft.Storage/storageAccounts. <api-version> is version of the API used to manage this azure resource.
body String
A JSON object that contains the request body used to add on an existing azure resource.
ignoreBodyChanges List<String>
A list of properties that should be ignored when comparing the body with its current state.
ignoreCasing Boolean
Whether ignore incorrect casing returned in body to suppress plan-diff. Defaults to false.
ignoreMissingProperty Boolean
Whether ignore not returned properties like credentials in body to suppress plan-diff. Defaults to true.
locks List<String>
A list of ARM resource IDs which are used to avoid create/modify/delete azapi resources at the same time.
name Changes to this property will trigger replacement. String
Specifies the name of the azure resource. Changing this forces a new resource to be created.
parentId Changes to this property will trigger replacement. String

The ID of the azure resource in which this resource is created. Changing this forces a new resource to be created. It supports different kinds of deployment scope for top level resources:

  • resource group scope: parent_id should be the ID of a resource group, it's recommended to manage a resource group by azurerm_resource_group.
  • management group scope: parent_id should be the ID of a management group, it's recommended to manage a management group by azurerm_management_group.
  • extension scope: parent_id should be the ID of the resource you're adding the extension to.
  • subscription scope: parent_id should be like /subscriptions/00000000-0000-0000-0000-000000000000
  • tenant scope: parent_id should be /

For child level resources, the parent_id should be the ID of its parent resource, for example, subnet resource's parent_id is the ID of the vnet.

resourceId Changes to this property will trigger replacement. String

The ID of an existing azure source. Changing this forces a new azure resource to be created.

Note: Configuring name and parent_id is an alternative way to configure resource_id.

responseExportValues List<String>
A list of path that needs to be exported from response body. Setting it to ["*"] will export the full response body. Here's an example. If it sets to ["properties.loginServer", "properties.policies.quarantinePolicy.status"], it will set the following json to computed property output.

{
"properties" : {
"loginServer" : "registry1.azurecr.io"
"policies" : {
"quarantinePolicy" = {
"status" = "disabled"
}
}
}
}

Outputs

All input properties are implicitly available as output properties. Additionally, the UpdateResource resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Output string
The output json containing the properties specified in response_export_values. Here're some examples to decode json and extract the value.

// it will output "registry1.azurecr.io"
output "login_server" {
value = jsondecode(azapi_resource.example.output).properties.loginServer
}
Id string
The provider-assigned unique ID for this managed resource.
Output string
The output json containing the properties specified in response_export_values. Here're some examples to decode json and extract the value.

// it will output "registry1.azurecr.io"
output "login_server" {
value = jsondecode(azapi_resource.example.output).properties.loginServer
}
id String
The provider-assigned unique ID for this managed resource.
output String
The output json containing the properties specified in response_export_values. Here're some examples to decode json and extract the value.

// it will output "registry1.azurecr.io"
output "login_server" {
value = jsondecode(azapi_resource.example.output).properties.loginServer
}
id string
The provider-assigned unique ID for this managed resource.
output string
The output json containing the properties specified in response_export_values. Here're some examples to decode json and extract the value.

// it will output "registry1.azurecr.io"
output "login_server" {
value = jsondecode(azapi_resource.example.output).properties.loginServer
}
id str
The provider-assigned unique ID for this managed resource.
output str
The output json containing the properties specified in response_export_values. Here're some examples to decode json and extract the value.

// it will output "registry1.azurecr.io"
output "login_server" {
value = jsondecode(azapi_resource.example.output).properties.loginServer
}
id String
The provider-assigned unique ID for this managed resource.
output String
The output json containing the properties specified in response_export_values. Here're some examples to decode json and extract the value.

// it will output "registry1.azurecr.io"
output "login_server" {
value = jsondecode(azapi_resource.example.output).properties.loginServer
}

Look up Existing UpdateResource Resource

Get an existing UpdateResource resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: UpdateResourceState, opts?: CustomResourceOptions): UpdateResource
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        body: Optional[str] = None,
        ignore_body_changes: Optional[Sequence[str]] = None,
        ignore_casing: Optional[bool] = None,
        ignore_missing_property: Optional[bool] = None,
        locks: Optional[Sequence[str]] = None,
        name: Optional[str] = None,
        output: Optional[str] = None,
        parent_id: Optional[str] = None,
        resource_id: Optional[str] = None,
        response_export_values: Optional[Sequence[str]] = None,
        type: Optional[str] = None) -> UpdateResource
func GetUpdateResource(ctx *Context, name string, id IDInput, state *UpdateResourceState, opts ...ResourceOption) (*UpdateResource, error)
public static UpdateResource Get(string name, Input<string> id, UpdateResourceState? state, CustomResourceOptions? opts = null)
public static UpdateResource get(String name, Output<String> id, UpdateResourceState state, CustomResourceOptions options)
resources:  _:    type: azapi:UpdateResource    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Body string
A JSON object that contains the request body used to add on an existing azure resource.
IgnoreBodyChanges List<string>
A list of properties that should be ignored when comparing the body with its current state.
IgnoreCasing bool
Whether ignore incorrect casing returned in body to suppress plan-diff. Defaults to false.
IgnoreMissingProperty bool
Whether ignore not returned properties like credentials in body to suppress plan-diff. Defaults to true.
Locks List<string>
A list of ARM resource IDs which are used to avoid create/modify/delete azapi resources at the same time.
Name Changes to this property will trigger replacement. string
Specifies the name of the azure resource. Changing this forces a new resource to be created.
Output string
The output json containing the properties specified in response_export_values. Here're some examples to decode json and extract the value.

// it will output "registry1.azurecr.io"
output "login_server" {
value = jsondecode(azapi_resource.example.output).properties.loginServer
}
ParentId Changes to this property will trigger replacement. string

The ID of the azure resource in which this resource is created. Changing this forces a new resource to be created. It supports different kinds of deployment scope for top level resources:

  • resource group scope: parent_id should be the ID of a resource group, it's recommended to manage a resource group by azurerm_resource_group.
  • management group scope: parent_id should be the ID of a management group, it's recommended to manage a management group by azurerm_management_group.
  • extension scope: parent_id should be the ID of the resource you're adding the extension to.
  • subscription scope: parent_id should be like /subscriptions/00000000-0000-0000-0000-000000000000
  • tenant scope: parent_id should be /

For child level resources, the parent_id should be the ID of its parent resource, for example, subnet resource's parent_id is the ID of the vnet.

ResourceId Changes to this property will trigger replacement. string

The ID of an existing azure source. Changing this forces a new azure resource to be created.

Note: Configuring name and parent_id is an alternative way to configure resource_id.

ResponseExportValues List<string>
A list of path that needs to be exported from response body. Setting it to ["*"] will export the full response body. Here's an example. If it sets to ["properties.loginServer", "properties.policies.quarantinePolicy.status"], it will set the following json to computed property output.

{
"properties" : {
"loginServer" : "registry1.azurecr.io"
"policies" : {
"quarantinePolicy" = {
"status" = "disabled"
}
}
}
}
Type string
It is in a format like <resource-type>@<api-version>. <resource-type> is the Azure resource type, for example, Microsoft.Storage/storageAccounts. <api-version> is version of the API used to manage this azure resource.
Body string
A JSON object that contains the request body used to add on an existing azure resource.
IgnoreBodyChanges []string
A list of properties that should be ignored when comparing the body with its current state.
IgnoreCasing bool
Whether ignore incorrect casing returned in body to suppress plan-diff. Defaults to false.
IgnoreMissingProperty bool
Whether ignore not returned properties like credentials in body to suppress plan-diff. Defaults to true.
Locks []string
A list of ARM resource IDs which are used to avoid create/modify/delete azapi resources at the same time.
Name Changes to this property will trigger replacement. string
Specifies the name of the azure resource. Changing this forces a new resource to be created.
Output string
The output json containing the properties specified in response_export_values. Here're some examples to decode json and extract the value.

// it will output "registry1.azurecr.io"
output "login_server" {
value = jsondecode(azapi_resource.example.output).properties.loginServer
}
ParentId Changes to this property will trigger replacement. string

The ID of the azure resource in which this resource is created. Changing this forces a new resource to be created. It supports different kinds of deployment scope for top level resources:

  • resource group scope: parent_id should be the ID of a resource group, it's recommended to manage a resource group by azurerm_resource_group.
  • management group scope: parent_id should be the ID of a management group, it's recommended to manage a management group by azurerm_management_group.
  • extension scope: parent_id should be the ID of the resource you're adding the extension to.
  • subscription scope: parent_id should be like /subscriptions/00000000-0000-0000-0000-000000000000
  • tenant scope: parent_id should be /

For child level resources, the parent_id should be the ID of its parent resource, for example, subnet resource's parent_id is the ID of the vnet.

ResourceId Changes to this property will trigger replacement. string

The ID of an existing azure source. Changing this forces a new azure resource to be created.

Note: Configuring name and parent_id is an alternative way to configure resource_id.

ResponseExportValues []string
A list of path that needs to be exported from response body. Setting it to ["*"] will export the full response body. Here's an example. If it sets to ["properties.loginServer", "properties.policies.quarantinePolicy.status"], it will set the following json to computed property output.

{
"properties" : {
"loginServer" : "registry1.azurecr.io"
"policies" : {
"quarantinePolicy" = {
"status" = "disabled"
}
}
}
}
Type string
It is in a format like <resource-type>@<api-version>. <resource-type> is the Azure resource type, for example, Microsoft.Storage/storageAccounts. <api-version> is version of the API used to manage this azure resource.
body String
A JSON object that contains the request body used to add on an existing azure resource.
ignoreBodyChanges List<String>
A list of properties that should be ignored when comparing the body with its current state.
ignoreCasing Boolean
Whether ignore incorrect casing returned in body to suppress plan-diff. Defaults to false.
ignoreMissingProperty Boolean
Whether ignore not returned properties like credentials in body to suppress plan-diff. Defaults to true.
locks List<String>
A list of ARM resource IDs which are used to avoid create/modify/delete azapi resources at the same time.
name Changes to this property will trigger replacement. String
Specifies the name of the azure resource. Changing this forces a new resource to be created.
output String
The output json containing the properties specified in response_export_values. Here're some examples to decode json and extract the value.

// it will output "registry1.azurecr.io"
output "login_server" {
value = jsondecode(azapi_resource.example.output).properties.loginServer
}
parentId Changes to this property will trigger replacement. String

The ID of the azure resource in which this resource is created. Changing this forces a new resource to be created. It supports different kinds of deployment scope for top level resources:

  • resource group scope: parent_id should be the ID of a resource group, it's recommended to manage a resource group by azurerm_resource_group.
  • management group scope: parent_id should be the ID of a management group, it's recommended to manage a management group by azurerm_management_group.
  • extension scope: parent_id should be the ID of the resource you're adding the extension to.
  • subscription scope: parent_id should be like /subscriptions/00000000-0000-0000-0000-000000000000
  • tenant scope: parent_id should be /

For child level resources, the parent_id should be the ID of its parent resource, for example, subnet resource's parent_id is the ID of the vnet.

resourceId Changes to this property will trigger replacement. String

The ID of an existing azure source. Changing this forces a new azure resource to be created.

Note: Configuring name and parent_id is an alternative way to configure resource_id.

responseExportValues List<String>
A list of path that needs to be exported from response body. Setting it to ["*"] will export the full response body. Here's an example. If it sets to ["properties.loginServer", "properties.policies.quarantinePolicy.status"], it will set the following json to computed property output.

{
"properties" : {
"loginServer" : "registry1.azurecr.io"
"policies" : {
"quarantinePolicy" = {
"status" = "disabled"
}
}
}
}
type String
It is in a format like <resource-type>@<api-version>. <resource-type> is the Azure resource type, for example, Microsoft.Storage/storageAccounts. <api-version> is version of the API used to manage this azure resource.
body string
A JSON object that contains the request body used to add on an existing azure resource.
ignoreBodyChanges string[]
A list of properties that should be ignored when comparing the body with its current state.
ignoreCasing boolean
Whether ignore incorrect casing returned in body to suppress plan-diff. Defaults to false.
ignoreMissingProperty boolean
Whether ignore not returned properties like credentials in body to suppress plan-diff. Defaults to true.
locks string[]
A list of ARM resource IDs which are used to avoid create/modify/delete azapi resources at the same time.
name Changes to this property will trigger replacement. string
Specifies the name of the azure resource. Changing this forces a new resource to be created.
output string
The output json containing the properties specified in response_export_values. Here're some examples to decode json and extract the value.

// it will output "registry1.azurecr.io"
output "login_server" {
value = jsondecode(azapi_resource.example.output).properties.loginServer
}
parentId Changes to this property will trigger replacement. string

The ID of the azure resource in which this resource is created. Changing this forces a new resource to be created. It supports different kinds of deployment scope for top level resources:

  • resource group scope: parent_id should be the ID of a resource group, it's recommended to manage a resource group by azurerm_resource_group.
  • management group scope: parent_id should be the ID of a management group, it's recommended to manage a management group by azurerm_management_group.
  • extension scope: parent_id should be the ID of the resource you're adding the extension to.
  • subscription scope: parent_id should be like /subscriptions/00000000-0000-0000-0000-000000000000
  • tenant scope: parent_id should be /

For child level resources, the parent_id should be the ID of its parent resource, for example, subnet resource's parent_id is the ID of the vnet.

resourceId Changes to this property will trigger replacement. string

The ID of an existing azure source. Changing this forces a new azure resource to be created.

Note: Configuring name and parent_id is an alternative way to configure resource_id.

responseExportValues string[]
A list of path that needs to be exported from response body. Setting it to ["*"] will export the full response body. Here's an example. If it sets to ["properties.loginServer", "properties.policies.quarantinePolicy.status"], it will set the following json to computed property output.

{
"properties" : {
"loginServer" : "registry1.azurecr.io"
"policies" : {
"quarantinePolicy" = {
"status" = "disabled"
}
}
}
}
type string
It is in a format like <resource-type>@<api-version>. <resource-type> is the Azure resource type, for example, Microsoft.Storage/storageAccounts. <api-version> is version of the API used to manage this azure resource.
body str
A JSON object that contains the request body used to add on an existing azure resource.
ignore_body_changes Sequence[str]
A list of properties that should be ignored when comparing the body with its current state.
ignore_casing bool
Whether ignore incorrect casing returned in body to suppress plan-diff. Defaults to false.
ignore_missing_property bool
Whether ignore not returned properties like credentials in body to suppress plan-diff. Defaults to true.
locks Sequence[str]
A list of ARM resource IDs which are used to avoid create/modify/delete azapi resources at the same time.
name Changes to this property will trigger replacement. str
Specifies the name of the azure resource. Changing this forces a new resource to be created.
output str
The output json containing the properties specified in response_export_values. Here're some examples to decode json and extract the value.

// it will output "registry1.azurecr.io"
output "login_server" {
value = jsondecode(azapi_resource.example.output).properties.loginServer
}
parent_id Changes to this property will trigger replacement. str

The ID of the azure resource in which this resource is created. Changing this forces a new resource to be created. It supports different kinds of deployment scope for top level resources:

  • resource group scope: parent_id should be the ID of a resource group, it's recommended to manage a resource group by azurerm_resource_group.
  • management group scope: parent_id should be the ID of a management group, it's recommended to manage a management group by azurerm_management_group.
  • extension scope: parent_id should be the ID of the resource you're adding the extension to.
  • subscription scope: parent_id should be like /subscriptions/00000000-0000-0000-0000-000000000000
  • tenant scope: parent_id should be /

For child level resources, the parent_id should be the ID of its parent resource, for example, subnet resource's parent_id is the ID of the vnet.

resource_id Changes to this property will trigger replacement. str

The ID of an existing azure source. Changing this forces a new azure resource to be created.

Note: Configuring name and parent_id is an alternative way to configure resource_id.

response_export_values Sequence[str]
A list of path that needs to be exported from response body. Setting it to ["*"] will export the full response body. Here's an example. If it sets to ["properties.loginServer", "properties.policies.quarantinePolicy.status"], it will set the following json to computed property output.

{
"properties" : {
"loginServer" : "registry1.azurecr.io"
"policies" : {
"quarantinePolicy" = {
"status" = "disabled"
}
}
}
}
type str
It is in a format like <resource-type>@<api-version>. <resource-type> is the Azure resource type, for example, Microsoft.Storage/storageAccounts. <api-version> is version of the API used to manage this azure resource.
body String
A JSON object that contains the request body used to add on an existing azure resource.
ignoreBodyChanges List<String>
A list of properties that should be ignored when comparing the body with its current state.
ignoreCasing Boolean
Whether ignore incorrect casing returned in body to suppress plan-diff. Defaults to false.
ignoreMissingProperty Boolean
Whether ignore not returned properties like credentials in body to suppress plan-diff. Defaults to true.
locks List<String>
A list of ARM resource IDs which are used to avoid create/modify/delete azapi resources at the same time.
name Changes to this property will trigger replacement. String
Specifies the name of the azure resource. Changing this forces a new resource to be created.
output String
The output json containing the properties specified in response_export_values. Here're some examples to decode json and extract the value.

// it will output "registry1.azurecr.io"
output "login_server" {
value = jsondecode(azapi_resource.example.output).properties.loginServer
}
parentId Changes to this property will trigger replacement. String

The ID of the azure resource in which this resource is created. Changing this forces a new resource to be created. It supports different kinds of deployment scope for top level resources:

  • resource group scope: parent_id should be the ID of a resource group, it's recommended to manage a resource group by azurerm_resource_group.
  • management group scope: parent_id should be the ID of a management group, it's recommended to manage a management group by azurerm_management_group.
  • extension scope: parent_id should be the ID of the resource you're adding the extension to.
  • subscription scope: parent_id should be like /subscriptions/00000000-0000-0000-0000-000000000000
  • tenant scope: parent_id should be /

For child level resources, the parent_id should be the ID of its parent resource, for example, subnet resource's parent_id is the ID of the vnet.

resourceId Changes to this property will trigger replacement. String

The ID of an existing azure source. Changing this forces a new azure resource to be created.

Note: Configuring name and parent_id is an alternative way to configure resource_id.

responseExportValues List<String>
A list of path that needs to be exported from response body. Setting it to ["*"] will export the full response body. Here's an example. If it sets to ["properties.loginServer", "properties.policies.quarantinePolicy.status"], it will set the following json to computed property output.

{
"properties" : {
"loginServer" : "registry1.azurecr.io"
"policies" : {
"quarantinePolicy" = {
"status" = "disabled"
}
}
}
}
type String
It is in a format like <resource-type>@<api-version>. <resource-type> is the Azure resource type, for example, Microsoft.Storage/storageAccounts. <api-version> is version of the API used to manage this azure resource.

Package Details

Repository
azapi dirien/pulumi-azapi
License
Apache-2.0
Notes
This Pulumi package is based on the azapi Terraform Provider.