Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing aws-native:sqs:QueuePolicy #69

Closed
sam-goodwin opened this issue Jan 27, 2023 · 5 comments
Closed

Missing aws-native:sqs:QueuePolicy #69

sam-goodwin opened this issue Jan 27, 2023 · 5 comments
Assignees
Labels
kind/enhancement Improvements or new features resolution/fixed This issue was fixed

Comments

@sam-goodwin
Copy link

What happened?

The AWS::SQS::QueuePolicy is missing.

Expected Behavior

When using the QueuePolicy Resource, the application should deploy without fail.

Steps to reproduce

Create a Queue and grant another Resource access. This should result in a QueuePolicy Resource being created with a Policy.

Output of pulumi about

CLI
Version      3.53.1
Go Version   go1.19.5
Go Compiler  gc

Plugins
NAME    VERSION
aws     5.28.0
nodejs  unknown

Host
OS       darwin
Version  13.1
Arch     arm64

This project is written in nodejs: executable='/Users/samgoodwin/.nvm/versions/node/v16.14.2/bin/node' version='v16.14.2'

Current Stack: sam-g/stock-bot/stock-bot

TYPE                 URN
pulumi:pulumi:Stack  urn:pulumi:stock-bot::stock-bot::pulumi:pulumi:Stack::stock-bot-stock-bot


Found no pending operations associated with stock-bot

Backend
Name           pulumi.com
URL            https://app.pulumi.com/sam-g
User           sam-g
Organizations  sam-g

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@sam-goodwin sam-goodwin added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Jan 27, 2023
@sam-goodwin
Copy link
Author

When mapping this one, the Pulumi classic QueuePolicy resource only accepts a single queueUrl while the CFN Resource passes an array.

My only course of action is to create multiple QueuePolicy resources? Problem is I am expected to return a Resource from the mapping function.

Should I create a ComponentResource to encapsulate them?

const comp = new ComponentResource(
  "AWS::SQS::QueuePolicy",
  name,
  {},
  options
);

props.Queues.map(
  (queueUrl) =>
    new sqs.QueuePolicy(
      name,
      {
        policy: toJson(props.PolicyDocument),
        queueUrl,
      },
      {
        parent: comp,
      }
    )
);
return comp;

@AaronFriel
Copy link

I've left a comment here which is applicable to this issue:

#66 (comment)

@AaronFriel
Copy link

Re: creating multiple queue resources, @pgavlin could you take a look at that?

@AaronFriel AaronFriel added kind/enhancement Improvements or new features and removed needs-triage Needs attention from the triage team labels Jan 30, 2023
@pgavlin
Copy link
Member

pgavlin commented Jan 30, 2023

Should I create a ComponentResource to encapsulate them?

Yes, I think that's a reasonable path forwards. It's been a while since I had my nose in this code, so I can't recall for certain, but you may need to make sure that the component resource has appropriate public properties s.t. attribute mappings work properly.

@AaronFriel AaronFriel removed the kind/bug Some behavior is incorrect or out of spec label Jul 3, 2023
@corymhall corymhall added the resolution/fixed This issue was fixed label May 24, 2024
@corymhall
Copy link
Contributor

Closing this since aws-native:sqs:QueuePolicy is available in the latest version of @pulumi/aws-native (v0.107.0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Improvements or new features resolution/fixed This issue was fixed
Projects
None yet
Development

No branches or pull requests

4 participants