diff --git a/Makefile b/Makefile index 2ab1765..571dbba 100644 --- a/Makefile +++ b/Makefile @@ -13,10 +13,10 @@ # limitations under the License. # Terraform provider version -PROVIDER_VERSION=1.8.0 +PROVIDER_VERSION=1.8.1 # Pulumi bridged provider version (this package) -VERSION=1.8.0 +VERSION=1.8.1 default: build diff --git a/go.mod b/go.mod index 6825160..fcd93b7 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/pulumi/pulumi-terraform-bridge/pf v0.21.0 github.com/pulumi/pulumi-terraform-bridge/v3 v3.67.0 github.com/pulumi/pulumi/sdk/v3 v3.95.0 - github.com/tetratelabs/terraform-provider-checkmate v1.8.0 + github.com/tetratelabs/terraform-provider-checkmate v1.8.1 ) require ( diff --git a/go.sum b/go.sum index eee9973..93793a6 100644 --- a/go.sum +++ b/go.sum @@ -1812,8 +1812,8 @@ github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I= github.com/tedsuo/ifrit v0.0.0-20180802180643-bea94bb476cc/go.mod h1:eyZnKCc955uh98WQvzOm0dgAeLnf2O0Rz0LPoC5ze+0= -github.com/tetratelabs/terraform-provider-checkmate v1.8.0 h1:DoaUMyyTz21XvfNffH2fd3WAcUljARBUUkCDE279kcM= -github.com/tetratelabs/terraform-provider-checkmate v1.8.0/go.mod h1:umIZA/qQZJAGt/pNk90wcmB6lPtufmjGf8kIo/gvKNw= +github.com/tetratelabs/terraform-provider-checkmate v1.8.1 h1:iWxIMLMmrQq/ka6VOrFXdLOeQeWw8xSeUspiQw9yuxI= +github.com/tetratelabs/terraform-provider-checkmate v1.8.1/go.mod h1:umIZA/qQZJAGt/pNk90wcmB6lPtufmjGf8kIo/gvKNw= github.com/texttheater/golang-levenshtein v1.0.1 h1:+cRNoVrfiwufQPhoMzB6N0Yf/Mqajr6t1lOv8GyGE2U= github.com/texttheater/golang-levenshtein v1.0.1/go.mod h1:PYAKrbF5sAiq9wd+H82hs7gNaen0CplQ9uvm6+enD/8= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= diff --git a/package.json b/package.json index b192b45..d7373c1 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,12 @@ { "name": "@tetratelabs/pulumi-checkmate", - "version": "1.8.0", - "description": ". Based on terraform-provider-checkmate: version v1.8.0", + "version": "1.8.1", + "description": ". Based on terraform-provider-checkmate: version v1.8.1", "types": "dist/index.d.ts", "scripts": { "build": "tsc", "prepare": "npm run build", - "install": "node sdk/scripts/install-pulumi-plugin.js resource checkmate 1.8.0 --server github://api.github.com/tetratelabs" + "install": "node sdk/scripts/install-pulumi-plugin.js resource checkmate 1.8.1 --server github://api.github.com/tetratelabs" }, "dependencies": { "@pulumi/pulumi": "^3.0.0" diff --git a/provider/cmd/pulumi-resource-checkmate/bridge-metadata.json b/provider/cmd/pulumi-resource-checkmate/bridge-metadata.json index 445c930..933d04f 100644 --- a/provider/cmd/pulumi-resource-checkmate/bridge-metadata.json +++ b/provider/cmd/pulumi-resource-checkmate/bridge-metadata.json @@ -34,6 +34,7 @@ "createAnywayOnCheckFailure": "create_anyway_on_check_failure", "expectWriteFailure": "expect_write_failure", "expectedMessage": "expected_message", + "persistentResponseRegex": "persistent_response_regex", "singleAttemptTimeout": "single_attempt_timeout" } } diff --git a/provider/cmd/pulumi-resource-checkmate/schema.json b/provider/cmd/pulumi-resource-checkmate/schema.json index 9130651..d866cef 100644 --- a/provider/cmd/pulumi-resource-checkmate/schema.json +++ b/provider/cmd/pulumi-resource-checkmate/schema.json @@ -7,7 +7,7 @@ "language": { "nodejs": { "packageName": "@tetratelabs/pulumi-checkmate", - "packageDescription": ". Based on terraform-provider-checkmate: version v1.8.0", + "packageDescription": ". Based on terraform-provider-checkmate: version v1.8.1", "readme": "\u003e This provider is a derived work of the [Terraform Provider](https://github.com/tetratelabs/terraform-provider-checkmate)\n\u003e distributed under [MPL 2.0](https://www.mozilla.org/en-US/MPL/2.0/). If you encounter a bug or missing feature,\n\u003e first check the [`pulumi-checkmate` repo](/issues); however, if that doesn't turn up anything,\n\u003e please consult the source [`terraform-provider-checkmate` repo](https://github.com/tetratelabs/terraform-provider-checkmate/issues).", "dependencies": { "@pulumi/pulumi": "^3.0.0" @@ -537,6 +537,10 @@ "type": "boolean", "description": "True if the check passed\n" }, + "persistentResponseRegex": { + "type": "string", + "description": "A regex pattern that the response need to match in every attempt to be considered successful. If not provided, the\nresponse is not checked. If using multiple attempts, this regex will be evaulated against the response text. For every\nsusequent attempt, the regex will be evaluated against the response text and compared against the first obtained value.\nThe check will be deemed successful if the regex matches the response text in every attempt. A single response not\nmatching such value will cause the check to fail.\n" + }, "port": { "type": "integer", "description": "The port of the hostname where to send the TCP echo request\n" @@ -559,6 +563,7 @@ "interval", "message", "passed", + "persistentResponseRegex", "port", "singleAttemptTimeout", "timeout" @@ -603,6 +608,10 @@ "type": "string", "description": "The message to send in the echo request\n" }, + "persistentResponseRegex": { + "type": "string", + "description": "A regex pattern that the response need to match in every attempt to be considered successful. If not provided, the\nresponse is not checked. If using multiple attempts, this regex will be evaulated against the response text. For every\nsusequent attempt, the regex will be evaluated against the response text and compared against the first obtained value.\nThe check will be deemed successful if the regex matches the response text in every attempt. A single response not\nmatching such value will cause the check to fail.\n" + }, "port": { "type": "integer", "description": "The port of the hostname where to send the TCP echo request\n" @@ -667,6 +676,10 @@ "type": "boolean", "description": "True if the check passed\n" }, + "persistentResponseRegex": { + "type": "string", + "description": "A regex pattern that the response need to match in every attempt to be considered successful. If not provided, the\nresponse is not checked. If using multiple attempts, this regex will be evaulated against the response text. For every\nsusequent attempt, the regex will be evaluated against the response text and compared against the first obtained value.\nThe check will be deemed successful if the regex matches the response text in every attempt. A single response not\nmatching such value will cause the check to fail.\n" + }, "port": { "type": "integer", "description": "The port of the hostname where to send the TCP echo request\n" diff --git a/provider/resources.go b/provider/resources.go index 7e4d25c..1a2ecfa 100644 --- a/provider/resources.go +++ b/provider/resources.go @@ -51,8 +51,8 @@ func Provider() tfbridge.ProviderInfo { P: tfpfbridge.ShimProvider(provider.NewProvider()), Name: "checkmate", GitHubOrg: "tetratelabs", - TFProviderVersion: "1.8.0", - Version: "1.8.0", + TFProviderVersion: "1.8.1", + Version: "1.8.1", Resources: map[string]*tfbridge.ResourceInfo{ "checkmate_http_health": {Tok: checkResourceTok(checkMod, "HttpHealth")}, "checkmate_local_command": {Tok: checkResourceTok(checkMod, "LocalCommand")}, diff --git a/sdk/scripts/install-pulumi-plugin.js b/sdk/scripts/install-pulumi-plugin.js index 577ccc1..a8bb2bf 100644 --- a/sdk/scripts/install-pulumi-plugin.js +++ b/sdk/scripts/install-pulumi-plugin.js @@ -17,7 +17,7 @@ var childProcess = require("child_process"); var args = process.argv.slice(2); -if (args.indexOf("v1.8.0") !== -1) { +if (args.indexOf("v1.8.1") !== -1) { process.exit(0); } diff --git a/sdk/tcpEcho.ts b/sdk/tcpEcho.ts index a830cc8..820f320 100644 --- a/sdk/tcpEcho.ts +++ b/sdk/tcpEcho.ts @@ -88,6 +88,14 @@ export class TcpEcho extends pulumi.CustomResource { * True if the check passed */ public /*out*/ readonly passed!: pulumi.Output; + /** + * A regex pattern that the response need to match in every attempt to be considered successful. If not provided, the + * response is not checked. If using multiple attempts, this regex will be evaulated against the response text. For every + * susequent attempt, the regex will be evaluated against the response text and compared against the first obtained value. + * The check will be deemed successful if the regex matches the response text in every attempt. A single response not + * matching such value will cause the check to fail. + */ + public readonly persistentResponseRegex!: pulumi.Output; /** * The port of the hostname where to send the TCP echo request */ @@ -125,6 +133,7 @@ export class TcpEcho extends pulumi.CustomResource { resourceInputs["keepers"] = state ? state.keepers : undefined; resourceInputs["message"] = state ? state.message : undefined; resourceInputs["passed"] = state ? state.passed : undefined; + resourceInputs["persistentResponseRegex"] = state ? state.persistentResponseRegex : undefined; resourceInputs["port"] = state ? state.port : undefined; resourceInputs["singleAttemptTimeout"] = state ? state.singleAttemptTimeout : undefined; resourceInputs["timeout"] = state ? state.timeout : undefined; @@ -148,6 +157,7 @@ export class TcpEcho extends pulumi.CustomResource { resourceInputs["interval"] = args ? args.interval : undefined; resourceInputs["keepers"] = args ? args.keepers : undefined; resourceInputs["message"] = args ? args.message : undefined; + resourceInputs["persistentResponseRegex"] = args ? args.persistentResponseRegex : undefined; resourceInputs["port"] = args ? args.port : undefined; resourceInputs["singleAttemptTimeout"] = args ? args.singleAttemptTimeout : undefined; resourceInputs["timeout"] = args ? args.timeout : undefined; @@ -204,6 +214,14 @@ export interface TcpEchoState { * True if the check passed */ passed?: pulumi.Input; + /** + * A regex pattern that the response need to match in every attempt to be considered successful. If not provided, the + * response is not checked. If using multiple attempts, this regex will be evaulated against the response text. For every + * susequent attempt, the regex will be evaluated against the response text and compared against the first obtained value. + * The check will be deemed successful if the regex matches the response text in every attempt. A single response not + * matching such value will cause the check to fail. + */ + persistentResponseRegex?: pulumi.Input; /** * The port of the hostname where to send the TCP echo request */ @@ -261,6 +279,14 @@ export interface TcpEchoArgs { * The message to send in the echo request */ message: pulumi.Input; + /** + * A regex pattern that the response need to match in every attempt to be considered successful. If not provided, the + * response is not checked. If using multiple attempts, this regex will be evaulated against the response text. For every + * susequent attempt, the regex will be evaluated against the response text and compared against the first obtained value. + * The check will be deemed successful if the regex matches the response text in every attempt. A single response not + * matching such value will cause the check to fail. + */ + persistentResponseRegex?: pulumi.Input; /** * The port of the hostname where to send the TCP echo request */