mirror of https://github.com/pulumi/pulumi.git
27 lines
1.2 KiB
Python
27 lines
1.2 KiB
Python
import pulumi
|
|
import pulumi_azure as azure
|
|
|
|
config = pulumi.Config()
|
|
# The name of the storage account
|
|
storage_account_name_param = config.require("storageAccountNameParam")
|
|
# The name of the resource group
|
|
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
|
|
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)
|