Closed taiidani closed 11 months ago
Additional behavior that seems to come out of this change. According to v0.1.5's documentation all fields are now Optional, but this doesn't seem to be the case:
resource "ngrok_reserved_domain" "example" {}
terraform {
required_providers {
ngrok = {
source = "ngrok/ngrok"
version = "0.1.5"
}
}
}
This snippet of TF cannot be applied:
$ terraform apply
...
Terraform will perform the following actions:
# ngrok_reserved_domain.example will be created
+ resource "ngrok_reserved_domain" "example" {
+ acme_challenge_cname_target = (known after apply)
+ cname_target = (known after apply)
+ id = (known after apply)
}
Plan: 1 to add, 0 to change, 0 to destroy.
...
ngrok_reserved_domain.example: Creating...
╷
│ Error: HTTP 400: The domain '' is not a fully qualified domain name. [ERR_NGROK_448]
│
│ Operation ID: op_2WdPPAju3ZY3Xe80lf24HtJWNIQ
│
│ with ngrok_reserved_domain.example,
│ on main.tf line 1, in resource "ngrok_reserved_domain" "example":
│ 1: resource "ngrok_reserved_domain" "example" {}
If we provide name
, the resource seems to go into an endless apply
loop:
resource "ngrok_reserved_domain" "example" {
name = "example-reserved-domain"
}
terraform {
required_providers {
ngrok = {
source = "ngrok/ngrok"
version = "0.1.5"
}
}
}
Produces:
$ terraform apply
...
Terraform will perform the following actions:
# ngrok_reserved_domain.example will be created
+ resource "ngrok_reserved_domain" "example" {
+ acme_challenge_cname_target = (known after apply)
+ cname_target = (known after apply)
+ id = (known after apply)
+ name = "example-reserved-domain"
}
Plan: 1 to add, 0 to change, 0 to destroy.
...
ngrok_reserved_domain.example: Creating...
ngrok_reserved_domain.example: Creation complete after 0s [id=rd_2WdPfzcot94uKCUYY55DUrp5hdm]
Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
$ terraform apply
ngrok_reserved_domain.example: Refreshing state... [id=rd_2WdPfzcot94uKCUYY55DUrp5hdm]
Terraform will perform the following actions:
# ngrok_reserved_domain.example must be replaced
-/+ resource "ngrok_reserved_domain" "example" {
+ acme_challenge_cname_target = (known after apply)
+ cname_target = (known after apply)
- domain = "example-reserved-domain.ngrok.app" -> null # forces replacement
~ id = "rd_2WdPfzcot94uKCUYY55DUrp5hdm" -> (known after apply)
name = "example-reserved-domain"
}
Plan: 1 to add, 0 to change, 1 to destroy.
...
ngrok_reserved_domain.example: Destroying... [id=rd_2WdPfzcot94uKCUYY55DUrp5hdm]
ngrok_reserved_domain.example: Destruction complete after 1s
ngrok_reserved_domain.example: Creating...
ngrok_reserved_domain.example: Creation complete after 0s [id=rd_2WdPgWl5TW6Z4aTAWjzcKgDkcCh]
Apply complete! Resources: 1 added, 0 changed, 1 destroyed.
Successive applies continue to show the resource as needing to be changed.
Thank you for bringing this to our attention! The latest release v0.2.0
should take care of this issue, the changelog shows the changes that have been made, with an update for the v1.5.0
section for the unintentional loss of the computed
property for domain
which has now been restored.
I'll close out this issue, please reopen if it doesn't fix the problem you're running into. Thanks again for the feedback!
Expected
When upgrading from v0.1.4 of the provider to v0.1.5, the
nginx_reserved_domain.resourcename.domain
output continues to contain the computed domain name generated by the resource.Actual
The
domain
output is null. Anything relying on thedomain
to be computed errors.Example