https://pulumi.com logo
Join the conversationJoin Slack
Channels
announcements
automation-api
aws
azure
blog-posts
built-with-pulumi
cloudengineering
cloudengineering-support
content-share
contribex
contribute
docs
dotnet
finops
general
getting-started
gitlab
golang
google-cloud
hackathon-03-19-2020
hacktoberfest
install
java
jobs
kubernetes
learn-pulumi-events
linen
localstack
multi-language-hackathon
office-hours
oracle-cloud-infrastructure
plugin-framework
pulumi-cdk
pulumi-crosscode
pulumi-deployments
pulumi-kubernetes-operator
pulumi-service
pulumiverse
python
registry
status
testingtesting123
testingtesting321
typescript
welcome
workshops
yaml
Powered by Linen
contribute
  • r

    rough-oil-1458

    09/02/2018, 7:47 PM
    yea, 🙂
  • b

    big-piano-35669

    09/02/2018, 7:47 PM
    Or, if you're using TypeScript, you can always do something like
    let datastore = await vsphere.getDatastore({
      name: "bdf1000-01",
      datacenterId: "datacenter-21"
    });
    
    console.log(datastore.id);
  • r

    rough-oil-1458

    09/02/2018, 7:47 PM
    I usually use vasync
  • b

    big-piano-35669

    09/02/2018, 7:47 PM
    Not at all 🙂 We actually have gone round and round on whether we can make these calls synchronous.
  • b

    big-piano-35669

    09/02/2018, 7:48 PM
    It would be a "lie" since they actually do I/O under the hood, so we've presently landed on returning promises.
  • b

    big-piano-35669

    09/02/2018, 7:48 PM
    But appealing from a usability perspective.
  • r

    rough-oil-1458

    09/02/2018, 7:48 PM
    nah
  • r

    rough-oil-1458

    09/02/2018, 7:48 PM
    people should know how to use javascript
  • r

    rough-oil-1458

    09/02/2018, 7:48 PM
    Thank you!!!! 🙂
  • b

    big-piano-35669

    09/02/2018, 7:48 PM
    👍
  • b

    big-piano-35669

    09/02/2018, 7:49 PM
    I actually suspect that, in the limit, the main conversion challenge from TF to Pulumi will be promises 🙂
  • r

    rough-oil-1458

    09/02/2018, 7:50 PM
    I'm having a bit of trouble understanding how to provide credentials to the provider
  • b

    big-piano-35669

    09/02/2018, 7:50 PM
    (Then again, it is pretty nifty that you can do I/O, have lots of async work in flight, etc, in your cloud infra programs, so...)
  • r

    rough-oil-1458

    09/02/2018, 7:50 PM
    Yes, Async = GOOD!
  • b

    big-piano-35669

    09/02/2018, 7:51 PM
    The config vars are auto-generated in the
    config
    module: https://github.com/Smithx10/pulumi-vsphere/blob/master/sdk/nodejs/config/vars.ts
  • r

    rough-oil-1458

    09/02/2018, 7:51 PM
    Does the func Provider() tfbridge.ProviderInfo { . function
  • r

    rough-oil-1458

    09/02/2018, 7:51 PM
    automatically know what to ask for in pulumi config?
  • r

    rough-oil-1458

    09/02/2018, 7:52 PM
    when I first went to pulumi up, it prompted for UNs and PW's
  • r

    rough-oil-1458

    09/02/2018, 7:52 PM
    but I didn't write any code for that
  • b

    big-piano-35669

    09/02/2018, 7:52 PM
    So, e.g.
    $ pulumi config set vsphere:user admin
    $ pulumi config set vsphere:password mysecretpassword --secret
  • b

    big-piano-35669

    09/02/2018, 7:52 PM
    If you look in the config section, it uses
    require
    calls for the required configuration variables:
    export let password: string = __config.require("password");
  • r

    rough-oil-1458

    09/02/2018, 7:53 PM
    yea, i saw
  • b

    big-piano-35669

    09/02/2018, 7:53 PM
    So, it basically knows what to ask for, based on the TF metadata it read to generate the package.
  • r

    rough-oil-1458

    09/02/2018, 7:53 PM
    The Terraform Provider also takes EnvVars
  • r

    rough-oil-1458

    09/02/2018, 7:53 PM
    Thats what I suspected
  • r

    rough-oil-1458

    09/02/2018, 7:53 PM
    Cool
  • r

    rough-oil-1458

    09/02/2018, 7:53 PM
    You made it very easy to pull in TF hahahaha
  • b

    big-piano-35669

    09/02/2018, 7:53 PM
    The Terraform Provider also takes EnvVars
    Oh, I wonder if you're hitting: https://github.com/pulumi/pulumi-terraform/issues/181
  • b

    big-piano-35669

    09/02/2018, 7:54 PM
    For config variables that are required, but take defaults from environment variables, we don't always generate the right thing.
  • b

    big-piano-35669

    09/02/2018, 7:54 PM
    If so, I know @microscopic-florist-22719 is actively working on a fix for this that should land next week.
Powered by Linen
Title
b

big-piano-35669

09/02/2018, 7:54 PM
If so, I know @microscopic-florist-22719 is actively working on a fix for this that should land next week.
View count: 1