Skip to content

Commit

Permalink
add template tags for marketplace constructs
Browse files Browse the repository at this point in the history
  • Loading branch information
suhussai committed Jun 3, 2024
1 parent d58674e commit 96e54a1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/control-plane/aws-marketplace/entitlement-logic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import * as subscriptions from 'aws-cdk-lib/aws-sns-subscriptions';
import * as sqs from 'aws-cdk-lib/aws-sqs';
import { NagSuppressions } from 'cdk-nag';
import { Construct } from 'constructs';
import { addTemplateTag } from '../../utils';

export interface EntitlementLogicProps {
readonly assetBucket: s3.IBucket;
Expand All @@ -23,6 +24,7 @@ export interface EntitlementLogicProps {
export class EntitlementLogic extends Construct {
constructor(scope: Construct, id: string, props: EntitlementLogicProps) {
super(scope, id);
addTemplateTag(this, 'EntitlementLogic');

const entitlementSQSQueueEncryptionKey = new cdk.aws_kms.Key(
this,
Expand Down
3 changes: 2 additions & 1 deletion src/control-plane/aws-marketplace/saas-product.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { NagSuppressions } from 'cdk-nag';
import { Construct } from 'constructs';
import { EntitlementLogic } from './entitlement-logic';
import { SubscriptionLogic } from './subscription-logic';
import { DetailType, IEventManager, generateAWSManagedRuleSet } from '../../utils';
import { DetailType, IEventManager, addTemplateTag, generateAWSManagedRuleSet } from '../../utils';

/**
* Enum representing the pricing models for an AWS Marketplace SaaS product.
Expand Down Expand Up @@ -100,6 +100,7 @@ export class AWSMarketplaceSaaSProduct extends Construct {
*/
constructor(scope: Construct, id: string, props: AWSMarketplaceSaaSProductProps) {
super(scope, id);
addTemplateTag(this, 'AWSMarketplaceSaaSProduct');

const quickstartBucket = s3.Bucket.fromBucketName(this, 'CodeBucket', 'aws-quickstart');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import * as s3 from 'aws-cdk-lib/aws-s3';
import { BucketDeployment, DeployTimeSubstitutedFile, Source } from 'aws-cdk-lib/aws-s3-deployment';
import { NagSuppressions } from 'cdk-nag';
import { Construct } from 'constructs';
import { generateAWSManagedRuleSet } from '../../utils';
import { addTemplateTag, generateAWSManagedRuleSet } from '../../utils';

/**
* Properties for the SampleRegistrationWebPage construct.
Expand Down Expand Up @@ -55,6 +55,8 @@ export interface SampleRegistrationWebPageProps {
export class SampleRegistrationWebPage extends Construct {
constructor(scope: Construct, id: string, props: SampleRegistrationWebPageProps) {
super(scope, id);
addTemplateTag(this, 'SampleRegistrationWebPage');

const websiteBucket = new s3.Bucket(this, 'WebsiteS3Bucket', {
enforceSSL: true,
autoDeleteObjects: props.autoDeleteBucketObjects,
Expand Down
2 changes: 2 additions & 0 deletions src/control-plane/aws-marketplace/subscription-logic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import * as s3 from 'aws-cdk-lib/aws-s3';
import * as sqs from 'aws-cdk-lib/aws-sqs';
import { NagSuppressions } from 'cdk-nag';
import { Construct } from 'constructs';
import { addTemplateTag } from '../../utils';

export interface SubscriptionLogicProps {
readonly productCode: string;
Expand All @@ -21,6 +22,7 @@ export interface SubscriptionLogicProps {
export class SubscriptionLogic extends Construct {
constructor(scope: Construct, id: string, props: SubscriptionLogicProps) {
super(scope, id);
addTemplateTag(this, 'SubscriptionLogic');

const meteringRecordsTable = new dynamodb.Table(this, 'AWSMarketplaceMeteringRecords', {
partitionKey: { name: 'customerIdentifier', type: dynamodb.AttributeType.STRING },
Expand Down

0 comments on commit 96e54a1

Please sign in to comment.