Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

Minor: CI/CD provisioning

Rich Turner25e7b21cf577
diff --git a/.ci_cd/aws/provision_account.sh b/.ci_cd/aws/provision_account.sh
index 59510ddde..382601054 100644
--- a/.ci_cd/aws/provision_account.sh
+++ b/.ci_cd/aws/provision_account.sh
@@ -145,6 +145,7 @@ VPCID=$(aws ec2 describe-vpcs --filters Name=is-default,Values=true --query "Vpc
if [ "$VPCID" == 'None' ]; then
echo "Provisioning default VPC"
VPCID=$(aws ec2 create-default-vpc --query "Vpc.VpcId" --output text $ACCOUNT_PROFILE)
+ aws ec2 associate-vpc-cidr-block --amazon-provided-ipv6-cidr-block --ipv6-cidr-block-network-border-group $AWS_REGION --vpc-id $VPCID $ACCOUNT_PROFILE
else
echo "Default VPC already exists"
fi
@@ -261,6 +262,13 @@ if [ "$PROVISION_EFS" != 'false' ]; then
VPCIP4CIDR=$(aws ec2 describe-vpcs --filters Name=is-default,Values=true --query "Vpcs[0].CidrBlockAssociationSet[0].CidrBlock" --output text $ACCOUNT_PROFILE 2>/dev/null)
VPCIP6CIDR=$(aws ec2 describe-vpcs --filters Name=is-default,Values=true --query "Vpcs[0].Ipv6CidrBlockAssociationSet[0].Ipv6CidrBlock" --output text $ACCOUNT_PROFILE 2>/dev/null)
+ if [ "$VPCIP4CIDR" == 'None' ]; then
+ unset VPCIP4CIDR
+ fi
+ if [ "$VPCIP6CIDR" == 'None' ]; then
+ unset VPCIP6CIDR
+ fi
+
if [ -z "$VPCIP4CIDR" ] && [ -z "$VPCIP6CIDR" ]; then
echo "Default VPC not found"
else
diff --git a/.ci_cd/aws/provision_host.sh b/.ci_cd/aws/provision_host.sh
index c74040b89..b6aaff70c 100644
--- a/.ci_cd/aws/provision_host.sh
+++ b/.ci_cd/aws/provision_host.sh
@@ -132,7 +132,7 @@ else
PARAMS="$PARAMS ParameterKey=SMTPUser,ParameterValue=$SMTP_USER"
fi
if [ -n "$SMTP_SECRET" ]; then
- PARAMS="$PARAMS ParameterKey=SMTPSecret,ParameterValue=$SMTP_USER ParameterKey=SMTPRegion,ParameterValue=$AWS_REGION"
+ PARAMS="$PARAMS ParameterKey=SMTPSecret,ParameterValue=$SMTP_SECRET ParameterKey=SMTPRegion,ParameterValue=$AWS_REGION"
fi
# Determine DNSHostedZoneName and DNSHostedZoneRoleArn (must be set if hosted zone is not in the same account as where the host is being created)