• f

    fast-florist-41572

    7 months ago
    Is there any easy way to use a local stack without having to logout of my remote backend and login to the local one?
    f
    l
    +1
    10 replies
    Copy to Clipboard
  • a

    astonishing-dentist-11149

    7 months ago
    Heya, so we build our stacks with automation in gitlab CI. When we do this, obviously the files for the stack do not get "saved" back into the branch when this happens. They are created on the builder and deleted seconds after the build is complete. Do any of you have this problem? How have you solved it? What I have been doing is pulling the code and doing a pulumi refresh to bring it in when I need it. I have thought about letting the builder commit the new files, but that feels like a really bad idea in most cases.
    a
    b
    5 replies
    Copy to Clipboard
  • h

    helpful-account-44059

    7 months ago
    Hi,i'm following the code to create new aws eks cluter, after
    pulumi up
    , i got this error:
    Diagnostics:
      eks:index:VpcCni (relation-aws-eks-cluter-vpc-cni):
        error: Command failed: kubectl apply -f C:\Users\Matrix\AppData\Local\Temp\tmp-6800oi250Aa7ZzSV.tmp
        error: You must be logged in to the server (the server has asked for the client to provide credentials)
    
      pulumi:pulumi:Stack (relation-aws-eks-cluter-dev):
        error: You must be logged in to the server (the server has asked for the client to provide credentials)
    
        error: update failed
    how to fix?
    h
    2 replies
    Copy to Clipboard
  • m

    magnificent-lifeguard-15082

    7 months ago
    Is there a way (ts) to register events for resources when they are created/updated within the runtime? Ie. to publish on a sns topic when a certain resource is updated or created. Concrete example: publish sns topic when a Migration resource fails.
    m
    2 replies
    Copy to Clipboard
  • n

    nice-pharmacist-5320

    7 months ago
    Hello everyone. I have all my env values set in pulumi config as I want pulumi stack to be the source of truth. I can list all the values by running
    pulumi config -j
    or get them one by one using
    pulumi config <config_name>
    but I want it in env. Is there a way to export all config from
    pulumi config
    to env? I have to set all of the config as env for a github action
    n
    1 replies
    Copy to Clipboard
  • b

    bored-table-20691

    7 months ago
    Is there any way to change the provider without Pulumi wanting to do a replace? Specifically, I am changing from the default AWS provider to an explicit one (configured with all the same values), but running
    pulumi up
    wants to do a wholesale replace (of VPCs, EKS cluster, etc), which would be very sad.
    b
    s
    8 replies
    Copy to Clipboard
  • b

    bored-table-20691

    7 months ago
    I am trying out the new Pulumi 3.23.0 capability of disabling the default providers, and have this in my stack:
    pulumi:disable-default-providers:
      - aws
      - kubernetes
    This seems to work well for AWS, but I am having an odd issue with the Kubernetes one. Specifically, I have the following resource:
    _, err = yaml.NewConfigFile(ctx, "certmanager-deploy-file", &yaml.ConfigFileArgs{
    		File: "./cert-manager.yaml",
    		Transformations: []yaml.Transformation{
    			// We need to make two modifications:
    			// 1. Add the role ARN for IRSA
    			// 2. Set the fsGroup for IRSA token mapping
    			// Docs here: <https://cert-manager.io/docs/configuration/acme/dns01/route53/#eks-iam-role-for-service-accounts-irsa>
    			func(state map[string]interface{}, opts ...pulumi.ResourceOption) {
    				metadata := state["metadata"].(map[string]interface{})
    				name := metadata["name"]
    				if state["kind"] == "ServiceAccount" && name == "cert-manager" {
    					var annotations map[string]interface{}
    					if v, ok := metadata["annotations"]; !ok {
    						annotations = make(map[string]interface{})
    						metadata["annotations"] = annotations
    					} else {
    						annotations = v.(map[string]interface{})
    					}
    					annotations["<http://eks.amazonaws.com/role-arn|eks.amazonaws.com/role-arn>"] = irsaRole.Arn
    				}
    				if state["kind"] == "Deployment" && name == "cert-manager" {
    					deploymentSpec := state["spec"].(map[string]interface{})
    					template := deploymentSpec["template"].(map[string]interface{})
    					podSpec := template["spec"].(map[string]interface{})
    					podSpec["securityContext"] = map[string]interface{}{
    						"fsGroup": 1001,
    					}
    				}
    
    			},
    		},
    	}, pulumi.DependsOn([]pulumi.Resource{irsaRole}), pulumi.Provider(eksConfig.Provider))
    	if err != nil {
    		return nil, err
    	}
    Where
    eksConfig.Provider
    is constructed as the result of an
    eks.Cluster
    creation:
    k8sProvider, err := providers.NewProvider(ctx, "k8s-ssa-provider", &providers.ProviderArgs{
    		Kubeconfig: kubeconfig,
    	})
    	if err != nil {
    		return nil, err
    	}
    When I run this with the default Kubernetes one disabled, I get this error:
    error: program failed: 1 error occurred:
        	* decoding YAML: rpc error: code = Unknown desc = unknown provider ''
        exit status 1
    There is not any more info in the logs even if I set logging to 9. If I enable the Kubernetes default provider, it works just fine, even though I am passing an explicit provider here. Is this a bug or am I doing something unexpected here?
    b
    o
    9 replies
    Copy to Clipboard
  • c

    curved-summer-41191

    7 months ago
    Is there a way to interact with the pulumi engine programmatically? Like a pulumi cli api
    c
    b
    2 replies
    Copy to Clipboard
  • f

    fierce-ability-58936

    7 months ago
    I want to apply a transformation to all children of a specific CustomComponent resource, to import existing resources into the stack on the first run. But I couldn't find a way how to do that transparently: The stack transformation
    ctx.RegisterStackTransformation(...
    applies to all resources in order, without taking into account child/parent relationship. And it doesn't seem to be a way to check if "is it a parent of XX?". I tried to add a transformation to the CustomComponent resource in the stack transformation but it didn't work (the nested one never runs). In other words, I wanted to add another transformation in the stack transformation. Seems to be a limitation? I'm using Go, if that matters. Does anyone have an idea how to achieve this? I could add that resource-specific transformation when instantiating the CustomResource, but that would require doing that everywhere including tests.
    f
    l
    3 replies
    Copy to Clipboard
  • m

    most-lighter-95902

    7 months ago
    Hi, does anyone know how to pass in
    --config
    flag to
    docker run
    via Pulumi? I’m using
    new docker.Container
    but not sure how I can pass in custom flags like this?
    m
    q
    5 replies
    Copy to Clipboard