Esempio n. 1
0
 public MyStack()
 {
     var examplePermission = new Aws.Lambda.Permission("examplePermission", new Aws.Lambda.PermissionArgs
     {
         Action    = "lambda:InvokeFunction",
         Function  = aws_lambda_function.Example.Arn,
         Principal = "config.amazonaws.com",
     });
     var exampleOrganization = new Aws.Organizations.Organization("exampleOrganization", new Aws.Organizations.OrganizationArgs
     {
         AwsServiceAccessPrincipals =
         {
             "config-multiaccountsetup.amazonaws.com",
         },
         FeatureSet = "ALL",
     });
     var exampleOrganizationCustomRule = new Aws.Cfg.OrganizationCustomRule("exampleOrganizationCustomRule", new Aws.Cfg.OrganizationCustomRuleArgs
     {
         LambdaFunctionArn = aws_lambda_function.Example.Arn,
         TriggerTypes      =
         {
             "ConfigurationItemChangeNotification",
         },
     }, new CustomResourceOptions
     {
         DependsOn =
         {
             "aws_lambda_permission.example",
             "aws_organizations_organization.example",
         },
     });
 }
Esempio n. 2
0
 public MyStack()
 {
     var org = new Aws.Organizations.Organization("org", new Aws.Organizations.OrganizationArgs
     {
         AwsServiceAccessPrincipals =
         {
             "cloudtrail.amazonaws.com",
             "config.amazonaws.com",
         },
         FeatureSet = "ALL",
     });
 }
Esempio n. 3
0
 public MyStack()
 {
     var exampleOrganization = new Aws.Organizations.Organization("exampleOrganization", new Aws.Organizations.OrganizationArgs
     {
         AwsServiceAccessPrincipals =
         {
             "config-multiaccountsetup.amazonaws.com",
         },
         FeatureSet = "ALL",
     });
     var exampleOrganizationManagedRule = new Aws.Cfg.OrganizationManagedRule("exampleOrganizationManagedRule", new Aws.Cfg.OrganizationManagedRuleArgs
     {
         RuleIdentifier = "IAM_PASSWORD_POLICY",
     }, new CustomResourceOptions
     {
         DependsOn =
         {
             "aws_organizations_organization.example",
         },
     });
 }
Esempio n. 4
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,
         },
     });
 }