소스 검색

requests check capi enabled from db, not env

Stefan McShane 3 년 전
부모
커밋
583f4bc395
2개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 0
      .gitignore
  2. 1 1
      api/server/handlers/project_integration/create_aws.go

+ 3 - 0
.gitignore

@@ -17,6 +17,9 @@ bin
 openapi.yaml
 openapi.yaml
 .idea
 .idea
 vendor
 vendor
+zarf/helm/charts
+*.env
+porter
 
 
 # Local docs directories
 # Local docs directories
 /docs/.obsidian
 /docs/.obsidian

+ 1 - 1
api/server/handlers/project_integration/create_aws.go

@@ -51,7 +51,7 @@ func (p *CreateAWSHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
 		AWSIntegration: aws.ToAWSIntegrationType(),
 		AWSIntegration: aws.ToAWSIntegrationType(),
 	}
 	}
 
 
-	if !p.Config().DisableCAPIProvisioner {
+	if project.CapiProvisionerEnabled {
 		credReq := porterv1.CreateAssumeRoleChainRequest{
 		credReq := porterv1.CreateAssumeRoleChainRequest{
 			ProjectId:       int64(project.ID),
 			ProjectId:       int64(project.ID),
 			SourceArn:       "arn:aws:iam::108458755588:role/CAPIManagement", // hard coded as this is the final hop for a CAPI cluster
 			SourceArn:       "arn:aws:iam::108458755588:role/CAPIManagement", // hard coded as this is the final hop for a CAPI cluster