Closed pnathan closed 1 year ago
Hi! Can you confirm you're using the latest version of the provider? Also why are you ignoring changes on the Id? Is that an attempt to work around this issue?
This is very similar to a bug I encountered when I was upgrading the plugin framework version and I thought I'd addressed it so if you confirm you're on the latest provider version I'll need to do some digging.
Yes, I confirm that I'm using the latest version.
And, yes, the lifecyle clause is an attempt to work around the issue.
porkbun = { source = "cullenmcdermott/porkbun" version =
"0.2.2" }
Regards, Paul
On Fri, Aug 4, 2023 at 12:00 PM Cullen McDermott @.***> wrote:
Hi! Can you confirm you're using the latest version of the provider? Also why are you ignoring changes on the Id? Is that an attempt to work around this issue?
— Reply to this email directly, view it on GitHub https://github.com/cullenmcdermott/terraform-provider-porkbun/issues/37#issuecomment-1666050091, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFZZYFUVSY4FSVQJIOLVQTXTVBD3ANCNFSM6AAAAAA3DU3NBU . You are receiving this because you authored the thread.Message ID: @.*** com>
Thanks! I was able to recreate this and it reminded me of a bug that I didn't end up addressing in the latest release.
You should be able to work around this by changing your resource like so:
resource porkbun_dns_record "housecarl-cloud" {
domain = "housecarl.cloud"
type = "A"
ttl = "300"
content = module.housecarl-site.ip_address
name = ""
}
Setting name = ""
makes terraform correctly detect that there are no changes.
Additionally I notice that you set the ttl to 300, according to the api docs the minimum is 600, I don't think this is causing your issue but wanted to mention it since you are likely not getting the result you hope for with that. I created #39 to prevent this in the future.
Glad to get a reproduction!
The workaround was successful.
Thanks for the headsup about the TTL misconfiguration, I fixed it.
Regards, Paul
On Fri, Aug 4, 2023 at 1:46 PM Cullen McDermott @.***> wrote:
Thanks! I was able to recreate this and it reminded me of a bug https://github.com/cullenmcdermott/terraform-provider-porkbun/blob/main/internal/provider/resource_dns_record.go#L60-L61 that I didn't end up addressing in the latest release.
You should be able to work around this by changing your resource like so:
resource porkbun_dns_record "housecarl-cloud" { domain = "housecarl.cloud" type = "A" ttl = "300" content = module.housecarl-site.ip_address name = "" }
Setting name = "" makes terraform correctly detect that there are no changes.
Additionally I notice that you set the ttl to 300, according to the api docs https://porkbun.com/api/json/v3/documentation#DNS%20Create%20Record the minimum is 600, I don't think this is causing your issue but wanted to mention it since you are likely not getting the result you hope for with that. I created #39 https://github.com/cullenmcdermott/terraform-provider-porkbun/issues/39 to prevent this in the future.
— Reply to this email directly, view it on GitHub https://github.com/cullenmcdermott/terraform-provider-porkbun/issues/37#issuecomment-1666163742, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFZZYDOW25DMMHIAXJI3ADXTVNQZANCNFSM6AAAAAA3DU3NBU . You are receiving this because you authored the thread.Message ID: @.*** com>
after applying, TF tries to reapply something to do with the ID
I do an apply, then another apply without any changes....
relevant resource: