コード例 #1
0
 public MyStack()
 {
     var testCluster = Output.Create(Aws.RedShift.GetCluster.InvokeAsync(new Aws.RedShift.GetClusterArgs
     {
         ClusterIdentifier = "test-cluster",
     }));
     var testStream = new Aws.Kinesis.FirehoseDeliveryStream("testStream", new Aws.Kinesis.FirehoseDeliveryStreamArgs
     {
         Destination           = "redshift",
         RedshiftConfiguration = new Aws.Kinesis.Inputs.FirehoseDeliveryStreamRedshiftConfigurationArgs
         {
             ClusterJdbcurl = Output.Tuple(testCluster, testCluster).Apply(values =>
             {
                 var testCluster  = values.Item1;
                 var testCluster1 = values.Item2;
                 return($"jdbc:redshift://{testCluster.Endpoint}/{testCluster1.DatabaseName}");
             }),
             CopyOptions      = "delimiter '|'",
             DataTableColumns = "test-col",
             DataTableName    = "test-table",
             Password         = "******",
             RoleArn          = aws_iam_role.Firehose_role.Arn,
             Username         = "******",
         },
         S3Configuration = new Aws.Kinesis.Inputs.FirehoseDeliveryStreamS3ConfigurationArgs
         {
             BucketArn         = aws_s3_bucket.Bucket.Arn,
             BufferInterval    = 400,
             BufferSize        = 10,
             CompressionFormat = "GZIP",
             RoleArn           = aws_iam_role.Firehose_role.Arn,
         },
     });
 }
コード例 #2
0
ファイル: MyStack.cs プロジェクト: justinvp/templates-aws
    public MyStack()
    {
        var bucket = new Aws.S3.Bucket("bucket", new Aws.S3.BucketArgs
        {
            Acl = "private",
        });
        var firehoseRole = new Aws.Iam.Role("firehoseRole", new Aws.Iam.RoleArgs
        {
            AssumeRolePolicy = @"{
  ""Version"": ""2012-10-17"",
  ""Statement"": [
    {
      ""Action"": ""sts:AssumeRole"",
      ""Principal"": {
        ""Service"": ""firehose.amazonaws.com""
      },
      ""Effect"": ""Allow"",
      ""Sid"": """"
    }
  ]
}

",
        });
        var testStream = new Aws.Kinesis.FirehoseDeliveryStream("testStream", new Aws.Kinesis.FirehoseDeliveryStreamArgs
        {
            Destination     = "s3",
            S3Configuration = new Aws.Kinesis.Inputs.FirehoseDeliveryStreamS3ConfigurationArgs
            {
                BucketArn = bucket.Arn,
                RoleArn   = firehoseRole.Arn,
            },
        });
    }
コード例 #3
0
 public MyStack()
 {
     var testCluster = new Aws.RedShift.Cluster("testCluster", new Aws.RedShift.ClusterArgs
     {
         ClusterIdentifier = "tf-redshift-cluster-%d",
         ClusterType       = "single-node",
         DatabaseName      = "test",
         MasterPassword    = "******",
         MasterUsername    = "******",
         NodeType          = "dc1.large",
     });
     var testStream = new Aws.Kinesis.FirehoseDeliveryStream("testStream", new Aws.Kinesis.FirehoseDeliveryStreamArgs
     {
         Destination           = "redshift",
         RedshiftConfiguration = new Aws.Kinesis.Inputs.FirehoseDeliveryStreamRedshiftConfigurationArgs
         {
             ClusterJdbcurl = Output.Tuple(testCluster.Endpoint, testCluster.DatabaseName).Apply(values =>
             {
                 var endpoint     = values.Item1;
                 var databaseName = values.Item2;
                 return($"jdbc:redshift://{endpoint}/{databaseName}");
             }),
             CopyOptions           = "delimiter '|'",
             DataTableColumns      = "test-col",
             DataTableName         = "test-table",
             Password              = "******",
             RoleArn               = aws_iam_role.Firehose_role.Arn,
             S3BackupConfiguration = new Aws.Kinesis.Inputs.FirehoseDeliveryStreamRedshiftConfigurationS3BackupConfigurationArgs
             {
                 BucketArn         = aws_s3_bucket.Bucket.Arn,
                 BufferInterval    = 300,
                 BufferSize        = 15,
                 CompressionFormat = "GZIP",
                 RoleArn           = aws_iam_role.Firehose_role.Arn,
             },
             S3BackupMode = "Enabled",
             Username     = "******",
         },
         S3Configuration = new Aws.Kinesis.Inputs.FirehoseDeliveryStreamS3ConfigurationArgs
         {
             BucketArn         = aws_s3_bucket.Bucket.Arn,
             BufferInterval    = 400,
             BufferSize        = 10,
             CompressionFormat = "GZIP",
             RoleArn           = aws_iam_role.Firehose_role.Arn,
         },
     });
 }
コード例 #4
0
 public MyStack()
 {
     var testCluster = new Aws.ElasticSearch.Domain("testCluster", new Aws.ElasticSearch.DomainArgs
     {
     });
     var testStream = new Aws.Kinesis.FirehoseDeliveryStream("testStream", new Aws.Kinesis.FirehoseDeliveryStreamArgs
     {
         Destination = "elasticsearch",
         ElasticsearchConfiguration = new Aws.Kinesis.Inputs.FirehoseDeliveryStreamElasticsearchConfigurationArgs
         {
             DomainArn = testCluster.Arn,
             IndexName = "test",
             ProcessingConfiguration = new Aws.Kinesis.Inputs.FirehoseDeliveryStreamElasticsearchConfigurationProcessingConfigurationArgs
             {
                 Enabled    = true,
                 Processors =
                 {
                     new Aws.Kinesis.Inputs.FirehoseDeliveryStreamElasticsearchConfigurationProcessingConfigurationProcessorArgs
                     {
                         Parameters =
                         {
                             new Aws.Kinesis.Inputs.FirehoseDeliveryStreamElasticsearchConfigurationProcessingConfigurationProcessorParameterArgs
                             {
                                 ParameterName  = "LambdaArn",
                                 ParameterValue = $"{aws_lambda_function.Lambda_processor.Arn}:$LATEST",
                             },
                         },
                         Type = "Lambda",
                     },
                 },
             },
             RoleArn  = aws_iam_role.Firehose_role.Arn,
             TypeName = "test",
         },
         S3Configuration = new Aws.Kinesis.Inputs.FirehoseDeliveryStreamS3ConfigurationArgs
         {
             BucketArn         = aws_s3_bucket.Bucket.Arn,
             BufferInterval    = 400,
             BufferSize        = 10,
             CompressionFormat = "GZIP",
             RoleArn           = aws_iam_role.Firehose_role.Arn,
         },
     });
 }
コード例 #5
0
ファイル: MyStack.cs プロジェクト: justinvp/templates-aws
 public MyStack()
 {
     var testStream = new Aws.Kinesis.FirehoseDeliveryStream("testStream", new Aws.Kinesis.FirehoseDeliveryStreamArgs
     {
         Destination = "splunk",
         S3Configuration = new Aws.Kinesis.Inputs.FirehoseDeliveryStreamS3ConfigurationArgs
         {
             BucketArn = aws_s3_bucket.Bucket.Arn,
             BufferInterval = 400,
             BufferSize = 10,
             CompressionFormat = "GZIP",
             RoleArn = aws_iam_role.Firehose.Arn,
         },
         SplunkConfiguration = new Aws.Kinesis.Inputs.FirehoseDeliveryStreamSplunkConfigurationArgs
         {
             HecAcknowledgmentTimeout = 600,
             HecEndpoint = "https://http-inputs-mydomain.splunkcloud.com:443",
             HecEndpointType = "Event",
             HecToken = "51D4DA16-C61B-4F5F-8EC7-ED4301342A4A",
             S3BackupMode = "FailedEventsOnly",
         },
     });
 }