Skip to content

Commit

Permalink
fix: do not rely on default AWS_REGION (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
leiicamundi authored May 22, 2024
1 parent 5f9e482 commit 640a67d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions .github/actions/rosa-create-cluster/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,15 @@ runs:
- name: Login to Red Hat Hybrid Cloud Console
shell: bash
run: |
rosa login --token=${{ inputs.rh-token }}
rosa whoami
rosa login --token=${{ inputs.rh-token }} --region="${{ inputs.aws-region }}"
rosa whoami --region="${{ inputs.aws-region }}"
- name: Verify and enable HCP ROSA on AWS Marketplace
shell: bash
run: |
rosa verify quota --region="${{ inputs.aws-region }}"
rosa verify permissions --region="${{ inputs.aws-region }}"
rosa create account-roles --mode auto
rosa create account-roles --mode auto --region="${{ inputs.aws-region }}"
- name: Install aws-cli v2
shell: bash
Expand Down Expand Up @@ -200,7 +200,7 @@ runs:
shell: bash
id: cluster_info
run: |
rosa describe cluster --output=json -c "${{ steps.apply.outputs.cluster_id }}"
rosa describe cluster --output=json -c "${{ steps.apply.outputs.cluster_id }}" --region="${{ inputs.aws-region }}"
export cluster_api=$(rosa describe cluster --output=json -c "${{ steps.apply.outputs.cluster_id }}" | jq -r '.api.url')
echo "cluster_api=$cluster_api"
echo "cluster_api=$cluster_api" >> "$GITHUB_OUTPUT"
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ concurrency:

env:
AWS_PROFILE: "infex"
AWS_REGION: "eu-west-2"
TESTS_AWS_REGION: "eu-west-2"
TF_S3_BUCKET: "camunda-tf-rosa"
OCP_ADMIN_USERNAME: "cluster-admin"
OCP_NAMESPACE: "myns"
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
run: |
aws configure set aws_access_key_id ${{ steps.secrets.outputs.AWS_ACCESS_KEY }} --profile ${{ env.AWS_PROFILE }}
aws configure set aws_secret_access_key ${{ steps.secrets.outputs.AWS_SECRET_KEY }} --profile ${{ env.AWS_PROFILE }}
aws configure set region ${{ env.AWS_REGION }} --profile ${{ env.AWS_PROFILE }}
aws configure set region ${{ env.TESTS_AWS_REGION }} --profile ${{ env.AWS_PROFILE }}
- name: Create Cluster
timeout-minutes: 125
Expand All @@ -91,7 +91,7 @@ jobs:
cluster-name: ${{ steps.commit_info.outputs.cluster_name }}
admin-username: ${{ env.OCP_ADMIN_USERNAME }}
admin-password: ${{ steps.secrets.outputs.CI_OPENSHIFT_MAIN_PASSWORD }}
aws-region: ${{ env.AWS_REGION }}
aws-region: ${{ env.TESTS_AWS_REGION }}
s3-backend-bucket: ${{ env.TF_S3_BUCKET }}

- name: Create namespace if not exists
Expand All @@ -110,5 +110,5 @@ jobs:
with:
rh-token: ${{ steps.secrets.outputs.RH_OPENSHIFT_TOKEN }}
cluster-name: "${{ steps.commit_info.outputs.cluster_name }}"
aws-region: ${{ env.AWS_REGION }}
aws-region: ${{ env.TESTS_AWS_REGION }}
s3-backend-bucket: ${{ env.TF_S3_BUCKET }}

0 comments on commit 640a67d

Please sign in to comment.