in radlab-launcher/radlab.py [0:0]
def setlocaldeployment(tfbucket, prefix, env_path, projid):
if (blob_exists(tfbucket, prefix, projid)):
# Checking if 'deployment' folder exist in local. If YES, delete the same.
delifexist(env_path)
# Creating Local directory
os.makedirs(env_path)
# Copy Terraform deployment configs from GCS to Local
if (download_blob(projid, tfbucket, prefix, env_path) == True):
print("Terraform state downloaded to local...")
else:
print(Fore.RED + "\nError Occured whiled downloading Deployment Configs from GCS. Checking if the deployment exist locally...\n")
elif (os.path.isdir(env_path)):
print("Terraform state exist locally...")
else:
sys.exit(Fore.RED + "\nThe deployment with the entered ID do not exist !\n")