Skip to content

Commit

Permalink
Updating recipes to work for eshop (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
willdavsmith committed Oct 10, 2023
1 parent 29b2242 commit 302770c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion aws/sqldatabases.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ param allocatedStorage string = '20'
param licenseModel string = 'license-included'

@description('Database port')
param port string = '1433'
param port int = 1433

resource eksCluster 'AWS.EKS/Cluster@default' existing = {
alias: eksClusterName
Expand Down
8 changes: 5 additions & 3 deletions local-dev/sqldatabases.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ param context object
@description('Name of the SQL database. Defaults to the name of the Radius SQL resource.')
param database string = context.resource.name

@description('SQL administrator username')
param adminLogin string = 'sa'

@description('SQL administrator password')
@secure()
#disable-next-line secure-parameter-default
Expand All @@ -39,7 +42,6 @@ import kubernetes as kubernetes {
namespace: context.runtime.kubernetes.namespace
}

var adminUsername = 'sa'
var uniqueName = 'sql-${uniqueString(context.resource.id)}'
var port = 1433

Expand Down Expand Up @@ -133,12 +135,12 @@ output result object = {
server: '${svc.metadata.name}.${svc.metadata.namespace}.svc.cluster.local'
port: port
database: database
username: adminUsername
username: adminLogin
}
secrets: {
#disable-next-line outputs-should-not-contain-secrets
password: adminPassword
#disable-next-line outputs-should-not-contain-secrets
connectionString: 'Server=tcp:${svc.metadata.name}.${svc.metadata.namespace}.svc.cluster.local,${port};Initial Catalog=${database};User Id=${adminUsername};Password=${adminPassword};Encrypt=false'
connectionString: 'Server=tcp:${svc.metadata.name}.${svc.metadata.namespace}.svc.cluster.local,${port};Initial Catalog=${database};User Id=${adminLogin};Password=${adminPassword};Encrypt=false'
}
}

0 comments on commit 302770c

Please sign in to comment.