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

auto-created resource: WebAppSourceControlSlot #3787

Open
EronWright opened this issue Dec 13, 2024 · 0 comments
Open

auto-created resource: WebAppSourceControlSlot #3787

EronWright opened this issue Dec 13, 2024 · 0 comments
Labels
kind/bug Some behavior is incorrect or out of spec

Comments

@EronWright
Copy link
Contributor

What happened?

Looks like the "slot" variant of "WebAppSourceControl" resource isn't marked as an auto-created resource.

Diagnostics:
  azure-native:web:WebAppSourceControlSlot (stagingContent):
    error: cannot create already existing resource '/subscriptions/0282681f-7a9e-424b-80b2-96babd57a8a1/resourceGroups/rgdd0cc9be/providers/Microsoft.Web/sites/app54658a9e/slots/staging/sourcecontrols/web'

Example

name: upgrade-appservices-webapp
runtime: yaml
description: Upgrade test for web app services (AppServicePlan, WebApp)
variables:
  repoURL: https://github.com/Azure-Samples/app-service-web-html-get-started.git
  branch: master

resources:
  rg:
    type: azure-native:resources:ResourceGroup
  
  servicePlan:
    type: azure-native:web:AppServicePlan
    properties:
      kind: app
      resourceGroupName: ${rg.name}
      sku:
        name: S1

  app:
    type: azure-native:web:WebApp
    options:
      aliases:
        - "urn:pulumi:dev::upgrade-appservices::azure-native:web:WebApp::webApp"
    properties:
      kind: app
      resourceGroupName: ${rg.name}
      serverFarmId: ${servicePlan.id}

  appContent:
    type: azure-native:web:WebAppSourceControl
    properties:
      name: ${app.name}
      branch: ${branch}
      repoUrl: ${repoURL}
      resourceGroupName: ${rg.name}
      isManualIntegration: true
  
  appSettings:
    type: azure-native:web:WebAppApplicationSettings
    properties:
      name: ${app.name}
      resourceGroupName: ${rg.name}
      properties:
        sticky1: production
        setting1: v1

  appStickies:
    type: azure-native:web:WebAppSlotConfigurationNames
    properties:
      name: ${app.name}
      resourceGroupName: ${rg.name}
      appSettingNames:
        - sticky1

  staging:
    type: azure-native:web:WebAppSlot
    properties:
      name: ${app.name}
      slot: staging
      resourceGroupName: ${rg.name}
      serverFarmId: ${servicePlan.id}
      
  stagingContent:
    type: azure-native:web:WebAppSourceControlSlot
    options:
      dependsOn:
       - ${staging}
    properties:
      resourceGroupName: ${rg.name}
      name: ${app.name}
      slot: staging
      branch: v2
      repoUrl: ${repoURL}
      isManualIntegration: true

  stagingSettings:
    type: azure-native:web:WebAppApplicationSettingsSlot
    options:
      dependsOn:
       - ${staging}
    properties:
      resourceGroupName: ${rg.name}
      name: ${app.name}
      slot: staging
      properties:
        sticky1: staging
        setting1: v2

outputs:
  siteURL: https://${app.defaultHostName}/

Output of pulumi about

❯ p about
CLI          
Version      3.132.0
Go Version   go1.23.1
Go Compiler  gc

Plugins
KIND      NAME          VERSION
resource  azure-native  unknown
language  yaml          unknown

Host     
OS       darwin
Version  14.5
Arch     arm64

This project is written in yaml

Additional context

Related to: #317

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).

@EronWright EronWright added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Dec 13, 2024
@danielrbradley danielrbradley removed the needs-triage Needs attention from the triage team label Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

2 participants