Hi, I'm trying to set up a slack configuration usi...
# aws
m
Hi, I'm trying to set up a slack configuration using
aws.chatbot.SlackChannelConfiguration
, but am repeatedly getting an unauthorized error. I manually created the same chatbot in the aws console, using the same role, and same logged in user, and that configuration works fine. I just cannot get pulumi to create it. Any suggestions?
role:
Copy code
const chatbotRole = new aws.iam.Role('ChatbotRole', {
    assumeRolePolicy: JSON.stringify({
      Version: '2012-10-17',
      Statement: [
        {
          Effect: 'Allow',
          Principal: {
            Service: '<http://chatbot.amazonaws.com|chatbot.amazonaws.com>',
          },
          Action: 'sts:AssumeRole',
        },
      ],
    }),
    managedPolicyArns: [
      'arn:aws:iam::aws:policy/AmazonSNSFullAccess',
      'arn:aws:iam::aws:policy/CloudWatchReadOnlyAccess',
      'arn:aws:iam::aws:policy/ReadOnlyAccess',
    ],
  });
chatbot:
Copy code
new aws.chatbot.SlackChannelConfiguration(
    'test',
    {
      configurationName: 'test config',
      iamRoleArn: chatbotRole.arn,
      slackChannelId: 'C----',
      slackTeamId: 'T----',
      snsTopicArns: [topic.arn],
      guardrailPolicyArns: ['arn:aws:iam::aws:policy/ReadOnlyAccess'],
      userAuthorizationRequired: false
    }
  );