Skip to content
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

Inconsistent result error while creating webhook #21

Open
robertolosanno-e2x opened this issue Mar 5, 2025 · 1 comment
Open

Inconsistent result error while creating webhook #21

robertolosanno-e2x opened this issue Mar 5, 2025 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@robertolosanno-e2x
Copy link

Version information

  • terraform: v1.11.1 on darwin_arm64
  • terraform provider: 0.2.0

Describe the bug

When creating a webhook, I get the error: "Error: Provider produced inconsistent result after apply... inconsistent values for sensitive attribute."
The webhook is created successfully.

To Reproduce

Create a new terraform project with the following data:

terraform {
  required_version = ">= 1.9.2, < 2.0.0"

  required_providers {
    contentstack = {
      source = "labd/contentstack"
    }
  }

  # backend "gcs" {}
  backend "local" {}
}

provider "contentstack" {
  base_url         = var.api_base_url
  api_key          = var.api_key
  management_token = var.management_token
}


resource "contentstack_webhook" "example" {
  name = "Example Webhook"

  destination {
    target_url          = var.config_server_webhook_url
    http_basic_auth     = var.webhook_basic_auth_username
    http_basic_password = var.webhook_basic_auth_password
  }

  channels = ["content_types.entries.environments.publish.success"]
  branches = [var.webhook_branch]

  retry_policy    = "manual"
  disabled        = false
  concise_payload = false
}

# variables.tf

variable "api_base_url" {
  type    = string
}

variable "api_key" {
  type    = string
}

variable "management_token" {
  type    = string
}

variable "config_server_webhook_url" {
  type        = string
  description = "The business config server webhook handler URL"
}

variable "webhook_branch" {
  type        = string
  description = "The branch to trigger the webhook"
  default     = "main"
}

variable "webhook_basic_auth_username" {
  type        = string
  description = "The basic auth username for the webhook"
}
variable "webhook_basic_auth_password" {
  type        = string
  description = "The basic auth password for the webhook"
  sensitive   = true
}

run
terraform init

terraform apply -var-file="<path-to-your-variables>.tfvars"

The terraform output is the following:


contentstack_webhook.business-config-server: Creating...
╷
│ Error: Provider produced inconsistent result after apply
│ 
│ When applying changes to contentstack_webhook.example, provider "provider[\"registry.terraform.io/labd/contentstack\"]" produced an unexpected new value: .destination[0].http_basic_password: inconsistent values for sensitive attribute.
│ 
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.

Expected behavior

No error message

Screenshots

n/a

Additional context

n/a

@robertolosanno-e2x robertolosanno-e2x added bug Something isn't working triage Needs triage labels Mar 5, 2025
@demeyerthom demeyerthom removed the triage Needs triage label Mar 7, 2025
@demeyerthom
Copy link
Member

demeyerthom commented Mar 7, 2025

Hi @robertolosanno-e2x . Looks like something is going wrong after creating the webhook. Once i have time I will take your sample and dive into it!

@demeyerthom demeyerthom self-assigned this Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants