44 lines
1.3 KiB
Python
44 lines
1.3 KiB
Python
#!/usr/bin/env python
|
|
""" Import Dynatrace Configuration Script.
|
|
This program is free software: you can redistribute it and/or modify it under
|
|
the terms of the GNU General Public License as published by the Free Software
|
|
Foundation, either version 3 of the License, or (at your option) any later
|
|
version.
|
|
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
You should have received a copy of the GNU General Public License along with
|
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
"""
|
|
|
|
__author__ = "Arnautovic Arnel"
|
|
__contact__ = "Arnel.Arnautovic@nttdata.com"
|
|
__copyright__ = "Copyright 2021, NTT DATA"
|
|
__credits__ = ["Ermis Wieger", "René Forstner"]
|
|
__date__ = "2021/11/29"
|
|
__deprecated__ = False
|
|
__license__ = "GPLv3"
|
|
__maintainer__ = "developer"
|
|
__status__ = "Prototype"
|
|
__version__ = "0.0.1"
|
|
|
|
# [AA 2021.11.30] Import modules
|
|
import os
|
|
import subprocess
|
|
import sys
|
|
import time
|
|
from dotenv import load_dotenv
|
|
|
|
if(len(sys.argv) == 1):
|
|
# Get the folder
|
|
# folderName = sys.argv[1]
|
|
|
|
# create main.tf
|
|
# replace
|
|
|
|
subprocess.run(["terraform", "init"])
|
|
subprocess.run(["terraform", "apply"])
|
|
else:
|
|
print("Usage example: ")
|
|
print("python .\importConfig.py")
|