Repository: chef/automate
Pull request #7862 (2023-05-04 15:44:37)

Validation for External postgresql
### :nut_and_bolt: Description: What code changed, and why?
Added implementation for validating external Postgres connectivity and infrastructure set by checking its connection. 

<!-- /!\ Please ensure that you are NOT disclosing any customer information without their consent /!\ -->

### :chains: Related Resources
https://chefio.atlassian.net/browse/CHEF-2183
### :+1: Definition of Done
This API will return if the external postgresql connectivity is success or not.
### :athletic_shoe: How to Build and Test the Change
Rebuild automate-cli
Hit the api on http://localhost:7799/api/v1/checks/external-postgresql
Sample Request
{
  "postgresql_instance_url": "A.B.C.D:7432",
  "postgresql_superuser_username": "postgres",
  "postgresql_superuser_password": "Progress123",
  "postgresql_dbuser_username": "postgres",
  "postgresql_dbuser_password": "Progress123",
  "postgresql_root_cert": "----- BEGIN CERTIFICATE ------"
}
### :white_check_mark: Checklist

**All PRs** must tick these:

- [x] I have read the [CONTRIBUTING document](https://github.com/chef/automate/blob/master/CONTRIBUTING.md).
- [x] All commits signed-off for the [Developer Certification of Origin](https://github.com/chef/chef/blob/master/CONTRIBUTING.md#developer-certification-of-origin-dco).

With occasional exceptions, all PRs **from Progress employees** must tick these:

- [x] Is the code clear? *(complicated code or lots of comments--subdivide and use well-named methods, meaningful variable names, etc.)*
- [x] Consistency checked? *(user notifications, user prompts, visual patterns, code patterns, variable names)*
- [x] Repeated code blocks eliminated? *(adapt and reuse existing components, blocks, functions, etc.)*
- [x] Spelling, grammar, typos checked? *(at a minimum use `make spell` in any component directory)*
- [x] Code well-formatted? *(indents, line breaks, etc. improve rather than hinder readability)*

All PRs **from Progress employees** should tick these if appropriate:

- [x] Tests added/updated? (all new code needs new tests)
- [ ] Docs added/updated? (all customer-facing changes)

*Please add a note next to any checkbox above if you are NOT ticking it.*

### :camera: Screenshots, if applicable
Demo video : [External_Postgresql_Validation_Demo](https://progresssoftware-my.sharepoint.com/:v:/g/personal/btejaswi_progress_com/EbuLitnKPP1BrcdidOsT37MBkwWQZ6bRJtj4hCH2ZB_dtw?e=C4UGQ6)



netlify[bot]: ### <span aria-hidden="true">👷</span> Deploy Preview for *chef-automate* processing.


|  Name | Link |
|:-:|------------------------|
|<span aria-hidden="true">🔨</span> Latest commit | b1053192b2655713cae2209f9b70c2574418fc26 |
|<span aria-hidden="true">🔍</span> Latest deploy log | https://app.netlify.com/sites/chef-automate/deploys/6453d2e7e79500000875a397 |
sonarqube-for-infrastructure-prod[bot]: **SonarQube Quality Gate**

[![Quality Gate failed](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862)

[![Failed condition](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/FailedConditionIcon-16px.png 'Failed condition')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862) [![39.0%](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/CoverageChart/25-16px.png '39.0%')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862) 39.02% Coverage on New Code (is less than 80%)  

[See analysis details on SonarQube](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862)


sonarqube-for-infrastructure-prod[bot]: **SonarQube Quality Gate**

[![Quality Gate failed](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862)

[![Failed condition](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/FailedConditionIcon-16px.png 'Failed condition')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862) [![57.1%](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/CoverageChart/50-16px.png '57.1%')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862) 57.14% Coverage on New Code (is less than 80%)  

[See analysis details on SonarQube](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862)


sonarqube-for-infrastructure-prod[bot]: **SonarQube Quality Gate**

[![Quality Gate failed](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862)

[![Failed condition](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/FailedConditionIcon-16px.png 'Failed condition')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862) [![79.2%](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/CoverageChart/60-16px.png '79.2%')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862) 79.2% Coverage on New Code (is less than 80%)  

[See analysis details on SonarQube](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862)


sonarqube-for-infrastructure-prod[bot]: **SonarQube Quality Gate**

[![Quality Gate failed](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862)

[![Failed condition](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/FailedConditionIcon-16px.png 'Failed condition')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862) [![78.9%](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/CoverageChart/60-16px.png '78.9%')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862) 78.9% Coverage on New Code (is less than 80%)  

[See analysis details on SonarQube](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862)


sonarqube-for-infrastructure-prod[bot]: **SonarQube Quality Gate**

[![Quality Gate failed](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862)

[![Failed condition](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/FailedConditionIcon-16px.png 'Failed condition')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862) [![76.3%](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/CoverageChart/60-16px.png '76.3%')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862) 76.3% Coverage on New Code (is less than 80%)  

[See analysis details on SonarQube](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862)


sonarqube-for-infrastructure-prod[bot]: **SonarQube Quality Gate**

[![Quality Gate failed](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862)

[![Failed condition](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/FailedConditionIcon-16px.png 'Failed condition')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862) [![76.3%](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/CoverageChart/60-16px.png '76.3%')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862) 76.3% Coverage on New Code (is less than 80%)  

[See analysis details on SonarQube](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862)


sonarqube-for-infrastructure-prod[bot]: **SonarQube Quality Gate**

[![Quality Gate failed](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862)

[![Failed condition](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/FailedConditionIcon-16px.png 'Failed condition')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862) [![78.4%](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/CoverageChart/60-16px.png '78.4%')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862) 78.4% Coverage on New Code (is less than 80%)  

[See analysis details on SonarQube](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862)


sonarqube-for-infrastructure-prod[bot]: **SonarQube Quality Gate**

[![Quality Gate failed](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862)

[![Failed condition](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/FailedConditionIcon-16px.png 'Failed condition')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862) [![78.3%](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/CoverageChart/60-16px.png '78.3%')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862) 78.3% Coverage on New Code (is less than 80%)  

[See analysis details on SonarQube](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862)


sonarqube-for-infrastructure-prod[bot]: **SonarQube Quality Gate**

[![Quality Gate failed](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862)

[![Failed condition](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/FailedConditionIcon-16px.png 'Failed condition')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862) [![0.0%](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/CoverageChart/0-16px.png '0.0%')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862) 0.0% Coverage on New Code (is less than 80%)  

[See analysis details on SonarQube](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862)


sonarqube-for-infrastructure-prod[bot]: **SonarQube Quality Gate**

[![Quality Gate failed](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862)

[![Failed condition](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/FailedConditionIcon-16px.png 'Failed condition')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862) [![0.0%](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/CoverageChart/0-16px.png '0.0%')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862) 0.0% Coverage on New Code (is less than 80%)  

[See analysis details on SonarQube](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862)


sonarqube-for-infrastructure-prod[bot]: **SonarQube Quality Gate**

[![Quality Gate failed](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862)

[![Failed condition](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/FailedConditionIcon-16px.png 'Failed condition')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862) [![0.0%](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/CoverageChart/0-16px.png '0.0%')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862) 0.0% Coverage on New Code (is less than 80%)  

[See analysis details on SonarQube](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862)


sonarqube-for-infrastructure-prod[bot]: **SonarQube Quality Gate**

[![Quality Gate failed](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862)

[![Failed condition](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/FailedConditionIcon-16px.png 'Failed condition')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862) [![0.0%](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/CoverageChart/0-16px.png '0.0%')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862) 0.0% Coverage on New Code (is less than 80%)  

[See analysis details on SonarQube](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862)


sonarqube-for-infrastructure-prod[bot]: **SonarQube Quality Gate**

[![Quality Gate failed](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862)

[![Failed condition](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/FailedConditionIcon-16px.png 'Failed condition')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862) [![0.0%](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/CoverageChart/0-16px.png '0.0%')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862) 0.0% Coverage on New Code (is less than 80%)  

[See analysis details on SonarQube](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862)


sonarqube-for-infrastructure-prod[bot]: **SonarQube Quality Gate**

[![Quality Gate passed](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862)

[![Bug](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/common/bug-16px.png 'Bug')](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=BUG) [![A](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/RatingBadge/A-16px.png 'A')](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=BUG) [0 Bugs](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=BUG)  
[![Vulnerability](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/common/vulnerability-16px.png 'Vulnerability')](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=VULNERABILITY) [![A](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/RatingBadge/A-16px.png 'A')](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=VULNERABILITY)  
[![Security Hotspot](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/common/security_hotspot-16px.png 'Security Hotspot')](https://sonar.progress.com/security_hotspots?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862) [![A](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/RatingBadge/A-16px.png 'A')](https://sonar.progress.com/security_hotspots?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862) [0 Security Hotspots](https://sonar.progress.com/security_hotspots?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862)  
[![Code Smell](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/common/code_smell-16px.png 'Code Smell')](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=CODE_SMELL) [![A](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/RatingBadge/A-16px.png 'A')](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=CODE_SMELL)

[![80.9%](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/CoverageChart/60-16px.png '80.9%')](https://sonar.progress.com/component_measures?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&metric=new_coverage&view=list) [80.9% Coverage](https://sonar.progress.com/component_measures?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&metric=new_coverage&view=list)  
[![0.0%](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/Duplications/3-16px.png '0.0%')](https://sonar.progress.com/component_measures?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonar.progress.com/component_measures?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&metric=new_duplicated_lines_density&view=list)


sonarqube-for-infrastructure-prod[bot]: **SonarQube Quality Gate**

[![Quality Gate passed](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862)

[![Bug](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/common/bug-16px.png 'Bug')](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=BUG) [![A](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/RatingBadge/A-16px.png 'A')](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=BUG) [0 Bugs](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=BUG)  
[![Vulnerability](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/common/vulnerability-16px.png 'Vulnerability')](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=VULNERABILITY) [![A](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/RatingBadge/A-16px.png 'A')](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=VULNERABILITY)  
[![Security Hotspot](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/common/security_hotspot-16px.png 'Security Hotspot')](https://sonar.progress.com/security_hotspots?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862) [![A](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/RatingBadge/A-16px.png 'A')](https://sonar.progress.com/security_hotspots?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862) [0 Security Hotspots](https://sonar.progress.com/security_hotspots?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862)  
[![Code Smell](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/common/code_smell-16px.png 'Code Smell')](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=CODE_SMELL) [![A](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/RatingBadge/A-16px.png 'A')](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=CODE_SMELL)

[![80.9%](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/CoverageChart/60-16px.png '80.9%')](https://sonar.progress.com/component_measures?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&metric=new_coverage&view=list) [80.9% Coverage](https://sonar.progress.com/component_measures?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&metric=new_coverage&view=list)  
[![0.0%](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/Duplications/3-16px.png '0.0%')](https://sonar.progress.com/component_measures?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonar.progress.com/component_measures?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&metric=new_duplicated_lines_density&view=list)


sonarqube-for-infrastructure-prod[bot]: **SonarQube Quality Gate**

[![Quality Gate passed](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862)

[![Bug](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/common/bug-16px.png 'Bug')](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=BUG) [![A](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/RatingBadge/A-16px.png 'A')](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=BUG) [0 Bugs](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=BUG)  
[![Vulnerability](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/common/vulnerability-16px.png 'Vulnerability')](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=VULNERABILITY) [![A](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/RatingBadge/A-16px.png 'A')](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=VULNERABILITY)  
[![Security Hotspot](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/common/security_hotspot-16px.png 'Security Hotspot')](https://sonar.progress.com/security_hotspots?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862) [![A](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/RatingBadge/A-16px.png 'A')](https://sonar.progress.com/security_hotspots?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862) [0 Security Hotspots](https://sonar.progress.com/security_hotspots?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862)  
[![Code Smell](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/common/code_smell-16px.png 'Code Smell')](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=CODE_SMELL) [![A](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/RatingBadge/A-16px.png 'A')](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=CODE_SMELL)

[![80.9%](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/CoverageChart/60-16px.png '80.9%')](https://sonar.progress.com/component_measures?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&metric=new_coverage&view=list) [80.9% Coverage](https://sonar.progress.com/component_measures?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&metric=new_coverage&view=list)  
[![0.0%](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/Duplications/3-16px.png '0.0%')](https://sonar.progress.com/component_measures?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonar.progress.com/component_measures?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&metric=new_duplicated_lines_density&view=list)


sonarqube-for-infrastructure-prod[bot]: **SonarQube Quality Gate**

[![Quality Gate passed](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862)

[![Bug](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/common/bug-16px.png 'Bug')](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=BUG) [![A](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/RatingBadge/A-16px.png 'A')](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=BUG) [0 Bugs](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=BUG)  
[![Vulnerability](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/common/vulnerability-16px.png 'Vulnerability')](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=VULNERABILITY) [![A](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/RatingBadge/A-16px.png 'A')](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=VULNERABILITY)  
[![Security Hotspot](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/common/security_hotspot-16px.png 'Security Hotspot')](https://sonar.progress.com/security_hotspots?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862) [![A](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/RatingBadge/A-16px.png 'A')](https://sonar.progress.com/security_hotspots?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862) [0 Security Hotspots](https://sonar.progress.com/security_hotspots?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862)  
[![Code Smell](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/common/code_smell-16px.png 'Code Smell')](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=CODE_SMELL) [![A](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/RatingBadge/A-16px.png 'A')](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=CODE_SMELL)

[![80.9%](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/CoverageChart/60-16px.png '80.9%')](https://sonar.progress.com/component_measures?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&metric=new_coverage&view=list) [80.9% Coverage](https://sonar.progress.com/component_measures?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&metric=new_coverage&view=list)  
[![0.0%](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/Duplications/3-16px.png '0.0%')](https://sonar.progress.com/component_measures?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonar.progress.com/component_measures?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&metric=new_duplicated_lines_density&view=list)


sonarqube-for-infrastructure-prod[bot]: **SonarQube Quality Gate**

[![Quality Gate passed](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862)

[![Bug](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/common/bug-16px.png 'Bug')](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=BUG) [![A](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/RatingBadge/A-16px.png 'A')](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=BUG) [0 Bugs](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=BUG)  
[![Vulnerability](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/common/vulnerability-16px.png 'Vulnerability')](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=VULNERABILITY) [![A](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/RatingBadge/A-16px.png 'A')](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=VULNERABILITY)  
[![Security Hotspot](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/common/security_hotspot-16px.png 'Security Hotspot')](https://sonar.progress.com/security_hotspots?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862) [![A](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/RatingBadge/A-16px.png 'A')](https://sonar.progress.com/security_hotspots?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862) [0 Security Hotspots](https://sonar.progress.com/security_hotspots?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862)  
[![Code Smell](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/common/code_smell-16px.png 'Code Smell')](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=CODE_SMELL) [![A](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/RatingBadge/A-16px.png 'A')](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=CODE_SMELL)

[![82.4%](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/CoverageChart/60-16px.png '82.4%')](https://sonar.progress.com/component_measures?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&metric=new_coverage&view=list) [82.4% Coverage](https://sonar.progress.com/component_measures?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&metric=new_coverage&view=list)  
[![0.0%](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/Duplications/3-16px.png '0.0%')](https://sonar.progress.com/component_measures?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonar.progress.com/component_measures?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&metric=new_duplicated_lines_density&view=list)


sonarqube-for-infrastructure-prod[bot]: **SonarQube Quality Gate**

[![Quality Gate passed](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862)

[![Bug](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/common/bug-16px.png 'Bug')](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=BUG) [![A](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/RatingBadge/A-16px.png 'A')](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=BUG) [0 Bugs](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=BUG)  
[![Vulnerability](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/common/vulnerability-16px.png 'Vulnerability')](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=VULNERABILITY) [![A](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/RatingBadge/A-16px.png 'A')](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=VULNERABILITY)  
[![Security Hotspot](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/common/security_hotspot-16px.png 'Security Hotspot')](https://sonar.progress.com/security_hotspots?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862) [![A](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/RatingBadge/A-16px.png 'A')](https://sonar.progress.com/security_hotspots?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862) [0 Security Hotspots](https://sonar.progress.com/security_hotspots?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862)  
[![Code Smell](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/common/code_smell-16px.png 'Code Smell')](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=CODE_SMELL) [![A](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/RatingBadge/A-16px.png 'A')](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=CODE_SMELL)

[![83.9%](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/CoverageChart/60-16px.png '83.9%')](https://sonar.progress.com/component_measures?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&metric=new_coverage&view=list) [83.9% Coverage](https://sonar.progress.com/component_measures?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&metric=new_coverage&view=list)  
[![0.0%](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/Duplications/3-16px.png '0.0%')](https://sonar.progress.com/component_measures?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonar.progress.com/component_measures?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&metric=new_duplicated_lines_density&view=list)


sonarqube-for-infrastructure-prod[bot]: **SonarQube Quality Gate**

[![Quality Gate passed](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862)

[![Bug](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/common/bug-16px.png 'Bug')](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=BUG) [![A](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/RatingBadge/A-16px.png 'A')](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=BUG) [0 Bugs](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=BUG)  
[![Vulnerability](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/common/vulnerability-16px.png 'Vulnerability')](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=VULNERABILITY) [![A](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/RatingBadge/A-16px.png 'A')](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=VULNERABILITY)  
[![Security Hotspot](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/common/security_hotspot-16px.png 'Security Hotspot')](https://sonar.progress.com/security_hotspots?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862) [![A](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/RatingBadge/A-16px.png 'A')](https://sonar.progress.com/security_hotspots?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862) [0 Security Hotspots](https://sonar.progress.com/security_hotspots?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862)  
[![Code Smell](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/common/code_smell-16px.png 'Code Smell')](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=CODE_SMELL) [![A](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/RatingBadge/A-16px.png 'A')](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=CODE_SMELL)

[![83.9%](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/CoverageChart/60-16px.png '83.9%')](https://sonar.progress.com/component_measures?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&metric=new_coverage&view=list) [83.9% Coverage](https://sonar.progress.com/component_measures?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&metric=new_coverage&view=list)  
[![0.0%](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/Duplications/3-16px.png '0.0%')](https://sonar.progress.com/component_measures?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonar.progress.com/component_measures?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&metric=new_duplicated_lines_density&view=list)


sonarqube-for-infrastructure-prod[bot]: **SonarQube Quality Gate**

[![Quality Gate failed](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862)

[![Failed condition](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/FailedConditionIcon-16px.png 'Failed condition')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862) [![78.6%](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/CoverageChart/60-16px.png '78.6%')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862) 78.6% Coverage on New Code (is less than 80%)  

[See analysis details on SonarQube](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862)


sonarqube-for-infrastructure-prod[bot]: **SonarQube Quality Gate**

[![Quality Gate failed](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862)

[![Failed condition](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/FailedConditionIcon-16px.png 'Failed condition')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862) [![78.6%](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/CoverageChart/60-16px.png '78.6%')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862) 78.6% Coverage on New Code (is less than 80%)  

[See analysis details on SonarQube](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862)


sonarqube-for-infrastructure-prod[bot]: **SonarQube Quality Gate**

[![Quality Gate failed](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862)

[![Failed condition](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/FailedConditionIcon-16px.png 'Failed condition')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862) [![79.6%](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/CoverageChart/60-16px.png '79.6%')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862) 79.6% Coverage on New Code (is less than 80%)  

[See analysis details on SonarQube](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862)


sonarqube-for-infrastructure-prod[bot]: **SonarQube Quality Gate**

[![Quality Gate passed](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862)

[![Bug](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/common/bug-16px.png 'Bug')](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=BUG) [![A](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/RatingBadge/A-16px.png 'A')](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=BUG) [0 Bugs](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=BUG)  
[![Vulnerability](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/common/vulnerability-16px.png 'Vulnerability')](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=VULNERABILITY) [![A](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/RatingBadge/A-16px.png 'A')](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=VULNERABILITY)  
[![Security Hotspot](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/common/security_hotspot-16px.png 'Security Hotspot')](https://sonar.progress.com/security_hotspots?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862) [![A](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/RatingBadge/A-16px.png 'A')](https://sonar.progress.com/security_hotspots?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862) [0 Security Hotspots](https://sonar.progress.com/security_hotspots?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862)  
[![Code Smell](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/common/code_smell-16px.png 'Code Smell')](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=CODE_SMELL) [![A](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/RatingBadge/A-16px.png 'A')](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonar.progress.com/project/issues?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&resolved=false&types=CODE_SMELL)

[![85.7%](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/CoverageChart/60-16px.png '85.7%')](https://sonar.progress.com/component_measures?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&metric=new_coverage&view=list) [85.7% Coverage](https://sonar.progress.com/component_measures?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&metric=new_coverage&view=list)  
[![0.0%](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/Duplications/3-16px.png '0.0%')](https://sonar.progress.com/component_measures?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonar.progress.com/component_measures?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=7862&metric=new_duplicated_lines_density&view=list)



Patch:
diff --git a/components/automate-cli/pkg/verifyserver/constants/externalpostgresqlconstants.go b/components/automate-cli/pkg/verifyserver/constants/externalpostgresqlconstants.go
new file mode 100644
index 000000000..01c8cbbdd
--- /dev/null
+++ b/components/automate-cli/pkg/verifyserver/constants/externalpostgresqlconstants.go
@@ -0,0 +1,9 @@
+package constants
+
+const (
+	EXTERNAL_PG_SUCCESS_CONNECTION_TITLE  = "Machine is able to connect with external managed PostgreSQL"
+	EXTERNAL_PG_FAIL_CONNECTION_TITLE     = "External PostgreSQL connection failed"
+	EXTERNAL_PG_CONNECTION_ERROR_MSG      = "Machine is unable to connect with external managed PostgreSQL"
+	EXTERNAL_PG_CONNECTION_RESOLUTION_MSG = "Ensure that the PostgreSQL configuration provided is correct. Review security group or firewall settings as well on the infrastructure"
+	EXTERNAL_PG_CONNECTION_SUCCESS_MSG    = "Connection successfully tested"
+)
diff --git a/components/automate-cli/pkg/verifyserver/models/externalpostgresql.go b/components/automate-cli/pkg/verifyserver/models/externalpostgresql.go
new file mode 100644
index 000000000..9a344823a
--- /dev/null
+++ b/components/automate-cli/pkg/verifyserver/models/externalpostgresql.go
@@ -0,0 +1,25 @@
+package models
+
+type ExternalPgConnectionDetails struct {
+	Title         string `json:"title"`
+	Passed        bool   `json:"passed"`
+	Status        string `json:"status"`
+	SuccessMsg    string `json:"success_msg"`
+	ErrorMsg      string `json:"error_msg"`
+	ResolutionMsg string `json:"resolution_msg"`
+}
+
+type ExternalPgRequest struct {
+	PostgresqlInstanceUrl       string `json:"postgresql_instance_url"`
+	PostgresqlInstancePort      string `json:"postgresql_instance_port"`
+	PostgresqlSuperUserUserName string `json:"postgresql_superuser_username"`
+	PostgresqlSuperUserPassword string `json:"postgresql_superuser_password"`
+	PostgresqlDbUserUserName    string `json:"postgresql_dbuser_username"`
+	PostgresqlDbUserPassword    string `json:"postgresql_dbuser_password"`
+	PostgresqlRootCert          string `json:"postgresql_root_cert"`
+}
+
+type ExternalPgResponse struct {
+	Passed bool                          `json:"passed"`
+	Checks []ExternalPgConnectionDetails `json:"checks"`
+}
diff --git a/components/automate-cli/pkg/verifyserver/server/api/v1/externalpostgresql.go b/components/automate-cli/pkg/verifyserver/server/api/v1/externalpostgresql.go
new file mode 100644
index 000000000..89cb671a3
--- /dev/null
+++ b/components/automate-cli/pkg/verifyserver/server/api/v1/externalpostgresql.go
@@ -0,0 +1,33 @@
+package v1
+
+import (
+	"net/http"
+
+	"github.com/chef/automate/components/automate-cli/pkg/verifyserver/models"
+	"github.com/chef/automate/components/automate-cli/pkg/verifyserver/response"
+	"github.com/gofiber/fiber/v2"
+)
+
+func (h *Handler) CheckExternalPostgresql(c *fiber.Ctx) error {
+	req := new(models.ExternalPgRequest)
+	if err := c.BodyParser(&req); err != nil {
+		h.Logger.Error("External postgresql config request body parsing failed:", err)
+		return fiber.NewError(fiber.StatusBadRequest, err.Error())
+	}
+	if len(req.PostgresqlInstanceUrl) == 0 ||
+		len(req.PostgresqlInstancePort) == 0 ||
+		len(req.PostgresqlSuperUserUserName) == 0 ||
+		len(req.PostgresqlSuperUserPassword) == 0 ||
+		len(req.PostgresqlDbUserUserName) == 0 ||
+		len(req.PostgresqlDbUserPassword) == 0 ||
+		len(req.PostgresqlRootCert) == 0 {
+		return fiber.NewError(http.StatusBadRequest, "Request Parameters cannot be empty")
+
+	}
+	pgConnection, err := h.ExternalPostgresqlService.GetPgConnection(req)
+	if err != nil {
+		h.Logger.Error("Error while getting  Details: ", err)
+		return fiber.NewError(fiber.StatusInternalServerError, err.Error())
+	}
+	return c.JSON(response.BuildSuccessResponse(pgConnection))
+}
diff --git a/components/automate-cli/pkg/verifyserver/server/api/v1/handler.go b/components/automate-cli/pkg/verifyserver/server/api/v1/handler.go
index bc7dff6cc..ec78a83bd 100644
--- a/components/automate-cli/pkg/verifyserver/server/api/v1/handler.go
+++ b/components/automate-cli/pkg/verifyserver/server/api/v1/handler.go
@@ -2,6 +2,7 @@ package v1
 
 import (
 	"github.com/chef/automate/components/automate-cli/pkg/verifyserver/services/batchcheckservice"
+	"github.com/chef/automate/components/automate-cli/pkg/verifyserver/services/externalpostgresqlservice"
 	"github.com/chef/automate/components/automate-cli/pkg/verifyserver/services/hardwareresourcecount"
 	"github.com/chef/automate/components/automate-cli/pkg/verifyserver/services/nfsmountservice"
 	"github.com/chef/automate/components/automate-cli/pkg/verifyserver/services/opensearchbackupservice"
@@ -26,6 +27,7 @@ type Handler struct {
 	StopMockServersService       stopmockserverservice.IStopMockServerService
 	OSBackupService              opensearchbackupservice.IOSS3BackupService
 	PortReachableService         portreachableservice.IPortReachableService
+	ExternalPostgresqlService    externalpostgresqlservice.ExternalPostgresqlService
 }
 
 func NewHandler(logger logger.Logger) *Handler {
@@ -80,3 +82,8 @@ func (h *Handler) AddPortReachableService(pr portreachableservice.IPortReachable
 	h.PortReachableService = pr
 	return h
 }
+
+func (h *Handler) AddExternalPostgresqlService(pg externalpostgresqlservice.ExternalPostgresqlService) *Handler {
+	h.ExternalPostgresqlService = pg
+	return h
+}
diff --git a/components/automate-cli/pkg/verifyserver/server/routes.go b/components/automate-cli/pkg/verifyserver/server/routes.go
index 541c8a619..eb723067a 100644
--- a/components/automate-cli/pkg/verifyserver/server/routes.go
+++ b/components/automate-cli/pkg/verifyserver/server/routes.go
@@ -18,7 +18,8 @@ func (vs *VerifyServer) SetupRoutes() {
 	apiChecksGroup.Get("/software-versions", vs.Handler.CheckSoftwareVersion)
 	apiChecksGroup.Post("/s3-config", vs.Handler.GetS3Config)
 	apiChecksGroup.Post("/port-reachable", vs.Handler.PortReachable)
-
+	apiChecksGroup.Post("/external-postgresql", vs.Handler.CheckExternalPostgresql)
+	
 	apiStartGroup := apiV1Group.Group("/start")
 	apiStartGroup.Post("/mock-server", vs.Handler.StartMockServer)
 	apiChecksGroup.Post("/aws-opensearch-s3-bucket-access", vs.Handler.CheckOSBackupS3)
diff --git a/components/automate-cli/pkg/verifyserver/server/server.go b/components/automate-cli/pkg/verifyserver/server/server.go
index db55ea2e3..91387a468 100644
--- a/components/automate-cli/pkg/verifyserver/server/server.go
+++ b/components/automate-cli/pkg/verifyserver/server/server.go
@@ -16,6 +16,7 @@ import (
 	"github.com/chef/automate/components/automate-cli/pkg/verifyserver/services/batchcheckservice/trigger/sshuseraccesschecktrigger"
 	"github.com/chef/automate/components/automate-cli/pkg/verifyserver/services/batchcheckservice/trigger/systemresourcechecktrigger"
 	"github.com/chef/automate/components/automate-cli/pkg/verifyserver/services/batchcheckservice/trigger/systemuserchecktrigger"
+	"github.com/chef/automate/components/automate-cli/pkg/verifyserver/services/externalpostgresqlservice"
 	"github.com/chef/automate/components/automate-cli/pkg/verifyserver/services/hardwareresourcecount"
 	"github.com/chef/automate/components/automate-cli/pkg/verifyserver/services/nfsmountservice"
 	"github.com/chef/automate/components/automate-cli/pkg/verifyserver/services/opensearchbackupservice"
@@ -26,7 +27,9 @@ import (
 	"github.com/chef/automate/components/automate-cli/pkg/verifyserver/services/statusservice"
 	"github.com/chef/automate/components/automate-cli/pkg/verifyserver/services/stopmockserverservice"
 	"github.com/chef/automate/components/automate-cli/pkg/verifyserver/utils/awsutils"
+	"github.com/chef/automate/components/automate-cli/pkg/verifyserver/utils/db"
 	"github.com/chef/automate/components/automate-cli/pkg/verifyserver/utils/fiberutils"
+	"github.com/chef/automate/lib/io/fileutils"
 	"github.com/chef/automate/lib/logger"
 	"github.com/gofiber/fiber/v2"
 	"github.com/gofiber/fiber/v2/middleware/cors"
@@ -96,7 +99,8 @@ func NewVerifyServer(port string, debug bool) (*VerifyServer, error) {
 		AddS3ConfigService(s3configservice.NewS3ConfigService(l, awsutils.NewAwsUtils())).
 		AddStopMockServerService(stopmockserverservice.NewStopMockServerService(l)).
 		AddOSS3BackupService(opensearchbackupservice.NewOSS3BackupService(l)).
-		AddPortReachableService(portreachableservice.NewPortReachableService(l, constants.TIMEOUT))
+		AddPortReachableService(portreachableservice.NewPortReachableService(l, constants.TIMEOUT)).
+		AddExternalPostgresqlService(externalpostgresqlservice.NewExternalPostgresqlService(db.NewDBImpl(),fileutils.NewFileSystemUtils(),l))
 	vs := &VerifyServer{
 		Port:    port,
 		Log:     l,
diff --git a/components/automate-cli/pkg/verifyserver/services/externalpostgresqlservice/externalpostgresqlservice.go b/components/automate-cli/pkg/verifyserver/services/externalpostgresqlservice/externalpostgresqlservice.go
new file mode 100644
index 000000000..549f7efc4
--- /dev/null
+++ b/components/automate-cli/pkg/verifyserver/services/externalpostgresqlservice/externalpostgresqlservice.go
@@ -0,0 +1,103 @@
+package externalpostgresqlservice
+
+import (
+	"fmt"
+
+	"github.com/chef/automate/components/automate-cli/pkg/verifyserver/constants"
+	"github.com/chef/automate/components/automate-cli/pkg/verifyserver/models"
+	"github.com/chef/automate/components/automate-cli/pkg/verifyserver/utils/db"
+	"github.com/chef/automate/lib/io/fileutils"
+	"github.com/chef/automate/lib/logger"
+)
+
+type ExternalPostgresqlService interface {
+	GetPgConnection(*models.ExternalPgRequest) (*models.ExternalPgResponse, error)
+}
+
+type ExternalPostgresqlServiceImpl struct {
+	logger    logger.Logger
+	DBUtils   db.DB
+	fileUtils fileutils.FileUtils
+	Req       *models.ExternalPgRequest
+}
+
+func NewExternalPostgresqlService(db db.DB, fileutils fileutils.FileUtils, logger logger.Logger) *ExternalPostgresqlServiceImpl {
+	return &ExternalPostgresqlServiceImpl{
+		logger:    logger,
+		DBUtils:   db,
+		fileUtils: fileutils,
+	}
+}
+
+func (pg *ExternalPostgresqlServiceImpl) GetPgConnection(req *models.ExternalPgRequest) (*models.ExternalPgResponse, error) {
+	pg.Req = req
+
+	//creating a temp file to copy the content of a rootcert into a file
+	rootcert, err := pg.fileUtils.CreateTempFile(req.PostgresqlRootCert, "root-cert")
+	if err != nil {
+		return nil, err
+	}
+
+	var resp *models.ExternalPgResponse
+	err = pg.CheckExternalPgConnection(rootcert)
+	if err != nil {
+		pg.logger.Error(err)
+		resp = &models.ExternalPgResponse{
+			Passed: false,
+			Checks: []models.ExternalPgConnectionDetails{failResponse(constants.EXTERNAL_PG_FAIL_CONNECTION_TITLE, constants.EXTERNAL_PG_CONNECTION_ERROR_MSG, constants.EXTERNAL_PG_CONNECTION_RESOLUTION_MSG)},
+		}
+		return resp, nil
+	}
+
+	resp = &models.ExternalPgResponse{
+		Passed: true,
+		Checks: []models.ExternalPgConnectionDetails{successResponse(constants.EXTERNAL_PG_SUCCESS_CONNECTION_TITLE, constants.EXTERNAL_PG_CONNECTION_SUCCESS_MSG)},
+	}
+
+	// delete the file when its done
+	defer pg.fileUtils.DeleteTempFile(rootcert)
+
+	return resp, nil
+}
+func (p *ExternalPostgresqlServiceImpl) CheckExternalPgConnection(rootcert string) error {
+
+	connStr := fmt.Sprintf("host=%s port=%s user=%s "+
+		"password=%s dbname=postgres sslmode=verify-ca sslrootcert=%s",
+		p.Req.PostgresqlInstanceUrl, p.Req.PostgresqlInstancePort, "%s", "%s", rootcert)
+
+	superUserConnStr := fmt.Sprintf(connStr, p.Req.PostgresqlSuperUserUserName, p.Req.PostgresqlSuperUserPassword)
+	DbUserConnStr := fmt.Sprintf(connStr, p.Req.PostgresqlDbUserUserName, p.Req.PostgresqlDbUserPassword)
+
+	QueryStr := []string{superUserConnStr, DbUserConnStr}
+
+	for i := 0; i < len(QueryStr); i++ {
+		err := p.DBUtils.InitPostgresDB(QueryStr[i])
+		if err != nil {
+			p.logger.Error("External Postgresql Connection failed: ", err.Error())
+			return err
+		}
+		p.logger.Info("External Postgresql aws connection success", i)
+	}
+	return nil
+}
+
+func successResponse(Title string, SuccessMsg string) models.ExternalPgConnectionDetails {
+	Resp := models.ExternalPgConnectionDetails{
+		Title:         constants.EXTERNAL_PG_SUCCESS_CONNECTION_TITLE,
+		Passed:        true,
+		SuccessMsg:    constants.EXTERNAL_PG_CONNECTION_SUCCESS_MSG,
+		ErrorMsg:      "",
+		ResolutionMsg: "",
+	}
+	return Resp
+}
+func failResponse(Title string, ErrorMsg string, ResolutionMsg string) models.ExternalPgConnectionDetails {
+	Resp := models.ExternalPgConnectionDetails{
+		Title:         constants.EXTERNAL_PG_FAIL_CONNECTION_TITLE,
+		Passed:        false,
+		SuccessMsg:    "",
+		ErrorMsg:      constants.EXTERNAL_PG_CONNECTION_ERROR_MSG,
+		ResolutionMsg: constants.EXTERNAL_PG_CONNECTION_RESOLUTION_MSG,
+	}
+	return Resp
+}
diff --git a/components/automate-cli/pkg/verifyserver/services/externalpostgresqlservice/mockexternalpostgresqlservice.go b/components/automate-cli/pkg/verifyserver/services/externalpostgresqlservice/mockexternalpostgresqlservice.go
new file mode 100644
index 000000000..1f40016ee
--- /dev/null
+++ b/components/automate-cli/pkg/verifyserver/services/externalpostgresqlservice/mockexternalpostgresqlservice.go
@@ -0,0 +1,11 @@
+package externalpostgresqlservice
+
+import "github.com/chef/automate/components/automate-cli/pkg/verifyserver/models"
+
+type MockExternalPostgresqlService struct {
+	GetPgConnectionFunc func(*models.ExternalPgRequest) (*models.ExternalPgResponse, error)
+}
+
+func (mss *MockExternalPostgresqlService) GetPgConnection(req *models.ExternalPgRequest) (*models.ExternalPgResponse, error) {
+	return mss.GetPgConnectionFunc(req)
+}
diff --git a/components/automate-cli/pkg/verifyserver/utils/db/db.go b/components/automate-cli/pkg/verifyserver/utils/db/db.go
new file mode 100644
index 000000000..294891415
--- /dev/null
+++ b/components/automate-cli/pkg/verifyserver/utils/db/db.go
@@ -0,0 +1,33 @@
+package db
+
+import (
+	"database/sql"
+
+	_ "github.com/lib/pq"
+)
+
+type DBImpl struct {
+}
+type DB interface {
+	InitPostgresDB(con string) error
+}
+
+func NewDBImpl() DB {
+	return &DBImpl{}
+}
+
+func (di *DBImpl) InitPostgresDB(con string) error {
+
+	db, err := sql.Open("postgres", con)
+	if err != nil {
+		return err
+	}
+
+	defer db.Close()
+
+	err = db.Ping()
+	if err != nil {
+		return err
+	}
+	return nil
+}
diff --git a/components/automate-cli/pkg/verifyserver/utils/db/mockdb.go b/components/automate-cli/pkg/verifyserver/utils/db/mockdb.go
new file mode 100644
index 000000000..635082756
--- /dev/null
+++ b/components/automate-cli/pkg/verifyserver/utils/db/mockdb.go
@@ -0,0 +1,9 @@
+package db
+
+type MockDB struct {
+	InitPostgresDBFunc func(con string) error
+}
+
+func (m *MockDB) InitPostgresDB(con string) error {
+	return m.InitPostgresDBFunc(con)
+}
diff --git a/lib/io/fileutils/fileutils.go b/lib/io/fileutils/fileutils.go
index 9d60fdb01..834f09270 100644
--- a/lib/io/fileutils/fileutils.go
+++ b/lib/io/fileutils/fileutils.go
@@ -28,10 +28,16 @@ type FileUtils interface {
 	WriteToFile(filepath string, data []byte) error
 	ReadFile(filename string) ([]byte, error)
 	WriteFile(filepath string, data []byte, perm os.FileMode) error
+	CreateTempFile(content string, filename string) (string, error)
+	DeleteTempFile(tempFile string) error
 }
 
 type FileSystemUtils struct{}
 
+func NewFileSystemUtils() FileUtils {
+	return &FileSystemUtils{}
+}
+
 func (fsu *FileSystemUtils) PathExists(path string) (bool, error) {
 	return PathExists(path)
 }
@@ -59,6 +65,12 @@ func (fsu *FileSystemUtils) ReadFile(filename string) ([]byte, error) {
 func (fsu *FileSystemUtils) WriteFile(filepath string, data []byte, perm os.FileMode) error {
 	return WriteFile(filepath, data, perm)
 }
+func (fsu *FileSystemUtils) CreateTempFile(content string, filename string) (string, error) {
+	return CreateTempFile(content, filename)
+}
+func (fsu *FileSystemUtils) DeleteTempFile(tempFile string) error {
+	return DeleteTempFile(tempFile)
+}
 
 // LogCLose closes the given io.Closer, logging any error.
 func LogClose(c io.Closer, log logrus.FieldLogger, msg string) {
@@ -147,3 +159,19 @@ func ReadFile(filename string) ([]byte, error) {
 func WriteFile(filepath string, data []byte, perm os.FileMode) error {
 	return ioutil.WriteFile(filepath, data, perm) // nosemgrep
 }
+
+func CreateTempFile(content string, filename string) (string, error) {
+	tempFile, err := os.CreateTemp("", filename)
+	if err != nil {
+		return "", errors.Wrap(err, "file creation failed ")
+	}
+	_, err = tempFile.WriteString((content))
+	if err != nil {
+		return "", errors.Wrap(err, "writing to a file failed ")
+	}
+	return tempFile.Name(), nil
+}
+
+func DeleteTempFile(tempFile string) error {
+	return os.Remove(tempFile)
+}
diff --git a/lib/io/fileutils/mockFileUtils.go b/lib/io/fileutils/mockFileUtils.go
index 6bb177367..dbad5bc1b 100644
--- a/lib/io/fileutils/mockFileUtils.go
+++ b/lib/io/fileutils/mockFileUtils.go
@@ -1,6 +1,8 @@
 package fileutils
 
-import "os"
+import (
+	"os"
+)
 
 type MockFileSystemUtils struct {
 	PathExistsFunc             func(path string) (bool, error)
@@ -12,6 +14,8 @@ type MockFileSystemUtils struct {
 	WriteToFileFunc            func(filepath string, data []byte) error
 	ReadFileFunc               func(filepath string) ([]byte, error)
 	WriteFileFunc              func(filepath string, data []byte, perm os.FileMode) error
+	CreateTempFileFunc         func(content string, filename string) (string, error)
+	DeleteTempFileFunc         func(tempFile string) error
 }
 
 func (fsu *MockFileSystemUtils) PathExists(path string) (bool, error) {
@@ -41,3 +45,9 @@ func (fsu *MockFileSystemUtils) ReadFile(filepath string) ([]byte, error) {
 func (fsu *MockFileSystemUtils) WriteFile(filepath string, data []byte, perm os.FileMode) error {
 	return fsu.WriteFileFunc(filepath, data, perm)
 }
+func (fsu *MockFileSystemUtils) CreateTempFile(content string, filename string) (string, error) {
+	return fsu.CreateTempFileFunc(content, filename)
+}
+func (fsu *MockFileSystemUtils) DeleteTempFile(tempFile string) error {
+	return fsu.DeleteTempFileFunc(tempFile)
+}


Test patch:
diff --git a/components/automate-cli/pkg/verifyserver/server/api/v1/externalpostgresql_test.go b/components/automate-cli/pkg/verifyserver/server/api/v1/externalpostgresql_test.go
new file mode 100644
index 000000000..888e8a954
--- /dev/null
+++ b/components/automate-cli/pkg/verifyserver/server/api/v1/externalpostgresql_test.go
@@ -0,0 +1,179 @@
+package v1_test
+
+import (
+	"errors"
+	"io"
+	"net/http/httptest"
+	"strings"
+	"testing"
+
+	"github.com/chef/automate/components/automate-cli/pkg/verifyserver/constants"
+	"github.com/chef/automate/components/automate-cli/pkg/verifyserver/models"
+	"github.com/chef/automate/components/automate-cli/pkg/verifyserver/server"
+	v1 "github.com/chef/automate/components/automate-cli/pkg/verifyserver/server/api/v1"
+	"github.com/chef/automate/components/automate-cli/pkg/verifyserver/services/externalpostgresqlservice"
+	"github.com/chef/automate/components/automate-cli/pkg/verifyserver/utils/fiberutils"
+	"github.com/chef/automate/lib/logger"
+	"github.com/gofiber/fiber/v2"
+	"github.com/stretchr/testify/assert"
+)
+
+var (
+	ExternalPgsuccessMessage      = "{\"status\":\"SUCCESS\",\"result\":{\"passed\":true,\"checks\":[{\"title\":\"Machine is able to connect with external managed PostgreSQL\",\"passed\":true,\"status\":\"\",\"success_msg\":\"Connection successfully tested\",\"error_msg\":\"\",\"resolution_msg\":\"\"}]}}"
+	ExternalPgfailureMessage      = "{\"status\":\"SUCCESS\",\"result\":{\"passed\":false,\"checks\":[{\"title\":\"External Postgresql connection failed\",\"passed\":false,\"status\":\"\",\"success_msg\":\"\",\"error_msg\":\"Machine is unable to connect with external managed PostgreSQL\",\"resolution_msg\":\"Ensure that the PostgreSQL configuration provided is correct. Review security group or firewall settings as well on the infrastructure\"}]}}"
+	ExternalPgInternalServerError = "{\"status\":\"FAILED\",\"result\":null,\"error\":{\"code\":500,\"message\":\"Internal Server Error\"}}"
+	ErrorBodyParser               = "{\"status\":\"FAILED\",\"result\":null,\"error\":{\"code\":400,\"message\":\"invalid character '}' looking for beginning of object key string\"}}"
+	InvalidRequest                = "{\"status\":\"FAILED\",\"result\":null,\"error\":{\"code\":400,\"message\":\"Request Parameters cannot be empty\"}}"
+)
+
+func SetupMockExternalPostgresqlService(responseBody *models.ExternalPgResponse, err error) externalpostgresqlservice.ExternalPostgresqlService {
+	return &externalpostgresqlservice.MockExternalPostgresqlService{
+		GetPgConnectionFunc: func(*models.ExternalPgRequest) (*models.ExternalPgResponse, error) {
+			return responseBody, err
+		},
+	}
+}
+
+func SetupExternalPostgresqlHandlers(pg externalpostgresqlservice.ExternalPostgresqlService) (*fiber.App, error) {
+	log, _ := logger.NewLogger("text", "debug")
+	fconf := fiber.Config{
+		ServerHeader: server.SERVICE,
+		ErrorHandler: fiberutils.CustomErrorHandler,
+	}
+	app := fiber.New(fconf)
+	handler := v1.NewHandler(log).
+		AddExternalPostgresqlService(pg)
+	vs := &server.VerifyServer{
+		Port:    server.DEFAULT_PORT,
+		Log:     log,
+		App:     app,
+		Handler: handler,
+	}
+	vs.SetupRoutes()
+	return vs.App, nil
+}
+
+func TestExternalPostgresql(t *testing.T) {
+	tests := []struct {
+		description   string
+		responseBody  *models.ExternalPgResponse
+		expectedCode  int
+		expectedBody  string
+		expectedError error
+		body          string
+	}{
+		{
+			description: "200:success status route",
+			responseBody: &models.ExternalPgResponse{
+				Passed: true,
+				Checks: []models.ExternalPgConnectionDetails{
+					{
+						Title:         constants.EXTERNAL_PG_SUCCESS_CONNECTION_TITLE,
+						Passed:        true,
+						SuccessMsg:    constants.EXTERNAL_PG_CONNECTION_SUCCESS_MSG,
+						ErrorMsg:      "",
+						ResolutionMsg: "",
+					},
+				},
+			},
+			expectedCode: 200,
+			expectedBody: ExternalPgsuccessMessage,
+			body: `{
+				"postgresql_instance_url": "A.B.C.D",
+				"postgresql_instance_port": "7432",
+				"postgresql_superuser_username": "postgres",
+				"postgresql_superuser_password": "Progress123",
+				"postgresql_dbuser_username": "postgres",
+				"postgresql_dbuser_password": "Progress123",
+				"postgresql_root_cert": "----- BEGIN CERTIFICATE ------"
+			}`,
+		},
+		{
+			description:  "400: body parser error",
+			responseBody: nil,
+			expectedCode: 400,
+			expectedBody: ErrorBodyParser,
+			body: `{
+						"postgresql_instance_url": "A.B.C.D",
+						"postgresq_instance_port": "7432",
+					}`,
+		},
+		{
+			description:  "400: body parser error with special character",
+			responseBody: nil,
+			expectedCode: 400,
+			expectedBody: InvalidRequest,
+			body: `{
+				"postgresql&_instance_url": "A.B.C.D",
+				"postgresql_instance_port": "7432",
+				"postgresql_superuser_username": "postgres",
+				"postgresql_superuser_password": "Progress123",
+				"postgresql_dbuser_username": "postgres",
+				"postgresql_dbuser_password": "Progress123",
+				"postgresql_root_cert": ""
+				}`,
+		},
+		{
+			description:  "400: body parser error with invalid type",
+			responseBody: nil,
+			expectedCode: 400,
+			expectedBody: InvalidRequest,
+			body: `{
+				"postgresql&_instance_url": 1234,
+				"postgresql_instance_port": "7432",
+				"postgresql_superuser_username": "postgres",
+				"postgresql_superuser_password": "Progress123",
+				"postgresql_dbuser_username": "postgres",
+				"postgresql_dbuser_password": "Progress123",
+				"postgresql_root_cert": ""
+				}`,
+		},
+		{
+			description:  "400: Request validator with empty string",
+			responseBody: nil,
+			expectedCode: 400,
+			expectedBody: InvalidRequest,
+			body: `{
+				"postgresql_instance_url": "A.B.C.D",
+				"postgresql_instance_port": "7432",
+				"postgresql_superuser_username": "postgres",
+				"postgresql_superuser_password": "Progress123",
+				"postgresql_dbuser_username": "postgres",
+				"postgresql_dbuser_password": "Progress123",
+				"postgresql_root_cert": ""
+				}`,
+		},
+		{
+			description:   "500: Internal Server error",
+			responseBody:  nil,
+			expectedCode:  500,
+			expectedBody:  ExternalPgInternalServerError,
+			expectedError: errors.New("Internal Server Error"),
+			body: `{
+						"postgresql_instance_url": "A.B.C.D",
+						"postgresql_instance_port": "7432",
+						"postgresql_superuser_username": "postgres",
+						"postgresql_superuser_password": "Progress123",
+						"postgresql_dbuser_username": "postgres",
+						"postgresql_dbuser_password": "Progress123",
+						"postgresql_root_cert": "----- BEGIN CERTIFICATE ------"
+					}`,
+		},
+	}
+	ExternalPostgresqlEndpoint := "/api/v1/checks/external-postgresql"
+
+	for _, test := range tests {
+		t.Run(test.description, func(t *testing.T) {
+			app, _ := SetupExternalPostgresqlHandlers(SetupMockExternalPostgresqlService(test.responseBody, test.expectedError))
+			req := httptest.NewRequest("POST", ExternalPostgresqlEndpoint, strings.NewReader(test.body))
+			req.Header.Add("Content-Type", "application/json")
+			res, err := app.Test(req, -1)
+			assert.NoError(t, err)
+			body, err := io.ReadAll(res.Body)
+			t.Log(body, "body")
+			assert.NoError(t, err, test.description)
+			assert.Contains(t, string(body), test.expectedBody)
+			assert.Equal(t, res.StatusCode, test.expectedCode)
+		})
+	}
+}
diff --git a/components/automate-cli/pkg/verifyserver/services/externalpostgresqlservice/externalpostgresqlservice_test.go b/components/automate-cli/pkg/verifyserver/services/externalpostgresqlservice/externalpostgresqlservice_test.go
new file mode 100644
index 000000000..70feb6c27
--- /dev/null
+++ b/components/automate-cli/pkg/verifyserver/services/externalpostgresqlservice/externalpostgresqlservice_test.go
@@ -0,0 +1,100 @@
+package externalpostgresqlservice_test
+
+import (
+	"errors"
+	"testing"
+
+	"github.com/chef/automate/components/automate-cli/pkg/verifyserver/constants"
+	"github.com/chef/automate/components/automate-cli/pkg/verifyserver/models"
+	"github.com/chef/automate/components/automate-cli/pkg/verifyserver/services/externalpostgresqlservice"
+	"github.com/chef/automate/components/automate-cli/pkg/verifyserver/utils/db"
+	"github.com/chef/automate/lib/io/fileutils"
+	"github.com/chef/automate/lib/logger"
+	"github.com/stretchr/testify/assert"
+)
+
+var (
+	req = models.ExternalPgRequest{
+		PostgresqlInstanceUrl:       "A.B.C.D",
+		PostgresqlInstancePort:      "7432",
+		PostgresqlSuperUserUserName: "postgres",
+		PostgresqlSuperUserPassword: "Progress123",
+		PostgresqlDbUserUserName:    "postgres",
+		PostgresqlDbUserPassword:    "Progress123",
+		PostgresqlRootCert:          "----- BEGIN CERTIFICATE ------",
+	}
+)
+
+func TestExternalPostgresqlService(t *testing.T) {
+	log, _ := logger.NewLogger("text", "debug")
+	cs := externalpostgresqlservice.NewExternalPostgresqlService(&db.MockDB{
+		InitPostgresDBFunc: func(con string) error {
+			return nil
+		},
+	}, &fileutils.MockFileSystemUtils{
+		CreateTempFileFunc: func(content string, filename string) (string, error) {
+			return "", nil
+		},
+		DeleteTempFileFunc: func(tempFile string) error {
+			return nil
+		},
+	}, log)
+	services, _ := cs.GetPgConnection(&models.ExternalPgRequest{
+		PostgresqlInstanceUrl:       "A.B.C.D",
+		PostgresqlInstancePort:      "7432",
+		PostgresqlSuperUserUserName: "postgres",
+		PostgresqlSuperUserPassword: "Progress123",
+		PostgresqlDbUserUserName:    "postgres",
+		PostgresqlDbUserPassword:    "Progress123",
+		PostgresqlRootCert:          "----- BEGIN CERTIFICATE ------",
+	})
+	assert.Equal(t, &models.ExternalPgResponse{
+		Passed: true,
+		Checks: []models.ExternalPgConnectionDetails{
+			{
+				Title:         constants.EXTERNAL_PG_SUCCESS_CONNECTION_TITLE,
+				Passed:        true,
+				SuccessMsg:    constants.EXTERNAL_PG_CONNECTION_SUCCESS_MSG,
+				ErrorMsg:      "",
+				ResolutionMsg: "",
+			},
+		},
+	}, services)
+}
+
+func TestExternalPostgresqlServiceFailure(t *testing.T) {
+	log, _ := logger.NewLogger("text", "debug")
+	csf := externalpostgresqlservice.NewExternalPostgresqlService(&db.MockDB{
+		InitPostgresDBFunc: func(con string) error {
+			return errors.New("")
+		},
+	}, &fileutils.MockFileSystemUtils{
+		CreateTempFileFunc: func(content string, filename string) (string, error) {
+			return "", nil
+		},
+		DeleteTempFileFunc: func(tempFile string) error {
+			return nil
+		},
+	}, log)
+	services, _ := csf.GetPgConnection(&models.ExternalPgRequest{
+		PostgresqlInstanceUrl:       "A.B.C.D",
+		PostgresqlInstancePort:      "7432",
+		PostgresqlSuperUserUserName: "postgres",
+		PostgresqlSuperUserPassword: "Progress123",
+		PostgresqlDbUserUserName:    "postgres",
+		PostgresqlRootCert:          "-----",
+	})
+	assert.Equal(t, &models.ExternalPgResponse{
+		Passed: false,
+		Checks: []models.ExternalPgConnectionDetails{
+			{
+				Title:         constants.EXTERNAL_PG_FAIL_CONNECTION_TITLE,
+				Passed:        false,
+				SuccessMsg:    "",
+				ErrorMsg:      constants.EXTERNAL_PG_CONNECTION_ERROR_MSG,
+				ResolutionMsg: constants.EXTERNAL_PG_CONNECTION_RESOLUTION_MSG,
+			},
+		},
+	}, services)
+
+}
diff --git a/components/automate-cli/pkg/verifyserver/utils/db/db_test.go b/components/automate-cli/pkg/verifyserver/utils/db/db_test.go
new file mode 100644
index 000000000..9ad0149ca
--- /dev/null
+++ b/components/automate-cli/pkg/verifyserver/utils/db/db_test.go
@@ -0,0 +1,19 @@
+package db
+
+import (
+	"strings"
+	"testing"
+)
+
+func TestInitPostgresDB(t *testing.T) {
+	//create DBImpl
+	di := &DBImpl{}
+
+	err := di.InitPostgresDB("mock-con-sting")
+	expectedError := `missing "=" after "mock-con-sting" in connection info string`
+	actualError := strings.TrimRight(err.Error(), `"`)
+
+	if actualError != expectedError {
+		t.Errorf("Extected error '%s', got '%s'", expectedError, actualError)
+	}
+}
diff --git a/lib/io/fileutils/fileutils_test.go b/lib/io/fileutils/fileutils_test.go
index 9960c1370..a6698c846 100644
--- a/lib/io/fileutils/fileutils_test.go
+++ b/lib/io/fileutils/fileutils_test.go
@@ -50,3 +50,35 @@ func TestIsSymlink(t *testing.T) {
 		assert.False(t, isSymlink, "%s should not be a symlink", filePath)
 	})
 }
+
+func TestCreateTempFile(t *testing.T) {
+	content := "abc"
+	filename := "file-name"
+	t.Run("It creates the file", func(t *testing.T) {
+		res1, err := fileutils.CreateTempFile(content, filename)
+		require.NoError(t, err)
+		res2, err := fileutils.CreateTempFile(content, filename)
+		require.NoError(t, err)
+		res3, err := fileutils.CreateTempFile(content, filename)
+		require.NoError(t, err)
+		res4, err := fileutils.CreateTempFile(content, filename)
+		require.NoError(t, err)
+		assert.Contains(t, res1, "file-name")
+		assert.Contains(t, res2, "file-name")
+		assert.Contains(t, res3, "file-name")
+		assert.Contains(t, res4, "file-name")
+	})
+}
+
+func TestDeleteTempFile(t *testing.T) {
+	tempFile, err := os.CreateTemp("", "testfile")
+	if err != nil {
+		return
+	}
+	defer tempFile.Close()
+
+	err = fileutils.DeleteTempFile(tempFile.Name())
+	if err != nil {
+		return
+	}
+}