Terraform Provider: status_page_domain computed fields cause inconsistent result after apply #139

Closed
opened 2026-04-05 16:18:56 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @listellm on 1/23/2026

Description

The oneuptime_status_page_domain resource causes a "Provider produced inconsistent result after apply" error due to SSL-related fields being incorrectly marked as configurable in the provider schema.

  • Related to #2235 (Domain Verification Workflow) - during testing of auto-verification, this issue was discovered

Observation: Auto-Verification Works

Positive note: The CNAME verification appears to work automatically via a polling mechanism. After creating the DNS CNAME record pointing to live-statuspage.oneuptime.com, the domain eventually shows is_cname_verified = true without manual intervention. This is good behaviour.

Problem

When Terraform detects drift on computed fields and attempts to apply, the provider produces inconsistent results:

  # oneuptime_status_page_domain.this will be updated in-place
  ~ resource "oneuptime_status_page_domain" "this" {
        id                    = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
      ~ is_ssl_ordered        = true -> false
      ~ is_ssl_provisioned    = true -> false
        # ... other computed fields ...
    }

After apply:

Error: Provider produced inconsistent result after apply

.is_ssl_ordered: was cty.False, but now cty.True.

Root Cause

The SSL-related fields (is_ssl_ordered, is_ssl_provisioned) are server-managed but:

  1. The provider schema marks them as configurable
  2. Terraform plans to change them from true to false
  3. The API ignores this and returns true
  4. Provider reports inconsistent result

Affected Fields

These fields are server-managed and should be marked as Computed: true only in the provider schema:

  • is_ssl_ordered
  • is_ssl_provisioned

Note: Other fields (is_cname_verified, created_at, updated_at, version) are already correctly marked as computed-only.

Expected Behaviour

Server-managed fields should be marked as Computed: true (not Optional) in the provider schema so Terraform doesn't attempt to set them.

Current Workaround

resource "oneuptime_status_page_domain" "this" {
  project_id     = var.project_id
  domain_id      = var.domain_id
  status_page_id = var.status_page_id
  subdomain      = var.subdomain

  lifecycle {
    ignore_changes = [
      is_ssl_ordered,
      is_ssl_provisioned,
    ]
  }
}

Environment

  • Terraform: >= 1.12.0
  • Provider: oneuptime/oneuptime v9.4.7
*Originally created by @listellm on 1/23/2026* ## Description The `oneuptime_status_page_domain` resource causes a "Provider produced inconsistent result after apply" error due to SSL-related fields being incorrectly marked as configurable in the provider schema. ## Related Issues - Related to #2235 (Domain Verification Workflow) - during testing of auto-verification, this issue was discovered ## Observation: Auto-Verification Works Positive note: The CNAME verification appears to work automatically via a polling mechanism. After creating the DNS CNAME record pointing to `live-statuspage.oneuptime.com`, the domain eventually shows `is_cname_verified = true` without manual intervention. This is good behaviour. ## Problem When Terraform detects drift on computed fields and attempts to apply, the provider produces inconsistent results: ```hcl # oneuptime_status_page_domain.this will be updated in-place ~ resource "oneuptime_status_page_domain" "this" { id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ~ is_ssl_ordered = true -> false ~ is_ssl_provisioned = true -> false # ... other computed fields ... } ``` After apply: ``` Error: Provider produced inconsistent result after apply .is_ssl_ordered: was cty.False, but now cty.True. ``` ## Root Cause The SSL-related fields (`is_ssl_ordered`, `is_ssl_provisioned`) are server-managed but: 1. The provider schema marks them as configurable 2. Terraform plans to change them from `true` to `false` 3. The API ignores this and returns `true` 4. Provider reports inconsistent result ## Affected Fields These fields are server-managed and should be marked as `Computed: true` only in the provider schema: - `is_ssl_ordered` - `is_ssl_provisioned` Note: Other fields (`is_cname_verified`, `created_at`, `updated_at`, `version`) are already correctly marked as computed-only. ## Expected Behaviour Server-managed fields should be marked as `Computed: true` (not `Optional`) in the provider schema so Terraform doesn't attempt to set them. ## Current Workaround ```hcl resource "oneuptime_status_page_domain" "this" { project_id = var.project_id domain_id = var.domain_id status_page_id = var.status_page_id subdomain = var.subdomain lifecycle { ignore_changes = [ is_ssl_ordered, is_ssl_provisioned, ] } } ``` ## Environment - Terraform: >= 1.12.0 - Provider: oneuptime/oneuptime v9.4.7
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/oneuptime#139