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
  • f

    fresh-actor-58531

    10/06/2021, 7:19 AM
    Hi Team, we are facing issue with pulumi stack - getting below error :
    [2021-10-06T06:47:38.665Z] error: the current deployment has 1 resource(s) with pending operations:
    [2021-10-06T06:47:38.665Z]   * urn:pulumi:stack-test::project-test::aws:elasticsearch/domain:Domain::stack-test, interrupted while deleting
    While updating the inbound rule for existing pulumi stack
    w
    • 2
    • 1
  • f

    fresh-actor-58531

    10/06/2021, 7:20 AM
    Kindly help, we are mentaining the stack from remote cloud
  • g

    gifted-greece-13666

    10/06/2021, 8:12 AM
    Hello everyone! 👋 I created my first stack on aws with Pulumi and everything went smoothly, resources are online and not having to deal with the AWS console everytime is super nice 😄 after that I wanted to use my S3 bucket as a pulumi backend (my Idea is to be able to manage the infrastructure from both my laptop and desktop). I was able to export the stack, then when I tried to import it after logging into the s3 backend, the cli correctly warned me about deserialization issues with
    error: could not deserialize deployment: constructing secrets manager of type "service": could not find access token for <https://api.pulumi.com>, have you logged in?
    , according to the doc i have to use
    pulumi stack change-secrets-provider "<awskms://alias/keyalias?region=myregion>"
    . Now, I must be doing something wrong in this part, but I can’t seem to figure it out: I created a Symmetric key (trying with an asymmetric throws
    InvalidKeyUsageException
    , copied the alias and used the change-secrets-provider command, but i get the following output: (I’m sure the alias is correct, I also tried using the keyId instead of the alias, but i get the same error. I tried with and without passing the region param)
    Migrating old configuration and state to new secrets provider
    I1006 09:53:48.314796   39657 sink.go:154] defaultSink::Error(error: bad value
    <http://github.com/pulumi/pulumi/sdk/v3/go/common/resource/config.symmetricCrypter.DecryptValue|github.com/pulumi/pulumi/sdk/v3/go/common/resource/config.symmetricCrypter.DecryptValue>
    	/private/tmp/pulumi-20210928-78813-8xkwft/sdk/go/common/resource/config/crypt.go:158
    <http://github.com/pulumi/pulumi/pkg/v3/resource/stack.(*cachingCrypter).DecryptValue|github.com/pulumi/pulumi/pkg/v3/resource/stack.(*cachingCrypter).DecryptValue>
    	/private/tmp/pulumi-20210928-78813-8xkwft/pkg/resource/stack/secrets.go:129
    <http://github.com/pulumi/pulumi/sdk/v3/go/common/resource/config.Value.Value|github.com/pulumi/pulumi/sdk/v3/go/common/resource/config.Value.Value>
    	/private/tmp/pulumi-20210928-78813-8xkwft/sdk/go/common/resource/config/value.go:74
    <http://github.com/pulumi/pulumi/sdk/v3/go/common/resource/config.Value.Copy|github.com/pulumi/pulumi/sdk/v3/go/common/resource/config.Value.Copy>
    	/private/tmp/pulumi-20210928-78813-8xkwft/sdk/go/common/resource/config/value.go:79
    <http://github.com/pulumi/pulumi/sdk/v3/go/common/resource/config.Map.Copy|github.com/pulumi/pulumi/sdk/v3/go/common/resource/config.Map.Copy>
    	/private/tmp/pulumi-20210928-78813-8xkwft/sdk/go/common/resource/config/map.go:49
    main.migrateOldConfigAndCheckpointToNewSecretsProvider
    	/private/tmp/pulumi-20210928-78813-8xkwft/pkg/cmd/pulumi/stack_change_secrets_provider.go:125
    main.newStackChangeSecretsProviderCmd.func1
    	/private/tmp/pulumi-20210928-78813-8xkwft/pkg/cmd/pulumi/stack_change_secrets_provider.go:102
    <http://github.com/pulumi/pulumi/sdk/v3/go/common/util/cmdutil.RunFunc.func1|github.com/pulumi/pulumi/sdk/v3/go/common/util/cmdutil.RunFunc.func1>
    	/private/tmp/pulumi-20210928-78813-8xkwft/sdk/go/common/util/cmdutil/exit.go:96
    <http://github.com/pulumi/pulumi/sdk/v3/go/common/util/cmdutil.RunResultFunc.func1|github.com/pulumi/pulumi/sdk/v3/go/common/util/cmdutil.RunResultFunc.func1>
    	/private/tmp/pulumi-20210928-78813-8xkwft/sdk/go/common/util/cmdutil/exit.go:112
    <http://github.com/spf13/cobra.(*Command).execute|github.com/spf13/cobra.(*Command).execute>
    	/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:846
    <http://github.com/spf13/cobra.(*Command).ExecuteC|github.com/spf13/cobra.(*Command).ExecuteC>
    	/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:950
    <http://github.com/spf13/cobra.(*Command).Execute|github.com/spf13/cobra.(*Command).Execute>
    	/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:887
    main.main
    	/private/tmp/pulumi-20210928-78813-8xkwft/pkg/cmd/pulumi/main.go:48
    runtime.main
    	/usr/local/Cellar/go/1.17.1/libexec/src/runtime/proc.go:255
    runtime.goexit
    	/usr/local/Cellar/go/1.17.1/libexec/src/runtime/asm_amd64.s:1581
    )
    g
    • 2
    • 2
  • f

    fresh-actor-58531

    10/06/2021, 9:48 AM
    any solution for interrupted
    b
    • 2
    • 2
  • q

    quiet-plumber-29358

    10/06/2021, 9:58 AM
    Hi, Is there a good resource somewhere out there with information about how to setup a landingzone in GCP? I dont feel like the official documentation covers it in detail. Im looking for an example codebase that covers for example bootstrapping, environments and policies. Thanks
    b
    • 2
    • 2
  • d

    damp-accountant-65956

    10/06/2021, 6:31 PM
    what's the best way to use
    ctx.Export()
    to export an array of values? Like I am creating a VPC and then an arbitrary number of subnets and I want to export each subnet's ARN, ID and name so I was trying to export an array of maps but I can't quite figure out how to cast things to outputs properly and use apply... just wondering if there were any examples I could look at?
    m
    r
    • 3
    • 4
  • f

    fast-easter-23401

    10/07/2021, 5:56 PM
    Hi everybody, This is a rather basic question. Any ideas will be greatly appreciated. I'm using a Helm Chart to deploy a cert-manager resource into a GCP cluster. Resources must be provisioned in a hierarchical order (cluster first, then cert-manager). So far so good, as it is possible to determine dependencies using the ComponentResourceOptions. So here's my problem: I wish to use the kubernetes.helm.v3.Chart class to create the cert-manager object, and I need to pass somehow the newly provisioned cluster as an argument to indicate which cluster cert-manager belongs to. Otherwise, my current context (the cluster kubectl is pointing to) you'll be used to host the cert-manager resource. How can I accomplish without manual intervention ? Thanks!
    b
    g
    • 3
    • 7
  • d

    delightful-fireman-31689

    10/08/2021, 2:51 AM
    Hi #getting-started #azure! I am trying to automate Azure ADB2C tenant create in my personal subscription with a single resource group where I have all the admin access. Unfortunately this gives me error 404 - appreciate any ideas how to fix it! Cheers This is the code:
    import * as azure_native from "@pulumi/azure-native";
    
    const b2cTenant = new azure_native.azureactivedirectory.B2CTenant("b2c", {
      location: "Australia",
      properties: {
        countryCode: "AU",
        displayName: "My Tenant",
      },
      resourceGroupName: "my-rg",
      resourceName: "<http://mytenant123451234234523456456756789876.onmicrosoft.com|mytenant123451234234523456456756789876.onmicrosoft.com>",
      sku: {
        name: "PremiumP1",
        tier: "A0",
      },
    });
    and here is the log:
    192-168-0-1:pulumi tuatara$ pulumi up --yes --skip-preview --debug --logflow --logtostderr
    Please choose a stack, or create a new one: dev
    Updating (dev)
    
    View Live: <https://app.pulumi.com/[REDACTED]/myPulumiProject/dev/updates/2>
    
         Type                                            Name                 Status                  Info
         pulumi:pulumi:Stack                             myPulumiProject-dev  **failed**              1 error; 16 debugs
     +   └─ azure-native:azureactivedirectory:B2CTenant  b2c                  **creating failed**     1 error
     
    Diagnostics:
      azure-native:azureactivedirectory:B2CTenant (b2c):
        error: resource partially created but read failed autorest/azure: Service returned an error. Status=404 Code="NotFound" Message="Resource with ID '[REDACTED]/my-rg/mytenant123451234234523456456756789876.onmicrosoft.com' does not exist." Target="resource": autorest/azure: Service returned an error. Status=404 Code="NotFound" Message="Resource with ID '[REDACTED]/my-rg/mytenant123451234234523456456756789876.onmicrosoft.com' does not exist." Target="resource"
     
      pulumi:pulumi:Stack (myPulumiProject-dev):
        debug: 2021/10/08 13:24:33 Testing if Service Principal / Client Certificate is applicable for Authentication..
        debug: 2021/10/08 13:24:33 Testing if Multi Tenant Service Principal / Client Secret is applicable for Authentication..
        debug: 2021/10/08 13:24:33 Testing if Service Principal / Client Secret is applicable for Authentication..
        debug: 2021/10/08 13:24:33 Testing if Managed Service Identity is applicable for Authentication..
        debug: 2021/10/08 13:24:33 Testing if Obtaining a token from the Azure CLI is applicable for Authentication..
        debug: 2021/10/08 13:24:33 Using Obtaining a token from the Azure CLI for Authentication
        debug: 2021/10/08 13:24:33 Getting OAuth config for endpoint <https://login.microsoftonline.com/> with  tenant [REDACTED]
        debug: Registering resource: t=pulumi:pulumi:Stack, name=myPulumiProject-dev, custom=false, remote=false
        debug: RegisterResource RPC prepared: t=pulumi:pulumi:Stack, name=myPulumiProject-dev
        debug: RegisterResource RPC finished: resource:myPulumiProject-dev[pulumi:pulumi:Stack]; err: null, resp: urn:pulumi:dev::myPulumiProject::pulumi:pulumi:Stack::myPulumiProject-dev,,,,
        debug: Running program '[REDACTED]' in pwd '[REDACTED]' w/ args: 
        debug: Registering resource: t=azure-native:azureactivedirectory:B2CTenant, name=b2c, custom=true, remote=false
        debug: RegisterResourceOutputs RPC prepared: urn=urn:pulumi:dev::myPulumiProject::pulumi:pulumi:Stack::myPulumiProject-dev
        debug: RegisterResource RPC prepared: t=azure-native:azureactivedirectory:B2CTenant, name=b2c
        debug: RegisterResourceOutputs RPC finished: urn=urn:pulumi:dev::myPulumiProject::pulumi:pulumi:Stack::myPulumiProject-dev; err: null, resp: 
        debug: RegisterResourceOutputs RPC finished: urn=urn:pulumi:dev::myPulumiProject::pulumi:pulumi:Stack::myPulumiProject-dev; err: null, resp: 
        error: update failed
     
    Resources:
        1 unchanged
    
    Duration: 1m12s
    w
    • 2
    • 9
  • s

    swift-australia-96791

    10/08/2021, 6:32 AM
    Hi All, I have been trying to use Pulumi GitHub Action and trying the new stack during run time below is the code snippet
    - uses: pulumi/actions@v3
            with:
              command: preview
              stack-name: prod
              upsert: true
              work-dir: PulumiProject 
            env:
              PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
    While GitHub Action runs I m getting an error " pulumi😛ulumi:Stack PulumiProject-prod create error: Missing required configuration variable 'PulumiProject:required_value' ", Can anyone assist me how to pass config values here?
    f
    b
    • 3
    • 2
  • m

    microscopic-addition-49262

    10/09/2021, 2:06 PM
    Hello,I have just started working on pulumi. I find this error. where is my mistake?
    f
    • 2
    • 2
  • m

    microscopic-addition-49262

    10/09/2021, 2:10 PM
    I want to deploy a simple application in GCP using Pulumi. how can i open jupyter notebook which will create bucket?
  • b

    broad-parrot-139

    10/09/2021, 3:23 PM
    Hello everyone, I am trying to use Pulumi to manage our k8s clusters. I don't understand how I can use Helm Releases properly with Pulumi - it hangs forever, even though I follow several examples. One question I have is, how do I pass my kubeconfig/cluster provider (created earlier in my sample stack) to the helm release? For regular Deployment/Services/... I can use the
    opts
    argument to pass the cluster provider, but I don't see it documented on Helm Release class
    c
    f
    • 3
    • 4
  • c

    clean-easter-25831

    10/10/2021, 7:18 PM
    I'm struggling with something that is probably very simple - I'm trying to use PodIdentity with AKS and assign identities to namespaces. In powershell I'd just run:
    az aks pod-identity add --resource-group $ClusterRG --cluster-name $ClusterName --namespace $namespace --name $identity --identity-resource-id $IdentityResourceId
    If I try and set this at cluster create time, I get the message: "PodIdentity addon does not support assigning pod identities on creation." How can I create the cluster first and then apply this? I don't really understand in Pulumi how to modify an object after creation. I'm using C# if it makes a difference.
    • 1
    • 1
  • b

    brave-nightfall-19158

    10/10/2021, 7:23 PM
    Hi all! I've just started with Pulumi and the trial version as we currently have approx 3-400 resources in Cloudformation and I'm trying out something new. I've just started with the index file, but wondering as I couldn't find any help anywhere, if there are best practices for splitting the resources into different files / folder structure? Every example I've seen shows all resources in the index file but this is not manageable. How do others do this? Any help/ideas are much appreciated as I start the Pulumi journey!
    b
    • 2
    • 3
  • d

    dry-tiger-83274

    10/11/2021, 9:48 PM
    Hi all! How can I execute PowerShell scripts on Windows EC2 instances? I know that I can use user_data as part of the EC2 object but it works for me just on Linux OS. Thanks for your help :)
    w
    • 2
    • 1
  • c

    chilly-plastic-75584

    10/12/2021, 5:44 PM
    Team is new to K8. Wondering a couple things from the pros here. • Would Pulumi be a good start for a team writing Go to learn K8 without doing the normal yaml approach, or is there any opinion on starting with the yaml and maturing to Pulumi later? (I know the answer I expect here 😉 but still wanted to make sure). • Next I'm wrapping up some tasks with Mage (a Go based task runner) and setup some docker compose and goreleaser stuff recently. Next step is Minikube/Kind deployment locally. Most of the work I'm doing I want to produce locally first in a single cluster for development work. ◦ I've considered one approach with https://devspace.sh/ which seems to make this a nice smooth process. ◦ The other is to wrap up some pulumi commands. I'm not certain though if I can do most of my work with local development with pulumi and only store state in dashboard once I push to an actual environment. ◦ So in summary: I'm wondering if I can replace Docker compose file reasonably with a pulumi setup without it being too complicated, and can I replace any need for helm/k8 yaml for the local stage of testing with pulumi, or is it designed more for the shared environment deployments into a staging system? Cheers!
    s
    • 2
    • 4
  • p

    prehistoric-shampoo-51907

    10/13/2021, 1:59 PM
    Hi, Is it possible to create k8s resources from templated yaml files, with outputs of other pulumi resources as input? The basic flow I’m after is • create an aws resource • use one of the outputs to render a k8s yaml • apply the k8s resource to the cluster It seems I can’t use the
    YAML
    field of
    yaml.ConfigGroupArgs (pulumi/pulumi-kubernetes/sdk/v3/go/kubernetes)
    because it expects plain
    []string
    , and I can’t use
    Transformations
    as the docs state that
    any values set on the state must be prompt (not Output values)
    . The docs also state that I shouldn’t use
    Apply
    and create the k8s resource in the callback because it could lead to 
    pulumi preview
     being wrong. Is there a solution other than using native k8s sdk resources instead of
    yaml.ConfigGroups
    ? Thanks
    g
    • 2
    • 12
  • f

    few-zebra-43062

    10/13/2021, 9:17 PM
    Hi everyone, Looking at adapting Pulumi for our Cloud infrastructure, but I'm not sure if that's even possible. Our app runs on Azure and consists of a few Function Apps, Storage Accounts, CDN endpoints, etc. We provide this app as a SaaS offering, where every customer get's his own "Tenant", meaning every customer gets his own infrastructure resources (duplicated basically). As far as I can tell, I can only use one Stack to deploy one environment. So I would need to create a stack for every customer manually, right? Or can I use one stack to deploy the same infrastructure X amount of times? Thanks! :)
    w
    s
    q
    • 4
    • 4
  • d

    dry-addition-79277

    10/15/2021, 9:19 AM
    Hi everyone, I'm trying to set up a cloudwatch alarm on lambda execution time, any useful resources for that particular use case, or lambda alarms in general?
  • a

    able-island-19908

    10/15/2021, 11:35 PM
    Is there a best-practice on how to determine the required permissions on the cloud provider provisioning account used by Pulumi? e.g. I'm working through the AWS tutorial examples, and I'm finding myself guessing at the required permissions -- editing permissions on the service account as tasks fail. I'm new to Pulumi, so I may be missing something obvious.
    b
    • 2
    • 3
  • f

    fast-grass-52071

    10/16/2021, 8:43 AM
    Team, This is related to https://pulumi-community.slack.com/archives/C01PF3E1B8V/p1631723058094400. I have combined the python code which uses both pulumi and pyvim modules in it. But, I am getting ’ModuleNotFoundError: No module named ‘pyVim’ ’ while executing the code although I have installed pyvim module in the venv using pip install pyvim inside the venv. Can anyone help me get rid of this?
    b
    • 2
    • 2
  • b

    brave-nightfall-19158

    10/17/2021, 3:37 PM
    Anyone imported an EC2 resource with instance metadata (e.g. AWS::CloudFormation::Init scripts) and user data? I'm struggling with the import for 2 reasons: 1. Userdata: my user data allows flags that the data is different. In pulumi it seems to show as a hash of some sort but not sure how I'm supposed to generate that? 2. I have my instance in Cloudformation and the metadata options doesn't seem to be available in Pulumi e.g. Init, Authentication etc. (screeenshot 2)? Many thanks for help!!
    b
    • 2
    • 7
  • w

    white-baker-74307

    10/17/2021, 5:48 PM
    Hello, I am trying to go through the Pulumi getting started, and I feel unbelievably dumb - I had an issue creating the "quickstart" project, so I want to start over, but now it says:
    Sorry, 'quickstart' is not a valid project name. A project with this name already exists.
    and for the life of me I cannot figure out how to completely delete the local cli project. I even deleted the cache named quickstart in ~/.pulumi folder. Anyone?
    b
    • 2
    • 29
  • g

    gray-beach-22985

    10/18/2021, 2:24 PM
    hello, how do I prevent other people from manually editing resources in AWS that were created with Pulumi (and thus are expected to be edited through Pulumi rather than manually edited)?
    p
    s
    • 3
    • 5
  • f

    few-army-64952

    10/18/2021, 5:29 PM
    hi folks, is there a way to import a JSON file and use it as policy document in Pulumi with TS?
    b
    • 2
    • 2
  • s

    swift-australia-96791

    10/20/2021, 7:37 AM
    Hi All, Can we create "Credentials for RDS database" in Secret Manager using Pulumi?
    g
    b
    • 3
    • 2
  • b

    big-plastic-81798

    10/21/2021, 8:00 AM
    Hi All, I'm new to pulumi and are in the process of trying to set up an Azure DevOps pipeline (also new to pipelines) following this page https://www.pulumi.com/docs/guides/continuous-delivery/azure-devops/# My issue is that when I try to run the script part after I run a pulumi up command it result in the variables being "$(pulumi stack output ResourceGroupName) instead of the real name of the resource group, does anyone have any idea as to what I might be missing for this to work??
    b
    • 2
    • 3
  • c

    colossal-vase-7526

    10/21/2021, 4:52 PM
    Hi all, I'm new to Pulumi and planning a big project (EXCITING), so keen to understand how many resources I might use. It'll be in Azure and would most probably be a resource group, a SQL database, a SQL database, 2 storage accounts, an App Service Plan, a Function App, a CDN Profile, a CDN Endpoint and Application Insights. That's 10 Azure resources per stack. Is that also 10 Pulumi resources are are there other things I need to include? I'm likely going to have 20-30 stacks for this project. Many many thanks in advance.
  • l

    little-soccer-5693

    10/21/2021, 9:15 PM
    hi. new guy here. i'm trying out the getting started tutorial: https://www.pulumi.com/docs/get-started/aws/deploy-changes/ but i get a golang stack dump when attempting to update my inf with
    pulumi up
    . Is this a bug or is something in my env not setup correctly? will paste stack trace in thread.
    c
    • 2
    • 2
  • s

    some-honey-3067

    10/22/2021, 2:37 AM
    Hello folks, I am trying to see if the kubernetes namespace exists using the .get function before creating it. I am not sure about the inputs to the .get function. Say, I have a namespace already created "my-namespace". I need to check before creating the namespace with the same name. This is my current code but doesn't work. let isNamespaceExist = k8s.core.v1.Namespace.get("my-namespace"); Thanks anyway
    f
    • 2
    • 8
Powered by Linen
Title
s

some-honey-3067

10/22/2021, 2:37 AM
Hello folks, I am trying to see if the kubernetes namespace exists using the .get function before creating it. I am not sure about the inputs to the .get function. Say, I have a namespace already created "my-namespace". I need to check before creating the namespace with the same name. This is my current code but doesn't work. let isNamespaceExist = k8s.core.v1.Namespace.get("my-namespace"); Thanks anyway
f

fast-easter-23401

10/22/2021, 6:26 PM
Hi @some-honey-3067, Pulumi operates in a declarative way, which means that you don't need to specify imperatively what pulumi should do (do this then that) . On the contrary, it is pulumi's responsibility to determine whether the operation you're trying to accomplish can be done or not. You need only to specify what is your desired state (i.e., I wish there's a <my-namespace> namespace in my cluster). As for your code: in nodeJS/Typescript you must include the keyword
new
to invoke the Namespace class constructor, which will create, if possible, a new namespace. But in order to do that, you need to specify which cluster to use. This is usually called a provider. So your code may end up looking a bit like this:
const nsName = 'my-namespace'
new Namespace(
  nsName,
  {
    apiVersion: 'v1',
    kind: 'Namespace',
    metadata: {
      name: nsName
    }
  },
  { provider: yourClusterInstance }
);
I hope this helps.
s

some-honey-3067

10/22/2021, 6:29 PM
@fast-easter-23401 I know this will create a new namespace but what if the namespace already exists? Will pulumi throw an error? Thanks for replying
f

fast-easter-23401

10/22/2021, 6:36 PM
It should, as your cloud provider's API would most probably return a client error (400), since the namespace already exists.
s

some-honey-3067

10/22/2021, 6:41 PM
My objective is to create the namespace only if it doesn't exist. Is there a way to achieve it?
f

fast-easter-23401

10/22/2021, 6:45 PM
The code snippet above can be used to this end.
s

some-honey-3067

10/23/2021, 1:17 AM
@fast-easter-23401 i got your point. I am looking for a more dynamic solution where if the namespace exists, Pulumi shouldn't throw an error and should pass without any errors.
f

fast-easter-23401

10/26/2021, 3:11 PM
Got any chance sorting this out? A different approach is to let pulumi know that you want to create a new namespace while provisioning a new resource. But you'll get an error anyways. I guess you could create a dynamic provider for this, but quite frankly I don't see the advantage of investing so much time. Who is responsible for executing your code? Does it run locally or in a CI/CD pipeline? Good luck.
s

some-honey-3067

10/27/2021, 4:57 AM
As a workaround, I do the following:
let createdNamespacesArray = Array();
let namespaceNamesArray = ["ns1", "ns2", "ns1", "ns3"];
for (let ns = 0; ns < namespaceNamesArray.length; ns++) {
if (!createdNamespacesArray.includes(namespaceNamesArray[ns])) {
const k8sNamespace = new k8s.core.v1.Namespace(
namespaceNamesArray[ns],
{},
{
provider: clusterInstance,
}
);
createdNamespacesArray.push(namespaceNamesArray[ns]);
}
}
This works for me but I don't like it really.
View count: 3