コード例 #1
0
def index():
    # we need terraform, graphviz, and an init-ed terraform project.
    if not which('terraform') or not which('dot') or not os.path.exists(
            '.terraform'):
        return render_template('error.html')

    return render_template('index.html', help=get_help())
コード例 #2
0
ファイル: server.py プロジェクト: nebur1989/blast-radius
def index():
    # we need terraform, graphviz, and an init-ed terraform project.
    if os.path.exists('.terragrunt-cache'):
        go_to_terragrunt_cache()
    if not which('terraform') and not which('terraform.exe'):
        return render_template('error.html')
    elif not which('dot') and not which('dot.exe'):
        return render_template('error.html')
    elif not os.path.exists('.terraform'):
        return render_template('error.html')
    else:
        return render_template('index.html', help=get_help())
コード例 #3
0
def get_terraform_exe():
    return which('terraform')