github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/route53/record.go (about) 1 // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. 2 // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 4 package route53 5 6 import ( 7 "context" 8 "reflect" 9 10 "errors" 11 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 12 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 13 ) 14 15 // Provides a Route53 record resource. 16 // 17 // ## Example Usage 18 // 19 // ### Simple routing policy 20 // 21 // <!--Start PulumiCodeChooser --> 22 // ```go 23 // package main 24 // 25 // import ( 26 // 27 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53" 28 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 29 // 30 // ) 31 // 32 // func main() { 33 // pulumi.Run(func(ctx *pulumi.Context) error { 34 // _, err := route53.NewRecord(ctx, "www", &route53.RecordArgs{ 35 // ZoneId: pulumi.Any(primary.ZoneId), 36 // Name: pulumi.String("www.example.com"), 37 // Type: pulumi.String(route53.RecordTypeA), 38 // Ttl: pulumi.Int(300), 39 // Records: pulumi.StringArray{ 40 // lb.PublicIp, 41 // }, 42 // }) 43 // if err != nil { 44 // return err 45 // } 46 // return nil 47 // }) 48 // } 49 // 50 // ``` 51 // <!--End PulumiCodeChooser --> 52 // 53 // ### Weighted routing policy 54 // 55 // Other routing policies are configured similarly. See [Amazon Route 53 Developer Guide](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy.html) for details. 56 // 57 // <!--Start PulumiCodeChooser --> 58 // ```go 59 // package main 60 // 61 // import ( 62 // 63 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53" 64 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 65 // 66 // ) 67 // 68 // func main() { 69 // pulumi.Run(func(ctx *pulumi.Context) error { 70 // _, err := route53.NewRecord(ctx, "www-dev", &route53.RecordArgs{ 71 // ZoneId: pulumi.Any(primary.ZoneId), 72 // Name: pulumi.String("www"), 73 // Type: pulumi.String(route53.RecordTypeCNAME), 74 // Ttl: pulumi.Int(5), 75 // WeightedRoutingPolicies: route53.RecordWeightedRoutingPolicyArray{ 76 // &route53.RecordWeightedRoutingPolicyArgs{ 77 // Weight: pulumi.Int(10), 78 // }, 79 // }, 80 // SetIdentifier: pulumi.String("dev"), 81 // Records: pulumi.StringArray{ 82 // pulumi.String("dev.example.com"), 83 // }, 84 // }) 85 // if err != nil { 86 // return err 87 // } 88 // _, err = route53.NewRecord(ctx, "www-live", &route53.RecordArgs{ 89 // ZoneId: pulumi.Any(primary.ZoneId), 90 // Name: pulumi.String("www"), 91 // Type: pulumi.String(route53.RecordTypeCNAME), 92 // Ttl: pulumi.Int(5), 93 // WeightedRoutingPolicies: route53.RecordWeightedRoutingPolicyArray{ 94 // &route53.RecordWeightedRoutingPolicyArgs{ 95 // Weight: pulumi.Int(90), 96 // }, 97 // }, 98 // SetIdentifier: pulumi.String("live"), 99 // Records: pulumi.StringArray{ 100 // pulumi.String("live.example.com"), 101 // }, 102 // }) 103 // if err != nil { 104 // return err 105 // } 106 // return nil 107 // }) 108 // } 109 // 110 // ``` 111 // <!--End PulumiCodeChooser --> 112 // 113 // ### Geoproximity routing policy 114 // 115 // <!--Start PulumiCodeChooser --> 116 // ```go 117 // package main 118 // 119 // import ( 120 // 121 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53" 122 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 123 // 124 // ) 125 // 126 // func main() { 127 // pulumi.Run(func(ctx *pulumi.Context) error { 128 // _, err := route53.NewRecord(ctx, "www", &route53.RecordArgs{ 129 // ZoneId: pulumi.Any(primary.ZoneId), 130 // Name: pulumi.String("www.example.com"), 131 // Type: pulumi.String(route53.RecordTypeCNAME), 132 // Ttl: pulumi.Int(300), 133 // GeoproximityRoutingPolicy: &route53.RecordGeoproximityRoutingPolicyArgs{ 134 // Coordinates: route53.RecordGeoproximityRoutingPolicyCoordinateArray{ 135 // &route53.RecordGeoproximityRoutingPolicyCoordinateArgs{ 136 // Latitude: pulumi.String("49.22"), 137 // Longitude: pulumi.String("-74.01"), 138 // }, 139 // }, 140 // }, 141 // SetIdentifier: pulumi.String("dev"), 142 // Records: pulumi.StringArray{ 143 // pulumi.String("dev.example.com"), 144 // }, 145 // }) 146 // if err != nil { 147 // return err 148 // } 149 // return nil 150 // }) 151 // } 152 // 153 // ``` 154 // <!--End PulumiCodeChooser --> 155 // 156 // ### Alias record 157 // 158 // See [related part of Amazon Route 53 Developer Guide](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/resource-record-sets-choosing-alias-non-alias.html) 159 // to understand differences between alias and non-alias records. 160 // 161 // TTL for all alias records is [60 seconds](https://aws.amazon.com/route53/faqs/#dns_failover_do_i_need_to_adjust), 162 // you cannot change this, therefore `ttl` has to be omitted in alias records. 163 // 164 // <!--Start PulumiCodeChooser --> 165 // ```go 166 // package main 167 // 168 // import ( 169 // 170 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elb" 171 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53" 172 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 173 // 174 // ) 175 // 176 // func main() { 177 // pulumi.Run(func(ctx *pulumi.Context) error { 178 // main, err := elb.NewLoadBalancer(ctx, "main", &elb.LoadBalancerArgs{ 179 // Name: pulumi.String("foobar-elb"), 180 // AvailabilityZones: pulumi.StringArray{ 181 // pulumi.String("us-east-1c"), 182 // }, 183 // Listeners: elb.LoadBalancerListenerArray{ 184 // &elb.LoadBalancerListenerArgs{ 185 // InstancePort: pulumi.Int(80), 186 // InstanceProtocol: pulumi.String("http"), 187 // LbPort: pulumi.Int(80), 188 // LbProtocol: pulumi.String("http"), 189 // }, 190 // }, 191 // }) 192 // if err != nil { 193 // return err 194 // } 195 // _, err = route53.NewRecord(ctx, "www", &route53.RecordArgs{ 196 // ZoneId: pulumi.Any(primary.ZoneId), 197 // Name: pulumi.String("example.com"), 198 // Type: pulumi.String(route53.RecordTypeA), 199 // Aliases: route53.RecordAliasArray{ 200 // &route53.RecordAliasArgs{ 201 // Name: main.DnsName, 202 // ZoneId: main.ZoneId, 203 // EvaluateTargetHealth: pulumi.Bool(true), 204 // }, 205 // }, 206 // }) 207 // if err != nil { 208 // return err 209 // } 210 // return nil 211 // }) 212 // } 213 // 214 // ``` 215 // <!--End PulumiCodeChooser --> 216 // 217 // ### NS and SOA Record Management 218 // 219 // When creating Route 53 zones, the `NS` and `SOA` records for the zone are automatically created. Enabling the `allowOverwrite` argument will allow managing these records in a single deployment without the requirement for `import`. 220 // 221 // <!--Start PulumiCodeChooser --> 222 // ```go 223 // package main 224 // 225 // import ( 226 // 227 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53" 228 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 229 // 230 // ) 231 // 232 // func main() { 233 // pulumi.Run(func(ctx *pulumi.Context) error { 234 // example, err := route53.NewZone(ctx, "example", &route53.ZoneArgs{ 235 // Name: pulumi.String("test.example.com"), 236 // }) 237 // if err != nil { 238 // return err 239 // } 240 // _, err = route53.NewRecord(ctx, "example", &route53.RecordArgs{ 241 // AllowOverwrite: pulumi.Bool(true), 242 // Name: pulumi.String("test.example.com"), 243 // Ttl: pulumi.Int(172800), 244 // Type: pulumi.String(route53.RecordTypeNS), 245 // ZoneId: example.ZoneId, 246 // Records: pulumi.StringArray{ 247 // example.NameServers.ApplyT(func(nameServers []string) (string, error) { 248 // return nameServers[0], nil 249 // }).(pulumi.StringOutput), 250 // example.NameServers.ApplyT(func(nameServers []string) (string, error) { 251 // return nameServers[1], nil 252 // }).(pulumi.StringOutput), 253 // example.NameServers.ApplyT(func(nameServers []string) (string, error) { 254 // return nameServers[2], nil 255 // }).(pulumi.StringOutput), 256 // example.NameServers.ApplyT(func(nameServers []string) (string, error) { 257 // return nameServers[3], nil 258 // }).(pulumi.StringOutput), 259 // }, 260 // }) 261 // if err != nil { 262 // return err 263 // } 264 // return nil 265 // }) 266 // } 267 // 268 // ``` 269 // <!--End PulumiCodeChooser --> 270 // 271 // ## Import 272 // 273 // If the record also contains a set identifier, append it: 274 // 275 // If the record name is the empty string, it can be omitted: 276 // 277 // __Using `pulumi import` to import__ Route53 Records using the ID of the record, record name, record type, and set identifier. For example: 278 // 279 // Using the ID of the record, which is the zone identifier, record name, and record type, separated by underscores (`_`): 280 // 281 // ```sh 282 // $ pulumi import aws:route53/record:Record myrecord Z4KAPRWWNC7JR_dev.example.com_NS 283 // ``` 284 // If the record also contains a set identifier, append it: 285 // 286 // ```sh 287 // $ pulumi import aws:route53/record:Record myrecord Z4KAPRWWNC7JR_dev.example.com_NS_dev 288 // ``` 289 type Record struct { 290 pulumi.CustomResourceState 291 292 // An alias block. Conflicts with `ttl` & `records`. 293 // Documented below. 294 Aliases RecordAliasArrayOutput `pulumi:"aliases"` 295 // Allow creation of this record to overwrite an existing record, if any. This does not affect the ability to update the record using this provider and does not prevent other resources within this provider or manual Route 53 changes outside this provider from overwriting this record. `false` by default. This configuration is not recommended for most environments. 296 // 297 // Exactly one of `records` or `alias` must be specified: this determines whether it's an alias record. 298 AllowOverwrite pulumi.BoolOutput `pulumi:"allowOverwrite"` 299 // A block indicating a routing policy based on the IP network ranges of requestors. Conflicts with any other routing policy. Documented below. 300 CidrRoutingPolicy RecordCidrRoutingPolicyPtrOutput `pulumi:"cidrRoutingPolicy"` 301 // A block indicating the routing behavior when associated health check fails. Conflicts with any other routing policy. Documented below. 302 FailoverRoutingPolicies RecordFailoverRoutingPolicyArrayOutput `pulumi:"failoverRoutingPolicies"` 303 // [FQDN](https://en.wikipedia.org/wiki/Fully_qualified_domain_name) built using the zone domain and `name`. 304 Fqdn pulumi.StringOutput `pulumi:"fqdn"` 305 // A block indicating a routing policy based on the geolocation of the requestor. Conflicts with any other routing policy. Documented below. 306 GeolocationRoutingPolicies RecordGeolocationRoutingPolicyArrayOutput `pulumi:"geolocationRoutingPolicies"` 307 // A block indicating a routing policy based on the geoproximity of the requestor. Conflicts with any other routing policy. Documented below. 308 GeoproximityRoutingPolicy RecordGeoproximityRoutingPolicyPtrOutput `pulumi:"geoproximityRoutingPolicy"` 309 // The health check the record should be associated with. 310 HealthCheckId pulumi.StringPtrOutput `pulumi:"healthCheckId"` 311 // A block indicating a routing policy based on the latency between the requestor and an AWS region. Conflicts with any other routing policy. Documented below. 312 LatencyRoutingPolicies RecordLatencyRoutingPolicyArrayOutput `pulumi:"latencyRoutingPolicies"` 313 // Set to `true` to indicate a multivalue answer routing policy. Conflicts with any other routing policy. 314 MultivalueAnswerRoutingPolicy pulumi.BoolPtrOutput `pulumi:"multivalueAnswerRoutingPolicy"` 315 // The name of the record. 316 Name pulumi.StringOutput `pulumi:"name"` 317 // A string list of records. To specify a single record value longer than 255 characters such as a TXT record for DKIM, add `\"\"` inside the provider configuration string (e.g., `"first255characters\"\"morecharacters"`). 318 Records pulumi.StringArrayOutput `pulumi:"records"` 319 // Unique identifier to differentiate records with routing policies from one another. Required if using `cidrRoutingPolicy`, `failoverRoutingPolicy`, `geolocationRoutingPolicy`,`geoproximityRoutingPolicy`, `latencyRoutingPolicy`, `multivalueAnswerRoutingPolicy`, or `weightedRoutingPolicy`. 320 SetIdentifier pulumi.StringPtrOutput `pulumi:"setIdentifier"` 321 // The TTL of the record. 322 Ttl pulumi.IntPtrOutput `pulumi:"ttl"` 323 // The record type. Valid values are `A`, `AAAA`, `CAA`, `CNAME`, `DS`, `MX`, `NAPTR`, `NS`, `PTR`, `SOA`, `SPF`, `SRV` and `TXT`. 324 Type pulumi.StringOutput `pulumi:"type"` 325 // A block indicating a weighted routing policy. Conflicts with any other routing policy. Documented below. 326 WeightedRoutingPolicies RecordWeightedRoutingPolicyArrayOutput `pulumi:"weightedRoutingPolicies"` 327 // The ID of the hosted zone to contain this record. 328 ZoneId pulumi.StringOutput `pulumi:"zoneId"` 329 } 330 331 // NewRecord registers a new resource with the given unique name, arguments, and options. 332 func NewRecord(ctx *pulumi.Context, 333 name string, args *RecordArgs, opts ...pulumi.ResourceOption) (*Record, error) { 334 if args == nil { 335 return nil, errors.New("missing one or more required arguments") 336 } 337 338 if args.Name == nil { 339 return nil, errors.New("invalid value for required argument 'Name'") 340 } 341 if args.Type == nil { 342 return nil, errors.New("invalid value for required argument 'Type'") 343 } 344 if args.ZoneId == nil { 345 return nil, errors.New("invalid value for required argument 'ZoneId'") 346 } 347 opts = internal.PkgResourceDefaultOpts(opts) 348 var resource Record 349 err := ctx.RegisterResource("aws:route53/record:Record", name, args, &resource, opts...) 350 if err != nil { 351 return nil, err 352 } 353 return &resource, nil 354 } 355 356 // GetRecord gets an existing Record resource's state with the given name, ID, and optional 357 // state properties that are used to uniquely qualify the lookup (nil if not required). 358 func GetRecord(ctx *pulumi.Context, 359 name string, id pulumi.IDInput, state *RecordState, opts ...pulumi.ResourceOption) (*Record, error) { 360 var resource Record 361 err := ctx.ReadResource("aws:route53/record:Record", name, id, state, &resource, opts...) 362 if err != nil { 363 return nil, err 364 } 365 return &resource, nil 366 } 367 368 // Input properties used for looking up and filtering Record resources. 369 type recordState struct { 370 // An alias block. Conflicts with `ttl` & `records`. 371 // Documented below. 372 Aliases []RecordAlias `pulumi:"aliases"` 373 // Allow creation of this record to overwrite an existing record, if any. This does not affect the ability to update the record using this provider and does not prevent other resources within this provider or manual Route 53 changes outside this provider from overwriting this record. `false` by default. This configuration is not recommended for most environments. 374 // 375 // Exactly one of `records` or `alias` must be specified: this determines whether it's an alias record. 376 AllowOverwrite *bool `pulumi:"allowOverwrite"` 377 // A block indicating a routing policy based on the IP network ranges of requestors. Conflicts with any other routing policy. Documented below. 378 CidrRoutingPolicy *RecordCidrRoutingPolicy `pulumi:"cidrRoutingPolicy"` 379 // A block indicating the routing behavior when associated health check fails. Conflicts with any other routing policy. Documented below. 380 FailoverRoutingPolicies []RecordFailoverRoutingPolicy `pulumi:"failoverRoutingPolicies"` 381 // [FQDN](https://en.wikipedia.org/wiki/Fully_qualified_domain_name) built using the zone domain and `name`. 382 Fqdn *string `pulumi:"fqdn"` 383 // A block indicating a routing policy based on the geolocation of the requestor. Conflicts with any other routing policy. Documented below. 384 GeolocationRoutingPolicies []RecordGeolocationRoutingPolicy `pulumi:"geolocationRoutingPolicies"` 385 // A block indicating a routing policy based on the geoproximity of the requestor. Conflicts with any other routing policy. Documented below. 386 GeoproximityRoutingPolicy *RecordGeoproximityRoutingPolicy `pulumi:"geoproximityRoutingPolicy"` 387 // The health check the record should be associated with. 388 HealthCheckId *string `pulumi:"healthCheckId"` 389 // A block indicating a routing policy based on the latency between the requestor and an AWS region. Conflicts with any other routing policy. Documented below. 390 LatencyRoutingPolicies []RecordLatencyRoutingPolicy `pulumi:"latencyRoutingPolicies"` 391 // Set to `true` to indicate a multivalue answer routing policy. Conflicts with any other routing policy. 392 MultivalueAnswerRoutingPolicy *bool `pulumi:"multivalueAnswerRoutingPolicy"` 393 // The name of the record. 394 Name *string `pulumi:"name"` 395 // A string list of records. To specify a single record value longer than 255 characters such as a TXT record for DKIM, add `\"\"` inside the provider configuration string (e.g., `"first255characters\"\"morecharacters"`). 396 Records []string `pulumi:"records"` 397 // Unique identifier to differentiate records with routing policies from one another. Required if using `cidrRoutingPolicy`, `failoverRoutingPolicy`, `geolocationRoutingPolicy`,`geoproximityRoutingPolicy`, `latencyRoutingPolicy`, `multivalueAnswerRoutingPolicy`, or `weightedRoutingPolicy`. 398 SetIdentifier *string `pulumi:"setIdentifier"` 399 // The TTL of the record. 400 Ttl *int `pulumi:"ttl"` 401 // The record type. Valid values are `A`, `AAAA`, `CAA`, `CNAME`, `DS`, `MX`, `NAPTR`, `NS`, `PTR`, `SOA`, `SPF`, `SRV` and `TXT`. 402 Type *string `pulumi:"type"` 403 // A block indicating a weighted routing policy. Conflicts with any other routing policy. Documented below. 404 WeightedRoutingPolicies []RecordWeightedRoutingPolicy `pulumi:"weightedRoutingPolicies"` 405 // The ID of the hosted zone to contain this record. 406 ZoneId *string `pulumi:"zoneId"` 407 } 408 409 type RecordState struct { 410 // An alias block. Conflicts with `ttl` & `records`. 411 // Documented below. 412 Aliases RecordAliasArrayInput 413 // Allow creation of this record to overwrite an existing record, if any. This does not affect the ability to update the record using this provider and does not prevent other resources within this provider or manual Route 53 changes outside this provider from overwriting this record. `false` by default. This configuration is not recommended for most environments. 414 // 415 // Exactly one of `records` or `alias` must be specified: this determines whether it's an alias record. 416 AllowOverwrite pulumi.BoolPtrInput 417 // A block indicating a routing policy based on the IP network ranges of requestors. Conflicts with any other routing policy. Documented below. 418 CidrRoutingPolicy RecordCidrRoutingPolicyPtrInput 419 // A block indicating the routing behavior when associated health check fails. Conflicts with any other routing policy. Documented below. 420 FailoverRoutingPolicies RecordFailoverRoutingPolicyArrayInput 421 // [FQDN](https://en.wikipedia.org/wiki/Fully_qualified_domain_name) built using the zone domain and `name`. 422 Fqdn pulumi.StringPtrInput 423 // A block indicating a routing policy based on the geolocation of the requestor. Conflicts with any other routing policy. Documented below. 424 GeolocationRoutingPolicies RecordGeolocationRoutingPolicyArrayInput 425 // A block indicating a routing policy based on the geoproximity of the requestor. Conflicts with any other routing policy. Documented below. 426 GeoproximityRoutingPolicy RecordGeoproximityRoutingPolicyPtrInput 427 // The health check the record should be associated with. 428 HealthCheckId pulumi.StringPtrInput 429 // A block indicating a routing policy based on the latency between the requestor and an AWS region. Conflicts with any other routing policy. Documented below. 430 LatencyRoutingPolicies RecordLatencyRoutingPolicyArrayInput 431 // Set to `true` to indicate a multivalue answer routing policy. Conflicts with any other routing policy. 432 MultivalueAnswerRoutingPolicy pulumi.BoolPtrInput 433 // The name of the record. 434 Name pulumi.StringPtrInput 435 // A string list of records. To specify a single record value longer than 255 characters such as a TXT record for DKIM, add `\"\"` inside the provider configuration string (e.g., `"first255characters\"\"morecharacters"`). 436 Records pulumi.StringArrayInput 437 // Unique identifier to differentiate records with routing policies from one another. Required if using `cidrRoutingPolicy`, `failoverRoutingPolicy`, `geolocationRoutingPolicy`,`geoproximityRoutingPolicy`, `latencyRoutingPolicy`, `multivalueAnswerRoutingPolicy`, or `weightedRoutingPolicy`. 438 SetIdentifier pulumi.StringPtrInput 439 // The TTL of the record. 440 Ttl pulumi.IntPtrInput 441 // The record type. Valid values are `A`, `AAAA`, `CAA`, `CNAME`, `DS`, `MX`, `NAPTR`, `NS`, `PTR`, `SOA`, `SPF`, `SRV` and `TXT`. 442 Type pulumi.StringPtrInput 443 // A block indicating a weighted routing policy. Conflicts with any other routing policy. Documented below. 444 WeightedRoutingPolicies RecordWeightedRoutingPolicyArrayInput 445 // The ID of the hosted zone to contain this record. 446 ZoneId pulumi.StringPtrInput 447 } 448 449 func (RecordState) ElementType() reflect.Type { 450 return reflect.TypeOf((*recordState)(nil)).Elem() 451 } 452 453 type recordArgs struct { 454 // An alias block. Conflicts with `ttl` & `records`. 455 // Documented below. 456 Aliases []RecordAlias `pulumi:"aliases"` 457 // Allow creation of this record to overwrite an existing record, if any. This does not affect the ability to update the record using this provider and does not prevent other resources within this provider or manual Route 53 changes outside this provider from overwriting this record. `false` by default. This configuration is not recommended for most environments. 458 // 459 // Exactly one of `records` or `alias` must be specified: this determines whether it's an alias record. 460 AllowOverwrite *bool `pulumi:"allowOverwrite"` 461 // A block indicating a routing policy based on the IP network ranges of requestors. Conflicts with any other routing policy. Documented below. 462 CidrRoutingPolicy *RecordCidrRoutingPolicy `pulumi:"cidrRoutingPolicy"` 463 // A block indicating the routing behavior when associated health check fails. Conflicts with any other routing policy. Documented below. 464 FailoverRoutingPolicies []RecordFailoverRoutingPolicy `pulumi:"failoverRoutingPolicies"` 465 // A block indicating a routing policy based on the geolocation of the requestor. Conflicts with any other routing policy. Documented below. 466 GeolocationRoutingPolicies []RecordGeolocationRoutingPolicy `pulumi:"geolocationRoutingPolicies"` 467 // A block indicating a routing policy based on the geoproximity of the requestor. Conflicts with any other routing policy. Documented below. 468 GeoproximityRoutingPolicy *RecordGeoproximityRoutingPolicy `pulumi:"geoproximityRoutingPolicy"` 469 // The health check the record should be associated with. 470 HealthCheckId *string `pulumi:"healthCheckId"` 471 // A block indicating a routing policy based on the latency between the requestor and an AWS region. Conflicts with any other routing policy. Documented below. 472 LatencyRoutingPolicies []RecordLatencyRoutingPolicy `pulumi:"latencyRoutingPolicies"` 473 // Set to `true` to indicate a multivalue answer routing policy. Conflicts with any other routing policy. 474 MultivalueAnswerRoutingPolicy *bool `pulumi:"multivalueAnswerRoutingPolicy"` 475 // The name of the record. 476 Name string `pulumi:"name"` 477 // A string list of records. To specify a single record value longer than 255 characters such as a TXT record for DKIM, add `\"\"` inside the provider configuration string (e.g., `"first255characters\"\"morecharacters"`). 478 Records []string `pulumi:"records"` 479 // Unique identifier to differentiate records with routing policies from one another. Required if using `cidrRoutingPolicy`, `failoverRoutingPolicy`, `geolocationRoutingPolicy`,`geoproximityRoutingPolicy`, `latencyRoutingPolicy`, `multivalueAnswerRoutingPolicy`, or `weightedRoutingPolicy`. 480 SetIdentifier *string `pulumi:"setIdentifier"` 481 // The TTL of the record. 482 Ttl *int `pulumi:"ttl"` 483 // The record type. Valid values are `A`, `AAAA`, `CAA`, `CNAME`, `DS`, `MX`, `NAPTR`, `NS`, `PTR`, `SOA`, `SPF`, `SRV` and `TXT`. 484 Type string `pulumi:"type"` 485 // A block indicating a weighted routing policy. Conflicts with any other routing policy. Documented below. 486 WeightedRoutingPolicies []RecordWeightedRoutingPolicy `pulumi:"weightedRoutingPolicies"` 487 // The ID of the hosted zone to contain this record. 488 ZoneId string `pulumi:"zoneId"` 489 } 490 491 // The set of arguments for constructing a Record resource. 492 type RecordArgs struct { 493 // An alias block. Conflicts with `ttl` & `records`. 494 // Documented below. 495 Aliases RecordAliasArrayInput 496 // Allow creation of this record to overwrite an existing record, if any. This does not affect the ability to update the record using this provider and does not prevent other resources within this provider or manual Route 53 changes outside this provider from overwriting this record. `false` by default. This configuration is not recommended for most environments. 497 // 498 // Exactly one of `records` or `alias` must be specified: this determines whether it's an alias record. 499 AllowOverwrite pulumi.BoolPtrInput 500 // A block indicating a routing policy based on the IP network ranges of requestors. Conflicts with any other routing policy. Documented below. 501 CidrRoutingPolicy RecordCidrRoutingPolicyPtrInput 502 // A block indicating the routing behavior when associated health check fails. Conflicts with any other routing policy. Documented below. 503 FailoverRoutingPolicies RecordFailoverRoutingPolicyArrayInput 504 // A block indicating a routing policy based on the geolocation of the requestor. Conflicts with any other routing policy. Documented below. 505 GeolocationRoutingPolicies RecordGeolocationRoutingPolicyArrayInput 506 // A block indicating a routing policy based on the geoproximity of the requestor. Conflicts with any other routing policy. Documented below. 507 GeoproximityRoutingPolicy RecordGeoproximityRoutingPolicyPtrInput 508 // The health check the record should be associated with. 509 HealthCheckId pulumi.StringPtrInput 510 // A block indicating a routing policy based on the latency between the requestor and an AWS region. Conflicts with any other routing policy. Documented below. 511 LatencyRoutingPolicies RecordLatencyRoutingPolicyArrayInput 512 // Set to `true` to indicate a multivalue answer routing policy. Conflicts with any other routing policy. 513 MultivalueAnswerRoutingPolicy pulumi.BoolPtrInput 514 // The name of the record. 515 Name pulumi.StringInput 516 // A string list of records. To specify a single record value longer than 255 characters such as a TXT record for DKIM, add `\"\"` inside the provider configuration string (e.g., `"first255characters\"\"morecharacters"`). 517 Records pulumi.StringArrayInput 518 // Unique identifier to differentiate records with routing policies from one another. Required if using `cidrRoutingPolicy`, `failoverRoutingPolicy`, `geolocationRoutingPolicy`,`geoproximityRoutingPolicy`, `latencyRoutingPolicy`, `multivalueAnswerRoutingPolicy`, or `weightedRoutingPolicy`. 519 SetIdentifier pulumi.StringPtrInput 520 // The TTL of the record. 521 Ttl pulumi.IntPtrInput 522 // The record type. Valid values are `A`, `AAAA`, `CAA`, `CNAME`, `DS`, `MX`, `NAPTR`, `NS`, `PTR`, `SOA`, `SPF`, `SRV` and `TXT`. 523 Type pulumi.StringInput 524 // A block indicating a weighted routing policy. Conflicts with any other routing policy. Documented below. 525 WeightedRoutingPolicies RecordWeightedRoutingPolicyArrayInput 526 // The ID of the hosted zone to contain this record. 527 ZoneId pulumi.StringInput 528 } 529 530 func (RecordArgs) ElementType() reflect.Type { 531 return reflect.TypeOf((*recordArgs)(nil)).Elem() 532 } 533 534 type RecordInput interface { 535 pulumi.Input 536 537 ToRecordOutput() RecordOutput 538 ToRecordOutputWithContext(ctx context.Context) RecordOutput 539 } 540 541 func (*Record) ElementType() reflect.Type { 542 return reflect.TypeOf((**Record)(nil)).Elem() 543 } 544 545 func (i *Record) ToRecordOutput() RecordOutput { 546 return i.ToRecordOutputWithContext(context.Background()) 547 } 548 549 func (i *Record) ToRecordOutputWithContext(ctx context.Context) RecordOutput { 550 return pulumi.ToOutputWithContext(ctx, i).(RecordOutput) 551 } 552 553 // RecordArrayInput is an input type that accepts RecordArray and RecordArrayOutput values. 554 // You can construct a concrete instance of `RecordArrayInput` via: 555 // 556 // RecordArray{ RecordArgs{...} } 557 type RecordArrayInput interface { 558 pulumi.Input 559 560 ToRecordArrayOutput() RecordArrayOutput 561 ToRecordArrayOutputWithContext(context.Context) RecordArrayOutput 562 } 563 564 type RecordArray []RecordInput 565 566 func (RecordArray) ElementType() reflect.Type { 567 return reflect.TypeOf((*[]*Record)(nil)).Elem() 568 } 569 570 func (i RecordArray) ToRecordArrayOutput() RecordArrayOutput { 571 return i.ToRecordArrayOutputWithContext(context.Background()) 572 } 573 574 func (i RecordArray) ToRecordArrayOutputWithContext(ctx context.Context) RecordArrayOutput { 575 return pulumi.ToOutputWithContext(ctx, i).(RecordArrayOutput) 576 } 577 578 // RecordMapInput is an input type that accepts RecordMap and RecordMapOutput values. 579 // You can construct a concrete instance of `RecordMapInput` via: 580 // 581 // RecordMap{ "key": RecordArgs{...} } 582 type RecordMapInput interface { 583 pulumi.Input 584 585 ToRecordMapOutput() RecordMapOutput 586 ToRecordMapOutputWithContext(context.Context) RecordMapOutput 587 } 588 589 type RecordMap map[string]RecordInput 590 591 func (RecordMap) ElementType() reflect.Type { 592 return reflect.TypeOf((*map[string]*Record)(nil)).Elem() 593 } 594 595 func (i RecordMap) ToRecordMapOutput() RecordMapOutput { 596 return i.ToRecordMapOutputWithContext(context.Background()) 597 } 598 599 func (i RecordMap) ToRecordMapOutputWithContext(ctx context.Context) RecordMapOutput { 600 return pulumi.ToOutputWithContext(ctx, i).(RecordMapOutput) 601 } 602 603 type RecordOutput struct{ *pulumi.OutputState } 604 605 func (RecordOutput) ElementType() reflect.Type { 606 return reflect.TypeOf((**Record)(nil)).Elem() 607 } 608 609 func (o RecordOutput) ToRecordOutput() RecordOutput { 610 return o 611 } 612 613 func (o RecordOutput) ToRecordOutputWithContext(ctx context.Context) RecordOutput { 614 return o 615 } 616 617 // An alias block. Conflicts with `ttl` & `records`. 618 // Documented below. 619 func (o RecordOutput) Aliases() RecordAliasArrayOutput { 620 return o.ApplyT(func(v *Record) RecordAliasArrayOutput { return v.Aliases }).(RecordAliasArrayOutput) 621 } 622 623 // Allow creation of this record to overwrite an existing record, if any. This does not affect the ability to update the record using this provider and does not prevent other resources within this provider or manual Route 53 changes outside this provider from overwriting this record. `false` by default. This configuration is not recommended for most environments. 624 // 625 // Exactly one of `records` or `alias` must be specified: this determines whether it's an alias record. 626 func (o RecordOutput) AllowOverwrite() pulumi.BoolOutput { 627 return o.ApplyT(func(v *Record) pulumi.BoolOutput { return v.AllowOverwrite }).(pulumi.BoolOutput) 628 } 629 630 // A block indicating a routing policy based on the IP network ranges of requestors. Conflicts with any other routing policy. Documented below. 631 func (o RecordOutput) CidrRoutingPolicy() RecordCidrRoutingPolicyPtrOutput { 632 return o.ApplyT(func(v *Record) RecordCidrRoutingPolicyPtrOutput { return v.CidrRoutingPolicy }).(RecordCidrRoutingPolicyPtrOutput) 633 } 634 635 // A block indicating the routing behavior when associated health check fails. Conflicts with any other routing policy. Documented below. 636 func (o RecordOutput) FailoverRoutingPolicies() RecordFailoverRoutingPolicyArrayOutput { 637 return o.ApplyT(func(v *Record) RecordFailoverRoutingPolicyArrayOutput { return v.FailoverRoutingPolicies }).(RecordFailoverRoutingPolicyArrayOutput) 638 } 639 640 // [FQDN](https://en.wikipedia.org/wiki/Fully_qualified_domain_name) built using the zone domain and `name`. 641 func (o RecordOutput) Fqdn() pulumi.StringOutput { 642 return o.ApplyT(func(v *Record) pulumi.StringOutput { return v.Fqdn }).(pulumi.StringOutput) 643 } 644 645 // A block indicating a routing policy based on the geolocation of the requestor. Conflicts with any other routing policy. Documented below. 646 func (o RecordOutput) GeolocationRoutingPolicies() RecordGeolocationRoutingPolicyArrayOutput { 647 return o.ApplyT(func(v *Record) RecordGeolocationRoutingPolicyArrayOutput { return v.GeolocationRoutingPolicies }).(RecordGeolocationRoutingPolicyArrayOutput) 648 } 649 650 // A block indicating a routing policy based on the geoproximity of the requestor. Conflicts with any other routing policy. Documented below. 651 func (o RecordOutput) GeoproximityRoutingPolicy() RecordGeoproximityRoutingPolicyPtrOutput { 652 return o.ApplyT(func(v *Record) RecordGeoproximityRoutingPolicyPtrOutput { return v.GeoproximityRoutingPolicy }).(RecordGeoproximityRoutingPolicyPtrOutput) 653 } 654 655 // The health check the record should be associated with. 656 func (o RecordOutput) HealthCheckId() pulumi.StringPtrOutput { 657 return o.ApplyT(func(v *Record) pulumi.StringPtrOutput { return v.HealthCheckId }).(pulumi.StringPtrOutput) 658 } 659 660 // A block indicating a routing policy based on the latency between the requestor and an AWS region. Conflicts with any other routing policy. Documented below. 661 func (o RecordOutput) LatencyRoutingPolicies() RecordLatencyRoutingPolicyArrayOutput { 662 return o.ApplyT(func(v *Record) RecordLatencyRoutingPolicyArrayOutput { return v.LatencyRoutingPolicies }).(RecordLatencyRoutingPolicyArrayOutput) 663 } 664 665 // Set to `true` to indicate a multivalue answer routing policy. Conflicts with any other routing policy. 666 func (o RecordOutput) MultivalueAnswerRoutingPolicy() pulumi.BoolPtrOutput { 667 return o.ApplyT(func(v *Record) pulumi.BoolPtrOutput { return v.MultivalueAnswerRoutingPolicy }).(pulumi.BoolPtrOutput) 668 } 669 670 // The name of the record. 671 func (o RecordOutput) Name() pulumi.StringOutput { 672 return o.ApplyT(func(v *Record) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 673 } 674 675 // A string list of records. To specify a single record value longer than 255 characters such as a TXT record for DKIM, add `\"\"` inside the provider configuration string (e.g., `"first255characters\"\"morecharacters"`). 676 func (o RecordOutput) Records() pulumi.StringArrayOutput { 677 return o.ApplyT(func(v *Record) pulumi.StringArrayOutput { return v.Records }).(pulumi.StringArrayOutput) 678 } 679 680 // Unique identifier to differentiate records with routing policies from one another. Required if using `cidrRoutingPolicy`, `failoverRoutingPolicy`, `geolocationRoutingPolicy`,`geoproximityRoutingPolicy`, `latencyRoutingPolicy`, `multivalueAnswerRoutingPolicy`, or `weightedRoutingPolicy`. 681 func (o RecordOutput) SetIdentifier() pulumi.StringPtrOutput { 682 return o.ApplyT(func(v *Record) pulumi.StringPtrOutput { return v.SetIdentifier }).(pulumi.StringPtrOutput) 683 } 684 685 // The TTL of the record. 686 func (o RecordOutput) Ttl() pulumi.IntPtrOutput { 687 return o.ApplyT(func(v *Record) pulumi.IntPtrOutput { return v.Ttl }).(pulumi.IntPtrOutput) 688 } 689 690 // The record type. Valid values are `A`, `AAAA`, `CAA`, `CNAME`, `DS`, `MX`, `NAPTR`, `NS`, `PTR`, `SOA`, `SPF`, `SRV` and `TXT`. 691 func (o RecordOutput) Type() pulumi.StringOutput { 692 return o.ApplyT(func(v *Record) pulumi.StringOutput { return v.Type }).(pulumi.StringOutput) 693 } 694 695 // A block indicating a weighted routing policy. Conflicts with any other routing policy. Documented below. 696 func (o RecordOutput) WeightedRoutingPolicies() RecordWeightedRoutingPolicyArrayOutput { 697 return o.ApplyT(func(v *Record) RecordWeightedRoutingPolicyArrayOutput { return v.WeightedRoutingPolicies }).(RecordWeightedRoutingPolicyArrayOutput) 698 } 699 700 // The ID of the hosted zone to contain this record. 701 func (o RecordOutput) ZoneId() pulumi.StringOutput { 702 return o.ApplyT(func(v *Record) pulumi.StringOutput { return v.ZoneId }).(pulumi.StringOutput) 703 } 704 705 type RecordArrayOutput struct{ *pulumi.OutputState } 706 707 func (RecordArrayOutput) ElementType() reflect.Type { 708 return reflect.TypeOf((*[]*Record)(nil)).Elem() 709 } 710 711 func (o RecordArrayOutput) ToRecordArrayOutput() RecordArrayOutput { 712 return o 713 } 714 715 func (o RecordArrayOutput) ToRecordArrayOutputWithContext(ctx context.Context) RecordArrayOutput { 716 return o 717 } 718 719 func (o RecordArrayOutput) Index(i pulumi.IntInput) RecordOutput { 720 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Record { 721 return vs[0].([]*Record)[vs[1].(int)] 722 }).(RecordOutput) 723 } 724 725 type RecordMapOutput struct{ *pulumi.OutputState } 726 727 func (RecordMapOutput) ElementType() reflect.Type { 728 return reflect.TypeOf((*map[string]*Record)(nil)).Elem() 729 } 730 731 func (o RecordMapOutput) ToRecordMapOutput() RecordMapOutput { 732 return o 733 } 734 735 func (o RecordMapOutput) ToRecordMapOutputWithContext(ctx context.Context) RecordMapOutput { 736 return o 737 } 738 739 func (o RecordMapOutput) MapIndex(k pulumi.StringInput) RecordOutput { 740 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Record { 741 return vs[0].(map[string]*Record)[vs[1].(string)] 742 }).(RecordOutput) 743 } 744 745 func init() { 746 pulumi.RegisterInputType(reflect.TypeOf((*RecordInput)(nil)).Elem(), &Record{}) 747 pulumi.RegisterInputType(reflect.TypeOf((*RecordArrayInput)(nil)).Elem(), RecordArray{}) 748 pulumi.RegisterInputType(reflect.TypeOf((*RecordMapInput)(nil)).Elem(), RecordMap{}) 749 pulumi.RegisterOutputType(RecordOutput{}) 750 pulumi.RegisterOutputType(RecordArrayOutput{}) 751 pulumi.RegisterOutputType(RecordMapOutput{}) 752 }