Skip to content

Commit 2669773

Browse files
authored
feat: web app initial commit (#13)
* feat: initial code for da feat: initial code for da feat: initial code for da feat: initial code for da * init commit * init commit * init commit * added folder * cra ignore rules * cra ignore rules * default sample app to false * default sample app to false * add resource tags variable * prefix length * prefix length * SKIP UPGRADE TEST * move to solutions dir
1 parent 5f55038 commit 2669773

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+4145
-354
lines changed

.secrets.baseline

Lines changed: 117 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"files": "go.sum|^.secrets.baseline$",
44
"lines": null
55
},
6-
"generated_at": "2023-12-09T06:39:44Z",
6+
"generated_at": "2024-06-13T19:58:20Z",
77
"plugins_used": [
88
{
99
"name": "AWSKeyDetector"
@@ -76,7 +76,122 @@
7676
"name": "TwilioKeyDetector"
7777
}
7878
],
79-
"results": {},
79+
"results": {
80+
"solutions/e2e/templates/web-tier-init-tmplt.tftpl": [
81+
{
82+
"hashed_secret": "6235e904bcd8535d8bf5b7c3ef87afa7c21d5ed9",
83+
"is_secret": false,
84+
"is_verified": false,
85+
"line_number": 44,
86+
"type": "Base64 High Entropy String",
87+
"verified_result": null
88+
},
89+
{
90+
"hashed_secret": "ae497b0268a38a3e6c1390baf56f91f7015dc50f",
91+
"is_secret": false,
92+
"is_verified": false,
93+
"line_number": 45,
94+
"type": "Base64 High Entropy String",
95+
"verified_result": null
96+
},
97+
{
98+
"hashed_secret": "474ef2f046dca2a4895eb5f280839bf6160f0132",
99+
"is_secret": false,
100+
"is_verified": false,
101+
"line_number": 46,
102+
"type": "Base64 High Entropy String",
103+
"verified_result": null
104+
},
105+
{
106+
"hashed_secret": "05b44b38e974221fa67b37e097593c2da7aaf006",
107+
"is_secret": false,
108+
"is_verified": false,
109+
"line_number": 47,
110+
"type": "Base64 High Entropy String",
111+
"verified_result": null
112+
},
113+
{
114+
"hashed_secret": "bd0abd68140d64b19aa1e869d90f195157c9cae0",
115+
"is_secret": false,
116+
"is_verified": false,
117+
"line_number": 48,
118+
"type": "Base64 High Entropy String",
119+
"verified_result": null
120+
},
121+
{
122+
"hashed_secret": "c819bfb777b1a5094c98f6ab973afa08a64e8924",
123+
"is_secret": false,
124+
"is_verified": false,
125+
"line_number": 49,
126+
"type": "Base64 High Entropy String",
127+
"verified_result": null
128+
},
129+
{
130+
"hashed_secret": "8b994f82cf3b0ceb82627495d16172f2d67f1013",
131+
"is_secret": false,
132+
"is_verified": false,
133+
"line_number": 50,
134+
"type": "Base64 High Entropy String",
135+
"verified_result": null
136+
},
137+
{
138+
"hashed_secret": "0c069d6d2e6300200de7fa11ca5e765e09841a23",
139+
"is_secret": false,
140+
"is_verified": false,
141+
"line_number": 51,
142+
"type": "Base64 High Entropy String",
143+
"verified_result": null
144+
},
145+
{
146+
"hashed_secret": "586339f74a4656604577622995f36cf84278f608",
147+
"is_secret": false,
148+
"is_verified": false,
149+
"line_number": 52,
150+
"type": "Base64 High Entropy String",
151+
"verified_result": null
152+
},
153+
{
154+
"hashed_secret": "5afc7fb8c9927f2c11767190a378d4544ec1db1b",
155+
"is_secret": false,
156+
"is_verified": false,
157+
"line_number": 53,
158+
"type": "Base64 High Entropy String",
159+
"verified_result": null
160+
},
161+
{
162+
"hashed_secret": "bb140e22f846ff4f24f84c2bfce1254507936775",
163+
"is_secret": false,
164+
"is_verified": false,
165+
"line_number": 54,
166+
"type": "Base64 High Entropy String",
167+
"verified_result": null
168+
},
169+
{
170+
"hashed_secret": "3cdcc0e0f07e981eba21aef9cbe5a932e0fa1382",
171+
"is_secret": false,
172+
"is_verified": false,
173+
"line_number": 55,
174+
"type": "Base64 High Entropy String",
175+
"verified_result": null
176+
},
177+
{
178+
"hashed_secret": "39a789e5c094470afa97883f3303a35a12b9da9c",
179+
"is_secret": false,
180+
"is_verified": false,
181+
"line_number": 56,
182+
"type": "Base64 High Entropy String",
183+
"verified_result": null
184+
},
185+
{
186+
"hashed_secret": "33ba075473fac188552ccd9938e0f024178ff9fc",
187+
"is_secret": false,
188+
"is_verified": false,
189+
"line_number": 58,
190+
"type": "Base64 High Entropy String",
191+
"verified_result": null
192+
}
193+
]
194+
},
80195
"version": "0.13.1+ibm.62.dss",
81196
"word_list": {
82197
"file": null,

README.md

Lines changed: 5 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!-- Update this title with a descriptive name. Use sentence case. -->
2-
# Terraform modules template project
2+
# Web app Multi-Zone Resiliency Deployable Architecture
33

44
<!--
55
Update status and "latest release" badges:
@@ -12,109 +12,12 @@ Update status and "latest release" badges:
1212
[![Renovate enabled](https://img.shields.io/badge/renovate-enabled-brightgreen.svg)](https://renovatebot.com/)
1313
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
1414

15-
<!--
16-
Add a description of modules in this repo.
17-
Expand on the repo short description in the .github/settings.yml file.
18-
19-
For information, see "Module names and descriptions" at
20-
https://terraform-ibm-modules.github.io/documentation/#/implementation-guidelines?id=module-names-and-descriptions
21-
-->
22-
23-
TODO: Replace this with a description of the modules in this repo.
24-
25-
26-
<!-- The following content is automatically populated by the pre-commit hook -->
27-
<!-- BEGIN OVERVIEW HOOK -->
28-
## Overview
29-
* [terraform-ibm-web-app-mzr-da](#terraform-ibm-web-app-mzr-da)
30-
* [Examples](./examples)
31-
* [Advanced example](./examples/advanced)
32-
* [Basic example](./examples/basic)
33-
* [Contributing](#contributing)
34-
<!-- END OVERVIEW HOOK -->
35-
36-
37-
<!--
38-
If this repo contains any reference architectures, uncomment the heading below and link to them.
39-
(Usually in the `/reference-architectures` directory.)
40-
See "Reference architecture" in the public documentation at
41-
https://terraform-ibm-modules.github.io/documentation/#/implementation-guidelines?id=reference-architecture
42-
-->
43-
<!-- ## Reference architectures -->
44-
45-
46-
<!-- Replace this heading with the name of the root level module (the repo name) -->
47-
## terraform-ibm-web-app-mzr-da
48-
49-
### Usage
50-
51-
<!--
52-
Add an example of the use of the module in the following code block.
53-
54-
Use real values instead of "var.<var_name>" or other placeholder values
55-
unless real values don't help users know what to change.
56-
-->
57-
58-
```hcl
59-
60-
```
61-
62-
### Required IAM access policies
63-
64-
<!-- PERMISSIONS REQUIRED TO RUN MODULE
65-
If this module requires permissions, uncomment the following block and update
66-
the sample permissions, following the format.
67-
Replace the sample Account and IBM Cloud service names and roles with the
68-
information in the console at
69-
Manage > Access (IAM) > Access groups > Access policies.
70-
-->
71-
72-
<!--
73-
You need the following permissions to run this module:
74-
75-
- IAM services
76-
- **Sample IBM Cloud** service
77-
- `Editor` platform access
78-
- `Manager` platform access
79-
- Account management services
80-
- **Sample account management** service
81-
- `Editor` platform access
82-
-->
83-
84-
<!-- NO PERMISSIONS FOR MODULE
85-
If no permissions are required for the module, uncomment the following
86-
statement instead the previous block.
87-
-->
88-
89-
<!-- No permissions are needed to run this module.-->
90-
91-
92-
<!-- The following content is automatically populated by the pre-commit hook -->
93-
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
94-
### Requirements
95-
96-
| Name | Version |
97-
|------|---------|
98-
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3.0 |
99-
100-
### Modules
101-
102-
No modules.
103-
104-
### Resources
105-
106-
No resources.
107-
108-
### Inputs
109-
110-
No inputs.
111-
112-
### Outputs
15+
This repository contains the following infrastructure as code solutions:
16+
- [Web app Multi-Zone Resiliency Deployable Architecture](./solutions/e2e)
11317

114-
No outputs.
115-
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
18+
**NB:** These solutions are not intended to be called by one or more other modules since they contain a provider configurations, meaning they are not compatible with the `for_each`, `count`, and `depends_on` arguments. For more information see [Providers Within Modules](https://developer.hashicorp.com/terraform/language/modules/develop/providers)
11619

117-
<!-- Leave this section as is so that your module has a link to local development environment set-up steps for contributors to follow -->
20+
<!-- Leave this section as is so that your module has a link to local development environment set up steps for contributors to follow -->
11821
## Contributing
11922

12023
You can report issues and request features for this module in GitHub issues in the module repo. See [Report an issue or request a feature](https://github.com/terraform-ibm-modules/.github/blob/main/.github/SUPPORT.md).

cra-config.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
# More info about this file at https://github.com/terraform-ibm-modules/common-pipeline-assets/blob/main/.github/workflows/terraform-test-pipeline.md#cra-config-yaml
22
version: "v1"
33
CRA_TARGETS:
4-
- CRA_TARGET: "examples/advanced" # Target directory for CRA scan. If not provided, the CRA Scan will not be run.
4+
- CRA_TARGET: "solutions/e2e" # Target directory for CRA scan. If not provided, the CRA Scan will not be run.
55
CRA_IGNORE_RULES_FILE: "cra-tf-validate-ignore-rules.json" # CRA Ignore file to use. If not provided, it checks the repo root directory for `cra-tf-validate-ignore-rules.json`
66
PROFILE_ID: "0e6e7b5a-817d-4344-ab6f-e5d7a9c49520" # SCC profile ID (currently set to the FSCloud 1.4.0 profile).
77
# SCC_INSTANCE_ID: "" # The SCC instance ID to use to download profile for CRA scan. If not provided, a default global value will be used.
88
# SCC_REGION: "" # The IBM Cloud region that the SCC instance is in. If not provided, a default global value will be used.
9-
# CRA_ENVIRONMENT_VARIABLES: # An optional map of environment variables for CRA, where the key is the variable name and value is the value. Useful for providing TF_VARs.
10-
# TF_VAR_sample: "sample value"
11-
# TF_VAR_other: "another value"
9+
CRA_ENVIRONMENT_VARIABLES: # An optional map of environment variables for CRA, where the key is the variable name and value is the value. Useful for providing TF_VARs.
10+
TF_VAR_prefix: "web-app"
11+
TF_VAR_region: "us-east"
12+
TF_VAR_ssh_key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDb8qoH4U47+79ssT6FdsOIxxZY8/oxWc66WPwqHfpjCgDRP3Rc1uq2YEKIRJba2DzNFnf+byinH0O9hwjKZ/3l7HxNtvQZXdCnT79TOT/wGbcHBV8ZUTBkUOx67ryS0F5bKDdMDWdsWkMXkRb8AAsJWLAeuFsfMYQjMBLmvrMsRRB6GG+97jF18ghqHjuBTX1FNF9fcytEaz7WfP8KrgSYRcQOauIVlMJyOmh3gZl84u14SXwQKhQrdvqt47ZErKH+fbsgxfOvvmYgr5RktKjbmi+lyBkxRM7//BaKcPw5saThf1MiEesJxIqyL16DW9LXdWei74xHNuF65K03y975Qr9CtPkr1rGgxwU2ksqLy1NN5TnF4erd1VSuLZ5BLov7JRJ2K17ttt0agp9VmkjRFIivOek= some-user@testing-box"
13+
TF_VAR_ssh_private_key: "some_key"

cra-tf-validate-ignore-rules.json

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,34 @@
11
{
2-
"scc_rules": []
2+
"scc_rules": [
3+
{
4+
"scc_rule_id": "rule-0e5151b1-9caf-433c-b4e5-be3d505e458e",
5+
"description": "Check whether Application Load Balancer for VPC is configured with multiple members in the pool",
6+
"ignore_reason": "This rule is not relevant to since the autoscale vsi are not attached at provision time",
7+
"is_valid": true
8+
},
9+
{
10+
"scc_rule_id": "rule-8c923215-afdc-41b1-886c-64ce78741f8c",
11+
"description": "Check whether Application Load Balancer for VPC has health check configured when created",
12+
"ignore_reason": "Health check is configured on Application Load Balancer",
13+
"is_valid": true
14+
},
15+
{
16+
"scc_rule_id": "rule-65b61a0f-ffdb-41ba-873d-ad329e7fc0ee",
17+
"description": "Check whether Application Load Balancer for VPC is configured to convert HTTP client requests to HTTPS",
18+
"ignore_reason": "This rule is not relevant since example is using a tcp listener",
19+
"is_valid": true
20+
},
21+
{
22+
"scc_rule_id": "rule-d544f217-3723-4376-b3aa-037c5f201e8d",
23+
"description": "Check whether Application Load Balancer for VPC uses HTTPS (SSL & TLS) instead of HTTP",
24+
"ignore_reason": "This rule is not relevant since example is using a tcp listener",
25+
"is_valid": true
26+
},
27+
{
28+
"scc_rule_id": "rule-8cbd597c-7471-42bd-9c88-36b2696456e9",
29+
"description": "Check whether Cloud Object Storage network access is restricted to a specific IP range",
30+
"ignore_reason": "In order for this rule to pass, Context Based Restrictions (CBRs) support needs to be added to the module (tracking in https://github.ibm.com/GoldenEye/issues/issues/5626). Even after that is added, there is still a dependency on SCC to support scanning for CBR rules. SCC CBR support is being tracked in https://github.ibm.com/project-fortress/pm/issues/11800.",
31+
"is_valid": true
32+
}
33+
]
334
}

examples/advanced/README.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

examples/advanced/main.tf

Lines changed: 0 additions & 3 deletions
This file was deleted.

examples/advanced/outputs.tf

Lines changed: 0 additions & 23 deletions
This file was deleted.

examples/advanced/provider.tf

Lines changed: 0 additions & 8 deletions
This file was deleted.

examples/advanced/variables.tf

Lines changed: 0 additions & 29 deletions
This file was deleted.

examples/advanced/version.tf

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)