Deploy Using Terraform

How to deploy Atlan using Terraform

๐Ÿ“œ Pre Requisites

  • Configure the AWS default profile with appropriate permission. Add this section in your ~/.aws/credentials file.

aws_access_key_id=<Your Access ID>
aws_secret_access_key=<Your Secret key>
aws_session_token=<Your Session Token>
  • Or Execute these commands in your terminal

export AWS_ACCESS_KEY_ID="<Your Access ID>"
export AWS_SECRET_ACCESS_KEY="<Your Secret key>"
export AWS_SESSION_TOKEN="<Your Session Token>"
  • Install terraform CLI.

brew tap hashicorp/tap
brew install terraform
terraform version

๐Ÿ‘€ Note: If you already have an existing key pair, skip the part given below.

  • Create a new key pair on the EC2 section of your AWS Console. Follow the steps given below to do the same:

    • Go to the EC2 section on AWS Console and generate a new key pair with the name "atlan-infra". The key pair is also referred to as KeyName.

    • Once the key pair is created, a file named, "atlan-infra.pem" will be downloaded.

    • Save the downloaded key pair file for future requirements.

New Key Pair in EC2

๐Ÿ› ๏ธ A Step-By-Step Guide for Atlan Cloud Deployment using AWS Terraform

STEP 1: Download the code zip file.

  • Download the zip file containing all the terraform templates from here and extract it.

STEP 2: Open the directory in the terminal.

STEP 3: Define values for parameters.

  • Open terraform.tfvars in your favorite editor and define values for the parameters. You can use default values for most parameters but values have to be defined for the ones listed below:

    • stack_name

    • licenseUrl

    • key_name

  • Save the file.

STEP 4: Initiate the terraform directory.

Initiating the terraform repository will download all the required providers, modules, and resources.

terraform init

STEP 5: Create a plan.

Before starting up with creating the stack create the terraform plan.

terraform plan

STEP 6: Execute the plan.

It will start creating the stack.

terraform apply -var-file=./terraform.tfvars

You will be asked for input after the execution of the above command. Enter yes if the plan is correct.

๐Ÿง™โ€โ™‚๏ธ Remember: Keep the "terraform.tfstate" file generated very safe and do not alter it. If this is deleted then there is no way to update or delete the stack through terraform.

STEP 7: Access the product

Once the stack is successfully created, you will get the following values as output:

  • Release Portal Domain

  • Product Domain

  • Release Portal Password

  • Nat Gateway IP

  • EKS cluster name

  • VPC ID

You can now use the product domain to access the setup page for the product. ๐ŸŽ‰

If you get stuck somewhere or have any further questions, feel free to reach out to us at [email protected]โ€‹