Skip to content
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

fix: do not rely on default AWS_REGION #4

Merged
merged 5 commits into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}
Loading