public void GenerateWithTerraformVars(OpenApiDocument document)
        {
            logger.LogDebug("In GenerateWithTerraformVars");
            var version   = document.Info.Version;
            var revisions = new List <string>();

            if (RevisionMappingFile != null)
            {
                var revisionsMappingParsed = GetRevisions(JObject.Parse(File.ReadAllText(RevisionMappingFile)));
                revisions.AddRange(revisionsMappingParsed);
            }
            else
            {
                revisions.Add("1");
            }

            var apiFilePath = Path.Combine(OutputDir, $"api.{version}.tf");

            if (!Directory.Exists(Path.Combine(OutputDir)))
            {
                Console.WriteLine($"Creating directory {Path.Combine(OutputDir)}");
                Directory.CreateDirectory(Path.Combine(OutputDir));
            }
            var generatedApiOutput = ApiGenerator.GenerateTerraformOutput(document, revisions, PoliciesPath);

            System.IO.File.WriteAllText(apiFilePath, ApiVariablesApplier.ApplyVariables(generatedApiOutput, TerraformVarSubFile));

            if (RevisionMappingFile != null)
            {
                var operationFilePath        = Path.Combine(OutputDir, $"operations.{version}.tf");
                var backendServiceUrl        = JObject.Parse(File.ReadAllText(TerraformVarSubFile)).SelectToken("api_backend_url").Value <string>();
                var generatedOperationOutput = OperationGenerator.GenerateTerraformOutput(document, RevisionMappingFile, backendServiceUrl, PoliciesPath);

                System.IO.File.WriteAllText(operationFilePath, OperationVariablesApplier.ApplyVariables(generatedOperationOutput, TerraformVarSubFile));
            }
            else
            {
                var operationFilePath        = Path.Combine(OutputDir, $"operations.{version}.tf");
                var backendServiceUrl        = JObject.Parse(File.ReadAllText(TerraformVarSubFile)).SelectToken("api_backend_url").Value <string>();
                var generatedOperationOutput = OperationGenerator.GenerateTerraformOutput(document, backendServiceUrl, PoliciesPath);

                System.IO.File.WriteAllText(operationFilePath, OperationVariablesApplier.ApplyVariables(generatedOperationOutput, TerraformVarSubFile));
            }
        }