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

All plans suddenly failing on 1.0.92 #320

Open
bryanhorstmann opened this issue Nov 12, 2024 · 5 comments
Open

All plans suddenly failing on 1.0.92 #320

bryanhorstmann opened this issue Nov 12, 2024 · 5 comments

Comments

@bryanhorstmann
Copy link

For the last two days I have been importing our existing Site24x7 infrastructure into Terraform.

Sometime between 11:04 UTC and 12:30 UTC today (12 November) all our Terraform plans have started failing. All plans for all resource types we create are failing with the same reason:

│ Error: json: cannot unmarshal number into Go struct field User.user_id of type string
│ Error: json: cannot unmarshal number into Go struct field NotificationProfile.profile_id of type string
│ Error: json: cannot unmarshal number into Go struct field Tag.tag_id of type string
│ Error: json: cannot unmarshal number into Go struct field SlackIntegration.tags of type string

I'm interpreting this as the API is now returning type: number for these fields and the provider is expecting type: string.

I can reproduce this with the following basic terraform:

terraform {
  required_providers {
    site24x7 = {
      source  = "site24x7/site24x7"
      version = "~> 1.0"
    }
  }
}

provider "site24x7" {
  oauth2_client_id = <REDACTED>
  oauth2_client_secret = <REDACTED>
  oauth2_refresh_token = <REDACTED>
  data_center = "EU"
}

resource "site24x7_tag" "this" {
  tag_color = "#999"
  tag_name  = "bryan-test"
  tag_value = "bryan-test"
}

→ terraform init                              
Initializing the backend...
Initializing provider plugins...
- Finding site24x7/site24x7 versions matching "~> 1.0"...
- Installing site24x7/site24x7 v1.0.92...
- Installed site24x7/site24x7 v1.0.92 (signed by a HashiCorp partner, key ID DACE8029C0095571)
Partner and community providers are signed by their developers.
If you'd like to know more about provider signing, you can read about it here:
https://www.terraform.io/docs/cli/plugins/signing.html
Terraform has created a lock file .terraform.lock.hcl to record the provider
selections it made above. Include this file in your version control repository
so that Terraform can guarantee to make the same selections by default when
you run "terraform init" in the future.

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.

→ terraform apply

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # site24x7_tag.this will be created
  + resource "site24x7_tag" "this" {
      + id        = (known after apply)
      + tag_color = "#999"
      + tag_name  = "bryan-test"
      + tag_value = "bryan-test"
    }

Plan: 1 to add, 0 to change, 0 to destroy.

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

site24x7_tag.this: Creating...
╷
│ Error: json: cannot unmarshal number into Go struct field Tag.tag_id of type string
│ 
│   with site24x7_tag.this,
│   on main.tf line 1, in resource "site24x7_tag" "this":
│    1: resource "site24x7_tag" "this" {
│ 
╵

The tag is created though:
image

@Cakasim
Copy link

Cakasim commented Nov 12, 2024

I can confirm this. This should be tackled with high priority. We are currently blocked by this. Thank you.

@bryanhorstmann
Copy link
Author

Just tested again and all is working. I suspect whatever change was deployed to the API has been rolled back

@VinothDarwin-ZC
Copy link
Collaborator

Thank you for notifying us about this issue. While the cause of the initial behavior might not be immediately clear, we’ll continue to review recent changes on our end to help prevent similar issues in the future.

If you experience any further issues or have questions, please feel free to reach out.

@amirkkn
Copy link

amirkkn commented Nov 27, 2024

Deployment until yesterday worked, but currently I get the same error and no deployment possible. I'm using latest provider version as well as terraform.

│ Error: json: cannot unmarshal number into Go struct field Tag.tag_id of type string
│
│   with site24x7_tag.environment_tag["prod"],
│   on main.tf line 27, in resource "site24x7_tag" "environment_tag":
│   27: resource "site24x7_tag" "environment_tag" {
│
╵
╷
│ Error: json: cannot unmarshal number into Go struct field WebhookIntegration.service_id of type string
│
│   with site24x7_webhook_integration.webhook_integration["PROD MS Teams"],
│   on main.tf line 38, in resource "site24x7_webhook_integration" "webhook_integration":
│   38: resource "site24x7_webhook_integration" "webhook_integration" {
│
╵

@VinothDarwin-ZC
Copy link
Collaborator

@amirkkn We have identified an issue causing unexpected behavior in the EU data center and are actively investigating the root cause. In the meantime, we recommend attempting the deployment again, as it might succeed on subsequent attempts. Thank you for your patience while we work to resolve this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants