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

DAITDS-143 - Pulsar Job support to Terraform #173

Merged
merged 3 commits into from
Sep 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/stretchr/objx v0.2.0 // indirect
github.com/stretchr/testify v1.4.0
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
gopkg.in/ns1/ns1-go.v2 v2.6.2
gopkg.in/ns1/ns1-go.v2 v2.6.3
gopkg.in/yaml.v2 v2.2.7 // indirect
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,8 @@ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw=
gopkg.in/ns1/ns1-go.v2 v2.6.2 h1:tC+gRSN6fmnb9l9cVrIysXyuRO0wV6cZrjDqlMB0gGc=
gopkg.in/ns1/ns1-go.v2 v2.6.2/go.mod h1:GMnKY+ZuoJ+lVLL+78uSTjwTz2jMazq6AfGKQOYhsPk=
gopkg.in/ns1/ns1-go.v2 v2.6.3 h1:VqMsosssl8WQrN5aWSK+jx4UjHiKPjAkyOJycdiZMZo=
gopkg.in/ns1/ns1-go.v2 v2.6.3/go.mod h1:GMnKY+ZuoJ+lVLL+78uSTjwTz2jMazq6AfGKQOYhsPk=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.7 h1:VUgggvou5XRW9mHwD/yXxIYSMtY0zoKQf/v226p2nyo=
gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
Expand Down
42 changes: 42 additions & 0 deletions ns1/examples/pulsar_job.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
resource "ns1_pulsarjob" "example" {
# Required
name = "<Pulsar job name>"
appid = "<your Application ID>"
typeid = "custom"

/* Obs:
If typeid is "latency", host and url_path becomes required.

If blend_metric_weights is setted, host, url_path, timestamp
and weights becomes required.
*/

# Optional
active = false
shared = false
config = {
host = "my_host.com"
url_path = "/my_url_path"
https = false
http = false
request_timeout_millis = 123
job_timeout_millis = 321
use_xhr = false
static_values = false
}
blend_metric_weights = {
timestamp = 53
}
weights {
name = "WeightName1"
weight = 3
default_value = 5.2
maximize = false
}
weights {
name = "myWeightName2"
weight = 0
default_value = 5.22
maximize = false
}
}
1 change: 1 addition & 0 deletions ns1/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ func Provider() terraform.ResourceProvider {
"ns1_user": userResource(),
"ns1_apikey": apikeyResource(),
"ns1_team": teamResource(),
"ns1_pulsarjob": pulsarJobResource(),
},
ConfigureFunc: ns1Configure,
}
Expand Down
Loading