Skip to content

Commit

Permalink
Fix issue with acees policy and add secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
miekki committed Mar 1, 2024
1 parent f51d1bc commit c9c6301
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ jobs:
module_name: keyvault
module_file_path: modules/security/keyvault-access-policy/main.bicep
module_metadata_file_path: modules/security/keyvault-access-policy/metadata.json
module_parameters: keyVaultName=test-keyvault tags={'env':'dev'} location=uksouth objectId=1
module_parameters: keyVaultName=test-keyvault objectId=1
secrets: inherit
26 changes: 26 additions & 0 deletions .github/workflows/module-keyvault-secrets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: module-keyvault-secrets
concurrency:
group: ${{ github.workflow }}

on:
workflow_dispatch:
push:
branches:
- main
paths:
- "modules/security/keyvault-secrets/**"

permissions:
id-token: write
contents: read

jobs:
call-shared-workflow:
name: Run
uses: ./.github/workflows/template-module.yml
with:
module_name: keyvault
module_file_path: modules/security/keyvault-secrets/main.bicep
module_metadata_file_path: modules/security/keyvault-secrets/metadata.json
module_parameters: keyVaultName=test-keyvault tags={'env':'dev'} location=uksouth secretName=my-secret-name secretValue=my-secret-value
secrets: inherit
6 changes: 3 additions & 3 deletions modules/security/keyvault-access-policy/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ metadata owner = 'MM'
@description('Required. Name of Key Vault.')
param keyVaultName string

@description('Required. Name of Key Vault Access Policy.')
param policyName string = 'add'

@description('Required. Object Id of a user, service principal or security group')
param objectId string

Expand All @@ -23,6 +20,9 @@ param keyPermissions array = []
@description('Optional. Specify the permissions to certificates. Valid values are: all, backup, create, delete, deleteissuers, get, getissuers, import, list, listissuers, managecontacts, manageissuers, purge, recover, restore, setissuers, update')
param certificatPermissions array = []

@description('Oprional. Name of Key Vault Access Policy.')
param policyName string = 'add'

resource keyvault 'Microsoft.KeyVault/vaults@2023-07-01' existing = {
name: keyVaultName
}
Expand Down

0 comments on commit c9c6301

Please sign in to comment.