https://pulumi.com logo
Docs
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
getting-started
  • b

    bored-monitor-99026

    04/10/2022, 1:42 AM
    hi everyone, i've created a protected resource, and then i unprotected it directly by modifying the state:
    pulumi state unprotect ...
    now, in the code, i still have the code block which creates the protected resource, but when i run
    pulumi preview
    , it shows resources unchanged. what i imagine how it should work is: since i modify the state manually (setting it as unprotected), while my code has it as protected, when i do
    pulumi preview
    i expect it should show resource going from
    unprotected
    to
    protected
    . i know
    protect
    is a pulumi thing, but does my expectation make sense? is this expected?
    e
    • 2
    • 2
  • b

    bitter-army-70832

    04/11/2022, 12:45 AM
    Hey all, I'm a newbie, I keep receiving this error after I try to use Pulumi with Docker. I've attached the error and my Dockerfile. Any help wold be extremely appreciated.
    l
    • 2
    • 2
  • b

    bored-monitor-99026

    04/11/2022, 2:22 AM
    hi everyone, how do you properly type this go struct in python?
    type Team struct {
      Name         string `yaml:"name"`
      Description  string `yaml:"description"`
      Slug         string   `yaml:"slug"`
      ParentTeamId int
      Teams        []Team   `yaml:"teams"`
    }
    here is what i have:
    @dataclass
    class Team:
        name: str
        slug: str
        description: str
        ...
        subteams: Optional[list[Team]] 
        parent_team_id: Optional[int] = None
    the team data is read from a yaml file here are several issues: 1. in order to use
    .
    refence , you have to do
    Team(**team)
    to create the object, where
    team
    is a python dict read from YAML. however, this will be flagged by type checker:
    Arguments missing for parameters "name", "slug", "description
    2. there is a nested field
    subteams
    , when reading from yaml, it's not automatically deserialized, so you have to create the object again
    Team(**sub_team)
    to use
    .
    reference 3. since not every team entry has
    subteam
    field, you have to assign empty list as default value. but when you iterate over the entries in yaml, you will have type error
    Object of type "None" cannot be used as iterable value
    when you do
    parent_team.subteams
    p
    b
    s
    • 4
    • 15
  • s

    stocky-butcher-62635

    04/11/2022, 9:49 AM
    I can't write the C# that works because I don't have domain knowledge about Azure -- does that sound right?
  • s

    stocky-butcher-62635

    04/11/2022, 10:02 AM
    error: Running program 'C:\Work\Azure\RwbPulumiProject\bin\Debug\netcoreapp3.1\RwbPulumiProject.dll' failed with an unhandled exception:
        System.ArgumentNullException: [Input] Pulumi.AzureNative.AzureData.SqlServerArgs.SqlServerRegistrationName is required but was not given a value (Parameter 'SqlServerRegistrationName')
  • s

    stocky-butcher-62635

    04/11/2022, 10:05 AM
    We already have four
    SQL server
    things in Azure's lit of All resource but no 'SQL server registration'. Why is pulumi requiring this?
  • s

    stocky-butcher-62635

    04/11/2022, 10:06 AM
    in fact I can't even find anything called SQL server registration in the Azure website
  • s

    stocky-butcher-62635

    04/11/2022, 11:13 AM
    OK, so
    Pulumi.AzureNative.AzureData.SqlServer
    is not
    Pulumi.AzureNative.Sql.Server
  • s

    stocky-butcher-62635

    04/11/2022, 11:18 AM
    I guess what's happening now is that for some reason pulumi thinks that the resource group exists even though it doesn't. It's appended something to resource group name. (I deleted the resource group that it had created and then failed.)
  • s

    stocky-butcher-62635

    04/11/2022, 11:26 AM
    pulumi state delete
    ?
  • s

    stocky-butcher-62635

    04/11/2022, 11:26 AM
    Cleaning up after a bad
    up
    is quite hard work!
  • s

    stocky-butcher-62635

    04/11/2022, 11:34 AM
    Sql.Server sqlServer = new Sql.Server($"{PulumiProject}-{ae}-sql-server", new Sql.ServerArgs()
            {
                ResourceGroupName = resourceGroup.Name,
                AdministratorLogin = "rwb",
                AdministratorLoginPassword = "Rwb196884-AaBbCcDd12234&*()"
            });
    but
    azure-native:sql:Server (RwbPulumiProject-rwb-dev-sql-server):
        error: resource partially created but read failed autorest/azure: Service returned an error. Status=404 Code="ResourceNotFound" Message="The requested resource of type 'Microsoft.Sql/servers' with name 'RwbPulumiProject-rwb-dev-sql-server17e42d66' was not found.": Code="PasswordNotComplex" Message="Password validation failed. The password does not meet policy requirements because it is not complex enough."
  • s

    stocky-butcher-62635

    04/11/2022, 11:54 AM
    username is a substring of password, apparently.
  • s

    stocky-butcher-62635

    04/11/2022, 11:55 AM
    Can I create a server login and database user for that login? Or only an admin user for the server?
  • s

    stocky-butcher-62635

    04/11/2022, 11:55 AM
    and do the passwords have to be plaintext hard-coded into the C#?
  • s

    stocky-butcher-62635

    04/11/2022, 12:15 PM
    System.Diagnostics.Debug.WriteLine
    doesn't work. How do you debug the programme?
    p
    • 2
    • 1
  • s

    stocky-butcher-62635

    04/11/2022, 12:22 PM
    config.Require(...)
    returns
    Output<string>
    and there is no way to get the actual value?
    p
    • 2
    • 1
  • s

    stocky-butcher-62635

    04/11/2022, 12:46 PM
    pulumi stack change-secrets-provider
    is for where the encryption key is stored but not for the encrypted values themselves. How do I change it back? Looks like I have to delete the stack and start over?
  • s

    stocky-butcher-62635

    04/11/2022, 12:47 PM
    Maybe it didn't work anyway -- website says Pulumi Service under Secrets Management
  • b

    brainy-church-78120

    04/11/2022, 2:18 PM
    hi @stocky-butcher-62635! would you be up for sharing what ur working on? then we may be able to curate a set of docs and other learning resources to help get you in a good place. folks are also available to zoom with you if that works better.
    👍 1
  • s

    stocky-butcher-62635

    04/11/2022, 4:06 PM
    How about I make a GitHub repo and organise it into a sequence of steps?
    b
    • 2
    • 7
  • e

    echoing-smartphone-60420

    04/11/2022, 7:01 PM
    Has anyone ran into
    helm hook
    issues? 🧵
    b
    • 2
    • 9
  • s

    stocky-butcher-62635

    04/12/2022, 12:33 PM
    After creating an SQL Server database I want to make the connection string and add it to a key vault.
    // Make the database conneciotn string and store it in the key vault.
                Output<string> cs = administratorLoginPassword.Apply(z => $"Server={sqlServer.FullyQualifiedDomainName}; Database={database.Name}, uid=rwb, pwd={z}");
                KeyVault.Secret s = new KeyVault.Secret($"{PulumiProject}-{ae}-key-vault-secret", new KeyVault.SecretArgs()
                {
                    ResourceGroupName = resourceGroup.Name,
                    VaultName = v.Name,
                    SecretName = "ConnectionString",
                    Properties = new KeyVault.Inputs.SecretPropertiesArgs() { Value = cs }
                });
    But the value is coming out as junk
    Server=Calling [ToString] on an [Output<T>] is not supported.
    
        To get the value of an Output<T> as an Output<string> consider:
        1. o.Apply(v => $"prefix{v}suffix")
        2. Output.Format($"prefix{hostname}suffix");
    
        See <https://pulumi.io/help/outputs> for more details.
        This function may throw in a future version of Pulumi.; Database=Calling [ToString] on an [Output<T>] is not supported.
    
        To get the value of an Output<T> as an Output<string> consider:
        1. o.Apply(v => $"prefix{v}suffix")
        2. Output.Format($"prefix{hostname}suffix");
    
        See <https://pulumi.io/help/outputs> for more details.
        This function may throw in a future version of Pulumi., uid=rwb, pwd=Sql-Server-Admin-Password
    w
    b
    • 3
    • 2
  • s

    stocky-butcher-62635

    04/12/2022, 12:35 PM
    The only workaround I can think of is to store the password as plaintext in the
    yml
    config or to generate it on the fly so that I have a proper string instead of this
    Output
    that can't be used
  • s

    stocky-butcher-62635

    04/12/2022, 12:35 PM
    Code: https://github.com/rwb196884/pulumi/blob/sequence-03-secrets/rwb196884/MyStack.cs
  • e

    echoing-smartphone-60420

    04/12/2022, 1:10 PM
    Hmm, still fighting my Helm template issue here 🧵. Working for helm but not
    .release
    api
    g
    b
    • 3
    • 66
  • q

    quick-airport-30353

    04/12/2022, 3:34 PM
    how can I tell pulumi that my stack files are in a different folder other than the root?
    m
    • 2
    • 1
  • i

    incalculable-thailand-44404

    04/12/2022, 5:56 PM
    Hi Folks, I am new to Pulumi, I am trying to understand how to extract actual value out of a Pulumi Output<>. this is my usecase :
    const repository = new aws.ecr.Repository(".......");
    
    const serviceImage = pulumi.output(aws.ecr.getImage({
      imageTag: "latest",
      repositoryName: ... NEED TO SPECIFY THE ACTUAL STRING REPO NAME...,
    }));
    repository.name
    is of the form :
    pulumi.Output<String>
    which is why I cannot use it as is.
    b
    b
    • 3
    • 18
  • w

    white-chef-55657

    04/13/2022, 11:57 AM
    howdy 👋 I couldn’t find much information on best practices for breaking out pulumi to different files, I’m using typescript and simply importing * from folders according to my own logic not sure it’s the cause, but my issue right now is that I’m exporting a const from an inner file that I include from
    index.ts
    but it’s not being recognized as an output - is pulumi picking up all of the exports from all the files or do I need to indicate something specific in the root level
    index.ts
    ?
    v
    • 2
    • 7
  • r

    rhythmic-branch-12845

    04/14/2022, 9:06 AM
    hi folks, I have a couple of questions that I guess probably belong here rather than in #general. Rather than repeating myself, could somebody help me with them? https://pulumi-community.slack.com/archives/C84L4E3N1/p1649911995262149 https://pulumi-community.slack.com/archives/C84L4E3N1/p1649925295765309
    • 1
    • 1
Powered by Linen
Title
r

rhythmic-branch-12845

04/14/2022, 9:06 AM
hi folks, I have a couple of questions that I guess probably belong here rather than in #general. Rather than repeating myself, could somebody help me with them? https://pulumi-community.slack.com/archives/C84L4E3N1/p1649911995262149 https://pulumi-community.slack.com/archives/C84L4E3N1/p1649925295765309
oh, and if somebody wouldnt mind help clarifying: https://pulumi-community.slack.com/archives/C84L4E3N1/p1649918660769559
View count: 3