Yandex Cloud
Search
Contact UsGet started
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • AI for business
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
Terraform in Yandex Cloud
  • Getting started
  • Solution library
    • Overview
    • Release notes
          • cdn_origin_group
          • cdn_resource

In this article:

  • Example usage
  • Schema
  • Required
  • Optional
  • Read-Only
  • Nested Schema for origin
  • Nested Schema for timeouts
  • Import
  1. Terraform reference
  2. Resources
  3. Cloud Content Delivery Network (CDN)
  4. Resources
  5. cdn_origin_group

yandex_cdn_origin_group (Resource)

Written by
Yandex Cloud
Updated at October 20, 2025
  • Example usage
  • Schema
    • Required
    • Optional
    • Read-Only
    • Nested Schema for origin
    • Nested Schema for timeouts
  • Import

Allows management of Yandex Cloud CDN Origin Groups.

Example usageExample usage

//
// Create a new CDN Origin Group
//
resource "yandex_cdn_origin_group" "my_group" {
  name     = "My Origin group"
  use_next = true

  origin {
    source = "ya.ru"
  }

  origin {
    source = "yandex.ru"
  }

  origin {
    source = "goo.gl"
  }

  origin {
    source = "amazon.com"
    backup = false
  }
}

SchemaSchema

RequiredRequired

  • name (String) The resource name.
  • origin (Block Set, Min: 1) A set of available origins, an origins group must contain at least one enabled origin with fields below. (see below for nested schema)

OptionalOptional

  • folder_id (String) The folder identifier that resource belongs to. If it is not provided, the default provider folder-id is used.
  • provider_type (String) CDN provider is a content delivery service provider. Possible values: "ourcdn" (default) or "gcore"
  • timeouts (Block, Optional) (see below for nested schema)
  • use_next (Boolean) If the option is active (has true value), in case the origin responds with 4XX or 5XX codes, use the next origin from the list.

Read-OnlyRead-Only

  • id (String) The ID of this resource.

Nested Schema for Nested Schema for origin

Required:

  • source (String) IP address or Domain name of your origin and the port.

Optional:

  • backup (Boolean) Specifies whether the origin is used in its origin group as backup. A backup origin is used when one of active origins becomes unavailable.
  • enabled (Boolean) The origin is enabled and used as a source for the CDN. Default enabled.

Read-Only:

  • origin_group_id (String) The ID of a specific origin group.

Nested Schema for Nested Schema for timeouts

Optional:

  • create (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
  • delete (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
  • update (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).

ImportImport

The resource can be imported by using their resource ID. For getting the resource ID you can use Yandex Cloud Web Console or YC CLI.

# terraform import yandex_cdn_origin_group.<resource Name> <resource Id>
terraform import yandex_cdn_origin_group.my_cdn_group ...

Was the article helpful?

Previous
cdn_resource
Next
cdn_resource
© 2025 Direct Cursus Technology L.L.C.