You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be helpful to output CDK- or Terraform-compatible artifacts to ease production deployments when using desired-state deployment styles, such as Cloud Formation.
To fully automate the generation of artifacts, it's important to remember that some of the required information, such as the list of subscribed events, is only known by NServiceBus Core.
An initial valuable step could be to provide, similarly to the transport CLI, a separate package allowing users to declare their infrastructure's desired state manually. For example, the following is a sample CDK resource that could be shipped as part of that package:
using Amazon.CDK;using Amazon.CDK.AWS.DynamoDB;using Amazon.CDK.AWS.IAM;using Amazon.CDK.AWS.SQS;using Attribute = Amazon.CDK.AWS.DynamoDB.Attribute;namespace Deploy;publicclassNServiceBusEndpointResource:Resource{publicNServiceBusEndpointResource(EndpointDetailsendpoint,Constructscope,stringid,IResourceProps?props=null):base(scope, id, props){varqueue=new Queue(this, endpoint.EndpointName,new QueueProps
{QueueName= endpoint.FullQueueName,RetentionPeriod= Duration.Seconds(endpoint.RetentionPeriod.TotalSeconds),});// Generate a stricter policy statementvarpolicyStatement=new PolicyStatement();
policyStatement.Effect = Effect.ALLOW;
policyStatement.AddAllResources();
policyStatement.AddAnyPrincipal();
policyStatement.AddActions(["sqs:*"]);
queue.AddToResourcePolicy(policyStatement);vardelay=new Queue(this,$"{endpoint.EndpointName}-delay",new QueueProps
{QueueName= endpoint.DelayQueueName,Fifo=true,DeliveryDelay= Duration.Seconds(900),RetentionPeriod= Duration.Seconds(endpoint.RetentionPeriod.TotalSeconds)});
delay.AddToResourcePolicy(policyStatement);if(endpoint.EventsToSubscribe !=null){foreach(var evtType in endpoint.EventsToSubscribe){//TODO: create the needed topic and subscribe}}}}publicclassEndpointDetails(string endpointName){publicstringEndpointName=> endpointName;publicstring?Prefix{get;set;}publicstringFullQueueName=>$"{Prefix}{endpointName}";publicstringDelayQueueName=>$"{FullQueueName}-delay.fifo";publicTimeSpanRetentionPeriod{get;set;}= TimeSpan.FromDays(4);publicType[]?EventsToSubscribe{get;set;}}
Additional Context
No response
The text was updated successfully, but these errors were encountered:
Describe the feature.
It would be helpful to output CDK- or Terraform-compatible artifacts to ease production deployments when using desired-state deployment styles, such as Cloud Formation.
This issue is related to but not dependent on:
To fully automate the generation of artifacts, it's important to remember that some of the required information, such as the list of subscribed events, is only known by NServiceBus Core.
An initial valuable step could be to provide, similarly to the transport CLI, a separate package allowing users to declare their infrastructure's desired state manually. For example, the following is a sample CDK resource that could be shipped as part of that package:
Additional Context
No response
The text was updated successfully, but these errors were encountered: