2020-10-06 05:57:52 +00:00
|
|
|
import pulumi
|
|
|
|
import pulumi_azure as azure
|
|
|
|
|
|
|
|
config = pulumi.Config()
|
2023-03-21 14:01:16 +00:00
|
|
|
# The name of the storage account
|
2020-10-07 19:29:33 +00:00
|
|
|
storage_account_name_param = config.require("storageAccountNameParam")
|
2023-03-21 14:01:16 +00:00
|
|
|
# The name of the resource group
|
2020-10-06 05:57:52 +00:00
|
|
|
resource_group_name_param = config.require("resourceGroupNameParam")
|
|
|
|
resource_group_var = azure.core.get_resource_group(name=resource_group_name_param)
|
|
|
|
location_param = config.get("locationParam")
|
|
|
|
if location_param is None:
|
|
|
|
location_param = resource_group_var.location
|
2020-10-07 19:29:33 +00:00
|
|
|
storage_account_tier_param = config.get("storageAccountTierParam")
|
|
|
|
if storage_account_tier_param is None:
|
|
|
|
storage_account_tier_param = "Standard"
|
|
|
|
storage_account_type_replication_param = config.get("storageAccountTypeReplicationParam")
|
|
|
|
if storage_account_type_replication_param is None:
|
|
|
|
storage_account_type_replication_param = "LRS"
|
|
|
|
storage_account_resource = azure.storage.Account("storageAccountResource",
|
|
|
|
name=storage_account_name_param,
|
|
|
|
account_kind="StorageV2",
|
|
|
|
location=location_param,
|
|
|
|
resource_group_name=resource_group_name_param,
|
|
|
|
account_tier=storage_account_tier_param,
|
|
|
|
account_replication_type=storage_account_type_replication_param)
|
|
|
|
pulumi.export("storageAccountNameOut", storage_account_resource.name)
|