DeployFast

SETUP ROUTE53

DEPLOY APPLICATION

MAINTAIN APP & INFRA

DEPLOY APPLICATION

Launch App

Warning Messages During Deployment

When you deploy applications using the ./deployfast.sh script, you might see the following warning messages. These messages are normal and can be safely ignored.

Message One (before script runs):

Warning: Resource targeting is in effect.

You are creating a plan with the -target option, which means that the result of this plan may not represent all of the changes requested by the current configuration.

The -target option is not for routine use, and is provided only for exceptional situations such as recovering from errors or mistakes, or when Terraform specifically suggests to use it as part of an error message.

Message Two (after script runs):

Warning: Applied changes may be incomplete

The plan was created with the -target option in effect, so some changes requested in the configuration may have been ignored and the output values may not be fully updated.

Run the following command to verify that no other changes are pending: terraform plan

Note that the -target option is not suitable for routine use, and is provided only for exceptional situations such as recovering from errors or mistakes, or when Terraform specifically suggests to use it as part of an error message.

These warnings are part of the normal deployment process with this script. They do not indicate an issue with your deployment. Please ignore them and proceed with your work.

You're now ready to run the second script

You've successfully configured your deploy app variables. Now it's time to run the second script to set up your infrastructure and deploy your application.

Once you run each command, the script will become executable, and your domain's A record, load balancer, secrets manager, CodePipeline (CI/CD), Elastic Beanstalk, and Docker container will be set up. A Docker image of your application will also be pushed to DockerHub.

In your terminal, run the following commands one by one from your deployfast root directory:

terminal

Command prints your current working directory. If it shows that you are in your "deployfast" root directory, you can proceed to run the next command.

pwd

terminal

Grants execute permission to the script

chmod +x deployfast.sh

terminal

Executes the script to build your infrastructure

./deployfast.sh

Importatnt


Avoid Redundant HTTPS Certificate and DNS Records Initialization

After running ./deployfast.sh, do not re-run ./create_acm_route53.sh. If you need to make changes to your HTTPS Certificate or DNS records, simply update the prod.tfvars file and re-run ./deployfast.sh. This will ensure that all updates are applied in a single step.

Warning: Missing Variables in prod.tfvars

When you run the ./deployfast.sh script and see a message asking for a value for a variable like stripe_public_key, it indicates that this key is missing in your prod.tfvars . This typically happens when a variable defined in the variables.tf and locals.tf files has not been provided a value in your prod.tfvars file.

var.stripe_public_key
  Stripe Public Key

Enter a value:

To resolve this, press Cmd + C on Mac or Ctrl + C on Windows to exit the script. You will see the following message:

Interrupt received.
Please wait for Terraform to exit or data loss may occur.
Gracefully shutting down...

Error: No value for required variable
 on variables.tf line 146:

146: variable "stripe_public_key" 
The root module input

variable "stripe_public_key" is not set, and has no default value. Use a -var or -var-file command
line argument to provide a value for this variable.

Do you want to proceed with applying the Terraform plan? Type "yes" to continue:

Type no to exit, add the missing key and value to your prod.tfvars file, and then re-run the script.