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

[Bug]: export topic ARN from workload stack #6002

Open
cvdb opened this issue Dec 18, 2024 · 0 comments
Open

[Bug]: export topic ARN from workload stack #6002

cvdb opened this issue Dec 18, 2024 · 0 comments
Labels
type/bug Issues that are bugs.

Comments

@cvdb
Copy link

cvdb commented Dec 18, 2024

Description:

How to access the ARN of a copilot generated SNS topic in an ADDON?

Details:

I need to reference the ARN of a topic created for a workload using the standard Pub/Sub process.
I know copilot has the JOB workload type but that is a bit heavy for what I need. I am trying to setup
some very basic AWS EventBridge Scheduler tasks that will publish a simple generic message onto an SNS topic.

Various copilot workers will then subscribe to the topic and use subscription filters to identify jobs intended for each worker.
The first limitation I had was that this does not work if I MANUALLY create an SNS topic. I needed to create a DUMMY workload
just to generate the PUBLISH topic that the workers that then subscribe to in their manifests.

That is OK, I used a JOB that will simply run some ADMIN one-off tasks and also setup this SHARED scheduler SNS topic.
I am now trying to use an ADDON to manage the basic AWS EventBridge Scheduler tasks, but I need to reference
this SHARED scheduler SNS topic ARN from within my ADDON as shown below.

The problem is, the ARN of workload topics are not exported from the stack.

This is what the ADDON template contains:

 18   UpdateVehicleLocationMetaData:
 17     Type: AWS::Scheduler::Schedule
 16     Properties:
 15       Name: !Sub ${App}-${Env}-update-vehicle-location-metadata
 14       Description: "Update related META-DATA index for the vehicle location index."
 13       FlexibleTimeWindow:
 12         Mode: OFF
 11       ScheduleExpression: rate(1 minute)
 10       State: ENABLED
  9       Target:
  8         Arn: <<<<< THIS IS WHAT i NEED >>>>>>
  7         RoleArn:
  6           Fn::ImportValue:
  5             !Sub ${App}-${Env}-schedulerExecutionRoleArn
  4         Input:
  3           Fn::ToJsonString:
  2             key1: "aaaa"
  1             key2: "bbbb"

Observed result:

SNS Topic in a workloads cloudformation template does not export the ARN of the SNS topics.

Expected result:

There should be a way to instruct copilot to export details on any resource within the stack.

Debugging:

Smashed my face into a wall...repeatedly!

@cvdb cvdb added the type/bug Issues that are bugs. label Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Issues that are bugs.
Projects
None yet
Development

No branches or pull requests

1 participant