Skip to content

Commit

Permalink
Update version to 0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
flanakin committed Mar 28, 2024
1 parent 7ab8026 commit 533dc5d
Show file tree
Hide file tree
Showing 16 changed files with 20,349 additions and 20 deletions.
2 changes: 1 addition & 1 deletion docs/_includes/ftkver.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.1
0.3
15 changes: 11 additions & 4 deletions docs/_resources/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Explore the latest and greatest features and enhancements from the FinOps toolki
<summary class="fs-2 text-uppercase">On this page</summary>

- [🔄️ Unreleased](#️-unreleased)
- [🛠️ v0.2.1](#️-v021)
- [ v0.3](#-v03)
- [🚚 v0.2](#-v02)
- [🛠️ v0.1.1](#️-v011)
- [🚚 v0.1](#-v01)
Expand Down Expand Up @@ -63,7 +63,14 @@ Legend:
<br>

## 🛠️ v0.2.1
## 🚚 v0.3

📗 FinOps documentation
{: .fs-5 .fw-500 .mt-4 mb-0 }

> ➕ Added:
>
> 1. Added the FinOps documentation to provide guidance around how to implement and adopt FinOps in the Microsoft Cloud.
🏦 FinOps hubs
{: .fs-5 .fw-500 .mt-4 mb-0 }
Expand Down Expand Up @@ -170,8 +177,8 @@ Legend:
> 1. Added ServiceModel and Environment columns to the [services](../_reporting/data/README.md#-services) data ([#585](https://github.com/microsoft/finops-toolkit/issues/585)).
> 2. New and updated [resource types](../_reporting/data/README.md#-resource-types) and icons.
[Download v0.2.1](https://github.com/microsoft/finops-toolkit/releases/tag/v0.2.1){: .btn .mt-2 .mb-4 .mb-md-0 .mr-4 }
[Full changelog](https://github.com/microsoft/finops-toolkit/compare/v0.2...v0.2.1){: .btn .mt-2 .mb-4 .mb-md-0 .mr-4 }
[Download v0.3](https://github.com/microsoft/finops-toolkit/releases/tag/v0.3){: .btn .mt-2 .mb-4 .mb-md-0 .mr-4 }
[Full changelog](https://github.com/microsoft/finops-toolkit/compare/v0.2...v0.3){: .btn .mt-2 .mb-4 .mb-md-0 .mr-4 }

📊 Power BI reports
{: .fs-5 .fw-500 .mt-4 mb-0 }
Expand Down
2,087 changes: 2,087 additions & 0 deletions docs/deploy/finops-hub-0.3.json

Large diffs are not rendered by default.

86 changes: 86 additions & 0 deletions docs/deploy/finops-hub-0.3.ui.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
"$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#",
"handler": "Microsoft.Azure.CreateUIDef",
"version": "0.1.2-preview",
"parameters": {
"config": {
"basics": {
"description": "FinOps hubs are a reliable, trustworthy platform for cost analytics, insights, and optimization. Connect your hub to one or more billing accounts and subscriptions and build custom reports in Power BI or other tools. [Learn more](https://aka.ms/finops/hubs)",
"location": {
"label": "Location",
"resourceTypes": ["Microsoft.DataFactory/factories", "Microsoft.KeyVault/vaults", "Microsoft.Storage/storageAccounts"]
}
}
},
"resourceTypes": [
"Microsoft.DataFactory/factories",
"Microsoft.KeyVault/vaults",
"Microsoft.Storage/storageAccounts",
"Microsoft.ManagedIdentity/userAssignedIdentities",
"Microsoft.Resources/deploymentScripts"
],
"basics": [
{
"name": "hubName",
"type": "Microsoft.Common.TextBox",
"label": "Name",
"defaultValue": "finops-hub",
"toolTip": "Name of the hub. Used to ensure unique resource names.",
"constraints": {
"required": true,
"regex": "^[a-zA-Z0-9][a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9]$",
"validationMessage": "Name must be between 3 and 63 characters long and can contain only lowercase letters, numbers, and hyphens. The first and last characters in the name must be alphanumeric."
},
"visible": true
},
{
"name": "storageSku",
"type": "Microsoft.Common.DropDown",
"label": "Storage redundancy",
"defaultValue": "Locally-redundant (LRS) - Lowest cost",
"toolTip": "The data in your storage account is always replicated to ensure durability and high availability. Choose a replication strategy that matches your durability requirements. [Learn more](https://go.microsoft.com/fwlink/?linkid=2163103)",
"constraints": {
"required": false,
"allowedValues": [
{
"label": "Locally-redundant (LRS) - Lowest cost",
"value": "Premium_LRS"
},
{
"label": "Zone-redundant (ZRS) - High availability",
"value": "Premium_ZRS"
}
]
},
"visible": true
}
],
"steps": [
{
"name": "tags",
"label": "Tags",
"elements": [
{
"name": "tagsByResource",
"label": "Tags",
"toolTip": "Tags to apply to resources.",
"type": "Microsoft.Common.TagsByResource",
"resources": [
"Microsoft.DataFactory/factories",
"Microsoft.KeyVault/vaults",
"Microsoft.Storage/storageAccounts",
"Microsoft.ManagedIdentity/userAssignedIdentities",
"Microsoft.Resources/deploymentScripts"
]
}
]
}
],
"outputs": {
"hubName": "[basics('hubName')]",
"location": "[location()]",
"storageSku": "[basics('storageSku')]",
"tagsByResource": "[steps('tags').tagsByResource]"
}
}
}
10 changes: 5 additions & 5 deletions docs/deploy/finops-hub-latest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"_generator": {
"name": "bicep",
"version": "0.24.24.22086",
"templateHash": "8690698478139568283"
"templateHash": "8447317040603248989"
}
},
"parameters": {
Expand Down Expand Up @@ -92,7 +92,7 @@
"_generator": {
"name": "bicep",
"version": "0.24.24.22086",
"templateHash": "8853729996270511383"
"templateHash": "15554300320953845972"
}
},
"parameters": {
Expand Down Expand Up @@ -156,7 +156,7 @@
}
},
"variables": {
"finOpsToolkitVersion": "0.2.1",
"finOpsToolkitVersion": "0.3",
"resourceTags": "[union(parameters('tags'), createObject('cm-resource-parent', format('{0}/providers/Microsoft.Cloud/hubs/{1}', resourceGroup().id, parameters('hubName')), 'ftk-version', variables('finOpsToolkitVersion'), 'ftk-tool', 'FinOps hubs'))]",
"uniqueSuffix": "[uniqueString(parameters('hubName'), resourceGroup().id)]",
"dataFactoryPrefix": "[format('{0}-engine', replace(parameters('hubName'), '_', '-'))]",
Expand Down Expand Up @@ -235,7 +235,7 @@
"_generator": {
"name": "bicep",
"version": "0.24.24.22086",
"templateHash": "14749908183641525509"
"templateHash": "10694508257002464346"
}
},
"parameters": {
Expand Down Expand Up @@ -291,7 +291,7 @@
}
},
"variables": {
"$fxv#0": "0.2.1",
"$fxv#0": "0.3",
"$fxv#1": "# Copyright (c) Microsoft Corporation.\r\n# Licensed under the MIT License.\r\n\r\nWrite-Output \"Updating settings.json file...\"\r\nWrite-Output \" Storage account: $env:storageAccountName\"\r\nWrite-Output \" Container: $env:containerName\"\r\n\r\n$validateScopes = { $_.Length -gt 45 }\r\n\r\n# Initialize variables\r\n$fileName = 'settings.json'\r\n$filePath = Join-Path -Path . -ChildPath $fileName\r\n$newScopes = $env:exportScopes.Split('|') | Where-Object $validateScopes | ForEach-Object { @{ scope = $_ } }\r\n\r\n# Get storage context\r\n$storageContext = @{\r\n Context = New-AzStorageContext -StorageAccountName $env:storageAccountName -UseConnectedAccount\r\n Container = $env:containerName\r\n}\r\n\r\n# Download existing settings, if they exist\r\n$blob = Get-AzStorageBlobContent @storageContext -Blob $fileName -Destination $filePath -Force\r\nif ($blob) {\r\n Write-Output \"Existing settings.json file found. Updating...\"\r\n $text = Get-Content $filePath -Raw\r\n Write-Output \"---------\"\r\n Write-Output $text\r\n Write-Output \"---------\"\r\n $json = $text | ConvertFrom-Json\r\n\r\n # Rename exportScopes to scopes + convert to object array\r\n if ($json.exportScopes) {\r\n Write-Output \" Updating exportScopes...\"\r\n if ($json.exportScopes[0] -is [string]) {\r\n Write-Output \" Converting string array to object array...\"\r\n $json.exportScopes = $json.exportScopes | Where-Object $validateScopes | ForEach-Object { @{ scope = $_ } }\r\n if (-not ($json.exportScopes -is [array])) {\r\n Write-Output \" Converting single object to object array...\"\r\n $json.exportScopes = @($json.exportScopes)\r\n }\r\n }\r\n\r\n Write-Output \" Renaming to 'scopes'...\"\r\n $json | Add-Member -MemberType NoteProperty -Name scopes -Value $json.exportScopes\r\n $json.PSObject.Properties.Remove('exportScopes')\r\n }\r\n}\r\n\r\n# Set default if not found\r\nif (!$json) {\r\n Write-Output \"No existing settings.json file found. Creating new file...\"\r\n $json = [ordered]@{\r\n '$schema' = 'https://aka.ms/finops/hubs/settings-schema'\r\n type = 'HubInstance'\r\n version = ''\r\n learnMore = 'https://aka.ms/finops/hubs'\r\n scopes = @()\r\n }\r\n}\r\n\r\n# Updating settings\r\nWrite-Output \"Updating version to $env:ftkVersion...\"\r\n$json.version = $env:ftkVersion\r\nif ($newScopes) {\r\n Write-Output \"Merging $($newScopes.Count) scopes...\"\r\n $json.scopes = Compare-Object -ReferenceObject $json.scopes -DifferenceObject $newScopes -Property scope -PassThru -IncludeEqual\r\n\r\n # Remove the SideIndicator property from the Compare-Object output\r\n $json.scopes | ForEach-Object { $_.PSObject.Properties.Remove('SideIndicator') } | ConvertTo-Json\r\n\r\n if (-not ($json.scopes -is [array])) {\r\n $json.scopes = @($json.scopes)\r\n }\r\n Write-Output \"$($json.scopes.Count) scopes found.\"\r\n}\r\n$text = $json | ConvertTo-Json\r\nWrite-Output \"---------\"\r\nWrite-Output $text\r\nWrite-Output \"---------\"\r\n$text | Out-File $filePath\r\n\r\n# Upload new/updated settings\r\nWrite-Output \"Uploading settings.json file...\"\r\nSet-AzStorageBlobContent @storageContext -File $filePath -Force\r\n",
"safeHubName": "[replace(replace(toLower(parameters('hubName')), '-', ''), '_', '')]",
"storageAccountSuffix": "[parameters('uniqueSuffix')]",
Expand Down
Loading

0 comments on commit 533dc5d

Please sign in to comment.