2

私のロギングシステムでは、S3バケットに書き込むFirehose配信ストリームに接続されたキネシスストリームを使用します。これは、fireSourceストリームの "Source"属性をキネシスストリームに設定することで、AWSコンソールから手動で設定できます。私はterraformを使用して、この設定をコードで取得したいと考えています。テラフォームを使用してキネシスストリームをFirehose配信ストリームに接続する方法

aws_kinesis_firehose_delivery_streamとaws_kinesis_streamの両方のテラフォームリソースには、ソース属性を設定する属性(私が見つけることができる)はありません。私はテラフォームのソースをクローン化し、それを見て、私はこれを参照してください。

createInput := &firehose.CreateDeliveryStreamInput{ 
    DeliveryStreamName: aws.String(sn), 
} 

私の次の思考は、私はSource属性を設定するためのコードを編集することができれば見ることでした。だから私は、属性名を見つけるために、AWS消防ホースAPIを介して見て、私はこれが見つかりました:

DeliveryStreamType

配信ストリームタイプ。このパラメータは、次のいずれかの値にすることができます。

DirectPut:プロバイダアプリケーションは配信ストリームに直接アクセスします。

KinesisStreamAsSource:配信ストリームは、ソースとしてKinesisストリームを使用します。 種類:文字列

有効値:DirectPut | KinesisStreamAsSource

私は、「KinesisStreamSourceConfiguration」という設定でDeliveryStreamTypeを設定するためにterraformコードを編集すると考えました。しかし、私は周りにグレープすると、テラフォームのレポにあるawsのsdkコード内のDeliveryStreamTypeへの参照が見つかりません。しかし、私はDeliveryStreamNameが表示されます。

キネシスストリームとファイアホースストリームをテラフォームで接続することはできますか?そうでない場合、これは地平線にある機能ですか?

ありがとうございます。

答えて

0

私は恐ろしいPR here

+0

を調達している&この機能を実装しようとしてきました!私はローカルでこれを実装してしまいましたが、既にPRが保留になっていれば、それは素晴らしいものです。そのようなことが一般的にどのくらいの期間合併するのか知っていますか?ありがとう! – CAS

+0

私はこのプロジェクトに初めて貢献しましたか分かりません – Peter

0

私はhttps://github.com/aws/aws-sdk-goから最新のものをクローン化し、terraformはDeliveryStreamTypeをサポートしない古いバージョンのgo aws APIを単に使用していることを確認しました。テラフォームコード:

type CreateDeliveryStreamInput struct { 
_ struct{} `type:"structure"` 

    // The name of the delivery stream. This name must be unique per AWS account 
    // in the same region. You can have multiple delivery streams with the same 
    // name if they are in different accounts or different regions. 
    // 
    // DeliveryStreamName is a required field 
    DeliveryStreamName *string `min:"1" type:"string" required:"true"` 
    ... 
} 

現在のレポをAWS-SDK-行く:

type CreateDeliveryStreamInput struct { 
_ struct{} `type:"structure"` 

    // The name of the delivery stream. This name must be unique per AWS account 
    // in the same region. If the delivery streams are in different accounts or 
    // different regions, you can have multiple delivery streams with the same name. 
    // 
    // DeliveryStreamName is a required field 
    DeliveryStreamName *string `min:"1" type:"string" required:"true"` 

    // The delivery stream type. This parameter can be one of the following values: 
    // 
    // * DirectPut: Provider applications access the delivery stream directly. 
    // 
    // * KinesisStreamAsSource: The delivery stream uses a Kinesis stream as 
    // a source. 
    DeliveryStreamType *string `type:"string" enum:"DeliveryStreamType"` 
    ... 
    // When a Kinesis stream is used as the source for the delivery stream, a KinesisStreamSourceConfiguration 
    // containing the Kinesis stream ARN and the role ARN for the source stream. 
    KinesisStreamSourceConfiguration *KinesisStreamSourceConfiguration `type:"structure"` 
    ... 
} 

だから、これは基本的にはテラフォームのレポは現在、AWS-SDK-行くコードを使用するように更新する必要があり、私の質問に答えます。

関連する問題