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

Fail fast to deploy when azure default location is missing #971

Open
TechWatching opened this issue Jun 27, 2023 · 0 comments
Open

Fail fast to deploy when azure default location is missing #971

TechWatching opened this issue Jun 27, 2023 · 0 comments
Labels
area/cicd kind/enhancement Improvements or new features

Comments

@TechWatching
Copy link

TechWatching commented Jun 27, 2023

What happened?

The pulumi up command took 8 min to fail when running in a Github Actions with the following error:

Diagnostics: azure-native:resources:ResourceGroup (rg-breizhCamp): error: azure-native:resources:ResourceGroup resource 'rg-breizhCamp' has a problem: missing required property 'location'. Either set it explicitly or configure it with 'pulumi config set azure-native:location <value>'.

Expected Behavior

It should have failed fast by detecting that there was no default azure location set in the setting and no location in the resource group.

Steps to reproduce

Create a new pulumi project using the azure-typescript template. Remove the azure-native:location from the dev stack . Run the pulumi up -y command in a github action.

Here is the pipeline:

name: infra

on:
  workflow_dispatch:

permissions:
  id-token: write   # required for OIDC auth
  contents: read

jobs:
  provision-infra:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3

      - name: Install pnpm
        uses: pnpm/action-setup@v2
        with:
          version: latest

      - name: Set node version to 18
        uses: actions/setup-node@v3
        with:
          node-version: 18
          cache: 'pnpm'
      
      - name: Install dependencies
        run: pnpm install
      
      - name: Provision infrastructure
        uses: pulumi/actions@v4.4.0
        id: pulumi
        with:
          command: up
          stack-name: dev
        env:
          ARM_USE_OIDC: true
          PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
          ARM_CLIENT_ID: ${{ secrets.ARM_CLIENT_ID }}
          ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }}
          ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }} 

Output of pulumi about

CLI
Version 3.73.0
Go Version go1.20.5
Go Compiler gc

Plugins
NAME VERSION
azure-native 2.0.0-beta.1
nodejs unknown

Host
OS Microsoft Windows 11 Pro
Version 10.0.22621 Build 22621
Arch x86_64

This project is written in nodejs: executable='C:\Users\alexa\AppData\Local\pnpm\node.exe' version='v18.16.0'

Current Stack: TechWatching/demo/dev

Found no resources associated with dev

Found no pending operations associated with dev

Backend
Name pulumi.com
URL https://app.pulumi.com/TechWatching
User TechWatching
Organizations TechWatching, teachingiac

Additional context

It took 8 min when running from github action.
When running locally it failed quickly.

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@TechWatching TechWatching added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Jun 27, 2023
@dixler dixler added kind/enhancement Improvements or new features area/cicd and removed needs-triage Needs attention from the triage team kind/bug Some behavior is incorrect or out of spec labels Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cicd kind/enhancement Improvements or new features
Projects
None yet
Development

No branches or pull requests

2 participants