Exemplo n.º 1
0
 public MyStack()
 {
     var myDetector = new Aws.GuardDuty.Detector("myDetector", new Aws.GuardDuty.DetectorArgs
     {
         Enable = true,
     });
 }
Exemplo n.º 2
0
 public MyStack()
 {
     var master = new Aws.GuardDuty.Detector("master", new Aws.GuardDuty.DetectorArgs
     {
     });
     var memberDetector = new Aws.GuardDuty.Detector("memberDetector", new Aws.GuardDuty.DetectorArgs
     {
     }, new CustomResourceOptions
     {
         Provider = "aws.dev",
     });
     var dev = new Aws.GuardDuty.Member("dev", new Aws.GuardDuty.MemberArgs
     {
         AccountId  = memberDetector.AccountId,
         DetectorId = master.Id,
         Email      = "*****@*****.**",
         Invite     = true,
     });
     var memberInviteAccepter = new Aws.GuardDuty.InviteAccepter("memberInviteAccepter", new Aws.GuardDuty.InviteAccepterArgs
     {
         DetectorId      = memberDetector.Id,
         MasterAccountId = master.AccountId,
     }, new CustomResourceOptions
     {
         Provider  = "aws.dev",
         DependsOn =
         {
             "aws_guardduty_member.dev",
         },
     });
 }
Exemplo n.º 3
0
    public MyStack()
    {
        var master = new Aws.GuardDuty.Detector("master", new Aws.GuardDuty.DetectorArgs
        {
            Enable = true,
        });
        var bucket = new Aws.S3.Bucket("bucket", new Aws.S3.BucketArgs
        {
            Acl = "private",
        });
        var myIPSetBucketObject = new Aws.S3.BucketObject("myIPSetBucketObject", new Aws.S3.BucketObjectArgs
        {
            Acl     = "public-read",
            Bucket  = bucket.Id,
            Content = @"10.0.0.0/8

",
            Key     = "MyIPSet",
        });
        var myIPSetIPSet = new Aws.GuardDuty.IPSet("myIPSetIPSet", new Aws.GuardDuty.IPSetArgs
        {
            Activate   = true,
            DetectorId = master.Id,
            Format     = "TXT",
            Location   = Output.Tuple(myIPSetBucketObject.Bucket, myIPSetBucketObject.Key).Apply(values =>
            {
                var bucket = values.Item1;
                var key    = values.Item2;
                return($"https://s3.amazonaws.com/{bucket}/{key}");
            }),
        });
    }
Exemplo n.º 4
0
 public MyStack()
 {
     var exampleDetector = new Aws.GuardDuty.Detector("exampleDetector", new Aws.GuardDuty.DetectorArgs
     {
         Enable = true,
     });
     var exampleOrganizationConfiguration = new Aws.GuardDuty.OrganizationConfiguration("exampleOrganizationConfiguration", new Aws.GuardDuty.OrganizationConfigurationArgs
     {
         AutoEnable = true,
         DetectorId = exampleDetector.Id,
     });
 }
Exemplo n.º 5
0
 public MyStack()
 {
     var master = new Aws.GuardDuty.Detector("master", new Aws.GuardDuty.DetectorArgs
     {
         Enable = true,
     });
     var memberDetector = new Aws.GuardDuty.Detector("memberDetector", new Aws.GuardDuty.DetectorArgs
     {
         Enable = true,
     }, new CustomResourceOptions
     {
         Provider = "aws.dev",
     });
     var memberMember = new Aws.GuardDuty.Member("memberMember", new Aws.GuardDuty.MemberArgs
     {
         AccountId         = memberDetector.AccountId,
         DetectorId        = master.Id,
         Email             = "*****@*****.**",
         Invite            = true,
         InvitationMessage = "please accept guardduty invitation",
     });
 }
Exemplo n.º 6
0
 public MyStack()
 {
     var exampleOrganization = new Aws.Organizations.Organization("exampleOrganization", new Aws.Organizations.OrganizationArgs
     {
         AwsServiceAccessPrincipals =
         {
             "guardduty.amazonaws.com",
         },
         FeatureSet = "ALL",
     });
     var exampleDetector = new Aws.GuardDuty.Detector("exampleDetector", new Aws.GuardDuty.DetectorArgs
     {
     });
     var exampleOrganizationAdminAccount = new Aws.GuardDuty.OrganizationAdminAccount("exampleOrganizationAdminAccount", new Aws.GuardDuty.OrganizationAdminAccountArgs
     {
         AdminAccountId = "123456789012",
     }, new CustomResourceOptions
     {
         DependsOn =
         {
             exampleOrganization,
         },
     });
 }