示例#1
0
 public MyStack()
 {
     var main = new Aws.Route53.Zone("main", new Aws.Route53.ZoneArgs
     {
     });
     var dev = new Aws.Route53.Zone("dev", new Aws.Route53.ZoneArgs
     {
         Tags =
         {
             { "Environment", "dev" },
         },
     });
     var dev_ns = new Aws.Route53.Record("dev-ns", new Aws.Route53.RecordArgs
     {
         Name    = "dev.example.com",
         Records =
         {
             dev.NameServers.Apply(nameServers => nameServers[0]),
             dev.NameServers.Apply(nameServers => nameServers[1]),
             dev.NameServers.Apply(nameServers => nameServers[2]),
             dev.NameServers.Apply(nameServers => nameServers[3]),
         },
         Ttl    = 30,
         Type   = "NS",
         ZoneId = main.ZoneId,
     });
 }
示例#2
0
 public MyStack()
 {
     var @private = new Aws.Route53.Zone("private", new Aws.Route53.ZoneArgs
     {
         Vpcs =
         {
             new Aws.Route53.Inputs.ZoneVpcArgs
             {
                 VpcId = aws_vpc.Example.Id,
             },
         },
     });
 }
示例#3
0
 public MyStack()
 {
     var main = new Aws.Route53.DelegationSet("main", new Aws.Route53.DelegationSetArgs
     {
         ReferenceName = "DynDNS",
     });
     var primary = new Aws.Route53.Zone("primary", new Aws.Route53.ZoneArgs
     {
         DelegationSetId = main.Id,
     });
     var secondary = new Aws.Route53.Zone("secondary", new Aws.Route53.ZoneArgs
     {
         DelegationSetId = main.Id,
     });
 }
示例#4
0
 public MyStack()
 {
     var exampleZone = new Aws.Route53.Zone("exampleZone", new Aws.Route53.ZoneArgs
     {
     });
     var exampleRecord = new Aws.Route53.Record("exampleRecord", new Aws.Route53.RecordArgs
     {
         AllowOverwrite = true,
         Name           = "test.example.com",
         Records        =
         {
             exampleZone.NameServers.Apply(nameServers => nameServers[0]),
             exampleZone.NameServers.Apply(nameServers => nameServers[1]),
             exampleZone.NameServers.Apply(nameServers => nameServers[2]),
             exampleZone.NameServers.Apply(nameServers => nameServers[3]),
         },
         Ttl    = 30,
         Type   = "NS",
         ZoneId = exampleZone.ZoneId,
     });
 }
示例#5
0
 public MyStack()
 {
     var primary = new Aws.Route53.Zone("primary", new Aws.Route53.ZoneArgs
     {
     });
 }
示例#6
0
 public MyStack()
 {
     var us_east_1 = new Aws.Provider("us-east-1", new Aws.ProviderArgs
     {
         Region = "us-east-1",
     });
     var awsRoute53ExampleCom = new Aws.CloudWatch.LogGroup("awsRoute53ExampleCom", new Aws.CloudWatch.LogGroupArgs
     {
         RetentionInDays = 30,
     }, new CustomResourceOptions
     {
         Provider = "aws.us-east-1",
     });
     var route53_query_logging_policyPolicyDocument = Output.Create(Aws.Iam.GetPolicyDocument.InvokeAsync(new Aws.Iam.GetPolicyDocumentArgs
     {
         Statements =
         {
             new Aws.Iam.Inputs.GetPolicyDocumentStatementArgs
             {
                 Actions =
                 {
                     "logs:CreateLogStream",
                     "logs:PutLogEvents",
                 },
                 Principals =
                 {
                     new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalArgs
                     {
                         Identifiers =
                         {
                             "route53.amazonaws.com",
                         },
                         Type = "Service",
                     },
                 },
                 Resources =
                 {
                     "arn:aws:logs:*:*:log-group:/aws/route53/*",
                 },
             },
         },
     }));
     var route53_query_logging_policyLogResourcePolicy = new Aws.CloudWatch.LogResourcePolicy("route53-query-logging-policyLogResourcePolicy", new Aws.CloudWatch.LogResourcePolicyArgs
     {
         PolicyDocument = route53_query_logging_policyPolicyDocument.Apply(route53_query_logging_policyPolicyDocument => route53_query_logging_policyPolicyDocument.Json),
         PolicyName     = "route53-query-logging-policy",
     }, new CustomResourceOptions
     {
         Provider = "aws.us-east-1",
     });
     var exampleComZone = new Aws.Route53.Zone("exampleComZone", new Aws.Route53.ZoneArgs
     {
     });
     var exampleComQueryLog = new Aws.Route53.QueryLog("exampleComQueryLog", new Aws.Route53.QueryLogArgs
     {
         CloudwatchLogGroupArn = awsRoute53ExampleCom.Arn,
         ZoneId = exampleComZone.ZoneId,
     }, new CustomResourceOptions
     {
         DependsOn =
         {
             "aws_cloudwatch_log_resource_policy.route53-query-logging-policy",
         },
     });
 }