Skip to content

Commit 8f443c9

Browse files
rajsinghtechclaude
andcommitted
Fix tailnet deletion to use organization-level credentials
Use the original organization OAuth token instead of the tailnet-specific token for deletion. Only the organization-level credentials that created the tailnet have permission to delete it. Changes: - Use steps.get_access_token.outputs.access_token (organization token) - Instead of steps.get_tailnet_token.outputs.tailnet_access_token (tailnet token) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 72dbc66 commit 8f443c9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/api-tailnet-k8s-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,9 @@ jobs:
211211
echo "Cleaning up Kind cluster..."
212212
kind delete cluster --name tailscale-test || true
213213
214-
if [ -n "${{ steps.get_tailnet_token.outputs.tailnet_access_token }}" ] && [ -n "${{ steps.create_tailnet.outputs.full_tailnet_name }}" ]; then
214+
if [ -n "${{ steps.get_access_token.outputs.access_token }}" ] && [ -n "${{ steps.create_tailnet.outputs.full_tailnet_name }}" ]; then
215215
echo "Deleting API-only tailnet: ${{ steps.create_tailnet.outputs.full_tailnet_name }}"
216-
./tailscale/scripts/delete-tailnet.sh "${{ steps.get_tailnet_token.outputs.tailnet_access_token }}" "${{ steps.create_tailnet.outputs.full_tailnet_name }}" || echo "Failed to delete tailnet (may have already been deleted)"
216+
./tailscale/scripts/delete-tailnet.sh "${{ steps.get_access_token.outputs.access_token }}" "${{ steps.create_tailnet.outputs.full_tailnet_name }}" || echo "Failed to delete tailnet (may have already been deleted)"
217217
else
218218
echo "Skipping tailnet deletion - missing access token or tailnet name"
219219
fi

0 commit comments

Comments
 (0)