Commit ed32954 1 parent ba9d15b commit ed32954 Copy full SHA for ed32954
File tree 4 files changed +49
-2
lines changed
4 files changed +49
-2
lines changed Original file line number Diff line number Diff line change 3
3
(:require [crucible.resources :refer [spec-or-ref defresource ] :as res]
4
4
[crucible.values :as v]
5
5
[crucible.encoding.keys :refer [->key]]
6
+ [crucible.aws.events.ecs-parameters :as ecs-parameters]
6
7
[clojure.spec.alpha :as s]))
7
8
8
- (s/def ::id (spec-or-ref #(re-matches #"[\.\- _A-Za-z0-9]+" %)))
9
+ (s/def ::id (spec-or-ref ( s/and string? #(re-matches #"[\.\- _A-Za-z0-9]+" %) )))
9
10
10
11
(s/def ::arn (spec-or-ref string?))
11
12
12
- (s/def ::target (s/keys :req [::arn ::id ]))
13
+ (s/def ::ecs-parameters ::ecs-parameters/ecs-parameters-spec )
14
+
15
+ (s/def ::target (s/keys :req [::arn
16
+ ::id ]
17
+ :opt [::ecs-parameters ]))
13
18
14
19
(s/def ::targets (s/coll-of ::target :kind vector?))
15
20
Original file line number Diff line number Diff line change
1
+ (ns crucible.aws.events.aws-vpc-configuration
2
+ " AWS::ECS::Rule > AwsVpcConfiguration"
3
+ (:require [clojure.spec.alpha :as s]
4
+ [crucible.resources :refer [spec-or-ref]]))
5
+
6
+ (s/def ::assign-public-ip (spec-or-ref string?))
7
+
8
+ (s/def ::security-groups (s/coll-of string? :type vector))
9
+
10
+ (s/def ::subnets (s/coll-of string? :type vector))
11
+
12
+ (s/def ::aws-vpc-configuration-spec (s/keys :req [::subnets ]
13
+ :opt [::assign-public-ip
14
+ ::security-groups ]))
Original file line number Diff line number Diff line change
1
+ (ns crucible.aws.events.ecs-parameters
2
+ " AWS::ECS::Rule > EcsParameters"
3
+ (:require [clojure.spec.alpha :as s]
4
+ [crucible.aws.events.network-configuration :as network-configuration]
5
+ [crucible.resources :refer [spec-or-ref]]))
6
+
7
+ (s/def ::group (spec-or-ref string?))
8
+ (s/def ::launch-type (spec-or-ref string?))
9
+ (s/def ::platform-version (spec-or-ref string?))
10
+ (s/def ::task-count (spec-or-ref integer?))
11
+ (s/def ::task-definition-arn (spec-or-ref string?))
12
+ (s/def ::network-configuration ::network-configuration/network-configuration-spec )
13
+
14
+ (s/def ::ecs-parameters-spec (s/keys :req [::task-definition-arn ]
15
+ :opt [::group
16
+ ::launch-type
17
+ ::platform-version
18
+ ::task-count
19
+ ::network-configuration ]))
Original file line number Diff line number Diff line change
1
+ (ns crucible.aws.events.network-configuration
2
+ " AWS::ECS::Rule > NetworkConfiguration"
3
+ (:require [clojure.spec.alpha :as s]
4
+ [crucible.aws.events.aws-vpc-configuration :as aws-vpc-configuration]
5
+ [crucible.resources :refer [spec-or-ref]]))
6
+
7
+ (s/def ::aws-vpc-configuration ::aws-vpc-configuration/aws-vpc-configuration-spec )
8
+
9
+ (s/def ::network-configuration-spec (s/keys :opt [::aws-vpc-configuration ]))
You can’t perform that action at this time.
0 commit comments