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

feat(stepfunctions): add service integrations #1646

Merged
merged 24 commits into from
May 8, 2019
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
e33629a
Implement service integration for SNS & SQS
Jan 28, 2019
28d74ce
WIP
Jan 29, 2019
df9fb7b
WIP
rix0rrr Jan 29, 2019
b1dcd17
Add support for running ECS tasks in StepFunctions
rix0rrr Jan 31, 2019
a4e74e8
Make FunctionTask and ActivityTask to match new naming pattern
rix0rrr Jan 31, 2019
b501289
Merge remote-tracking branch 'origin/master' into huijbers/stepfuncti…
rix0rrr Apr 23, 2019
29c6e0c
WIP
rix0rrr Apr 23, 2019
106e04e
Merge remote-tracking branch 'origin/master' into huijbers/stepfuncti…
rix0rrr Apr 26, 2019
55a15e1
Get ECS library to build
rix0rrr Apr 27, 2019
b3cd0bc
Move metrics away
rix0rrr Apr 27, 2019
7766d0e
Adding tests
rix0rrr Apr 27, 2019
d0c5283
Don't inherit from task, do composition instead
rix0rrr May 6, 2019
8db693a
Refactor
rix0rrr May 7, 2019
3d2bf84
Get rid of 'xxx' and 'xxxPath' arguments, use Tokens to embed the dis…
rix0rrr May 7, 2019
67adba1
Merge remote-tracking branch 'origin/master' into huijbers/stepfuncti…
rix0rrr May 7, 2019
c0e5b87
Fix conflicts
rix0rrr May 7, 2019
cc98036
Get rid of duplicate definitions in vpc-ref
rix0rrr May 8, 2019
349e32d
Fix build
rix0rrr May 8, 2019
8d6df56
Mass rename "unresolved" => "isToken"
rix0rrr May 8, 2019
d220914
Rename Ecs classes
rix0rrr May 8, 2019
8d41855
Nothing is a construct and everything is bound through bind()
rix0rrr May 8, 2019
cf090d8
Placement is now configured in constructor through proper union types
rix0rrr May 8, 2019
f2a78a5
Fix casing in stepfunctions task
rix0rrr May 8, 2019
755ef40
Remove peerDependency
rix0rrr May 8, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix build
rix0rrr committed May 8, 2019
commit 349e32d4d89de984bd3136fea1ad8bf81e9a3f7f
Original file line number Diff line number Diff line change
@@ -120,7 +120,7 @@ export class ApplicationTargetGroup extends TargetGroupBase implements IApplicat
*/
public registerConnectable(connectable: ec2.IConnectable, portRange?: ec2.IPortRange) {
if (portRange === undefined) {
if (cdk.unresolved(this.defaultPort)) {
if (cdk.Token.isToken(this.defaultPort)) {
portRange = new ec2.TcpPortFromAttribute(this.defaultPort);
} else {
portRange = new ec2.TcpPort(parseInt(this.defaultPort, 10));
4 changes: 2 additions & 2 deletions packages/@aws-cdk/aws-route53/lib/records/zone-delegation.ts
Original file line number Diff line number Diff line change
@@ -28,9 +28,9 @@ export class ZoneDelegationRecord extends cdk.Construct {
super(scope, id);

const ttl = props.ttl === undefined ? 172_800 : props.ttl;
const resourceRecords = cdk.unresolved(props.nameServers)
const resourceRecords = cdk.Token.isToken(props.nameServers)
? props.nameServers // Can't map a string-array token!
: props.nameServers.map(ns => (cdk.unresolved(ns) || ns.endsWith('.')) ? ns : `${ns}.`);
: props.nameServers.map(ns => (cdk.Token.isToken(ns) || ns.endsWith('.')) ? ns : `${ns}.`);

new CfnRecordSet(this, 'Resource', {
hostedZoneId: props.zone.hostedZoneId,
30 changes: 30 additions & 0 deletions packages/@aws-cdk/aws-stepfunctions/lib/activity.ts
Original file line number Diff line number Diff line change
@@ -15,6 +15,32 @@ export interface ActivityProps {
* Define a new StepFunctions activity
*/
export class Activity extends Resource implements IActivity {
/**
* Construct an Activity from an existing Activity ARN
*/
public static fromActivityArn(scope: Construct, id: string, activityArn: string): IActivity {
class Imported extends Construct implements IActivity {
public get activityArn() { return activityArn; }
public get activityName() {
return this.node.stack.parseArn(activityArn, ':').resourceName || '';
}
}

return new Imported(scope, id);
}

/**
* Construct an Activity from an existing Activity Name
*/
public static fromActivityName(scope: Construct, id: string, activityName: string): IActivity {
return Activity.fromActivityArn(scope, id, scope.node.stack.formatArn({
service: 'states',
resource: 'activity',
resourceName: activityName,
sep: ':',
}));
}

/**
* @attribute
*/
@@ -144,11 +170,15 @@ export class Activity extends Resource implements IActivity {
export interface IActivity extends IResource {
/**
* The ARN of the activity
*
* @attribute
*/
readonly activityArn: string;

/**
* The name of the activity
*
* @attribute
*/
readonly activityName: string;
}
2 changes: 1 addition & 1 deletion packages/decdk/package.json
Original file line number Diff line number Diff line change
@@ -149,4 +149,4 @@
"engines": {
"node": ">= 8.10.0"
}
}
}