[MOSIP-44628] Updated documentation and flow diagram for terraform profile based workflow#228
[MOSIP-44628] Updated documentation and flow diagram for terraform profile based workflow#228abhishek-1809 wants to merge 13 commits into
Conversation
…ofile based workflow Signed-off-by: abhishek-1809 <abhisahu1920@gmail.com>
…ofile based workflow Signed-off-by: abhishek-1809 <abhisahu1920@gmail.com>
…ofile based workflow Signed-off-by: abhishek-1809 <abhisahu1920@gmail.com>
…ofile based workflow Signed-off-by: abhishek-1809 <abhisahu1920@gmail.com>
…ofile based workflow Signed-off-by: abhishek-1809 <abhisahu1920@gmail.com>
|
Warning Review limit reached
More reviews will be available in 17 minutes and 9 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThis PR updates infrastructure documentation to support profile-based Terraform state isolation across components: state file naming and directory layouts now include profile segments, INFRA_PROFILE workflow parameter added, GH_INFRA_PAT secret guidance added, and workflow, backup, cleanup, and architecture docs revised. ChangesTerraform State Profile Isolation Documentation
Estimated code review effort: Possibly related PRs:
Suggested reviewers:
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (3)
.github/workflows/README.md (1)
172-190:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winProfile placeholder creates ambiguity.
Line 190 states
where <profile> = mosip/esignet, which suggests the profile value itself contains a forward slash. However:
- The directory structure
profiles/<profile>/implies<profile>is a single directory name- State filenames like
aws-infra-<profile>-<branch>-terraform.tfstatesuggest<profile>is a single token- Other documentation suggests choosing between
mosipOResignetRecommendation: Clarify whether:
- Profile is a single value (e.g.,
mosiporesignetseparately), OR- Profile intentionally supports slash-separated paths (e.g.,
mosip/esignetas one value)If it's a single value, update line 190 and similar instances to show separate examples rather than combined.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/README.md around lines 172 - 190, The docs are ambiguous about the profile placeholder; update the README so <profile> is clearly defined as a single token (e.g., "mosip" or "esignet") rather than "mosip/esignet": change the example at the `where <profile> = mosip/esignet` note to show separate examples (e.g., `where <profile> = mosip` or `where <profile> = esignet`) and ensure surrounding references like `profiles/<profile>/` and filenames `aws-infra-<profile>-<branch>-terraform.tfstate` reflect that <profile> is a single directory/name, not a slash-separated path.docs/ENVIRONMENT_DESTRUCTION_GUIDE.md (1)
48-48:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winProfile format inconsistency (same issue as README.md).
This shows
Profile: esignet/mosipwhich is inconsistent with other documentation. See the detailed comment on README.md line 844 for the full explanation and recommendation.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/ENVIRONMENT_DESTRUCTION_GUIDE.md` at line 48, The "Profile: esignet/mosip" entry in ENVIRONMENT_DESTRUCTION_GUIDE.md uses a different profile format than the rest of the docs; update this line to match the canonical profile format used elsewhere (as noted in README.md) by replacing "Profile: esignet/mosip" with the standardized profile syntax (use the same casing, delimiter and structure as the README.md recommendation) so documentation is consistent across files.terraform/README.md (1)
293-330:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winProfile placeholder ambiguity (same issue as other files).
Lines 307 and 330 state
where <profile> = mosip/esignet, creating the same ambiguity noted in other files. See the detailed comment on .github/workflows/README.md lines 172-190 for full explanation.Additionally, line 323 is missing a language identifier for the fenced code block (markdown linting issue MD040).
🔧 Fix for markdown linting issue
Examples: +``` ├── aws-base-infra-main-terraform.tfstate.gpg # Production base infrastructure ├── profiles/<profile>/aws-infra-<profile>-staging-terraform.tfstate.gpg # Staging MOSIP cluster🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@terraform/README.md` around lines 293 - 330, Replace the ambiguous placeholder text "where <profile> = mosip/esignet" with an explicit explanation such as "where <profile> can be either 'mosip' or 'esignet'" in both occurrences (the two README paragraphs that reference profile values) and add a language identifier to the fenced code block that shows example state filenames (e.g., change the opening backticks to ```text or ```bash) so markdown linting MD040 is satisfied; update the example block and both profile notes (`where <profile> ...`) accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@README.md`:
- Around line 844-854: The "Profile" field is documented inconsistently; update
the README's Profile section (the "Profile" bullet) to clearly show it expects a
single value (either "mosip" or "esignet") using a consistent choice notation
like "Profile: <select one: mosip | esignet>" and replace other variants such as
"esignet / mosip", "esignet/mosip", and "INFRA_PROFILE: mosip/esignet" with the
same single-value examples or explicit choice notation; ensure references to
state naming "{cloud}-{component}-{profile}-{branch}" and the
ENVIRONMENT_DESTRUCTION_GUIDE and INFRA_PROFILE examples all use the
single-value format so users understand to pass only "mosip" or "esignet".
---
Duplicate comments:
In @.github/workflows/README.md:
- Around line 172-190: The docs are ambiguous about the profile placeholder;
update the README so <profile> is clearly defined as a single token (e.g.,
"mosip" or "esignet") rather than "mosip/esignet": change the example at the
`where <profile> = mosip/esignet` note to show separate examples (e.g., `where
<profile> = mosip` or `where <profile> = esignet`) and ensure surrounding
references like `profiles/<profile>/` and filenames
`aws-infra-<profile>-<branch>-terraform.tfstate` reflect that <profile> is a
single directory/name, not a slash-separated path.
In `@docs/ENVIRONMENT_DESTRUCTION_GUIDE.md`:
- Line 48: The "Profile: esignet/mosip" entry in
ENVIRONMENT_DESTRUCTION_GUIDE.md uses a different profile format than the rest
of the docs; update this line to match the canonical profile format used
elsewhere (as noted in README.md) by replacing "Profile: esignet/mosip" with the
standardized profile syntax (use the same casing, delimiter and structure as the
README.md recommendation) so documentation is consistent across files.
In `@terraform/README.md`:
- Around line 293-330: Replace the ambiguous placeholder text "where <profile> =
mosip/esignet" with an explicit explanation such as "where <profile> can be
either 'mosip' or 'esignet'" in both occurrences (the two README paragraphs that
reference profile values) and add a language identifier to the fenced code block
that shows example state filenames (e.g., change the opening backticks to
```text or ```bash) so markdown linting MD040 is satisfied; update the example
block and both profile notes (`where <profile> ...`) accordingly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 729a6f7a-3ca9-4cf9-bf0d-58e521e30e9c
⛔ Files ignored due to path filters (2)
docs/_images/infra-terraform-apply.pngis excluded by!**/*.pngdocs/_images/infra-terraform-destroy.pngis excluded by!**/*.png
📒 Files selected for processing (6)
.github/workflows/README.mdREADME.mddocs/ENVIRONMENT_DESTRUCTION_GUIDE.mddocs/TERRAFORM_WORKFLOW_GUIDE.mddocs/_images/ARCHITECTURE_DIAGRAMS.mdterraform/README.md
…ofile based workflow Signed-off-by: abhishek-1809 <abhisahu1920@gmail.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@README.md`:
- Around line 208-219: The README documents GH_INFRA_PAT but the Step 2
"Configure GitHub Secrets" actionable list omits it; update the Step 2 secrets
list to include GH_INFRA_PAT with a short note about its required scopes
(Contents: Read & write, Metadata: Read, Actions/Environments/Variables: Read &
write) and a brief pointer that it is a GitHub Personal Access Token
(fine-grained) used for repository operations; locate the Step 2 section and add
GH_INFRA_PAT alongside the other secret names so copy-paste setup instructions
and any examples reference this variable.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 342d06c2-7d29-471b-8c86-2cff2918425d
📒 Files selected for processing (2)
README.mddocs/SECRET_GENERATION_GUIDE.md
…ofile based workflow Signed-off-by: abhishek-1809 <abhisahu1920@gmail.com>
…ofile based workflow Signed-off-by: abhishek-1809 <abhisahu1920@gmail.com>
Signed-off-by: abhishek-1809 <abhisahu1920@gmail.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/SECRET_GENERATION_GUIDE.md`:
- Line 308: Update the permission label wording in the string that currently
reads "- **Contents**: Read and write *(critical, Read only causes 403 on
push)*" so the parenthetical uses the hyphenated form "Read-only" (i.e., change
"Read only causes 403 on push" to "Read-only causes 403 on push") within
SECRET_GENERATION_GUIDE.md to keep the permission label consistent.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 83a5a6be-127b-4f7c-b108-fa2ab22cf018
⛔ Files ignored due to path filters (3)
docs/_images/esignet.pngis excluded by!**/*.pngdocs/_images/helmsman-external-services.pngis excluded by!**/*.pngdocs/_images/helmsman-testrigs.pngis excluded by!**/*.png
📒 Files selected for processing (3)
README.mddocs/ENVIRONMENT_DESTRUCTION_GUIDE.mddocs/SECRET_GENERATION_GUIDE.md
🚧 Files skipped from review as they are similar to previous changes (1)
- docs/ENVIRONMENT_DESTRUCTION_GUIDE.md
…ofile based workflow Signed-off-by: abhishek-1809 <abhisahu1920@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: bhumi46 <111699703+bhumi46@users.noreply.github.com>
Summary by CodeRabbit