-
Notifications
You must be signed in to change notification settings - Fork 0
chore: tf gh actions #35
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
Merged
Merged
Changes from 14 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
352574f
chore: tf gh actions
eugbyte 85d4c12
chore: experiment
eugbyte 2c68851
chore: update
eugbyte 69437c9
chore: gh action
eugbyte 7fb36ac
chore: update
eugbyte e838dfd
chore: update
eugbyte 1dbf829
chore: update
eugbyte 1e6ef5c
chore: add tf to hg
eugbyte ad79a57
chore: update
eugbyte d022ca2
fix: fmt
eugbyte ffd4222
fix: ci
eugbyte a467b0b
chore: trigger
eugbyte 88d01dd
chore: trigger
eugbyte f6ac616
fix: ci
eugbyte c402f04
chore: tf state
eugbyte f0c66e9
chore: update
eugbyte 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
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
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,63 @@ | ||
| name: Deploy evently | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ "main" ] | ||
| pull_request: | ||
| branches: [ "main" ] | ||
|
|
||
| # important for azure/login | ||
| permissions: | ||
| id-token: write | ||
| contents: read | ||
|
|
||
| jobs: | ||
| deploy: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Azure Login | ||
| uses: azure/login@v2 | ||
| with: | ||
| client-id: ${{ secrets.AZURE_CLIENT_ID }} | ||
| tenant-id: ${{ secrets.AZURE_TENANT_ID }} | ||
| subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | ||
| - name: Validate Azure CLI can be used | ||
| uses: azure/cli@v2 | ||
| with: | ||
| azcliversion: latest | ||
| inlineScript: | | ||
| az account show | ||
| - name: Set up Terraform | ||
| uses: hashicorp/setup-terraform@v3 | ||
| - name: Terraform init | ||
| run: | | ||
| cd deploy/Terraform | ||
| terraform init | ||
| - name: Terraform validate | ||
| run: | | ||
| cd deploy/Terraform | ||
| terraform validate | ||
| - name: Terraform plan | ||
| run: | | ||
| cd deploy/Terraform | ||
| terraform plan | ||
| env: | ||
| TF_VAR_sql_admin_username: ${{ secrets.TF_VAR_SQL_ADMIN_USERNAME }} | ||
| TF_VAR_sql_admin_password: ${{ secrets.TF_VAR_SQL_ADMIN_PASSWORD }} | ||
| TF_VAR_google_client_id: ${{ secrets.TF_VAR_GOOGLE_CLIENT_ID }} | ||
| TF_VAR_google_client_secret: ${{ secrets.TF_VAR_GOOGLE_CLIENT_SECRET }} | ||
| TF_VAR_email_from: ${{ secrets.TF_VAR_EMAIL_FROM }} | ||
| TF_VAR_smtp_password: ${{ secrets.TF_VAR_SMTP_PASSWORD }} | ||
| # Apply step can be skipped for pull requests | ||
| - name: Terraform apply | ||
| run: cd deploy/Terraform && terraform apply -auto-approve | ||
| env: | ||
| TF_VAR_sql_admin_username: ${{ secrets.TF_VAR_SQL_ADMIN_USERNAME }} | ||
| TF_VAR_sql_admin_password: ${{ secrets.TF_VAR_SQL_ADMIN_PASSWORD }} | ||
| TF_VAR_google_client_id: ${{ secrets.TF_VAR_GOOGLE_CLIENT_ID }} | ||
| TF_VAR_google_client_secret: ${{ secrets.TF_VAR_GOOGLE_CLIENT_SECRET }} | ||
| TF_VAR_email_from: ${{ secrets.TF_VAR_EMAIL_FROM }} | ||
| TF_VAR_smtp_password: ${{ secrets.TF_VAR_SMTP_PASSWORD }} | ||
|
|
||
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 |
|---|---|---|
|
|
@@ -12,7 +12,7 @@ terraform { | |
| } | ||
|
|
||
| locals { | ||
| environment = "staging" | ||
| environment = "staging" | ||
| } | ||
|
|
||
| provider "azurerm" { | ||
|
|
||
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.