File tree Expand file tree Collapse file tree 4 files changed +16641
-22927
lines changed Expand file tree Collapse file tree 4 files changed +16641
-22927
lines changed Original file line number Diff line number Diff line change 1- export temp_atlas_url=` aws cloudformation --region us-east-1 describe-stacks --stack-name AtlasIntegInfraStack --query " Stacks[0].Outputs[0].OutputValue" `
2- export temp_atlas_password=` aws cloudformation --region us-east-1 describe-stacks --stack-name AtlasIntegInfraStack --query " Stacks[0].Outputs[1].OutputValue" `
3- export temp_atlas_username=` aws cloudformation --region us-east-1 describe-stacks --stack-name AtlasIntegInfraStack --query " Stacks[0].Outputs[2].OutputValue" `
1+ #! /bin/bash
42
5- export atlas_url= ` echo $temp_atlas_url | cut -c 16- | tr -d ' " ' `
6- export atlas_username= ` echo $temp_atlas_username | tr -d ' " ' `
7- export atlas_password= ` echo $temp_atlas_password | tr -d ' " ' `
3+ temp_atlas_url= $( aws cloudformation --region us-east-1 describe-stacks --stack-name AtlasIntegInfraStack --query " Stacks[0].Outputs[0].OutputValue " )
4+ temp_atlas_password= $( aws cloudformation --region us-east-1 describe-stacks --stack-name AtlasIntegInfraStack --query " Stacks[0].Outputs[1].OutputValue " )
5+ temp_atlas_username= $( aws cloudformation --region us-east-1 describe-stacks --stack-name AtlasIntegInfraStack --query " Stacks[0].Outputs[2].OutputValue " )
86
9- export ATLAS_URI=" mongodb+srv://${atlas_username} :${atlas_password} @${atlas_url} "
7+ atlas_url=$( echo " $temp_atlas_url " | cut -c 16-| tr -d ' "' )
8+ atlas_username=$( echo " $temp_atlas_username " | tr -d ' "' )
9+ atlas_password=$( echo " $temp_atlas_password " | tr -d ' "' )
1010
11- mongoimport ${ATLAS_URI} --db=employees --collection=records out.json
11+ ATLAS_URI=" mongodb+srv://${atlas_username} :${atlas_password} @${atlas_url} "
12+
13+ export temp_atlas_url
14+ export temp_atlas_password
15+ export temp_atlas_username
16+ export atlas_url
17+ export atlas_username
18+ export atlas_password
19+ export ATLAS_URI
20+
21+ mongoimport " ${ATLAS_URI} " --db=employees --collection=records out.json
You can’t perform that action at this time.
0 commit comments