templates/etleap-main.yaml [815:947]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      UserData: !Base64
        "Fn::Sub":
          - |
            #cloud-config
            # -*- YAML -*-
            apt_upgrade: true
            locale: en_US.UTF-8

            write_files:
            - path: /home/ubuntu/.aws/config
              content: |
                [default]
                region = ${AWS::Region}
              owner: ubuntu:ubuntu
            - path: /root/.aws/config
              content: |
                [default]
                region = ${AWS::Region}
            - path: /home/ubuntu/ssl_certificate/ssl.pem
              content: |
                -----BEGIN CERTIFICATE-----
                MIIDEjCCAfoCCQCwU84b/lc2gjANBgkqhkiG9w0BAQsFADBLMQswCQYDVQQGEwJV
                UzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNU2FuIEZyYW5jaXNjbzEP
                MA0GA1UECgwGRXRsZWFwMB4XDTIwMDYwNTAxMDEzNVoXDTMwMDYwMzAxMDEzNVow
                SzELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWExFjAUBgNVBAcMDVNh
                biBGcmFuY2lzY28xDzANBgNVBAoMBkV0bGVhcDCCASIwDQYJKoZIhvcNAQEBBQAD
                ggEPADCCAQoCggEBANbRtGKkwUY0LJ32u1p/lm0FcUnzCFP00o8Y3X10rB9j0kPF
                daKd+o1dIAfrD9FPjG/cZCRY0A2jGhngp/zQ9j8zMF0mUJX1q2Ub8yD6dDUL9KRW
                T3Zhr5h35T4FFcF6W/iiFT0L11xdSP6nsQFsKXan1ewp/RRCzXIx2mOyiQ7EkeaR
                k8meEQXWygk4y1ivfMrZdJQa8EnzMHrnPnSr/8HZB0DAjhXi+H4XcOgsVD8Fjbcj
                0BRk12YP278lcygekVYndr9YTvphKBBlTeVPqSrWzFIJV7e/9PR9NGyOga2A6dQ2
                ZGvvLZ0KK9ivAh7Hxatk+TjxFtvqWKKORAR19c8CAwEAATANBgkqhkiG9w0BAQsF
                AAOCAQEABaGzI5PVlrIkG/RVY/5IQYKN6Wm09FhDA6ocFCDKW0C9lf28GSximxEW
                KTH/DB/FyTK19y7UygM4Qw9eknFT7oNlZABd4fvBjBHwxfNNd53IOaEVn56As8jv
                g2jExvgv7/i62K2KE1zXI0P8SoOLyWXiYlo2uvyLzv21dNBWRAyOd9cpNndq7YsK
                qqWW0jUyL1dpytJ4Czw8O+1UiAP3oK61k1hepZMPtrdKUZIbhGNnoCiZrfkb715Q
                c04YhqhUzaCmm+Ui1KxJfGrheLNind0YV3udwdMAHVQninKvTCC0Rp5SwrwvC72x
                IdrMAzUSKCQ8sKWUzcq8ddquBFP9nA==
                -----END CERTIFICATE-----
              owner: ubuntu:ubuntu
            - path: /home/ubuntu/ssl_certificate/ssl.key
              content: |
                -----BEGIN PRIVATE KEY-----
                MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDW0bRipMFGNCyd
                9rtaf5ZtBXFJ8whT9NKPGN19dKwfY9JDxXWinfqNXSAH6w/RT4xv3GQkWNANoxoZ
                4Kf80PY/MzBdJlCV9atlG/Mg+nQ1C/SkVk92Ya+Yd+U+BRXBelv4ohU9C9dcXUj+
                p7EBbCl2p9XsKf0UQs1yMdpjsokOxJHmkZPJnhEF1soJOMtYr3zK2XSUGvBJ8zB6
                5z50q//B2QdAwI4V4vh+F3DoLFQ/BY23I9AUZNdmD9u/JXMoHpFWJ3a/WE76YSgQ
                ZU3lT6kq1sxSCVe3v/T0fTRsjoGtgOnUNmRr7y2dCivYrwIex8WrZPk48Rbb6lii
                jkQEdfXPAgMBAAECggEAX6WnZ3RsCdIZO4wsBzNfytLtijuHrboINmaf18gnCyLq
                7/nvUqR8dozMQjpLJKsCoJvEitpwaGICsRryMQLpYWJtWkxA/UQROEeljT12mFfm
                aXV0lAUSphRcIa0p7qeIY7/nLPMkxJ9UbO5FRZjfLVG1Uh2v7WGBECNaVaGcnNHf
                entkz6Q2XW2OwGeMNlPXc4d00xPYjqHkF6uzlyBDRT4PwYLZEz4A0pL/YIB2PpOj
                ySGRwBOV/y/gDgn6+RhUXYi7U8e6RGMsqBAFiIYL81ApLuQKqIsQXHHV8UfdTxNJ
                hsdvgNU7UC7eSENOv6Gx0eUmj6OILZHfZTkgaUwMIQKBgQD/j3oDN1nDFfZ2LXoz
                W5EPx5AoNdgLvqKmEVaTRTq3VjoSXk+EvbJKmpPy9Xif8tjfYm+tDd1lhgzRw3U2
                Yg/YTYCmgkM2qLiQbhtbMLnltmteKYKKidOYRjer81vXwHJ7+giyCB68kxtATN4e
                wpo3o5lYzALjorVV/k0mYwCMiwKBgQDXMEojpxFVHdkhzJl13MNYWU7FB3i6V1sv
                VWOC1tXNTXb6OOv6YHHqaxPhcJSNmVOT7z1Azfu5KKMRTPrezdGvHxDs+ZKaXvIs
                FQAZcVn2L8cWb3AVQRqSKoPWJBUpz/6Y24nmZQk4UR3sJn1pY0NDrEh7XGIuuNIT
                dXiwHukQTQKBgQDp7hXL1+DMmNAQATT4yfqRLSWiCReIOKp9xSUwjZBfvghORBIZ
                +eK4M6L2JQiTsSIf6OU8zZI5mmklofsrGrxSTS9UO6z23Z6EZqWX5ZRk14SUnv6l
                feA4ZR4UwiDx73FcVtWa0aABEc9CHpq8IXo1MAXwqF6ErK2815kbaEhaXQKBgQDW
                ANg6jLPYCk8eJfOYG2zKOEb1+3A9IRM2B51nSXBnNFrWjjVgUvn3P3YOBYA3MfzE
                anBoOnHUum0xj3UOj3GwzxxuD+WUUEhXPqtSoj/tbaZ40WqOOKjMJCvokwnZA1kX
                e32w+1on/8PaToz6ehUy/+s1g7LA9F03rOPRg2wVIQKBgQDiuph/Mb5HyMH2YTUV
                5Jnv6Ro2RDo0wD+MIvGCeDSKjhMP/CTxdE6AyTveE5fQXOdAs7RSgoD34HA/xnnC
                sfD5NsU9GcHfSYi1FVsusujN30lqrdjDKfXO4/spKtn9/2K1BwWTduw2NE4BPCE5
                W5MvOAw81WlRadDCGWeTxGEF/Q==
                -----END PRIVATE KEY-----
              owner: ubuntu:ubuntu
            - path: /home/ubuntu/db-init.sh
              content: |
                #!/bin/bash -e

                DB_ROOT_PASSWORD=$1
                ETLEAP_DB_PASSWORD=$2
                SALESFORCE_DB_PASSWORD=$3
                ORG_NAME=$4

                mysql -h$ETLEAP_RDS_HOSTNAME -uroot -p$DB_ROOT_PASSWORD <<EOF
                CREATE DATABASE IF NOT EXISTS etleap;
                GRANT ALL PRIVILEGES ON etleap.* TO 'etleap-prod'@'%' IDENTIFIED BY "$ETLEAP_DB_PASSWORD";

                CREATE DATABASE IF NOT EXISTS salesforce;
                USE salesforce;
                GRANT ALL PRIVILEGES ON salesforce.* TO 'salesforce'@'%' IDENTIFIED BY "$SALESFORCE_DB_PASSWORD";
                CREATE TABLE IF NOT EXISTS jobs (id bigint(20) NOT NULL AUTO_INCREMENT,
                  user_hash varchar(64) NOT NULL,
                  job_id varchar(64) NOT NULL,
                  first_batch_id varchar(64),
                  query_hash varchar(64) NOT NULL,
                  bulk_api_calls int(11) NOT NULL,
                  failed tinyint(1) NOT NULL DEFAULT 0,
                  create_date datetime NOT NULL,
                  PRIMARY KEY (id),
                  UNIQUE KEY (user_hash, job_id),
                  INDEX user_hash_create_date (user_hash, create_date)
                ) ENGINE=InnoDB;

                FLUSH PRIVILEGES;

                EOF

                exit 0
              owner: ubuntu:ubuntu
              permissions: "0755"
            - path: /home/ubuntu/.etleap
              content: |
                export CUSTOMER_VPC=1
                export ETLEAP_DEPLOYMENT_ID=${DeploymentId}
                export USE_PROD_SECRETS=0
                export JOB_ROLE=customer_job,monitor
                export ETLEAP_DB_PASSWORD="$(aws secretsmanager get-secret-value --secret-id ${EtleapDBPassword} | jq -r .SecretString)"
                export SALESFORCE_DB_PASSWORD="$(aws secretsmanager get-secret-value --secret-id ${EtleapDBSalesforcePassword} | jq -r .SecretString)"
                export ETLEAP_HOSTS_ALLOWED="${PublicHostnameOrIp}"
                export FRONT_END_HOSTNAME="${PublicHostnameOrIp}"
                export ETLEAP_FRONT_END_URL="https://${PublicHostnameOrIp}/"
                export ETLEAP_CORS_ALLOWED_ORIGINS="https://${PublicHostnameOrIp}"
                export API_HOSTNAME="${PublicHostnameOrIp}"
                export API_URL="https://$API_HOSTNAME/"
                export ETLEAP_BASE_URL=$API_URL
                export ETLEAP_CONF_FILE=/opt/etleap/prod-customervpc.conf
                export ETLEAP_HTTP_SESSION_DOMAIN="${PublicHostnameOrIp}"
                export ETLEAP_KMS_KEY_VIRGINIA="${EtleapKMS}"
                export ETLEAP_SETUP_FIRST_NAME="${FirstName}"
                export ETLEAP_SETUP_LAST_NAME="${LastName}"
                export ETLEAP_SETUP_EMAIL="${Email}"
                export ETLEAP_SETUP_PASSWORD="${EtleapSetupPassword}"
                export ETLEAP_SETUP_ADMIN_PASSWORD="$(aws secretsmanager get-secret-value --secret-id ${EtleapAdminPassword} | jq -r .SecretString)"
                export ETLEAP_SETUP_INTERMEDIATE_BUCKET=${S3IntermediateBucket}
                export ETLEAP_SETUP_INTERMEDIATE_ROLE_ARN="${S3IntermediateRole}"
                export ENABLE_YSJES='true'
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



templates/etleap-main.yaml [998:1130]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      UserData: !Base64
        "Fn::Sub":
          - |
            #cloud-config
            # -*- YAML -*-
            apt_upgrade: true
            locale: en_US.UTF-8

            write_files:
            - path: /home/ubuntu/.aws/config
              content: |
                [default]
                region = ${AWS::Region}
              owner: ubuntu:ubuntu
            - path: /root/.aws/config
              content: |
                [default]
                region = ${AWS::Region}
            - path: /home/ubuntu/ssl_certificate/ssl.pem
              content: |
                -----BEGIN CERTIFICATE-----
                MIIDEjCCAfoCCQCwU84b/lc2gjANBgkqhkiG9w0BAQsFADBLMQswCQYDVQQGEwJV
                UzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNU2FuIEZyYW5jaXNjbzEP
                MA0GA1UECgwGRXRsZWFwMB4XDTIwMDYwNTAxMDEzNVoXDTMwMDYwMzAxMDEzNVow
                SzELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWExFjAUBgNVBAcMDVNh
                biBGcmFuY2lzY28xDzANBgNVBAoMBkV0bGVhcDCCASIwDQYJKoZIhvcNAQEBBQAD
                ggEPADCCAQoCggEBANbRtGKkwUY0LJ32u1p/lm0FcUnzCFP00o8Y3X10rB9j0kPF
                daKd+o1dIAfrD9FPjG/cZCRY0A2jGhngp/zQ9j8zMF0mUJX1q2Ub8yD6dDUL9KRW
                T3Zhr5h35T4FFcF6W/iiFT0L11xdSP6nsQFsKXan1ewp/RRCzXIx2mOyiQ7EkeaR
                k8meEQXWygk4y1ivfMrZdJQa8EnzMHrnPnSr/8HZB0DAjhXi+H4XcOgsVD8Fjbcj
                0BRk12YP278lcygekVYndr9YTvphKBBlTeVPqSrWzFIJV7e/9PR9NGyOga2A6dQ2
                ZGvvLZ0KK9ivAh7Hxatk+TjxFtvqWKKORAR19c8CAwEAATANBgkqhkiG9w0BAQsF
                AAOCAQEABaGzI5PVlrIkG/RVY/5IQYKN6Wm09FhDA6ocFCDKW0C9lf28GSximxEW
                KTH/DB/FyTK19y7UygM4Qw9eknFT7oNlZABd4fvBjBHwxfNNd53IOaEVn56As8jv
                g2jExvgv7/i62K2KE1zXI0P8SoOLyWXiYlo2uvyLzv21dNBWRAyOd9cpNndq7YsK
                qqWW0jUyL1dpytJ4Czw8O+1UiAP3oK61k1hepZMPtrdKUZIbhGNnoCiZrfkb715Q
                c04YhqhUzaCmm+Ui1KxJfGrheLNind0YV3udwdMAHVQninKvTCC0Rp5SwrwvC72x
                IdrMAzUSKCQ8sKWUzcq8ddquBFP9nA==
                -----END CERTIFICATE-----
              owner: ubuntu:ubuntu
            - path: /home/ubuntu/ssl_certificate/ssl.key
              content: |
                -----BEGIN PRIVATE KEY-----
                MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDW0bRipMFGNCyd
                9rtaf5ZtBXFJ8whT9NKPGN19dKwfY9JDxXWinfqNXSAH6w/RT4xv3GQkWNANoxoZ
                4Kf80PY/MzBdJlCV9atlG/Mg+nQ1C/SkVk92Ya+Yd+U+BRXBelv4ohU9C9dcXUj+
                p7EBbCl2p9XsKf0UQs1yMdpjsokOxJHmkZPJnhEF1soJOMtYr3zK2XSUGvBJ8zB6
                5z50q//B2QdAwI4V4vh+F3DoLFQ/BY23I9AUZNdmD9u/JXMoHpFWJ3a/WE76YSgQ
                ZU3lT6kq1sxSCVe3v/T0fTRsjoGtgOnUNmRr7y2dCivYrwIex8WrZPk48Rbb6lii
                jkQEdfXPAgMBAAECggEAX6WnZ3RsCdIZO4wsBzNfytLtijuHrboINmaf18gnCyLq
                7/nvUqR8dozMQjpLJKsCoJvEitpwaGICsRryMQLpYWJtWkxA/UQROEeljT12mFfm
                aXV0lAUSphRcIa0p7qeIY7/nLPMkxJ9UbO5FRZjfLVG1Uh2v7WGBECNaVaGcnNHf
                entkz6Q2XW2OwGeMNlPXc4d00xPYjqHkF6uzlyBDRT4PwYLZEz4A0pL/YIB2PpOj
                ySGRwBOV/y/gDgn6+RhUXYi7U8e6RGMsqBAFiIYL81ApLuQKqIsQXHHV8UfdTxNJ
                hsdvgNU7UC7eSENOv6Gx0eUmj6OILZHfZTkgaUwMIQKBgQD/j3oDN1nDFfZ2LXoz
                W5EPx5AoNdgLvqKmEVaTRTq3VjoSXk+EvbJKmpPy9Xif8tjfYm+tDd1lhgzRw3U2
                Yg/YTYCmgkM2qLiQbhtbMLnltmteKYKKidOYRjer81vXwHJ7+giyCB68kxtATN4e
                wpo3o5lYzALjorVV/k0mYwCMiwKBgQDXMEojpxFVHdkhzJl13MNYWU7FB3i6V1sv
                VWOC1tXNTXb6OOv6YHHqaxPhcJSNmVOT7z1Azfu5KKMRTPrezdGvHxDs+ZKaXvIs
                FQAZcVn2L8cWb3AVQRqSKoPWJBUpz/6Y24nmZQk4UR3sJn1pY0NDrEh7XGIuuNIT
                dXiwHukQTQKBgQDp7hXL1+DMmNAQATT4yfqRLSWiCReIOKp9xSUwjZBfvghORBIZ
                +eK4M6L2JQiTsSIf6OU8zZI5mmklofsrGrxSTS9UO6z23Z6EZqWX5ZRk14SUnv6l
                feA4ZR4UwiDx73FcVtWa0aABEc9CHpq8IXo1MAXwqF6ErK2815kbaEhaXQKBgQDW
                ANg6jLPYCk8eJfOYG2zKOEb1+3A9IRM2B51nSXBnNFrWjjVgUvn3P3YOBYA3MfzE
                anBoOnHUum0xj3UOj3GwzxxuD+WUUEhXPqtSoj/tbaZ40WqOOKjMJCvokwnZA1kX
                e32w+1on/8PaToz6ehUy/+s1g7LA9F03rOPRg2wVIQKBgQDiuph/Mb5HyMH2YTUV
                5Jnv6Ro2RDo0wD+MIvGCeDSKjhMP/CTxdE6AyTveE5fQXOdAs7RSgoD34HA/xnnC
                sfD5NsU9GcHfSYi1FVsusujN30lqrdjDKfXO4/spKtn9/2K1BwWTduw2NE4BPCE5
                W5MvOAw81WlRadDCGWeTxGEF/Q==
                -----END PRIVATE KEY-----
              owner: ubuntu:ubuntu
            - path: /home/ubuntu/db-init.sh
              content: |
                #!/bin/bash -e

                DB_ROOT_PASSWORD=$1
                ETLEAP_DB_PASSWORD=$2
                SALESFORCE_DB_PASSWORD=$3
                ORG_NAME=$4

                mysql -h$ETLEAP_RDS_HOSTNAME -uroot -p$DB_ROOT_PASSWORD <<EOF
                CREATE DATABASE IF NOT EXISTS etleap;
                GRANT ALL PRIVILEGES ON etleap.* TO 'etleap-prod'@'%' IDENTIFIED BY "$ETLEAP_DB_PASSWORD";

                CREATE DATABASE IF NOT EXISTS salesforce;
                USE salesforce;
                GRANT ALL PRIVILEGES ON salesforce.* TO 'salesforce'@'%' IDENTIFIED BY "$SALESFORCE_DB_PASSWORD";
                CREATE TABLE IF NOT EXISTS jobs (id bigint(20) NOT NULL AUTO_INCREMENT,
                  user_hash varchar(64) NOT NULL,
                  job_id varchar(64) NOT NULL,
                  first_batch_id varchar(64),
                  query_hash varchar(64) NOT NULL,
                  bulk_api_calls int(11) NOT NULL,
                  failed tinyint(1) NOT NULL DEFAULT 0,
                  create_date datetime NOT NULL,
                  PRIMARY KEY (id),
                  UNIQUE KEY (user_hash, job_id),
                  INDEX user_hash_create_date (user_hash, create_date)
                ) ENGINE=InnoDB;

                FLUSH PRIVILEGES;

                EOF

                exit 0
              owner: ubuntu:ubuntu
              permissions: "0755"
            - path: /home/ubuntu/.etleap
              content: |
                export CUSTOMER_VPC=1
                export ETLEAP_DEPLOYMENT_ID=${DeploymentId}
                export USE_PROD_SECRETS=0
                export JOB_ROLE=customer_job,monitor
                export ETLEAP_DB_PASSWORD="$(aws secretsmanager get-secret-value --secret-id ${EtleapDBPassword} | jq -r .SecretString)"
                export SALESFORCE_DB_PASSWORD="$(aws secretsmanager get-secret-value --secret-id ${EtleapDBSalesforcePassword} | jq -r .SecretString)"
                export ETLEAP_HOSTS_ALLOWED="${PublicHostnameOrIp}"
                export FRONT_END_HOSTNAME="${PublicHostnameOrIp}"
                export ETLEAP_FRONT_END_URL="https://${PublicHostnameOrIp}/"
                export ETLEAP_CORS_ALLOWED_ORIGINS="https://${PublicHostnameOrIp}"
                export API_HOSTNAME="${PublicHostnameOrIp}"
                export API_URL="https://$API_HOSTNAME/"
                export ETLEAP_BASE_URL=$API_URL
                export ETLEAP_CONF_FILE=/opt/etleap/prod-customervpc.conf
                export ETLEAP_HTTP_SESSION_DOMAIN="${PublicHostnameOrIp}"
                export ETLEAP_KMS_KEY_VIRGINIA="${EtleapKMS}"
                export ETLEAP_SETUP_FIRST_NAME="${FirstName}"
                export ETLEAP_SETUP_LAST_NAME="${LastName}"
                export ETLEAP_SETUP_EMAIL="${Email}"
                export ETLEAP_SETUP_PASSWORD="${EtleapSetupPassword}"
                export ETLEAP_SETUP_ADMIN_PASSWORD="$(aws secretsmanager get-secret-value --secret-id ${EtleapAdminPassword} | jq -r .SecretString)"
                export ETLEAP_SETUP_INTERMEDIATE_BUCKET=${S3IntermediateBucket}
                export ETLEAP_SETUP_INTERMEDIATE_ROLE_ARN="${S3IntermediateRole}"
                export ENABLE_YSJES='true'
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



