2022-07-21 19:04:02 +00:00
|
|
|
using System.Collections.Generic;
|
2023-03-24 11:43:46 +00:00
|
|
|
using System.Linq;
|
2020-05-19 08:18:38 +00:00
|
|
|
using Pulumi;
|
|
|
|
using Aws = Pulumi.Aws;
|
|
|
|
|
2022-07-21 19:04:02 +00:00
|
|
|
return await Deployment.RunAsync(() =>
|
2020-05-19 08:18:38 +00:00
|
|
|
{
|
2022-07-21 19:04:02 +00:00
|
|
|
var logs = new Aws.S3.Bucket("logs");
|
|
|
|
|
|
|
|
var bucket = new Aws.S3.Bucket("bucket", new()
|
2020-05-19 08:18:38 +00:00
|
|
|
{
|
2022-07-21 19:04:02 +00:00
|
|
|
Loggings = new[]
|
2020-05-19 08:18:38 +00:00
|
|
|
{
|
2022-07-21 19:04:02 +00:00
|
|
|
new Aws.S3.Inputs.BucketLoggingArgs
|
2020-05-19 08:18:38 +00:00
|
|
|
{
|
2022-07-21 19:04:02 +00:00
|
|
|
TargetBucket = logs.BucketName,
|
2020-05-19 08:18:38 +00:00
|
|
|
},
|
2022-07-21 19:04:02 +00:00
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
return new Dictionary<string, object?>
|
|
|
|
{
|
|
|
|
["targetBucket"] = bucket.Loggings.Apply(loggings => loggings[0]?.TargetBucket),
|
|
|
|
};
|
|
|
|
});
|
2020-05-19 08:18:38 +00:00
|
|
|
|