Skip to content

Commit

Permalink
fix: updating init templates so they build (aws#3050)
Browse files Browse the repository at this point in the history
  • Loading branch information
shivlaks authored Jun 25, 2019
1 parent 9083a1f commit b022e9f
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public HelloStack(Construct parent, string id, IStackProps props) : base(parent,
// The CDK includes built-in constructs for most resource types, such as Queues and Topics.
var queue = new Queue(this, "MyFirstQueue", new QueueProps
{
VisibilityTimeoutSec = 300
VisibilityTimeout = Duration.seconds(300)
});

var topic = new Topic(this, "MyFirstTopic", new TopicProps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ open Amazon.CDK.AWS.SQS
type MyStack(scope, id, props) as this =
inherit Stack(scope, id, props)

let queue = Queue(this, "MyFirstQueue", QueueProps(VisibilityTimeoutSec = Nullable(300.)))
let queue = Queue(this, "MyFirstQueue", QueueProps(VisibilityTimeout = Duration.seconds(300)))
let topic = Topic(this, "MyFirstTopic", TopicProps(DisplayName = "My First Topic Yeah"))
let hello = HelloConstruct(this, "Buckets", { BucketCount = 5 })
let user = User(this, "MyUser", UserProps())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ let main _ =
let app = App(null)
MyStack(app, "hello-cdk-1", StackProps()) |> ignore
MyStack(app, "hello-cdk-2", StackProps()) |> ignore
app.Run() |> ignore
app.Synth() |> ignore
0
Original file line number Diff line number Diff line change
@@ -1,53 +1,38 @@
{
"Resources": {
"MyFirstQueueMyFirstTopicSubscription774591B6": {
"Type": "AWS::SNS::Subscription",
"Properties": {
"Endpoint": {
"Fn::GetAtt": [
"MyFirstQueueFF09316A",
"Arn"
]
},
"TopicArn": {
"Ref": "MyFirstTopic0ED1F8A4"
},
"Protocol": "sqs"
}
},
"MyFirstTopic0ED1F8A4": {
"Type": "AWS::SNS::Topic",
"MyFirstQueueFF09316A": {
"Type": "AWS::SQS::Queue",
"Properties": {
"DisplayName": "My First Topic Yeah"
"VisibilityTimeout": 300
}
},
"MyFirstQueuePolicy596EEC78": {
"Type": "AWS::SQS::QueuePolicy",
"Properties": {
"PolicyDocument": {
"Version": "2012-10-17",
"Statement": [
{
"Action": "sqs:SendMessage",
"Condition": {
"ArnEquals": {
"aws:SourceArn": {
"Ref": "MyFirstTopic0ED1F8A4"
}
}
},
"Action": "sqs:SendMessage",
"Effect": "Allow",
"Principal": {
"Service": "sns.amazonaws.com"
},
"Resource": {
"Fn::GetAtt": [
"MyFirstQueueFF09316A",
"Arn"
]
},
"Effect": "Allow",
"Principal": {
"Service": "sns.amazonaws.com"
}
}
]
],
"Version": "2012-10-17"
},
"Queues": [
{
Expand All @@ -56,24 +41,43 @@
]
}
},
"BucketsBucket1B98A5B53": {
"Type": "AWS::S3::Bucket",
"DeletionPolicy": "Retain"
"MyFirstTopic0ED1F8A4": {
"Type": "AWS::SNS::Topic",
"Properties": {
"DisplayName": "My First Topic Yeah"
}
},
"MyFirstQueueFF09316A": {
"Type": "AWS::SQS::Queue",
"MyFirstTopicMyFirstQueue2028650A": {
"Type": "AWS::SNS::Subscription",
"Properties": {
"VisibilityTimeout": 300
"Protocol": "sqs",
"TopicArn": {
"Ref": "MyFirstTopic0ED1F8A4"
},
"Endpoint": {
"Fn::GetAtt": [
"MyFirstQueueFF09316A",
"Arn"
]
}
}
},
"BucketsBucket351AD8978": {
"BucketsBucket04F23AD6D": {
"Type": "AWS::S3::Bucket",
"DeletionPolicy": "Retain"
},
"BucketsBucket1B98A5B53": {
"Type": "AWS::S3::Bucket",
"DeletionPolicy": "Retain"
},
"BucketsBucket237F4E9C5": {
"Type": "AWS::S3::Bucket",
"DeletionPolicy": "Retain"
},
"BucketsBucket351AD8978": {
"Type": "AWS::S3::Bucket",
"DeletionPolicy": "Retain"
},
"BucketsBucket4AEE1AAD9": {
"Type": "AWS::S3::Bucket",
"DeletionPolicy": "Retain"
Expand All @@ -84,16 +88,15 @@
"MyUserDefaultPolicy7B897426": {
"Type": "AWS::IAM::Policy",
"Properties": {
"PolicyName": "MyUserDefaultPolicy7B897426",
"PolicyDocument": {
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"s3:GetObject*",
"s3:GetBucket*",
"s3:List*"
],
"Effect": "Allow",
"Resource": [
{
"Fn::GetAtt": [
Expand All @@ -115,15 +118,15 @@
]
]
}
],
"Effect": "Allow"
]
},
{
"Action": [
"s3:GetObject*",
"s3:GetBucket*",
"s3:List*"
],
"Effect": "Allow",
"Resource": [
{
"Fn::GetAtt": [
Expand All @@ -145,15 +148,15 @@
]
]
}
],
"Effect": "Allow"
]
},
{
"Action": [
"s3:GetObject*",
"s3:GetBucket*",
"s3:List*"
],
"Effect": "Allow",
"Resource": [
{
"Fn::GetAtt": [
Expand All @@ -175,15 +178,15 @@
]
]
}
],
"Effect": "Allow"
]
},
{
"Action": [
"s3:GetObject*",
"s3:GetBucket*",
"s3:List*"
],
"Effect": "Allow",
"Resource": [
{
"Fn::GetAtt": [
Expand All @@ -205,15 +208,15 @@
]
]
}
],
"Effect": "Allow"
]
},
{
"Action": [
"s3:GetObject*",
"s3:GetBucket*",
"s3:List*"
],
"Effect": "Allow",
"Resource": [
{
"Fn::GetAtt": [
Expand All @@ -235,21 +238,18 @@
]
]
}
],
"Effect": "Allow"
]
}
]
],
"Version": "2012-10-17"
},
"PolicyName": "MyUserDefaultPolicy7B897426",
"Users": [
{
"Ref": "MyUserDC45028B"
}
]
}
},
"BucketsBucket04F23AD6D": {
"Type": "AWS::S3::Bucket",
"DeletionPolicy": "Retain"
}
}
}

0 comments on commit b022e9f

Please sign in to comment.