def _get_azure_context() -> AzureContext: client_config = core.get_client_config() context = AzureContext(client_config.tenant_id, client_config.object_id, client_config.subscription_id) v = Validator(AZURE_CONTEXT_SCHEMA, require_all=True) if not v.validate(asdict(context)): raise Exception(v.errors) return context
source=asset.FileAsset("./README.md")) app_service_plan = appservice.Plan("asp", resource_group_name=resource_group.name, kind="App", sku=appservice.PlanSkuArgs(tier="Basic", size="B1")) blob = storage.Blob( "zip", storage_account_name=storage_account.name, storage_container_name=container.name, type="Block", source=asset.FileArchive("./webapp/bin/Debug/netcoreapp3.1/publish")) client_config = core.get_client_config() tenant_id = client_config.tenant_id current_principal = client_config.object_id vault = keyvault.KeyVault( "vault", resource_group_name=resource_group.name, sku_name="standard", tenant_id=tenant_id, access_policies=[ keyvault.KeyVaultAccessPolicyArgs( tenant_id=tenant_id, object_id=current_principal, secret_permissions=["delete", "get", "list", "set"]) ])