Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add secure() for secrets #3589

Merged
merged 1 commit into from Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -56,7 +56,8 @@ param identityName string = ''
param imageName string = ''

@description('The secrets required for the container')
param secrets array = []
@secure()
param secrets object = {}

@description('The environment variables for the container')
param env array = []
Expand Down
8 changes: 6 additions & 2 deletions templates/common/infra/bicep/core/host/container-app.bicep
Expand Up @@ -63,7 +63,8 @@ param ingressEnabled bool = true
param revisionMode string = 'Single'

@description('The secrets required for the container')
param secrets array = []
@secure()
param secrets object = {}

@description('The service binds associated with the container')
param serviceBinds array = []
Expand Down Expand Up @@ -123,7 +124,10 @@ resource app 'Microsoft.App/containerApps@2023-05-02-preview' = {
appProtocol: daprAppProtocol
appPort: ingressEnabled ? targetPort : 0
} : { enabled: false }
secrets: secrets
secrets: [for secret in items(secrets): {
weikanglim marked this conversation as resolved.
Show resolved Hide resolved
name: secret.key
value: secret.value
}]
service: !empty(serviceType) ? { type: serviceType } : null
registries: usePrivateRegistry ? [
{
Expand Down