Skip to content

Commit 119602b

Browse files
committed
base files
1 parent 69955c4 commit 119602b

40 files changed

+2350
-1
lines changed
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
---
2+
name: Bug report
3+
about: If something isn't working as expected or documented
4+
labels: type/bug,status/needs-triage
5+
assignees: ''
6+
7+
---
8+
9+
---
10+
name: 🐛 Bug Report
11+
about: If something isn't working as expected or documented
12+
13+
---
14+
15+
## Description
16+
17+
[Provide a clear and concise description of the bug.]
18+
19+
## Steps to Reproduce
20+
21+
1. [First step]
22+
2. [Second step]
23+
3. [Third step]
24+
- [Any sub-steps if applicable]
25+
26+
## Expected Behavior
27+
28+
[Describe what you expected to happen.]
29+
30+
## Actual Behavior
31+
32+
[Describe what actually happened.]
33+
34+
## Screenshots or Videos (if applicable)
35+
36+
[If applicable, add screenshots or videos to help explain the problem.]
37+
38+
## Environment
39+
40+
- Operating System: [e.g. Windows 10, macOS Big Sur, Linux Ubuntu 20.04]
41+
- Browser (if applicable): [e.g. Chrome, Firefox, Safari]
42+
- Version/Commit: [If applicable, specify the version or commit hash where the issue occurred.]
43+
44+
## Additional Information
45+
46+
[Any additional information that may be relevant to the issue. This could include error messages, logs, or any workaround attempted.]
47+
48+
## Reproducibility
49+
50+
[Rate the reproducibility of the bug based on your attempts:
51+
- [ ] Always
52+
- [ ] Sometimes
53+
- [ ] Rarely
54+
- [ ] Unable to Reproduce]
55+
56+
## Priority
57+
58+
[Set the priority of this bug:
59+
- [ ] High
60+
- [ ] Medium
61+
- [ ] Low]
62+
63+
## Related Issues/PRs
64+
65+
[If there are any related issues or pull requests, mention them here.]
66+
67+
## Assignees
68+
69+
[Tag anyone who should be assigned to address this issue.]
70+
71+
## Labels
72+
73+
[Add any relevant labels to categorize this issue.]
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
name: Feature request
3+
about: Ask for an enhancement
4+
labels: type/feature,status/needs-triage
5+
assignees: ''
6+
7+
---
8+
9+
---
10+
name: Feature Request
11+
about: Ask for an enhancement
12+
13+
---
14+
15+
## Description
16+
17+
[Provide a clear and concise description of the new feature you are requesting.]
18+
19+
## Use Case
20+
21+
[Describe the specific use case or scenario where this feature would be beneficial.]
22+
23+
## Proposed Solution
24+
25+
[Outline your proposed solution to implement this feature. If you have any specific ideas or suggestions, include them here.]
26+
27+
## Alternatives Considered
28+
29+
[Discuss any alternative approaches or solutions that were considered, if any.]
30+
31+
## Benefits
32+
33+
[Explain the benefits and advantages of implementing this feature.]
34+
35+
## Drawbacks
36+
37+
[Discuss any potential drawbacks or challenges associated with implementing this feature.]
38+
39+
## Additional Context
40+
41+
[Provide any additional context, background information, or references that may be helpful in understanding and evaluating this feature request.]
42+
43+
## Priority
44+
45+
[Set the priority of this feature request:
46+
- [ ] High
47+
- [ ] Medium
48+
- [ ] Low]
49+
50+
## Related Issues/PRs
51+
52+
[If there are any related issues or pull requests, mention them here.]
53+
54+
## Assignees
55+
56+
[Tag anyone who should be assigned to address this feature request.]
57+
58+
## Labels
59+
60+
[Add any relevant labels to categorize this feature request.]
61+

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "github-actions" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "weekly"

.github/workflows/pull_request.yml

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
name: Pull Request Validation
2+
on:
3+
pull_request:
4+
paths:
5+
- 'terraform/**'
6+
- '.github/**'
7+
8+
jobs:
9+
fmt:
10+
runs-on: ubuntu-latest
11+
env:
12+
TERRAFORM_ENV_BASE64: ${{ secrets.TERRAFORM_ENV_BASE64 }}
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: fmt-check
16+
run: |
17+
terraform fmt -recursive -check .
18+
19+
lint:
20+
needs: [fmt]
21+
runs-on: ubuntu-latest
22+
env:
23+
TERRAFORM_ENV_BASE64: ${{ secrets.TERRAFORM_ENV_BASE64 }}
24+
steps:
25+
- uses: actions/checkout@v4
26+
27+
- uses: terraform-linters/setup-tflint@v4
28+
name: Setup TFLint
29+
with:
30+
tflint_version: latest
31+
32+
- name: tflint
33+
run: |
34+
_branch="${GITHUB_BASE_REF}"
35+
case "${_branch}" in
36+
"prod")
37+
_tfdir=terraform
38+
;;
39+
"qa")
40+
_tfdir=terraform
41+
;;
42+
*)
43+
echo "ERROR: Unknown target branch: ${_branch}"
44+
exit 1
45+
esac
46+
cd ${_tfdir}
47+
echo "***Running terraform lint***"
48+
tflint
49+
50+
validate:
51+
needs: [lint]
52+
name: validate
53+
runs-on: ubuntu-latest
54+
timeout-minutes: 5
55+
env:
56+
TERRAFORM_ENV_BASE64: ${{ secrets.TERRAFORM_ENV_BASE64 }}
57+
steps:
58+
- name: Check out code into the Go module directory
59+
uses: actions/checkout@v4
60+
- uses: hashicorp/setup-terraform@v3
61+
- run: |-
62+
echo $TERRAFORM_ENV_BASE64 | base64 -d > tfvars
63+
source tfvars
64+
_branch="${GITHUB_BASE_REF}"
65+
_tfdir=terraform
66+
export TF_VAR_pingone_environment_name="${_branch}"
67+
case "${_branch}" in
68+
"prod")
69+
_stateKey=${TF_VAR_tf_state_key_prefix}/prod/terraform.tfstate
70+
;;
71+
"qa")
72+
_stateKey=${TF_VAR_tf_state_key_prefix}/qa/terraform.tfstate
73+
;;
74+
*)
75+
echo "ERROR: Unknown target branch: ${_branch}"
76+
exit 1
77+
esac
78+
terraform -chdir=${_tfdir} init \
79+
-backend-config="bucket=$TF_VAR_tf_state_bucket" \
80+
-backend-config="region=$TF_VAR_tf_state_region" \
81+
-backend-config="key=${_stateKey}"
82+
echo "***Running terraform validate***"
83+
terraform -chdir=${_tfdir} validate
84+
85+
trivy:
86+
needs: [validate]
87+
runs-on: ubuntu-latest
88+
env:
89+
TERRAFORM_ENV_BASE64: ${{ secrets.TERRAFORM_ENV_BASE64 }}
90+
steps:
91+
- uses: actions/checkout@v4
92+
- name: Trivy
93+
uses: aquasecurity/trivy-action@master
94+
with:
95+
scan-type: 'config'
96+
hide-progress: false
97+
exit-code: '1'
98+
99+
100+
tfplan:
101+
needs: [validate]
102+
runs-on: ubuntu-latest
103+
env:
104+
TERRAFORM_ENV_BASE64: ${{ secrets.TERRAFORM_ENV_BASE64 }}
105+
steps:
106+
- name: Check out code into the Go module directory
107+
uses: actions/checkout@v4
108+
- uses: hashicorp/setup-terraform@v3
109+
- run: |-
110+
echo $TERRAFORM_ENV_BASE64 | base64 -d > tfvars
111+
source tfvars
112+
_branch="${GITHUB_BASE_REF}"
113+
_tfdir=terraform
114+
export TF_VAR_pingone_environment_name="${_branch}"
115+
case "${_branch}" in
116+
"prod")
117+
_stateKey="${TF_VAR_tf_state_key_prefix}/prod/terraform.tfstate"
118+
export TF_VAR_pingone_target_environment_id="${PINGONE_TARGET_ENVIRONMENT_ID_PROD}"
119+
;;
120+
"qa")
121+
_stateKey="${TF_VAR_tf_state_key_prefix}/qa/terraform.tfstate"
122+
export TF_VAR_pingone_target_environment_id="${PINGONE_TARGET_ENVIRONMENT_ID_QA}"
123+
;;
124+
*)
125+
echo "ERROR: Unknown target branch: ${_branch}"
126+
exit 1
127+
esac
128+
terraform -chdir=${_tfdir} init \
129+
-backend-config="bucket=$TF_VAR_tf_state_bucket" \
130+
-backend-config="region=$TF_VAR_tf_state_region" \
131+
-backend-config="key=${_stateKey}"
132+
echo "***Running terraform plan***"
133+
terraform -chdir=${_tfdir} plan

0 commit comments

Comments
 (0)