azurermDataShareAccount
Manages a Data Share Account.
Example Usage
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
new azurerm.provider.AzurermProvider(this, "azurerm", {
features: [{}],
});
const azurermResourceGroupExample = new azurerm.resourceGroup.ResourceGroup(
this,
"example",
{
location: "West Europe",
name: "example-resources",
}
);
const azurermDataShareAccountExample =
new azurerm.dataShareAccount.DataShareAccount(this, "example_2", {
identity: [
{
type: "SystemAssigned",
},
],
location: azurermResourceGroupExample.location,
name: "example-dsa",
resource_group_name: azurermResourceGroupExample.name,
tags: {
foo: "bar",
},
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermDataShareAccountExample.overrideLogicalId("example");
Arguments Reference
The following arguments are supported:
-
name
- (Required) The name which should be used for this Data Share Account. Changing this forces a new Data Share Account to be created. -
resourceGroupName
- (Required) The name of the Resource Group where the Data Share Account should exist. Changing this forces a new Data Share Account to be created. -
location
- (Required) The Azure Region where the Data Share Account should exist. Changing this forces a new Data Share Account to be created. -
identity
- (Required) Anidentity
block as defined below. Changing this forces a new resource to be created.
tags
- (Optional) A mapping of tags which should be assigned to the Data Share Account.
An identity
block supports the following:
type
- (Required) Specifies the type of Managed Service Identity that should be configured on this Data Share Account. The only possible value issystemAssigned
. Changing this forces a new resource to be created.
\~> NOTE: The assigned principalId
and tenantId
can be retrieved after the identity type
has been set to systemAssigned
and the Data Share Account has been created. More details are available below.
Attributes Reference
In addition to the Arguments listed above - the following Attributes are exported:
id
- The ID of the Data Share Account.
An identity
block exports the following:
-
principalId
- The Principal ID for the Service Principal associated with the Identity of this Data Share Account. -
tenantId
- The Tenant ID for the Service Principal associated with the Identity of this Data Share Account.
-> You can access the Principal ID via ${azurermDataShareAccountExampleIdentity0PrincipalId}
and the Tenant ID via ${azurermDataShareAccountExampleIdentity0TenantId}
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 30 minutes) Used when creating the Data Share Account.read
- (Defaults to 5 minutes) Used when retrieving the Data Share Account.update
- (Defaults to 30 minutes) Used when updating the Data Share Account.delete
- (Defaults to 30 minutes) Used when deleting the Data Share Account.
Import
Data Share Accounts can be imported using the resourceId
, e.g.