I’m rather beginner when it comes to Terraform and I’m dealing with some issue.
Given that I have TF file like:
resource "fusionauth_application" "test" {
tenant_id = fusionauth_tenant.test_frontend.id
application_id = var.fusionauth_test_application_id
name = var.fusionauth_test_application_name
jwt_configuration {
enabled = true
access_token_id = fusionauth_key.test-rsa-access-token.key_id
}
login_configuration {
require_authentication = true
generate_refresh_tokens = true
allow_token_refresh = true
}
}
After first run of the Terraform the resource will be created and that’s totally fine. But during creation of the resource, since the ID token key was not provided, the new ID key will be created for JWT configuration.
Then the subsequent calls to the Terraform apply will always try to set null
for jwt_configuration.id_token_key_id
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
~ update in-place
Terraform will perform the following actions:
# fusionauth_application.formedia will be updated in-place
~ resource "fusionauth_application" "test" {
id = <some-id>
name = "Test"
# (16 unchanged attributes hidden)
~ jwt_configuration {
- id_token_key_id = <some-key> -> null
# (4 unchanged attributes hidden)
}
# (4 unchanged blocks hidden)
}
Now I’m not sure if this is some bug in the Terraform provider or maybe I should somehow handle this ? I cannot/don’t really want to explicitly pass the value there, but maybe I should ?
Cheers