-
Notifications
You must be signed in to change notification settings - Fork 1
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
Bug .accelerated_pullzone #5
Comments
Hi, Thank you for your report. Unfortunately, the Thank you. |
To import the accelerated pullzone into your terraform plan, you can use the following: resource "bunnynet_dns_zone" "example" {
domain = "my.domain"
}
resource "bunnynet_dns_record" "A" {
zone = bunnynet_dns_zone.example.id
name = ""
type = "A"
value = "192.0.2.1"
accelerated = true
enabled = true
}
resource "bunnynet_pullzone" "example" {
name = "generated-pullzone-name"
origin {
type = "DnsAccelerate"
url = "https://192.0.2.1:443/"
forward_host_header = true
}
routing {
tier = "Standard"
}
cache_enabled = true
strip_cookies = false
}
import {
id = bunnynet_dns_record.A.accelerated_pullzone
to = bunnynet_pullzone.example
} The Thank you. |
Thank you. The new release fixed the error! However, when I try to use import, I have two problems.
error:
I comment out a line of code import and resource "bunnynet_pullzone", run terrafrom and then run terraform again wihout comment.
I tried setting url = "https://12.12.12.12" and changing type = "DnsAccelerate" to type = "OriginUrl". Could you please provide guidance on how to modify the code to enable Terraform to create all required resources in a single run, eliminating the need for a second Terraform execution? Additionally, should I submit a new bug report for the second issue? |
Hi! From what I am reading, terraform itself does not have support for doing this in a single call: hashicorp/terraform#34152 (comment) When doing it with two calls (first without import and pullzone), I had success importing the pullzone with the following block: resource "bunnynet_pullzone" "example" {
name = "d73a02cb-d"
origin {
type = "DnsAccelerate"
url = "http://12.12.12.12"
forward_host_header = true
}
routing {
tier = "Standard"
}
cache_enabled = true
strip_cookies = false
} This should result in a "clean" plan, where it will only import the pullzone without any changes:
Thank you. |
Test terraform code:
Error:
The text was updated successfully, but these errors were encountered: