Skip to content

Commit 054318a

Browse files
committed
fix: wrong workspace selected
1 parent e615ebc commit 054318a

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

actions/deploy-terraform/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ runs:
6969
APP_NAME: ${{ inputs.app-name }}
7070
shell: bash
7171
run: |
72-
WORKSPACE_ID=$(aws grafana list-workspaces | jq -r '.workspaces[] | select( .tags.Env == "prod") | select( .tags.Name == "grafana-9") | .id')
73-
ENDPOINT=$(aws grafana list-workspaces | jq -r '.workspaces[] | select( .tags.Env == "prod") | select( .tags.Name == "grafana-9") | .endpoint')
72+
WORKSPACE_ID=$(aws grafana list-workspaces | jq -r '.workspaces[] | select( .tags.Env == "prod") | .id')
73+
ENDPOINT=$(aws grafana list-workspaces | jq -r '.workspaces[] | select( .tags.Env == "prod") | .endpoint')
7474
KEY_NAME="$APP_NAME-$RANDOM"
7575
echo "Deploying with $KEY_NAME"
7676
KEY=$(aws grafana create-workspace-api-key --key-name "$KEY_NAME" --key-role "ADMIN" --seconds-to-live 900 --workspace-id "$WORKSPACE_ID" | jq -r .key)

actions/plan-terraform/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ runs:
6363
APP_NAME: ${{ inputs.app-name }}
6464
shell: bash
6565
run: |
66-
WORKSPACE_ID=$(aws grafana list-workspaces | jq -r '.workspaces[] | select( .tags.Env == "prod") | select( .tags.Application == "infra") | .id')
67-
ENDPOINT=$(aws grafana list-workspaces | jq -r '.workspaces[] | select( .tags.Env == "prod") | select( .tags.Application == "infra") | .endpoint')
66+
WORKSPACE_ID=$(aws grafana list-workspaces | jq -r '.workspaces[] | select( .tags.Env == "prod") | .id')
67+
ENDPOINT=$(aws grafana list-workspaces | jq -r '.workspaces[] | select( .tags.Env == "prod") | .endpoint')
6868
KEY_NAME="$APP_NAME-$RANDOM"
6969
echo "Deploying with $KEY_NAME"
7070
KEY=$(aws grafana create-workspace-api-key --key-name "$KEY_NAME" --key-role "ADMIN" --seconds-to-live 300 --workspace-id "$WORKSPACE_ID" | jq -r .key)

aws/grafana/get-details/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ runs:
2323
shell: bash
2424
run: |
2525
echo "getting details for '${{ inputs.environment }}'"
26-
WORKSPACE_ID=$(aws grafana list-workspaces | jq -r '.workspaces[] | select( .tags.Env == "${{ inputs.environment }}") | select( .tags.Name == "grafana-9") | .id')
27-
ENDPOINT=$(aws grafana list-workspaces | jq -r '.workspaces[] | select( .tags.Env == "${{ inputs.environment }}") | select( .tags.Name == "grafana-9") | .endpoint')
26+
WORKSPACE_ID=$(aws grafana list-workspaces | jq -r '.workspaces[] | select( .tags.Env == "${{ inputs.environment }}") | .id')
27+
ENDPOINT=$(aws grafana list-workspaces | jq -r '.workspaces[] | select( .tags.Env == "${{ inputs.environment }}") | .endpoint')
2828
echo "endpoint=$ENDPOINT" >> $GITHUB_OUTPUT
2929
echo "workspace-id=$WORKSPACE_ID" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)