I'm trying to comunicate with you, using this chan...
# typescript
n
I'm trying to comunicate with you, using this channel and appeal to your experience about pulumi to resolve this issue. I've got a weird behavior of pulumi in my devops stack. I try to update a value of an url (pulumi.devops.yaml) for a CORS policy access using pulumi up and it shows me this error:
Copy code
aws:cognito:UserPool (devops-devops-auth-usr-pool):
  error: 1 error occurred:
        * updating urn:pulumi:devops::bric-infra::bric:infra:Infra$bric:auth:Cognito$aws:cognito/userPool:UserPool::devops-devops-auth-usr-pool: 1 error occurred:
        * error updating Cognito User pool (eu-central-1_uRXXXXXXq6): InvalidParameter: 1 validation error(s) found.
    - minimum field size of 1, UpdateUserPoolInput.AccountRecoverySetting.RecoveryMechanisms
but , If I run it again, pulumi up runs without any issue, everything is ok. Why do I run pulumi up twice?
l
Can you paste (using the Slack Text Snippet feature) the code that creates the UserPool?
n
Hi!! ok
Copy code
this.userPool = new aws.cognito.UserPool(
      namespaced(name, "usr-pool"),
      { emailConfiguration: emailConfig,
        autoVerifiedAttributes: ["email"],
        usernameAttributes: ["email"],
        schemas: [
          {
            attributeDataType: "String",
            name: "email",
            mutable: false,
            required: true,
            stringAttributeConstraints: {
              minLength: "1",
              maxLength: "256",
            },
          },
          {
            attributeDataType: "String",
            name: "userType",
            mutable: true,
            stringAttributeConstraints: {
              minLength: "1",
              maxLength: "256",
            },
          },
        ],
        lambdaConfig: {
          postConfirmation: getFunctionArn(args.lambdaPostConfirmation),
          customMessage: getFunctionArn(args.lambdaCustomMessage),
        },
      },
      resourceOpts
    );
l
Do you run your
pulumi up
with
--refresh
? Or run a refresh occasionally?
n
I use refresh.. pulumi always find something to update or delete.. even I didn't change anything.. look at this..
I don't understand that.. and some times it deletes security groups rules..
image.png
l
That's probably becuase you're mixing internal and associatedrules
Don't refresh, fix your code
n
ok.. I´m going to check them
thanks..
l
Your original problem will go away if you don't refresh. But better, just set that value correctly.
n
yes.. One step at time..