<commit_before># terraform-templates
README: AWS ELB Sandwich with PANFW Deployed using terraform_version

Terraform is a DSL, which allows users to define infrastructure as code, along with the capability to deploy that infrastructure
onto the cloud platform of choice.

1. Terraform Code Overview:

Directory Layout
-----------------

This particular repository has been implemented in order to duplicate the PAN ELB Autoscaling template. Consequently,
there are terraform files which deploys the networking and the various other entities of the alb template. There is also another directory
which provides the definition and deployment of the inner firewall template.

The outer template files are stored in the ```aws/aws_cft``` directory.
The inner template files are stored int he ```aws_modules_version``` directory.

Terraform Specifics
-------------------

The code follows the following Terraform conventions:

a. Variable parameters are specified in the ```terraform.tfvars``` file.
b. Variable are defined in the ```*_vars.tf``` file.
c. The infrastructure definition is specified in the other ```*.tf``` files.

Setting up the AWS Security Credentials:
-----------------------------------------

 - Before applying the terraform templates, setup the AWS credentials.
 - This can be done by the usual methods as prescribed by AWS namely:
    - export the credentials as environment variables
    - Static credentials in a <filename>.tf file
    - Other options are specified at: https://www.terraform.io/docs/providers/aws/index.html

Salient Arguments that need to be set that are user specific:
-------------------------------------------------------------

  - The S3 buckets which contain the PAN bootstrap code as well as the Lambda code need to be specified.
    - Variable: MasterS3Bucket File: ```aws/aws_cft/terraform.tfvars```



Usage Instructions for the Outer Template:
------------------------------------------
1. cd into the aws/aws_cft directory
2. Introspect the ```aws_cft_vars.tf``` file to identify the various variables.
3. Provide the input parameters for these variables either when prompted or in the ```terraform.tfvars``` file.
4. (Assumption: terraform binary executable is in the PATH. If not please add it to the PATH). Run: terraform apply
5. Invoking step 5 above should begin the installation of the artifacts associated with the outer template.
6. Once the deployment has completed, execute: terraform output > ../../aws_modules_version/output.tfvars<commit_msg>Updated the README to include instructions to fetch the correct AMI ID's for the PAN FW's<commit_after># terraform-templates
README: AWS ELB Sandwich with PANFW Deployed using terraform_version

Terraform is a DSL, which allows users to define infrastructure as code, along with the capability to deploy that infrastructure
onto the cloud platform of choice.

1. Terraform Code Overview:

Directory Layout
-----------------

This particular repository has been implemented in order to duplicate the PAN ELB Autoscaling template. Consequently,
there are terraform files which deploys the networking and the various other entities of the alb template. There is also another directory
which provides the definition and deployment of the inner firewall template.

The outer template files are stored in the ```aws/aws_cft``` directory.
The inner template files are stored int he ```aws_modules_version``` directory.

Terraform Specifics
-------------------

The code follows the following Terraform conventions:

a. Variable parameters are specified in the ```terraform.tfvars``` file.
b. Variable are defined in the ```*_vars.tf``` file.
c. The infrastructure definition is specified in the other ```*.tf``` files.

#H1 PreRequisites for Using the Terraform Template

### H3 Identify the right AMI ID's for the PAN FW (depending on the license type desired)
    This can be found at: (https://www.paloaltonetworks.com/documentation/global/compatibility-matrix/vm-series-firewalls/aws-cft-amazon-machine-images-ami-list)

### H3 Identify the right AMI ID's for the Web Server
    The selection depends on a combination of the supported Architectures as well as the desired instance type.

Setting up the AWS Security Credentials:
-----------------------------------------

 - Before applying the terraform templates, setup the AWS credentials.
 - This can be done by the usual methods as prescribed by AWS namely:
    - export the credentials as environment variables
    - Static credentials in a <filename>.tf file
    - Other options are specified at: https://www.terraform.io/docs/providers/aws/index.html

Salient Arguments that need to be set that are user specific:
-------------------------------------------------------------

  - The S3 buckets which contain the PAN bootstrap code as well as the Lambda code need to be specified.
    - Variable: MasterS3Bucket File: ```aws/aws_cft/terraform.tfvars```

  - You will also be required to specify the S3 Bucket which contains the lambda code.
     - You will be prompted for this value when you run the terraform apply command for the inner template.



Usage Instructions for the Outer Template:
------------------------------------------
1. cd into the aws/aws_cft directory
2. Introspect the ```aws_cft_vars.tf``` file to identify the various variables.
3. Provide the input parameters for these variables either when prompted or in the ```terraform.tfvars``` file.
4. (Assumption: terraform binary executable is in the PATH. If not please add it to the PATH). Run: terraform apply
5. Invoking step 5 above should begin the installation of the artifacts associated with the outer template.
6. Once the deployment has completed, execute: terraform output > ../../aws_modules_version/output.tfvars
{'fraction_non_alphanumeric': 0.11805555555555555, 'fraction_numerical': 0.004166666666666667, 'mean_word_length': 3.245394252026529, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 3, 'lorem ipsum': 0, 'www.': 3, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1046566', 'n_tokens_mistral': 1423, 'n_tokens_neox': 1375, 'n_words': 731}