public bool Create()
        {
            logger.Info("Doing the work to deploy IaaS VM");

            var token      = AzureHelper.GetAccessTokenAsync();
            var credential = new TokenCredentials(token.Result.AccessToken);

            logger.Info("Success in getting token for deployment creation!");

            try
            {
                logger.Info("Creating the resource group...");
                var rgResult = AzureHelper.CreateResourceGroupAsync(
                    credential,
                    groupName,
                    subscriptionId,
                    location);
                logger.Info("Success in generating RG. ProvisioningState: " + rgResult.Result.Properties.ProvisioningState);

                Console.WriteLine("Creating the template deployment...");
                Task <DeploymentExtended> dpResult = AzureHelper.CreateTemplateDeploymentAsync(
                    credential,
                    groupName,
                    deploymentName,
                    subscriptionId,
                    template,
                    templateParameters);
                logger.Info("Successfully created deployment. ProvisioningState: " + dpResult.Result.Properties.ProvisioningState);
            }
            catch (Exception e)
            {
                logger.Error("During deployment, exception: " + e);
                return(false);
            }

            return(true);
        }