mirror of
https://github.com/bartvdbraak/keyweave.git
synced 2025-07-06 16:19:11 +00:00
Compare commits
No commits in common. "main" and "v0.2.6" have entirely different histories.
9 changed files with 486 additions and 634 deletions
9
.github/renovate.json
vendored
9
.github/renovate.json
vendored
|
@ -1,12 +1,5 @@
|
||||||
{
|
{
|
||||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||||
"extends": ["config:base"],
|
"extends": ["config:base"],
|
||||||
"reviewers": ["bartvdbraak"],
|
"reviewers": ["bartvdbraak"]
|
||||||
"packageRules": [
|
|
||||||
{
|
|
||||||
"matchPackagePrefixes": ["azure"],
|
|
||||||
"groupName": "Azure Dependencies",
|
|
||||||
"groupSlug": "azure-dependencies"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
|
@ -70,7 +70,7 @@ jobs:
|
||||||
experimental: false
|
experimental: false
|
||||||
|
|
||||||
- name: mac-arm64
|
- name: mac-arm64
|
||||||
os: macos-latest
|
os: macos-11.0
|
||||||
target: aarch64-apple-darwin
|
target: aarch64-apple-darwin
|
||||||
cross: true
|
cross: true
|
||||||
experimental: true
|
experimental: true
|
||||||
|
@ -167,7 +167,7 @@ jobs:
|
||||||
sha512sum keyweave-* | tee SHA512SUMS
|
sha512sum keyweave-* | tee SHA512SUMS
|
||||||
sha256sum keyweave-* | tee SHA256SUMS
|
sha256sum keyweave-* | tee SHA256SUMS
|
||||||
|
|
||||||
- uses: softprops/action-gh-release@v2
|
- uses: softprops/action-gh-release@v1
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
|
|
3
.github/workflows/tests.yml
vendored
3
.github/workflows/tests.yml
vendored
|
@ -56,10 +56,9 @@ jobs:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: azure/login@v2
|
- uses: azure/login@v2
|
||||||
with:
|
with:
|
||||||
client-id: ${{ secrets.AZURE_CLIENT_ID_BICEP }}
|
client-id: ${{ secrets.AZURE_CLIENT_ID }}
|
||||||
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
|
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
|
||||||
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
|
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
|
||||||
|
|
||||||
- name: Deploy Bicep template
|
- name: Deploy Bicep template
|
||||||
uses: azure/arm-deploy@v2
|
uses: azure/arm-deploy@v2
|
||||||
with:
|
with:
|
||||||
|
|
1073
Cargo.lock
generated
1073
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
16
Cargo.toml
16
Cargo.toml
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "keyweave"
|
name = "keyweave"
|
||||||
version = "0.3.1"
|
version = "0.2.6"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
authors = ["Bart van der Braak <bart@vanderbraak.nl>"]
|
authors = ["Bart van der Braak <bart@vanderbraak.nl>"]
|
||||||
keywords = ["azure", "keyvault", "env"]
|
keywords = ["azure", "keyvault", "env"]
|
||||||
|
@ -10,14 +10,14 @@ documentation = "https://docs.rs/keyweave"
|
||||||
repository = "https://github.com/bartvdbraak/keyweave/"
|
repository = "https://github.com/bartvdbraak/keyweave/"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow = "1.0.82"
|
anyhow = "1.0.80"
|
||||||
azure_core = "0.21.0"
|
azure_core = "0.19.0"
|
||||||
azure_identity = "0.21.0"
|
azure_identity = "0.19.0"
|
||||||
azure_security_keyvault = "0.21.0"
|
azure_security_keyvault = "0.19.0"
|
||||||
clap = { version = "4.5.4", features = ["derive"] }
|
clap = { version = "4.5.1", features = ["derive"] }
|
||||||
futures = "0.3.30"
|
futures = "0.3.30"
|
||||||
paris = { version = "1.5.15", features = ["macros"] }
|
paris = { version = "1.5.15", features = ["macros"] }
|
||||||
tokio = {version = "1.37.0", features = ["full"]}
|
tokio = {version = "1.36.0", features = ["full"]}
|
||||||
|
|
||||||
[target.'cfg(all(target_os = "linux", any(target_env = "musl", target_arch = "arm", target_arch = "aarch64")))'.dependencies]
|
[target.'cfg(all(target_os = "linux", any(target_env = "musl", target_arch = "arm", target_arch = "aarch64")))'.dependencies]
|
||||||
openssl = { version = "0.10", features = ["vendored"] }
|
openssl = { version = "0.10", features = ["vendored"] }
|
||||||
|
@ -26,4 +26,4 @@ openssl = { version = "0.10", features = ["vendored"] }
|
||||||
assert_cmd = "2.0.14"
|
assert_cmd = "2.0.14"
|
||||||
assert_fs = "1.1.1"
|
assert_fs = "1.1.1"
|
||||||
predicates = "3.1.0"
|
predicates = "3.1.0"
|
||||||
serial_test = "3.1.0"
|
serial_test = "3.0.0"
|
||||||
|
|
|
@ -31,7 +31,7 @@ var nameFormat = '${name.tenantId}-${name.projectId}-${environment}-${name.regio
|
||||||
Resource Group
|
Resource Group
|
||||||
*/
|
*/
|
||||||
|
|
||||||
resource ResourceGroup 'Microsoft.Resources/resourceGroups@2024-03-01' = {
|
resource ResourceGroup 'Microsoft.Resources/resourceGroups@2023-07-01' = {
|
||||||
name: format(nameFormat, 'RG', 1)
|
name: format(nameFormat, 'RG', 1)
|
||||||
location: location
|
location: location
|
||||||
tags: tags
|
tags: tags
|
||||||
|
|
|
@ -16,7 +16,7 @@ var accessPolicies = [for identity in identities: {
|
||||||
Log Analytics Workspace (existing)
|
Log Analytics Workspace (existing)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
resource _logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2023-09-01' existing = {
|
resource _logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2022-10-01' existing = {
|
||||||
name: format(nameFormat, 'LAW', 1)
|
name: format(nameFormat, 'LAW', 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ param tags object
|
||||||
Log Analytics Workspace
|
Log Analytics Workspace
|
||||||
*/
|
*/
|
||||||
|
|
||||||
resource logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2023-09-01' = {
|
resource logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2022-10-01' = {
|
||||||
name: format(nameFormat, 'LAW', 1)
|
name: format(nameFormat, 'LAW', 1)
|
||||||
location: location
|
location: location
|
||||||
tags: tags
|
tags: tags
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use azure_identity::{DefaultAzureCredential, TokenCredentialOptions};
|
use azure_identity::DefaultAzureCredential;
|
||||||
use azure_security_keyvault::prelude::KeyVaultGetSecretsResponse;
|
use azure_security_keyvault::prelude::KeyVaultGetSecretsResponse;
|
||||||
use azure_security_keyvault::KeyvaultClient;
|
use azure_security_keyvault::KeyvaultClient;
|
||||||
use clap::Parser;
|
use clap::Parser;
|
||||||
|
@ -237,12 +237,7 @@ async fn main() -> Result<()> {
|
||||||
let vault_url = format!("https://{}.vault.azure.net", opts.vault_name);
|
let vault_url = format!("https://{}.vault.azure.net", opts.vault_name);
|
||||||
|
|
||||||
log.loading("Detecting credentials.");
|
log.loading("Detecting credentials.");
|
||||||
let credential_options = TokenCredentialOptions::default();
|
let credential = DefaultAzureCredential::default();
|
||||||
let credential =
|
|
||||||
DefaultAzureCredential::create(credential_options).map_err(|e| CustomError {
|
|
||||||
message: format!("Failed to create DefaultAzureCredential: {}", e),
|
|
||||||
})?;
|
|
||||||
|
|
||||||
let client = match KeyvaultClient::new(&vault_url, std::sync::Arc::new(credential)) {
|
let client = match KeyvaultClient::new(&vault_url, std::sync::Arc::new(credential)) {
|
||||||
Ok(c) => c,
|
Ok(c) => c,
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue