Skip to content

Commit

Permalink
Fix binding name
Browse files Browse the repository at this point in the history
  • Loading branch information
amitkma committed Apr 29, 2024
1 parent 95df6bc commit 14f6559
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion azurecontainerapps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -611,10 +611,12 @@ export class azurecontainerapps {
}

if (!(this.addOnServices === null || this.addOnServices === undefined || this.addOnServices.length == 0)){
let services = []
for (const addOnService of this.addOnServices){
const bindingName = addOnService.replace(/-/g, '_')
this.commandLineArgs.push(`--bind ${addOnService}[:${bindingName}]`)
services.push(`${addOnService}[:${bindingName}]`)
}
this.commandLineArgs.push(`--bind ${services.join(' ')}`)
}

// Determine default values only for the 'create' scenario to avoid overriding existing values for the 'update' scenario
Expand Down
4 changes: 3 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4463,10 +4463,12 @@ class azurecontainerapps {
this.commandLineArgs.push(`--registry-server ${this.registryUrl}`, `--registry-username ${this.registryUsername}`, `--registry-password ${this.registryPassword}`);
}
if (!(this.addOnServices === null || this.addOnServices === undefined || this.addOnServices.length == 0)) {
let services = [];
for (const addOnService of this.addOnServices) {
const bindingName = addOnService.replace(/-/g, '_');
this.commandLineArgs.push(`--bind ${addOnService}[:${bindingName}]`);
services.push(`${addOnService}[:${bindingName}]`);
}
this.commandLineArgs.push(`--bind ${services.join(' ')}`);
}
// Determine default values only for the 'create' scenario to avoid overriding existing values for the 'update' scenario
if (!this.containerAppExists) {
Expand Down

0 comments on commit 14f6559

Please sign in to comment.