• c

    curved-morning-41391

    7 months ago
    Anyone know the reason for needing
    pulumi.String
    instead of just a Go string?
    c
    b
    3 replies
    Copy to Clipboard
  • p

    proud-angle-89904

    7 months ago
    hi folks, i’m following along with kubernetes the hard way, and just got to the point where they provision a certificate authority… i’m trying to figure out whether i can do that in pulumi-- i came across the [tls provider][], but i’m not quite sure where to go from there… [tls provider]: https://www.pulumi.com/registry/packages/tls
    p
    q
    5 replies
    Copy to Clipboard
  • o

    orange-policeman-59119

    7 months ago
    You can write a native resource provider in Go, which while requiring more steps, is going to be the path forward right now. I have an example I'm working on here: https://github.com/aaronfriel/pulumi-wordle. Some other folks on the team are maintaining similar native providers that are arguably more useful 🙂
    o
    1 replies
    Copy to Clipboard
  • b

    bored-table-20691

    7 months ago
    @orange-policeman-59119 what's the best example of a native package that's simple but not trivial, ideally something that manages a REST API style resource, and implements all the core functionality (create update delete and diff)? The typical xyz example is a bit too simple to help beyond the boilerplate imo.
    b
    b
    +1
    6 replies
    Copy to Clipboard
  • l

    late-energy-66663

    7 months ago
    Hi Team, Wonder if you can advise , I am new to golang and Pulumi, creating multiple EC2 multiple instances with following Code . I would like to export , publicip, ec2name , hostname for each ec2 machine in a separate record . I am creating a ec2.Instance slice and then exporting their value . What would be the best way to get the output in the following format, desired output:
    Machine 1
    hostname: <http://ec2-15-161-152-141.eu-south-1.compute.amazonaws.com|ec2-15-161-152-141.eu-south-1.compute.amazonaws.com>
    Public ip : 15.161.152.141
    Machine2
    hostname: <http://ec2-15-160-154-234.eu-south-1.compute.amazonaws.com|ec2-15-160-154-234.eu-south-1.compute.amazonaws.com>
    Public ip : 15.160.154.234
    Current Code :
    var nodeList []*ec2.Instance
    
    for i := 1; i <= args.NumberOfNodes; i++ {
       vm.Instance, err = ec2.NewInstance(ctx, fmt.Sprintf("machine-%d", i), &ec2.InstanceArgs{
          Tags: pulumi.StringMap{"Name": pulumi.String(fmt.Sprintf("kafka-%d", i))},
          //InstanceType:        pulumi.String("t3.large"),
          InstanceType:        args.InstanceType,
          VpcSecurityGroupIds: pulumi.StringArray{vm.SecurityGroup.ID()},
          Ami:                 pulumi.String("ami-0f8ce9c417115413d"),
          UserData:            userData,
          KeyName:             deployer.KeyName,
       })
       if err != nil {
          panic("error creating ec2 instance")
       }
       nodeList = append(nodeList, vm.Instance)
    }
    
    for k, v := range nodeList {
       ctx.Export("publicIp"+strconv.Itoa(k), v.PublicIp)
       ctx.Export("publicHostName"+strconv.Itoa(k), v.PublicDns)
    
    
    }
    Current Outputs:
    publicHostName0: "<http://ec2-15-161-152-141.eu-south-1.compute.amazonaws.com|ec2-15-161-152-141.eu-south-1.compute.amazonaws.com>"
    publicHostName1: "<http://ec2-15-160-154-234.eu-south-1.compute.amazonaws.com|ec2-15-160-154-234.eu-south-1.compute.amazonaws.com>"
    
        publicIp0      : "15.161.152.141"
        publicIp1      : "15.160.154.234"
    l
    b
    67 replies
    Copy to Clipboard
  • b

    billions-judge-9412

    7 months ago
    When trying to assign a userassignedidentity to AKS following this example: https://www.pulumi.com/registry/packages/azure-native/api-docs/containerservice/managedcluster/#createupdate-managed-cluster-with-enableahub I get the error that "pulumi.AnyMap" isnt declared by package pulumi Anyone know what gives? Second question: I've created an identity - is it identity.ID() that i have to pass in? - How do i convert that ID to a string?
    b
    b
    69 replies
    Copy to Clipboard
  • b

    billions-judge-9412

    7 months ago
    Is there any way to turn a pulumi.StringOutput into a string? I just need a resourcegroup.Name (a pulumi.StringOutput) to be a string ....
    b
    b
    2 replies
    Copy to Clipboard
  • r

    ripe-shampoo-80285

    7 months ago
    What is the best way to convert a StringOutput or StringPtrOutput to StringArrayOutput. I have tried the following, but it doesn't seem to work. Any help will be appreciated. vpcSgId := cluster.EksCluster.ApplyT(func(eksCluster *awseks.Cluster) pulumi.StringArrayOutput { return eksCluster.VpcConfig.ClusterSecurityGroupId().ApplyT(func(sgId *string) pulumi.StringArray { return pulumi.StringArray{pulumi.String(*sgId)} }).(pulumi.StringArrayOutput) })
    r
    2 replies
    Copy to Clipboard
  • q

    quiet-wolf-18467

    7 months ago
    Creating resources within ApplyT can mean that the preview isn't always accurate. I wouldn't go as far to call this an anti pattern, but definitely a last resort.
    q
    l
    2 replies
    Copy to Clipboard
  • r

    ripe-shampoo-80285

    7 months ago
    Does pulumi support Helmfile?
    r
    1 replies
    Copy to Clipboard