-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
28 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -9,6 +9,11 @@ on: | |
branch: | ||
required: true | ||
type: string | ||
additional_tags: | ||
required: true | ||
type: string | ||
default: '{"OwnerEmail": "[email protected]", "ManagerEmail": "[email protected]", "TeamEmail": "[email protected]", "Description": "DSFKit_Tests", "Environment": "Test", "DataClassification": "Internal"}' | ||
|
||
secrets: | ||
AWS_ACCESS_KEY_ID_STAGE: | ||
required: true | ||
|
@@ -29,6 +34,11 @@ on: | |
type: boolean | ||
default: false | ||
required: false | ||
additional_tags: | ||
required: true | ||
type: string | ||
default: '{"OwnerEmail": "[email protected]", "ManagerEmail": "[email protected]", "TeamEmail": "[email protected]", "Description": "DSFKit_Tests", "Environment": "Test", "DataClassification": "Internal"}' | ||
|
||
|
||
env: | ||
TF_CLI_ARGS: "-no-color" | ||
|
@@ -40,6 +50,7 @@ env: | |
AWS_REGION: ap-southeast-1 | ||
TF_WORKSPACE: sonar_single_account_cli | ||
DESTROY_DELAY_SECONDS: 1800 | ||
TF_VAR_additional_tags: ${{ inputs.additional_tags }} | ||
|
||
permissions: | ||
contents: read | ||
|
@@ -208,7 +219,7 @@ jobs: | |
envs: REMOTE_EXAMPLE_DIR,TF_WORKSPACE | ||
script: | | ||
printenv | ||
terraform -chdir=$REMOTE_EXAMPLE_DIR plan | ||
terraform -chdir=$REMOTE_EXAMPLE_DIR -var additional_tags='${{ env.TF_VAR_additional_tags }}' plan | ||
- name: Terraform Apply | ||
uses: appleboy/[email protected] | ||
|
@@ -219,7 +230,7 @@ jobs: | |
port: 22 | ||
command_timeout: "2h" | ||
envs: REMOTE_EXAMPLE_DIR,TF_WORKSPACE | ||
script: terraform -chdir=$REMOTE_EXAMPLE_DIR apply -auto-approve | ||
script: terraform -chdir=$REMOTE_EXAMPLE_DIR apply -var additional_tags='${{ env.TF_VAR_additional_tags }}' -auto-approve | ||
|
||
- name: Terraform Output | ||
if: always() | ||
|
This file contains 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 |
---|---|---|
|
@@ -9,6 +9,11 @@ on: | |
explicit_ref: | ||
required: true | ||
type: string | ||
additional_tags: | ||
required: true | ||
type: string | ||
default: '{"OwnerEmail": "[email protected]", "ManagerEmail": "[email protected]", "TeamEmail": "[email protected]", "Description": "DSFKit_Tests", "Environment": "Test", "DataClassification": "Internal"}' | ||
|
||
secrets: | ||
AWS_ACCESS_KEY_ID: | ||
required: true | ||
|
@@ -24,13 +29,20 @@ on: | |
use_modules_from_terraform_registry: | ||
type: boolean | ||
required: false | ||
additional_tags: | ||
required: true | ||
type: string | ||
default: '{"OwnerEmail": "[email protected]", "ManagerEmail": "[email protected]", "TeamEmail": "[email protected]", "Description": "DSFKit_Tests", "Environment": "Test", "DataClassification": "Internal"}' | ||
|
||
|
||
env: | ||
TF_CLI_ARGS: "-no-color" | ||
TF_INPUT: 0 | ||
TF_VAR_agentless_gw_count: 1 | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
TF_VAR_additional_tags: ${{ inputs.additional_tags }} | ||
|
||
|
||
permissions: | ||
contents: read | ||
|
@@ -64,6 +76,7 @@ jobs: | |
TF_VAR_hub_hadr: ${{ matrix.hub_hadr }} | ||
TF_VAR_agentless_gw_hadr: ${{ matrix.agentless_gw_hadr }} | ||
TF_VAR_simulation_db_types_for_agentless: ${{ matrix.simulation_db_types_for_agentless }} | ||
|
||
environment: test | ||
|
||
# Use the Bash shell regardless whether the GitHub Actions runner is ubuntu-latest, macos-latest, or windows-latest | ||
|
@@ -281,11 +294,11 @@ jobs: | |
- name: Terraform Plan for upgrade | ||
run: | | ||
terraform -chdir=$UPGRADE_EXAMPLE_DIR workspace list | ||
terraform -chdir=$UPGRADE_EXAMPLE_DIR plan | ||
terraform -chdir=$UPGRADE_EXAMPLE_DIR plan -var additional_tags='${{ env.TF_VAR_additional_tags }}' | ||
- name: Terraform Apply for upgrade | ||
id: apply_upgrade | ||
run: terraform -chdir=$UPGRADE_EXAMPLE_DIR apply -auto-approve | ||
run: terraform -chdir=$UPGRADE_EXAMPLE_DIR apply -var additional_tags='${{ env.TF_VAR_additional_tags }}' -auto-approve | ||
|
||
- name: Terraform Output for upgrade | ||
if: always() | ||
|