pulumi-azuread icon indicating copy to clipboard operation
pulumi-azuread copied to clipboard

Importing `azuread.Application` produces an invalid resource

Open jkodroff opened this issue 1 year ago • 0 comments

What happened?

Importing a resource of type azuread.Application produces an invalid resource:

  azuread:index:Application (pulumi-deployments-oidc):
    warning: One or more imported inputs failed to validate. This is almost certainly a bug in the `azuread` provider. The import will still proceed, but you will need to edit the generated code after copying it into your program.
    warning: azuread:index/application:Application resource 'pulumi-deployments-oidc' has a problem: Conflicting configuration arguments: "feature_tags": conflicts with tags. Examine values at 'pulumi-deployments-oidc.featureTags'.
    warning: azuread:index/application:Application resource 'pulumi-deployments-oidc' has a problem: Conflicting configuration arguments: "tags": conflicts with feature_tags. Examine values at 'pulumi-deployments-oidc.tags'.

Here's the code that was generated:

const pulumi_deployments_oidc = new azuread.Application("pulumi-deployments-oidc", {
  displayName: "pulumi-deployments-oidc",
  featureTags: [{}],
  // ...
  tags: [
    "webApp",
    "apiConsumer",
  ],
  // ...
}, {
  protect: true,
});

This line needs to be removed and the resource will be valid:

  featureTags: [{}],

Example

n/a

Output of pulumi about

CLI          
Version      3.89.0
Go Version   go1.21.3
Go Compiler  gc

Plugins
NAME     VERSION
azuread  5.42.0
nodejs   unknown

Host     
OS       darwin
Version  14.0
Arch     arm64

This project is written in nodejs: executable='/Users/jkodroff/.nvm/versions/node/v20.8.0/bin/node' version='v20.8.0'

Current Stack: jkodrofftest/test-import/dev

TYPE                                                                                         URN
pulumi:pulumi:Stack                                                                          urn:pulumi:dev::test-import::pulumi:pulumi:Stack::test-import-dev
pulumi:providers:azuread                                                                     urn:pulumi:dev::test-import::pulumi:providers:azuread::default_5_42_0
azuread:index/application:Application                                                        urn:pulumi:dev::test-import::azuread:index/application:Application::pulumi-deployments-oidc
azuread:index/applicationFederatedIdentityCredential:ApplicationFederatedIdentityCredential  urn:pulumi:dev::test-import::azuread:index/applicationFederatedIdentityCredential:ApplicationFederatedIdentityCredential::test


Found no pending operations associated with dev

Backend        
Name           pulumi.com
URL            https://app.pulumi.com/jkodroff
User           jkodroff
Organizations  jkodroff, oracle-workshop, jkodrofftest, aws-partnership, zephyr, demo, pulumi
Token type     personal

Dependencies:
NAME             VERSION
@pulumi/azuread  5.42.0
@pulumi/pulumi   3.89.0
@types/node      16.18.59

Pulumi locates its logs in /var/folders/5m/4n1x3f8151s35wc80w06z5k80000gn/T/ by default

Additional context

No response

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

jkodroff avatar Oct 18 '23 20:10 jkodroff