0.1.130 • Published 6 months ago

@azbake/ingredient-storage v0.1.130

Weekly downloads
190
License
MIT
Repository
-
Last release
6 months ago

Changelogs

Overview

The Storage ingredient is a plugin for Bake. When included in a recipe this will create a standard storage account. Whether services blob, file, disk, queue, or table storage are mounted on this resource is not defined in the template, only the logical construct is created.

Usage

This typically would be included as a dependent resource in a recipe. It is possible to setup a stand alone instance, but would not be a typical inclusion. Metrics and diagnostic logs are recorded to Storage Analytics is enabled by default.

Recipe

name: My package
shortName: mypkg
version: 0.0.1
ingredients:
  - "@azbake/ingredient-storage@~0"
parallelRegions: false
resourceGroup: true
variables:
  #"true" or "false" strings.  Defaults to "true" if unspecified.
  blobDiagnosticHourlyMetricsEnabled: "true"
  #Number of days to retain hourly metrics
  blobDiagnosticHourlyMetricsRetentionDays: 12
  #"true" or "false" strings.  Defaults to "true" if unspecified.
  blobDiagnosticMinuteMetricsEnabled: "false"
  #Number of days to retain minute metrics
  blobDiagnosticMinuteMetricsRetentionDays: 10    
    #"true" or "false" strings.  Defaults to "true" if unspecified.
  blobDiagnosticLoggingEnabled: "true"
  #Number of days to retain minute metrics
  blobDiagnosticLoggingRetentionDays: 10    
recipe:
  mypkg-storage:
    properties:
      type: "@azbake/ingredient-storage"
      source: ""
      parameters:
        storageAccountName: "[storage.create_resource_name()]"
parameterrequireddefaultdescription
storageAccountNameyesName for the storage account resource
storageKindnoStorageV2Sets the storage account kind
storageTiernoStandardSets the pricing tier for the storage account
locationnoParent resource group geographic locationThe location for this resource
storageAccountTypenoThe type for the storage account See documentation
storageAccessTiernoSelects Hot or Cold tiers for the storage account. See documentation
containeryes (when source is populated)Container to upload the specific source to. Only used when source is specified.
uploadPathyes (when source is populated)Path within the specified container to upload the source to. Only used when source is specified.
deploynotrueFlag to determine whether or not to deploy the service account. Useful for skipping deployment when just adding context to a container via source
unzipnofalseFlag to determine whether or not to unzip and upload if a zip file is encountered in the specified path.
rgOverridenoSpecifics a resource group override for the storage account if different from the main resource group of the bake recipe.
variablerequireddefaultdescription
blobDiagnosticHourlyMetricsEnabledno"true"Enables recording of hourly metrics to Storage Analytics. Currently accepts "true" / "false" as strings only.
blobDiagnosticHourlyMetricsRetentionDaysno10Data retention of hourly metrics in Storage Analytics.
blobDiagnosticMinuteMetricsEnabledno"true"Enables recording of minute metrics to Storage Analytics. Currently accepts "true" / "false" as strings only.
blobDiagnosticMinuteMetricsRetentionDaysno10Data retention of minute metrics in Storage Analytics
blobDiagnosticLoggingEnabledno"true"Enables recording of diagnostic logs to Storage Analytics. Currently accepts "true" / "false" as strings only.
blobDiagnosticLoggingRetentionDays10"true"Data retention of diagnostic logs in Storage Analytics

*** Please note that the only value required for creation of this resource is the storageAccountName

Uploading Files to Blob Storage

Files can be uploaded to a blob container during deployment by specifying the source property within the recipe. The source property supports pointing to a direct file via file:/// syntax or pointing to a directory using relative pathing.

NOTE: only blob storage is supported at this time.

name: My package
shortName: mypkg
version: 0.0.1
ingredients:
  - "@azbake/ingredient-storage@~0"
parallelRegions: false
resourceGroup: false
recipe:
  mypkg-storage:
    properties:
      type: "@azbake/ingredient-storage"
      source: "file:///./deploy/deploy.zip" # "./deploy"
      parameters:
        storageAccountName: "[storage.create_resource_name()]"
        container: myContainer
        uploadPath: mypkg/__build_buildNumber__
        deploy: false
        unzip: true

Utilities

Utility classes can be used inside of the bake.yaml file for parameter and source values.

storage class

functiondescription
create_resource_name()Returns the name created for the traffic manager profile when deployed.

Function Details

create_resource_name()

Gets the name create for the traffic manager profile deployed.

...
parameters:
    storageAccountName: "[storage.create_resource_name()]"
...

Returns

string

0.1.130

6 months ago

0.1.129

9 months ago

0.1.128

1 year ago

0.1.125

2 years ago

0.1.124

2 years ago

0.1.127

2 years ago

0.1.126

2 years ago

0.1.122

2 years ago

0.1.121

3 years ago

0.1.120

3 years ago

0.1.118

3 years ago

0.1.119

3 years ago

0.1.117

3 years ago

0.1.116

3 years ago

0.1.115

4 years ago

0.1.114

4 years ago

0.1.113

4 years ago

0.1.112

4 years ago

0.1.111

4 years ago

0.1.110

4 years ago

0.1.109

4 years ago

0.1.107

4 years ago

0.1.108

4 years ago

0.1.106

4 years ago

0.1.105

4 years ago

0.1.104

4 years ago

0.1.103

4 years ago

0.1.101

4 years ago

0.1.100

4 years ago

0.1.99

4 years ago

0.1.98

4 years ago

0.1.97

4 years ago

0.1.96

4 years ago

0.1.95

4 years ago

0.1.92

4 years ago

0.1.87

4 years ago

0.1.75

5 years ago

0.1.68

5 years ago

0.1.67

5 years ago

0.1.65

5 years ago

0.1.64

5 years ago

0.1.61

5 years ago

0.1.59

5 years ago

0.1.55

5 years ago

0.1.53

5 years ago

0.1.52

5 years ago

0.1.49

5 years ago

0.1.48

5 years ago

0.1.47

5 years ago

0.1.46

5 years ago

0.1.45

5 years ago

0.1.44

5 years ago

0.1.43

5 years ago

0.1.42

5 years ago

0.1.39

5 years ago

0.1.38

5 years ago

0.1.37

5 years ago

0.1.36

5 years ago

0.1.34

5 years ago

0.1.33

5 years ago

0.1.32

5 years ago

0.0.3

5 years ago