Giter Site home page Giter Site logo

terraform-provider-uptrends's People

Contributors

dependabot[bot] avatar wasfree avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

terraform-provider-uptrends's Issues

Uptrernds_monitor_web does not accept checkpoints

Terraform Version

Terraform v1.1.0
on darwin_amd64

  • provider registry.terraform.io/wasfree/uptrends v0.1.1

Affected Resource(s)

  • uptrends_monitor_web

Terraform Configuration Files

resource "uptrends_monitor_web" "testing-api" {
  name                     = "api"
  check_interval           = 2
  notes                    = "Managed by Terraform"
  primary_checkpoints_only = true
  type                     = "Https"

  url                       = "https://www.google.com/"
  expected_http_status_code = 200

  selected_checkpoints {
    checkpoints       = ["Frankfurt"]
  }
}

Debug Output

Plan: https://gist.github.com/GeorgeGlarakis/c3fba7f9e3cb0ff523771a7ed6d8ed50
Apply: https://gist.github.com/GeorgeGlarakis/847742d9bc7c265721fc59b450b35fbb

Expected Behavior

What should have happened?

Accept the provided checkpoint.

Actual Behavior

What actually happened?

Returns an error when a checkpoint is selected.

Steps to Reproduce

  1. terraform init
  2. terraform plan
  3. terraform apply

uptrends_monitor_web match_pattern block has no effect

Hi there,

Terraform Version

% terraform -v
Terraform v1.5.2

Affected Resource(s)

Please list the resources as a list, for example:

  • uptrends_monitor_web

Terraform Configuration Files

resource "uptrends_monitor_web" "test" {
  type                     = "Https"
  name                     = "Google Test"
  url                      = "https://www.google.com"
  check_interval           = 5
  primary_checkpoints_only = true
  generate_alert           = false

  expected_http_status_code = 200

  match_pattern {
    is_positive = true
    pattern     = "Some text here"
  }

  selected_checkpoints {
  ...
  }
}

Expected Behavior

  • HTTP status code match field should be set to "200"
  • Checkpage content field should have value "Some text here"

Actual Behavior

  • HTTP status code match field is blank
  • Checkpage content field is blank
  • Terraform continually tries to apply the broken block
    + match_pattern {
    + is_positive = true
    + pattern = "Some text here"
    }

Also, the docs for match_pattern do not match what is required to be passed, e.g.

Docs
match_pattern = "blah"

Required
match_pattern {
is_positive = true
pattern = "Some text here"
}

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply

500 server error on tf apply when request_headers are changed

Terraform Version

Terraform v1.5.1
on darwin_arm64

  • provider registry.terraform.io/wasfree/uptrends v0.2.3

Affected Resource(s)

  • uptrends_monitor_web https

Terraform Configuration Files

resource "uptrends_monitor_web" "resource_name" {
  name                     = var.web-name
  type                     = "Https"
  url                      = var.web-url
  notes                    = var.default-notes

  check_interval             = var.check-interval
  alert_on_load_time_limit_1 = true
  load_time_limit_1          = var.load-time-limit-1
  alert_on_load_time_limit_2 = true
  load_time_limit_2          = var.load-time-limit-2
  
  alert_on_min_bytes         = var.alert-on-min-bytes
  min_bytes                  = var.min-bytes
  
  #expected_http_status_code = 0

  user_agent                = var.user-agent
  auth_type                 = var.auth-type
  primary_checkpoints_only  = true

  match_pattern {
    pattern = var.match-pattern
    is_positive = true
  }

  selected_checkpoints {
    exclude_locations = ["Moscow", "Novosibirsk", "Saint Petersburg"]
  }
  
  request_headers {
    name  = var.header-name-1
    value = var.header-value-1
  }
  request_headers {
    name  = var.header-name-2
    value = var.header-value-2
  }
}

variable "web-name" {
    description = "Name of service"
}

variable "web-url" {
    description = "URL of service to be monitored"
}

variable "default-notes" {
  description = "Description to add to web monitor"
  default     = "Managed by Terraform"
}

variable "match-pattern" {
    description = "Phrase used when scanning site to verify availability(?)"
    default     = ""
}

variable "check-interval" {
    description = "Frequency (in minutes) to poll site"
    default     = "1"
}

variable "load-time-limit-1" {
    description = "Level 1 trigger alert time (in ms)"
    default     = "10000" #10 seconds
}

variable "load-time-limit-2" {
    description = "Level 2 trigger alert time (in ms)"
    default     = "25000" #10 seconds
}

variable "alert-on-min-bytes" {
    description = "Alert when data received is less than X bytes?"
    default     = "true" 
}

variable "min-bytes" {
    description = "How many bytes minimum should be returned?"
    default     = "1024" 
}

variable "user-agent" {
    description = "What browser user agent should be used?"
    default     = "chrome108" 
}

variable "auth-type" {
    description = "Authentication needed?"
    default     = "None" 
}

variable "header-name-1" {
  default = ""
}

variable "header-name-2" {
  default = ""
}

variable "header-value-1" {
  default = ""
}

variable "header-value-2" {
  default = ""
}

 web-name                   = "API"
 web-url                        = "https://masked"

Debug Output

https://gist.github.com/rknightion/4a7fee0b05ccbe4cfdd6c5131935cf86

Expected Behavior

It removed previously added request_headers

Actual Behavior

500 sever error

Steps to Reproduce

tf apply. Is happening across all our monitors

Important Factoids

The headers were added in a previous run without issue. It's only now trying to remove them again that the error is happening

Linking monitors to monitor groups

Hi,

we just noticed that while we can create a uptrends_monitor_group resource, there doesn't seem to be a way to actually link monitors to these groups? Is this something that's planned? Are you accepting PRs?

Thanks!

Uptrernds_monitor_web mode only accepts "Production"

Terraform Version

Terraform v1.1.0
on darwin_amd64

  • provider registry.terraform.io/wasfree/uptrends v0.1.1

Affected Resource(s)

  • uptrends_monitor_web

I haven't tried with a different resource.

Terraform Configuration Files

resource "uptrends_monitor_web" "testing-api" {
  name                     = "api"
  check_interval           = 2
  notes                    = "Managed by Terraform"
  primary_checkpoints_only = true
  type                     = "Https"
  mode                     = "Development"

  url                       = "https://www.google.com/"
  expected_http_status_code = 200
}

Debug Output

https://gist.github.com/GeorgeGlarakis/48872a89c7e0f49e3e42db6aa4e1ee57

Terminal Output

https://gist.github.com/GeorgeGlarakis/6023335c4c4fb09aa140093ca19149bf

Expected Behavior

What should have happened?

It should have been accepted the mode "Development".

Actual Behavior

What actually happened?

Throws an error without any specific explanation and turns out that it does not accept other modes than "Production".

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform init
  2. terraform plan
  3. terraform apply

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.