-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Dev #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Mraakhil
wants to merge
24
commits into
iam-veeramalla:main
Choose a base branch
from
Mraakhil:dev
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Dev #21
Changes from 11 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
6233152
Update main.tf
Mraakhil 20bc619
Update EKS variables for region, availability zones, and instance types
Mraakhil b721375
lo bhai jenkinsfile
Mraakhil eced5f2
afaf
Mraakhil 9b48127
git
Mraakhil b4cec78
le bhai
Mraakhil 923a06f
ksgs
Mraakhil d0c419f
doneboss
Mraakhil ef9e5b9
regiondone
Mraakhil 016cd5e
fix man
Mraakhil e3fb6f8
yes
Mraakhil 014e4ac
lsss
Mraakhil 2daa5e1
afsafd
Mraakhil da631d3
jdsfsdf
Mraakhil 0bebcb3
Update Jenkinsfile
Mraakhil 7b71481
Update Jenkinsfile
Mraakhil 9c73715
Update Jenkinsfile
Mraakhil 3f31783
Update Jenkinsfile
Mraakhil 7963f1c
Refactor Jenkins pipeline stages and cleanup
Mraakhil 5f72585
Update variables.tf
Mraakhil 39dee0c
Change default instance type from t3.micro to c7i-flex.large
Mraakhil c12cad9
Update variables.tf
Mraakhil 34bee1f
Update default Kubernetes version to 1.36
Mraakhil 37c3b47
Update variables.tf
Mraakhil File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| pipeline { | ||
| agent any | ||
| tools { | ||
| terraform 'terraform-latest' // Must match the name you set in Manage Jenkins -> Tools | ||
| } | ||
|
|
||
| parameters { | ||
| choice(name: 'ACTION', choices: ['apply', 'destroy'], description: 'Choose whether to apply or destroy the Terraform EKS module') | ||
| } | ||
|
|
||
| environment { | ||
| TF_DIR = 'eks-install' | ||
| AWS_DEFAULT_REGION = 'ap-south-1' | ||
|
|
||
| // This pulls the two "Secret text" credentials you already created in Jenkins | ||
| // using the exact IDs shown in your screenshot ('accesskey' and 'secretaccesskey') | ||
| AWS_ACCESS_KEY_ID = credentials('accesskey') | ||
| AWS_SECRET_ACCESS_KEY = credentials('secretaccesskey') | ||
| } | ||
|
|
||
| stages { | ||
| stage('Checkout Code') { | ||
| steps { | ||
| checkout scm | ||
| } | ||
| } | ||
|
|
||
| stage('Terraform Init') { | ||
| steps { | ||
| dir("${env.TF_DIR}") { | ||
| sh 'terraform init' | ||
| } | ||
| } | ||
| } | ||
|
|
||
| stage('Terraform Plan') { | ||
| steps { | ||
| dir("${env.TF_DIR}") { | ||
| sh "terraform plan ${params.ACTION == 'destroy' ? '-destroy' : ''} -out=tfplan" | ||
| } | ||
| } | ||
| } | ||
|
|
||
| stage('Manual Approval') { | ||
| steps { | ||
| input message: "Review plan for folder '${env.TF_DIR}'. Proceed with ${params.ACTION}?", ok: 'Proceed' | ||
| } | ||
| } | ||
|
|
||
| stage('Terraform Execute') { | ||
| steps { | ||
| dir("${env.TF_DIR}") { | ||
| script { | ||
| if (params.ACTION == 'apply') { | ||
| sh 'terraform apply -auto-approve tfplan' | ||
| } else if (params.ACTION == 'destroy') { | ||
| sh 'terraform apply -destroy -auto-approve' | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| post { | ||
| always { | ||
| cleanWs() // Cleans up workspace after execution | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift
Restore Terraform state locking or remove the unused lock table.
eks-install/backend/main.tfstill provisionsaws_dynamodb_table.terraform_locks, but this backend no longer references it. Unless another locking mechanism is configured, concurrent Jenkins runs can update the same state without coordination, risking state corruption. Re-adddynamodb_table = "terraform-eks-state-locks"or complete an explicit migration to the intended locking mechanism.🤖 Prompt for AI Agents