Skip to content

Commit

Permalink
Merge pull request #339 from microsoft/dev
Browse files Browse the repository at this point in the history
fixed issue with sharedresourcetemplate for org and prj
  • Loading branch information
markusheiliger authored May 10, 2022
2 parents ff2e827 + 5015496 commit cfab301
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public async Task<string> Run(
var template = new SharedResourcesTemplate();

template.Parameters["organizationId"] = organization.Id;
template.Parameters["organizationSlug"] = organization.Slug;
template.Parameters["organizationName"] = organization.Slug;
template.Parameters["organizationTags"] = organization.GetWellKnownTags();


Expand Down
2 changes: 1 addition & 1 deletion src/TeamCloud.Orchestrator/TeamCloud.Orchestrator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@

<Target Name="TranspileBicepToARM" BeforeTargets="Build">
<Message Text="Transpiling .\Templates\SharedResourcesTemplate.bicep into .\Templates\SharedResourcesTemplate.json" />
<Exec Command="az bicep build --file SharedResourcesTemplate.bicep" WorkingDirectory="Templates" />
<Exec Command="az bicep build --file SharedResourcesTemplate.bicep --outfile SharedResourcesTemplate.json" WorkingDirectory="Templates" />
</Target>

<Target Name="UserSecretIdInfo" BeforeTargets="PreBuildEvent" Condition="'$(UserSecretsId)' != ''">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ param projectTags object = {}
@minLength(36)
@maxLength(36)
param organizationId string
param organizationSlug string
param organizationName string
param organizationTags object = {}

param deploymentScopes array = []
Expand All @@ -20,7 +20,7 @@ var projectResourceGroupName = 'TCP-${projectName}-${uniqueString(projectId)}'
var projectDeploymentName = take('${deployment().name}-project', 64)

var deployOrganization = !deployProject
var organizationResourceGroupName = 'TCO-${organizationSlug}-${uniqueString(organizationId)}'
var organizationResourceGroupName = 'TCO-${organizationName}-${uniqueString(organizationId)}'
var organizationDeploymentName = take('${deployment().name}-organization', 64)

resource organizationResourceGroup 'Microsoft.Resources/resourceGroups@2019-10-01' = if (deployOrganization) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"_generator": {
"name": "bicep",
"version": "0.6.1.6515",
"templateHash": "1437278143323890797"
"templateHash": "1106573156801624642"
}
},
"parameters": {
Expand All @@ -28,7 +28,7 @@
"maxLength": 36,
"minLength": 36
},
"organizationSlug": {
"organizationName": {
"type": "string"
},
"organizationTags": {
Expand All @@ -49,7 +49,7 @@
"projectResourceGroupName": "[format('TCP-{0}-{1}', parameters('projectName'), uniqueString(parameters('projectId')))]",
"projectDeploymentName": "[take(format('{0}-project', deployment().name), 64)]",
"deployOrganization": "[not(variables('deployProject'))]",
"organizationResourceGroupName": "[format('TCO-{0}-{1}', parameters('organizationSlug'), uniqueString(parameters('organizationId')))]",
"organizationResourceGroupName": "[format('TCO-{0}-{1}', parameters('organizationName'), uniqueString(parameters('organizationId')))]",
"organizationDeploymentName": "[take(format('{0}-organization', deployment().name), 64)]"
},
"resources": [
Expand Down

0 comments on commit cfab301

Please sign in to comment.