-
Notifications
You must be signed in to change notification settings - Fork 845
Expand file tree
/
Copy pathAzureContainerAppsTests.AzureContainerAppsBicepGenerationIsIdempotent.verified.bicep
More file actions
100 lines (89 loc) · 2.36 KB
/
AzureContainerAppsTests.AzureContainerAppsBicepGenerationIsIdempotent.verified.bicep
File metadata and controls
100 lines (89 loc) · 2.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
@description('The location for the resource(s) to be deployed.')
param location string = resourceGroup().location
param env_outputs_azure_container_apps_environment_default_domain string
param env_outputs_azure_container_apps_environment_id string
param api_identity_outputs_id string
@secure()
param secret_value string
param kv_outputs_name string
param api_identity_outputs_clientid string
resource kv 'Microsoft.KeyVault/vaults@2024-11-01' existing = {
name: kv_outputs_name
}
resource kv_secret 'Microsoft.KeyVault/vaults/secrets@2024-11-01' existing = {
name: 'secret'
parent: kv
}
resource existingKv 'Microsoft.KeyVault/vaults@2024-11-01' existing = {
name: 'existingKvName'
scope: resourceGroup('existingRgName')
}
resource existingKv_secret 'Microsoft.KeyVault/vaults/secrets@2024-11-01' existing = {
name: 'secret'
parent: existingKv
}
resource api 'Microsoft.App/containerApps@2025-07-01' = {
name: 'api'
location: location
properties: {
configuration: {
secrets: [
{
name: 'top-secret'
value: secret_value
}
{
name: 'top-secret2'
identity: api_identity_outputs_id
keyVaultUrl: kv_secret.properties.secretUri
}
{
name: 'existing-top-secret'
identity: api_identity_outputs_id
keyVaultUrl: existingKv_secret.properties.secretUri
}
]
activeRevisionsMode: 'Single'
}
environmentId: env_outputs_azure_container_apps_environment_id
template: {
containers: [
{
image: 'myimage:latest'
name: 'api'
env: [
{
name: 'TOP_SECRET'
secretRef: 'top-secret'
}
{
name: 'TOP_SECRET2'
secretRef: 'top-secret2'
}
{
name: 'EXISTING_TOP_SECRET'
secretRef: 'existing-top-secret'
}
{
name: 'AZURE_CLIENT_ID'
value: api_identity_outputs_clientid
}
{
name: 'AZURE_TOKEN_CREDENTIALS'
value: 'ManagedIdentityCredential'
}
]
}
]
scale: {
minReplicas: 1
}
}
}
identity: {
type: 'UserAssigned'
userAssignedIdentities: {
'${api_identity_outputs_id}': { }
}
}
}