3131from app .template_generators .terraform .aws .EFS import (IaC_template_generator_efs )
3232import os
3333
34- @app .post ("/IaC-basic/" )
34+ @app .post ("/api/ IaC-basic/" )
3535async def IaC_basic_generation (request :IaCBasicInput ) -> Output :
3636 if os .environ .get ("TEST" ):
3737 return Output (output = 'Terraform developed by hashicorp and it is very usefull' )
3838 generated_prompt = IaC_basics_generator (request )
3939 output = gpt_service (generated_prompt )
4040 return Output (output = output )
4141
42- @app .post ("/IaC-bugfix/" )
42+ @app .post ("/api/ IaC-bugfix/" )
4343async def IaC_bugfix_generation (request :IaCBugfixInput ) -> Output :
4444 if os .environ .get ("TEST" ):
4545 return Output (output = 'fix this bug by adding x to the y' )
@@ -48,15 +48,15 @@ async def IaC_bugfix_generation(request:IaCBugfixInput) -> Output:
4848 return Output (output = output )
4949
5050
51- @app .post ("/IaC-install/" )
51+ @app .post ("/api/ IaC-install/" )
5252async def IaC_install_generation (request :IaCInstallationInput ) -> Output :
5353 if os .environ .get ("TEST" ):
5454 return Output (output = 'apt-get install xyz \n apt-get update (covert them to shell file output)' )
5555 generated_prompt = IaC_installation_generator (request )
5656 output = gpt_service (generated_prompt )
5757 return Output (output = output )
5858
59- @app .post ("/IaC-template/docker" )
59+ @app .post ("/api/ IaC-template/docker" )
6060async def IaC_template_generation_docker (request :IaCTemplateGenerationDocker ) -> Output :
6161 if os .environ .get ("TEST" ):
6262 return Output (output = 'output (nothing special)' )
@@ -66,7 +66,7 @@ async def IaC_template_generation_docker(request:IaCTemplateGenerationDocker) ->
6666 execute_pythonfile ("MyTerraform" ,"terraform_generator" )
6767 return Output (output = 'output' )
6868
69- @app .post ("/IaC-template/aws/ec2" )
69+ @app .post ("/api/ IaC-template/aws/ec2" )
7070async def IaC_template_generation_aws_ec2 (request :IaCTemplateGenerationEC2 ) -> Output :
7171 if os .environ .get ("TEST" ):
7272 return Output (output = 'output (nothing special)' )
@@ -77,7 +77,7 @@ async def IaC_template_generation_aws_ec2(request:IaCTemplateGenerationEC2) -> O
7777 execute_pythonfile ("MyTerraform" ,"terraform_generator" )
7878 return Output (output = 'output' )
7979
80- @app .post ("/IaC-template/aws/s3" )
80+ @app .post ("/api/ IaC-template/aws/s3" )
8181async def IaC_template_generation_aws_s3 (request :IaCTemplateGenerationS3 ) -> Output :
8282 if os .environ .get ("TEST" ):
8383 return Output (output = 'output (nothing special)' )
@@ -87,7 +87,7 @@ async def IaC_template_generation_aws_s3(request:IaCTemplateGenerationS3) -> Out
8787 execute_pythonfile ("MyTerraform" ,"terraform_generator" )
8888 return Output (output = 'output' )
8989
90- @app .post ("/IaC-template/aws/iam" )
90+ @app .post ("/api/ IaC-template/aws/iam" )
9191async def IaC_template_generation_aws_iam (request :IaCTemplateGenerationIAM ) -> Output :
9292 if os .environ .get ("TEST" ):
9393 return Output (output = 'output (nothing special)' )
@@ -98,7 +98,7 @@ async def IaC_template_generation_aws_iam(request:IaCTemplateGenerationIAM) -> O
9898 return Output (output = 'output' )
9999
100100
101- @app .post ("/IaC-template/argocd" )
101+ @app .post ("/api/ IaC-template/argocd" )
102102async def IaC_template_generation_argocd (request :IaCTemplateGenerationArgoCD ) -> Output :
103103 if os .environ .get ("TEST" ):
104104 return Output (output = 'output (nothing special)' )
@@ -110,7 +110,7 @@ async def IaC_template_generation_argocd(request:IaCTemplateGenerationArgoCD) ->
110110
111111
112112
113- @app .post ("/IaC-template/aws/elb" )
113+ @app .post ("/api/ IaC-template/aws/elb" )
114114async def IaC_template_generation_aws_elb (request :IaCTemplateGenerationELB ) -> Output :
115115 if os .environ .get ("TEST" ):
116116 return Output (output = 'output (nothing special)' )
@@ -120,7 +120,7 @@ async def IaC_template_generation_aws_elb(request:IaCTemplateGenerationELB) -> O
120120 execute_pythonfile ("MyTerraform" ,"terraform_generator" )
121121 return Output (output = 'output' )
122122
123- @app .post ("/IaC-template/aws/efs" )
123+ @app .post ("/api/ IaC-template/aws/efs" )
124124async def IaC_template_generation_aws_efs (request :IaCTemplateGenerationEFS ) -> Output :
125125 if os .environ .get ("TEST" ):
126126 return Output (output = 'output (nothing special)' )
0 commit comments