Skip to content

Commit

Permalink
Merge pull request #17 from tetratelabs/bump-1.8.0
Browse files Browse the repository at this point in the history
Bump to TF 1.8.0
  • Loading branch information
chirauki authored May 24, 2024
2 parents be83904 + 081ea13 commit 4bed5a6
Show file tree
Hide file tree
Showing 11 changed files with 48 additions and 22 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
dist/
node_modules/
ts_bin/
provider/cmd/pulumi-resource-checkmate/pulumi-resource-checkmate
provider/cmd/pulumi-resource-checkmate/pulumi-resource-checkmate
yarn.lock
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
# limitations under the License.

# Terraform provider version
PROVIDER_VERSION=1.7.0
PROVIDER_VERSION=1.8.0

# Pulumi bridged provider version (this package)
VERSION=1.7.1
VERSION=1.8.0

default: build

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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.7.0
github.com/tetratelabs/terraform-provider-checkmate v1.8.0
)

require (
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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.7.0 h1:X+gALxxBDQ3ZTWZEa7LWgsErF7M4JtSPYm9rnVFhpIc=
github.com/tetratelabs/terraform-provider-checkmate v1.7.0/go.mod h1:umIZA/qQZJAGt/pNk90wcmB6lPtufmjGf8kIo/gvKNw=
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/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=
Expand Down
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
{
"name": "@tetratelabs/pulumi-checkmate",
"version": "1.7.1",
"description": ". Based on terraform-provider-checkmate: version v1.7.0",
"version": "1.8.0",
"description": ". Based on terraform-provider-checkmate: version v1.8.0",
"types": "dist/index.d.ts",
"main": "dist/index.js",
"scripts": {
"build": "tsc",
"prepare": "npm run build",
"install": "node sdk/scripts/install-pulumi-plugin.js resource checkmate 1.7.1 --server github://api.github.com/tetratelabs"
"install": "node sdk/scripts/install-pulumi-plugin.js resource checkmate 1.8.0 --server github://api.github.com/tetratelabs"
},
"dependencies": {
"@pulumi/pulumi": "^3.0.0"
Expand Down
1 change: 0 additions & 1 deletion package.json.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"version": "${VERSION}",
"description": ". Based on terraform-provider-checkmate: version v${PROVIDER_VERSION}",
"types": "dist/index.d.ts",
"main": "dist/index.js",
"scripts": {
"build": "tsc",
"prepare": "npm run build",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"connectionTimeout": "connection_timeout",
"consecutiveSuccesses": "consecutive_successes",
"createAnywayOnCheckFailure": "create_anyway_on_check_failure",
"expectWriteFailure": "expect_write_failure",
"expectedMessage": "expected_message",
"singleAttemptTimeout": "single_attempt_timeout"
}
Expand Down
16 changes: 14 additions & 2 deletions provider/cmd/pulumi-resource-checkmate/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"language": {
"nodejs": {
"packageName": "@tetratelabs/pulumi-checkmate",
"packageDescription": ". Based on terraform-provider-checkmate: version v1.7.0",
"packageDescription": ". Based on terraform-provider-checkmate: version v1.8.0",
"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"
Expand Down Expand Up @@ -506,6 +506,10 @@
"type": "boolean",
"description": "If false, the resource will fail to create if the check does not pass. If true, the resource will be created anyway.\nDefaults to false.\n"
},
"expectWriteFailure": {
"type": "boolean",
"description": "Wether or not the check is expected to fail after successfully connecting to the target. If true, the check will be\nconsidered successful if it fails. Defaults to false.\n"
},
"expectedMessage": {
"type": "string",
"description": "The message expected to be included in the echo response\n"
Expand Down Expand Up @@ -549,6 +553,7 @@
"required": [
"connectionTimeout",
"consecutiveSuccesses",
"expectWriteFailure",
"expectedMessage",
"host",
"interval",
Expand All @@ -571,6 +576,10 @@
"type": "boolean",
"description": "If false, the resource will fail to create if the check does not pass. If true, the resource will be created anyway.\nDefaults to false.\n"
},
"expectWriteFailure": {
"type": "boolean",
"description": "Wether or not the check is expected to fail after successfully connecting to the target. If true, the check will be\nconsidered successful if it fails. Defaults to false.\n"
},
"expectedMessage": {
"type": "string",
"description": "The message expected to be included in the echo response\n"
Expand Down Expand Up @@ -608,7 +617,6 @@
}
},
"requiredInputs": [
"expectedMessage",
"host",
"message",
"port"
Expand All @@ -628,6 +636,10 @@
"type": "boolean",
"description": "If false, the resource will fail to create if the check does not pass. If true, the resource will be created anyway.\nDefaults to false.\n"
},
"expectWriteFailure": {
"type": "boolean",
"description": "Wether or not the check is expected to fail after successfully connecting to the target. If true, the check will be\nconsidered successful if it fails. Defaults to false.\n"
},
"expectedMessage": {
"type": "string",
"description": "The message expected to be included in the echo response\n"
Expand Down
8 changes: 4 additions & 4 deletions provider/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ func checkResourceTok(mod string, res string) tokens.Type {

func Provider() tfbridge.ProviderInfo {
return tfbridge.ProviderInfo{
P: tfpfbridge.ShimProvider(provider.NewProvider()),
P: tfpfbridge.ShimProvider(provider.NewProvider()),
Name: "checkmate",
GitHubOrg: "tetratelabs",
TFProviderVersion: "1.7.0",
Version: "1.7.1",
TFProviderVersion: "1.8.0",
Version: "1.8.0",
Resources: map[string]*tfbridge.ResourceInfo{
"checkmate_http_health": {Tok: checkResourceTok(checkMod, "HttpHealth")},
"checkmate_local_command": {Tok: checkResourceTok(checkMod, "LocalCommand")},
Expand All @@ -67,6 +67,6 @@ func Provider() tfbridge.ProviderInfo {
"@types/node": "^10.0.0", // so we can access strongly typed node definitions.
},
},
MetadataInfo: tfbridge.NewProviderMetadata([]byte{}),
MetadataInfo: tfbridge.NewProviderMetadata([]byte{}),
}
}
2 changes: 1 addition & 1 deletion sdk/scripts/install-pulumi-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var childProcess = require("child_process");

var args = process.argv.slice(2);

if (args.indexOf("v1.7.1") !== -1) {
if (args.indexOf("v1.8.0") !== -1) {
process.exit(0);
}

Expand Down
22 changes: 18 additions & 4 deletions sdk/tcpEcho.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ export class TcpEcho extends pulumi.CustomResource {
* Defaults to false.
*/
public readonly createAnywayOnCheckFailure!: pulumi.Output<boolean | undefined>;
/**
* Wether or not the check is expected to fail after successfully connecting to the target. If true, the check will be
* considered successful if it fails. Defaults to false.
*/
public readonly expectWriteFailure!: pulumi.Output<boolean>;
/**
* The message expected to be included in the echo response
*/
Expand Down Expand Up @@ -113,6 +118,7 @@ export class TcpEcho extends pulumi.CustomResource {
resourceInputs["connectionTimeout"] = state ? state.connectionTimeout : undefined;
resourceInputs["consecutiveSuccesses"] = state ? state.consecutiveSuccesses : undefined;
resourceInputs["createAnywayOnCheckFailure"] = state ? state.createAnywayOnCheckFailure : undefined;
resourceInputs["expectWriteFailure"] = state ? state.expectWriteFailure : undefined;
resourceInputs["expectedMessage"] = state ? state.expectedMessage : undefined;
resourceInputs["host"] = state ? state.host : undefined;
resourceInputs["interval"] = state ? state.interval : undefined;
Expand All @@ -124,9 +130,6 @@ export class TcpEcho extends pulumi.CustomResource {
resourceInputs["timeout"] = state ? state.timeout : undefined;
} else {
const args = argsOrState as TcpEchoArgs | undefined;
if ((!args || args.expectedMessage === undefined) && !opts.urn) {
throw new Error("Missing required property 'expectedMessage'");
}
if ((!args || args.host === undefined) && !opts.urn) {
throw new Error("Missing required property 'host'");
}
Expand All @@ -139,6 +142,7 @@ export class TcpEcho extends pulumi.CustomResource {
resourceInputs["connectionTimeout"] = args ? args.connectionTimeout : undefined;
resourceInputs["consecutiveSuccesses"] = args ? args.consecutiveSuccesses : undefined;
resourceInputs["createAnywayOnCheckFailure"] = args ? args.createAnywayOnCheckFailure : undefined;
resourceInputs["expectWriteFailure"] = args ? args.expectWriteFailure : undefined;
resourceInputs["expectedMessage"] = args ? args.expectedMessage : undefined;
resourceInputs["host"] = args ? args.host : undefined;
resourceInputs["interval"] = args ? args.interval : undefined;
Expand Down Expand Up @@ -171,6 +175,11 @@ export interface TcpEchoState {
* Defaults to false.
*/
createAnywayOnCheckFailure?: pulumi.Input<boolean>;
/**
* Wether or not the check is expected to fail after successfully connecting to the target. If true, the check will be
* considered successful if it fails. Defaults to false.
*/
expectWriteFailure?: pulumi.Input<boolean>;
/**
* The message expected to be included in the echo response
*/
Expand Down Expand Up @@ -227,10 +236,15 @@ export interface TcpEchoArgs {
* Defaults to false.
*/
createAnywayOnCheckFailure?: pulumi.Input<boolean>;
/**
* Wether or not the check is expected to fail after successfully connecting to the target. If true, the check will be
* considered successful if it fails. Defaults to false.
*/
expectWriteFailure?: pulumi.Input<boolean>;
/**
* The message expected to be included in the echo response
*/
expectedMessage: pulumi.Input<string>;
expectedMessage?: pulumi.Input<string>;
/**
* The hostname where to send the TCP echo request to
*/
Expand Down

0 comments on commit 4bed5a6

Please sign in to comment.