Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ошибка в модуле resource "yandex_cdn_resource" #434

Open
zet694 opened this issue Apr 23, 2024 · 2 comments
Open

Ошибка в модуле resource "yandex_cdn_resource" #434

zet694 opened this issue Apr 23, 2024 · 2 comments

Comments

@zet694
Copy link

zet694 commented Apr 23, 2024

Привет! Получаю ошибку:

│ Error: missing expected {
│ 
│   with yandex_cdn_resource.static,
│   on resource-yandex_cdn_origin_group.tf line 21, in resource "yandex_cdn_resource" "static":
│   21:           static_request_headers = {
│   22:           is-from-cdn = "yes"
│   23:         }

Пример кода когда провляется ошибка:

resource "yandex_cdn_origin_group" "static" {
  name = "static"
  origin {
    source = yandex_storage_bucket.static-content.bucket_domain_name
  }
}

resource "yandex_cdn_resource" "static" {
    cname = "static.stage"

    active = true

    origin_protocol = "http"


    origin_group_id = yandex_cdn_origin_group.static.id

    options {
        edge_cache_settings = 345600
        ignore_cookie = true
          static_request_headers = {
          is-from-cdn = "yes"
        }
        static_response_headers = {
          is-cdn = "yes"
        }
    }
}

Версия yandex-cloud/yandex - 0.116.0

@Beloglaz0v
Copy link

Столкнулся с аналогичной проблемой после обновления версии провайдера до 0.105.0, ранее была 0.88.0 и проблем не было

@zet694
Copy link
Author

zet694 commented Apr 25, 2024

Костыль пока такой:

terraform state rm yandex_cdn_resource.<YourCNDResourceName>
terraform import yandex_cdn_resource.my_resource <YourCNDResourceId>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants