예제 #1
0
from pulumi import Config, Output, asset, export
from pulumi_azure_native.storage import (BlobContainer, PublicAccess,
                                         StorageAccount)

username = "******"

config = Config()
pwd = config.require("sqlPassword")

resource_group = resource.ResourceGroup("appservicerg")

storage_account = storage.StorageAccount(
    "appservicesa",
    resource_group_name=resource_group.name,
    kind=storage.Kind.STORAGE_V2,
    sku=storage.SkuArgs(name=storage.SkuName.STANDARD_LRS))

app_service_plan = web.AppServicePlan("appservice-asp",
                                      resource_group_name=resource_group.name,
                                      kind="App",
                                      sku=web.SkuDescriptionArgs(
                                          tier="Basic",
                                          name="B1",
                                      ))

storage_container = BlobContainer("appservice-c",
                                  account_name=storage_account.name,
                                  public_access=PublicAccess.NONE,
                                  resource_group_name=resource_group.name)

blob = storage.Blob("appservice-b",
예제 #2
0
import pulumi_azure_native.synapse as synapse
import pulumi_azure_native.resources as resources
import pulumi_random as random

config = pulumi.Config()

resource_group = resources.ResourceGroup("synapse-rg")

storage_account = storage.StorageAccount(
    "synapsesa",
    resource_group_name=resource_group.name,
    access_tier=storage.AccessTier.HOT,
    enable_https_traffic_only=True,
    is_hns_enabled=True,
    kind=storage.Kind.STORAGE_V2,
    sku=storage.SkuArgs(name=storage.SkuName.STANDARD_RAGRS, ))

data_lake_storage_account_url = storage_account.name.apply(
    lambda name: f"https://{name}.dfs.core.windows.net")

users = storage.BlobContainer("users",
                              resource_group_name=resource_group.name,
                              account_name=storage_account.name,
                              public_access=storage.PublicAccess.NONE)

workspace = synapse.Workspace(
    "workspace",
    resource_group_name=resource_group.name,
    default_data_lake_storage=synapse.DataLakeStorageAccountDetailsArgs(
        account_url=data_lake_storage_account_url,
        filesystem="users",