1
1
import { IEcsDeploymentConfig , CfnDeploymentConfig } from '@aws-cdk/aws-codedeploy' ;
2
2
3
- import { Aws , Construct , IResolvable } from '@aws-cdk/core' ;
3
+ import { Aws , Construct , IResolvable , Resource } from '@aws-cdk/core' ;
4
4
5
5
export interface EcsDeploymentConfigurationProps {
6
6
/**
@@ -26,8 +26,9 @@ export interface EcsDeploymentConfigurationProps {
26
26
readonly trafficRoutingConfig ?: CfnDeploymentConfig . TrafficRoutingConfigProperty | IResolvable ;
27
27
}
28
28
29
- export class EcsDeploymentConfiguration extends Construct {
30
- readonly deploymentConfig : IEcsDeploymentConfig ;
29
+ export class EcsDeploymentConfiguration extends Resource implements IEcsDeploymentConfig {
30
+ readonly deploymentConfigName : string ;
31
+ readonly deploymentConfigArn : string ;
31
32
32
33
constructor ( scope : Construct , id : string , props : EcsDeploymentConfigurationProps ) {
33
34
super ( scope , id ) ;
@@ -39,10 +40,8 @@ export class EcsDeploymentConfiguration extends Construct {
39
40
40
41
const deployConfigurationName = props . deploymentConfigName ?? cfnDeploymentConfig . ref ;
41
42
42
- this . deploymentConfig = {
43
- deploymentConfigName : deployConfigurationName ,
44
- deploymentConfigArn : this . arnForDeploymentConfig ( deployConfigurationName ) ,
45
- } ;
43
+ this . deploymentConfigName = deployConfigurationName ;
44
+ this . deploymentConfigArn = this . arnForDeploymentConfig ( deployConfigurationName ) ;
46
45
}
47
46
48
47
private arnForDeploymentConfig ( deploymentConfigurationName : string ) : string {
0 commit comments