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

defaultProvider should apply to fn::invoke, not just resources #661

Open
iwahbe opened this issue Oct 9, 2024 · 0 comments
Open

defaultProvider should apply to fn::invoke, not just resources #661

iwahbe opened this issue Oct 9, 2024 · 0 comments
Labels
kind/bug Some behavior is incorrect or out of spec

Comments

@iwahbe
Copy link
Member

iwahbe commented Oct 9, 2024

What happened?

I was using pulumi-yaml as part of cross-testing in the bridge, and I assumed that a provider configured with defaultProvider: true would apply to my fn::invoke instance. It did not, but it should.

Example

name: dev-yaml
runtime: yaml
resources:
  p:
    type: pulumi:providers:aws
    properties:
      skipCredentialsValidation: true
      region: "invalid"
    defaultProvider: true

outputs:
  _:
    fn::invoke:
      function: aws:getCallerIdentity
      # options:              # Specifying p to be the provider for _ shouldn't do anything, since
      #   provider: ${p}      # p is already the default provider for AWS.

You can see a failed call to https://sts.invalid.amazonaws.com/ when the invoke options are uncommented, but the call either succeeds (if you have ambient AWS credentials) for fails with missing creds if not with the invoke options commented out.

Output of pulumi about

CLI          
Version      3.134.2-dev.0
Go Version   go1.23.1
Go Compiler  gc

Plugins
KIND      NAME  VERSION
resource  aws   unknown
language  yaml  unknown

Host     
OS       darwin
Version  15.0.1
Arch     arm64

This project is written in yaml

Current Stack: pulumi/dev-yaml/dev

Found no resources associated with dev

Found no pending operations associated with dev

Backend        
Name           pulumi.com
URL            https://app.pulumi.com/ian-pulumi-corp
User           ian-pulumi-corp
Organizations  ian-pulumi-corp, pulumi
Token type     personal

No dependencies found

Pulumi locates its logs in /var/folders/fg/_1q36r4j6yx0rwz2fbhjd5y40000gn/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).

@iwahbe iwahbe added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Oct 9, 2024
@justinvp justinvp removed the needs-triage Needs attention from the triage team label Oct 11, 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