IaC for IAST of OWASP Juice Shop app.
- AWS CLI
- Git
- Terraform
- tfstate S3 bucket with DynamoDB
- Secrets in AWS Secrets Manager to store database user and password
- Add local machine IP address as a variable in your environement
- Add local machine IP address as a GitHub Secret in your repository
- Connect to your AWS account with short-term credentials from AWS IAM
aws configure
AWS Access Key ID [None]: <YOUR_ACCESS_KEY>
AWS Secret Access Key [None]: <YOUR_SECRET_ACCESS_KEY>
Default region name [None]: <REGION>
Default output format [None]: <PREFERRED_FORMAT_SUCH_AS_JSON>
-
Clone this repository in your local machine
git clone <HTTPS/SSH>
-
Go to the repository folder
cd iac-iast-owasp-demo
-
Go to infrastructure folder
cd infrastructure
-
Initialize terraform
terraform init
-
Run terraform plan
terraform plan
-
Deploy resources in AWS
terraform apply
No requirements.
Name | Version |
---|---|
aws | 5.11.0 |
No modules.
Name | Type |
---|---|
aws_db_instance.rds | resource |
aws_db_subnet_group.db_sg | resource |
aws_eip.nat_eip | resource |
aws_iam_instance_profile.instance_profile | resource |
aws_iam_openid_connect_provider.default | resource |
aws_iam_role.github_actions | resource |
aws_iam_role.instance_role | resource |
aws_iam_role_policy_attachment.github_actions_atch | resource |
aws_iam_role_policy_attachment.ssm_policy | resource |
aws_instance.app_server | resource |
aws_internet_gateway.ig_external_vpc | resource |
aws_main_route_table_association.rtb_assoc | resource |
aws_nat_gateway.nat_external_vpc | resource |
aws_route_table.rtb | resource |
aws_security_group.sg | resource |
aws_ssm_activation.ssm_activation | resource |
aws_subnet.subnet | resource |
aws_vpc.vpc | resource |
aws_ami.ubuntu_image | data source |
aws_iam_policy_document.assume_role | data source |
aws_iam_policy_document.github_assume_role_policy | data source |
aws_region.current_region | data source |
aws_secretsmanager_secret.db_secret | data source |
aws_secretsmanager_secret_version.db_secrets | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
my_ip | IP for ssh | any |
n/a | yes |
No outputs.
8333606 - Ignore push of some file when running the pipeline
8bc788b - Ignore push of some file when running the pipeline
280ff4c - Add TF_VAR_my_ip env var to pipeline
d4c00de - Add my_ip env var to pipeline
fc6e417 - Add terraform apply and correct plan in pipeline
This README file was updated on Tue Aug 8 18:24:29 CEST 2023 by Leticia Valladares on this commit