-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
24 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
# This script will create a VPN configuration file for the specified environment | ||
# Usage: ./createVPNConfig.sh <environment> | ||
# Example: ./createVPNConfig.sh staging | ||
ENVIRONMENT=$1 | ||
git clone https://github.com/cds-snc/notification-terraform.git /var/tmp/notification-terraform | ||
cd /var/tmp/notification-terraform/env/$ENVIRONMENT/eks | ||
ENDPOINT_ID=$(terragrunt output --raw gha_vpn_id) | ||
CERT=$(terragrunt output --raw gha_vpn_certificate) | ||
KEY=$(terragrunt output --raw gha_vpn_key) | ||
aws ec2 export-client-vpn-client-configuration --client-vpn-endpoint-id $ENDPOINT_ID --output text > /var/tmp/$ENVIRONMENT.ovpn | ||
echo "<cert> | ||
$CERT | ||
</cert>" >> /var/tmp/$ENVIRONMENT.ovpn | ||
echo "<key> | ||
$KEY | ||
</key>" >> /var/tmp/$ENVIRONMENT.ovpn |