private static async getOrCreateResourceGroup()

in azurecontainerapps.ts [307:322]


    private static async getOrCreateResourceGroup(containerAppName: string, location: string): Promise<string> {
        // Get the resource group to deploy to if it was provided, or generate it from the Container App name
        let resourceGroup: string = this.toolHelper.getInput('resourceGroup', false);
        if (this.util.isNullOrEmpty(resourceGroup)) {
            resourceGroup = `${containerAppName}-rg`;
            this.toolHelper.writeInfo(`Default resource group name: ${resourceGroup}`);

            // Ensure that the resource group that the Container App will be created in exists
            const resourceGroupExists = await this.appHelper.doesResourceGroupExist(resourceGroup);
            if (!resourceGroupExists) {
                await this.appHelper.createResourceGroup(resourceGroup, location);
            }
        }

        return resourceGroup;
    }