pulumi / pulumi-ise

Apache License 2.0
0 stars 0 forks source link

Every action on the provider results in the api calls being output to the console. #9

Open zbuchheit opened 6 months ago

zbuchheit commented 6 months ago

What happened?

While using the provider, all resources I was creating or functions I was using resulted in the corresponding api call being logged to the output.

Example

import * as pulumi from "@pulumi/pulumi";
import * as ise from "@pulumi/ise";

    const username = process.env["ISE_USERNAME"] || "";
    const password = process.env["ISE_PASSWORD"] || "";
    if (username === "" || password === "") {
        throw new Error("Missing ISE username and/or password");
    }

    const url = process.env["ISE_URL"] || "";
    if (url === "") {
        throw new Error("Missing ISE URL");
    }

    const provider = new ise.Provider("ise", {
        username: username,
        password: password,
        url: url,
        retries: 0
    });

    const pulumiEmployeeGroup = new ise.identitymanagement.UserIdentityGroup("pulumi-employee-group", {
        name: "PulumiEmployeeGroup",
        description: "My pulumi employee identity group",
    });
Updating (dev):
     Type                                         Name                   Status              Info
 +   pulumi:pulumi:Stack                          zbuchheit-ise-dev      created (2s)        3 messages
 +   ├─ pulumi:providers:ise                      ise                    created (0.06s)
 +   └─ ise:identitymanagement:UserIdentityGroup  pulumi-employee-group  created (0.44s)
Diagnostics:
  pulumi:pulumi:Stack (zbuchheit-ise-dev):
    2024/05/10 01:32:35 [DEBUG] HTTP Request: POST, https://{REDACTED}/ers/config/identitygroup, {{"IdentityGroup":{"name":"PulumiEmployeeGroup","description":"My pulumi employee identity group"}}}
    2024/05/10 01:32:36 [DEBUG] HTTP Response:
    2024/05/10 01:32:36 [DEBUG] Exit from Do method

Output of pulumi about

CLI
Version      3.115.2
Go Version   go1.22.2
Go Compiler  gc

Plugins
KIND      NAME    VERSION
resource  ise     0.1.1
language  nodejs  unknown

Host
OS       Microsoft Windows Server 2022 Datacenter
Version  10.0.20348 Build 20348
Arch     x86_64

This project is written in nodejs: executable='C:\Program Files\nodejs\node.exe' version='v20.13.1'

Backend
Name           EC2AMAZ-V236MOS
URL            file://~
User           EC2AMAZ-V236MOS\Administrator
Organizations
Token type     personal

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

VenelinMartinov commented 6 months ago

Thanks for reporting and for the detailed repro!

Unfortunately, we'd need to sort out access credentials for the provider before we can address issues here.

Opened https://github.com/pulumi/pulumi-ise/issues/16

zbuchheit commented 3 months ago

adding some additional details to this as i have created my own instance of ISE in AWS.

In my testing, the provider is behaving as if the TF_LOG level is set to DEBUG automatically. When I test the equivalent in TF, I don't get the same behavior so this does appear to be a bug in the bridged provider.

VenelinMartinov commented 3 months ago

Note similar issues in Meraki and https://github.com/pulumi/pulumi-databricks/issues/474. Potentially related too: https://github.com/pulumi/pulumi-gitlab/issues/514

zbuchheit commented 3 months ago

When digging into it, it looks like this is likely coming from the go library used. That being said, I am curious why this behaves differently in the upstream provider.

source: https://github.com/netascode/go-ise/blob/b9cb4ca5f659fcad3ca9b0d4526abcfa5766e390/client.go#L142

iwahbe commented 3 weeks ago

When digging into it, it looks like this is likely coming from the go library used. That being said, I am curious why this behaves differently in the upstream provider.

source: https://github.com/netascode/go-ise/blob/b9cb4ca5f659fcad3ca9b0d4526abcfa5766e390/client.go#L142

Terraform doesn't display provider stdout to the user by default, but we do. https://github.com/pulumi/pulumi-terraform-bridge/issues/2489 tracks that discrepancy.