From 99c05aa909406cbece9f7090c22067f49b9a31f7 Mon Sep 17 00:00:00 2001 From: pulumi-bot Date: Wed, 2 Feb 2022 21:09:21 +0000 Subject: [PATCH] Update pulumi-terraform-bridge to v3.18.0 --- provider/go.mod | 4 +- provider/go.sum | 59 +++-- sdk/dotnet/Pulumi.Rke.csproj | 5 + sdk/dotnet/Utilities.cs | 21 +- sdk/dotnet/pulumi-plugin.json | 4 + sdk/go.mod | 2 +- sdk/go.sum | 13 +- sdk/go/rke/cluster.go | 4 +- sdk/go/rke/config/pulumiUtilities.go | 8 + sdk/go/rke/provider.go | 8 +- sdk/go/rke/pulumi-plugin.json | 4 + sdk/go/rke/pulumiUtilities.go | 8 + sdk/nodejs/cluster.ts | 244 ++++++++++---------- sdk/nodejs/config/vars.ts | 2 +- sdk/nodejs/package.json | 3 +- sdk/nodejs/provider.ts | 12 +- sdk/nodejs/scripts/install-pulumi-plugin.js | 26 +++ sdk/nodejs/utilities.ts | 5 + sdk/python/pulumi_rke/pulumi-plugin.json | 4 + sdk/python/setup.py | 1 + 20 files changed, 258 insertions(+), 179 deletions(-) create mode 100644 sdk/dotnet/pulumi-plugin.json create mode 100644 sdk/go/rke/pulumi-plugin.json create mode 100644 sdk/nodejs/scripts/install-pulumi-plugin.js create mode 100644 sdk/python/pulumi_rke/pulumi-plugin.json diff --git a/provider/go.mod b/provider/go.mod index 1dd32abe..1b008922 100644 --- a/provider/go.mod +++ b/provider/go.mod @@ -4,8 +4,8 @@ go 1.16 require ( github.com/hashicorp/terraform-plugin-sdk v1.15.0 - github.com/pulumi/pulumi-terraform-bridge/v3 v3.11.0 - github.com/pulumi/pulumi/sdk/v3 v3.17.0 + github.com/pulumi/pulumi-terraform-bridge/v3 v3.18.0 + github.com/pulumi/pulumi/sdk/v3 v3.23.2 github.com/rancher/terraform-provider-rke v1.2.2 ) diff --git a/provider/go.sum b/provider/go.sum index 4cbef027..b3dfc17e 100644 --- a/provider/go.sum +++ b/provider/go.sum @@ -406,8 +406,6 @@ github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6Wezm github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gofrs/flock v0.7.1 h1:DP+LD/t0njgoPBvT5MJLeliUIVQR03hiKR6vezdwHlc= -github.com/gofrs/flock v0.7.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/uuid v3.3.0+incompatible h1:8K4tyRfvU1CYPgJsveYFQMhpFd/wXNM7iK6rR7UHz84= github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -500,6 +498,7 @@ github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/subcommands v1.0.1/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -563,8 +562,8 @@ github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9 github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-hclog v0.15.0 h1:qMuK0wxsoW4D0ddCCYwPSTm4KQv1X1ke3WmPWZ0Mvsk= -github.com/hashicorp/go-hclog v0.15.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v0.16.1 h1:IVQwpTGNRRIHafnTs2dQLIk4ENtneRIEEJWOVDqz99o= +github.com/hashicorp/go-hclog v0.16.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.1.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-kms-wrapping/entropy v0.1.0/go.mod h1:d1g9WGtAunDNpek8jUIEJnBlbgKS1N2Q61QkHiZyR1g= @@ -608,6 +607,7 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.3 h1:YPkqC67at8FYaadspW/6uE0COsBxS2656RLEr8Bppgk= github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/hc-install v0.3.1/go.mod h1:3LCdWcCDS1gaHC9mhHCGbkYfoY6vdsKohGjugbZdZak= github.com/hashicorp/hcl v0.0.0-20170504190234-a4b07c25de5f/go.mod h1:oZtUIOe8dh44I2q6ScRibXws4Ajl+d+nod3AaR9vL5w= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= @@ -628,30 +628,33 @@ github.com/hashicorp/terraform-config-inspect v0.0.0-20191115094559-17f92b0546e8 github.com/hashicorp/terraform-config-inspect v0.0.0-20191115094559-17f92b0546e8/go.mod h1:p+ivJws3dpqbp1iP84+npOyAmTTOLMgCzrXd3GSdn/A= github.com/hashicorp/terraform-exec v0.1.1/go.mod h1:yKWvMPtkTaHpeAmllw+1qdHZ7E5u+pAZ+x8e2jQF6gM= github.com/hashicorp/terraform-exec v0.9.0/go.mod h1:tOT8j1J8rP05bZBGWXfMyU3HkLi1LWyqL3Bzsc3CJjo= -github.com/hashicorp/terraform-exec v0.14.0 h1:UQoUcxKTZZXhyyK68Cwn4mApT4mnFPmEXPiqaHL9r+w= -github.com/hashicorp/terraform-exec v0.14.0/go.mod h1:qrAASDq28KZiMPDnQ02sFS9udcqEkRly002EA2izXTA= +github.com/hashicorp/terraform-exec v0.15.0 h1:cqjh4d8HYNQrDoEmlSGelHmg2DYDh5yayckvJ5bV18E= +github.com/hashicorp/terraform-exec v0.15.0/go.mod h1:H4IG8ZxanU+NW0ZpDRNsvh9f0ul7C0nHP+rUR/CHs7I= github.com/hashicorp/terraform-json v0.4.0/go.mod h1:eAbqb4w0pSlRmdvl8fOyHAi/+8jnkVYN28gJkSJrLhU= github.com/hashicorp/terraform-json v0.5.0/go.mod h1:eAbqb4w0pSlRmdvl8fOyHAi/+8jnkVYN28gJkSJrLhU= -github.com/hashicorp/terraform-json v0.12.0 h1:8czPgEEWWPROStjkWPUnTQDXmpmZPlkQAwYYLETaTvw= -github.com/hashicorp/terraform-json v0.12.0/go.mod h1:pmbq9o4EuL43db5+0ogX10Yofv1nozM+wskr/bGFJpI= -github.com/hashicorp/terraform-plugin-go v0.4.0 h1:LFbXNeLDo0J/wR0kUzSPq0RpdmFh2gNedzU0n/gzPAo= -github.com/hashicorp/terraform-plugin-go v0.4.0/go.mod h1:7u/6nt6vaiwcWE2GuJKbJwNlDFnf5n95xKw4hqIVr58= +github.com/hashicorp/terraform-json v0.13.0 h1:Li9L+lKD1FO5RVFRM1mMMIBDoUHslOniyEi5CM+FWGY= +github.com/hashicorp/terraform-json v0.13.0/go.mod h1:y5OdLBCT+rxbwnpxZs9kGL7R9ExU76+cpdY8zHwoazk= +github.com/hashicorp/terraform-plugin-go v0.5.0 h1:+gCDdF0hcYCm0YBTxrP4+K1NGIS5ZKZBKDORBewLJmg= +github.com/hashicorp/terraform-plugin-go v0.5.0/go.mod h1:PAVN26PNGpkkmsvva1qfriae5Arky3xl3NfzKa8XFVM= +github.com/hashicorp/terraform-plugin-log v0.2.0 h1:rjflRuBqCnSk3UHOR25MP1G5BDLKktTA6lNjjcAnBfI= +github.com/hashicorp/terraform-plugin-log v0.2.0/go.mod h1:E1kJmapEHzqu1x6M++gjvhzM2yMQNXPVWZRCB8sgYjg= github.com/hashicorp/terraform-plugin-sdk v1.0.0/go.mod h1:NuwtLpEpPsFaKJPJNGtMcn9vlhe6Ofe+Y6NqXhJgV2M= github.com/hashicorp/terraform-plugin-sdk v1.7.0/go.mod h1:OjgQmey5VxnPej/buEhe+YqKm0KNvV3QqU4hkqHqPCY= github.com/hashicorp/terraform-plugin-sdk v1.14.0/go.mod h1:t62Xy+m7Zjq5tA2vrs8Wuo/TQ0sc9Mx9MjXL3+7MHBQ= github.com/hashicorp/terraform-plugin-sdk v1.15.0 h1:bmYnTT7MqNXlUHDc7pT8E6uKT2g/upjlRLypJFK1OQU= github.com/hashicorp/terraform-plugin-sdk v1.15.0/go.mod h1:PuFTln8urDmRM6mV0II6apOTsyG/iHkxp+5W11eJE58= github.com/hashicorp/terraform-plugin-sdk/v2 v2.0.2/go.mod h1:pVZLnLuSe/yv0XqTHFPb8xRGWPwgANT77jHeHqjXS5o= -github.com/hashicorp/terraform-plugin-sdk/v2 v2.8.0 h1:GSumgrL6GGcRYU37YuF1CC59hRPR7Yzy6tpoFlo8wr4= -github.com/hashicorp/terraform-plugin-sdk/v2 v2.8.0/go.mod h1:6KbP09YzlB++S6XSUKYl83WyoHVN4MgeoCbPRsdfCtA= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.10.1 h1:B9AocC+dxrCqcf4vVhztIkSkt3gpRjUkEka8AmZWGlQ= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.10.1/go.mod h1:FjM9DXWfP0w/AeOtJoSKHBZ01LqmaO6uP4bXhv3fekw= github.com/hashicorp/terraform-plugin-test v1.2.0/go.mod h1:QIJHYz8j+xJtdtLrFTlzQVC0ocr3rf/OjIpgZLK56Hs= github.com/hashicorp/terraform-plugin-test v1.3.0/go.mod h1:QIJHYz8j+xJtdtLrFTlzQVC0ocr3rf/OjIpgZLK56Hs= github.com/hashicorp/terraform-plugin-test v1.4.3 h1:HSOZZu2W7a9tx4QPYXhrT9oh7JptibaSkP7CK4C0OF0= github.com/hashicorp/terraform-plugin-test v1.4.3/go.mod h1:UA7z/02pgqsRLut4DJIPm0Hjnj27uOvhi19c8kTqIfM= github.com/hashicorp/terraform-plugin-test/v2 v2.1.1/go.mod h1:HaW2G5cDTVyiEKt7PHC85YSM5BwvYl/rIko1g8Lg7qE= +github.com/hashicorp/terraform-registry-address v0.0.0-20210412075316-9b2996cce896/go.mod h1:bzBPnUIkI0RxauU8Dqo+2KrZZ28Cf48s8V6IHt3p4co= github.com/hashicorp/terraform-svchost v0.0.0-20191011084731-65d371908596/go.mod h1:kNDNcF7sN4DocDLBkQYz73HGKwN1ANB1blq4lIYLYvg= -github.com/hashicorp/terraform-svchost v0.0.0-20191119180714-d2e4933b9136 h1:81Dg7SK6Q5vzqFItO8e1iIF2Nj8bLXV23NXjEgbev/s= -github.com/hashicorp/terraform-svchost v0.0.0-20191119180714-d2e4933b9136/go.mod h1:kNDNcF7sN4DocDLBkQYz73HGKwN1ANB1blq4lIYLYvg= +github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 h1:HKLsbzeOsfXmKNpr3GiT18XAblV0BjCbzL8KQAMZGa0= +github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734/go.mod h1:kNDNcF7sN4DocDLBkQYz73HGKwN1ANB1blq4lIYLYvg= github.com/hashicorp/vault/api v1.0.5-0.20200519221902-385fac77e20f/go.mod h1:euTFbi2YJgwcju3imEt919lhJKF68nN1cQPq3aA+kBE= github.com/hashicorp/vault/api v1.1.0 h1:QcxC7FuqEl0sZaIjcXB/kNEeBa0DH5z57qbWBvZwLC4= github.com/hashicorp/vault/api v1.1.0/go.mod h1:R3Umvhlxi2TN7Ex2hzOowyeNb+SfbVWI973N+ctaFMk= @@ -802,8 +805,9 @@ github.com/mitchellh/go-ps v1.0.0 h1:i6ampVEEF4wQFF+bkYfwYgY+F/uYJDktmvLPf7qIgjc github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/go-testing-interface v1.0.4 h1:ZU1VNC02qyufSZsjjs7+khruk2fKvbQ3TwRV/IBCeFA= github.com/mitchellh/go-testing-interface v1.0.4/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= +github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/go-wordwrap v1.0.0 h1:6GlHJ/LTGMrIJbwgdqdl2eEH8o+Exx/0m8ir9Gns0u4= github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= @@ -884,6 +888,7 @@ github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi github.com/pierrec/lz4 v2.5.2+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pierrec/lz4 v2.6.0+incompatible h1:Ix9yFKn1nSPBLFl/yZknTp8TU5G4Ps0JDmguYK6iH1A= github.com/pierrec/lz4 v2.6.0+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -924,12 +929,12 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.2.0 h1:wH4vA7pcjKuZzjF7lM8awk4fnuJO6idemZXoKnULUx4= github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/pulumi/pulumi-terraform-bridge/v3 v3.11.0 h1:vEBU2faYdzFy8f/lGrmHO0R+SUDABcrI+MXyIV5GEFU= -github.com/pulumi/pulumi-terraform-bridge/v3 v3.11.0/go.mod h1:4om0OU44z3ZN2CW56sD7xt4OT6/7hCkVR3Mfpf4Xg58= -github.com/pulumi/pulumi/pkg/v3 v3.17.0 h1:YzBQ7kkQ1XRFhL0XZA0R5aI7onyNz4W87EqErzNe0po= -github.com/pulumi/pulumi/pkg/v3 v3.17.0/go.mod h1:tWkGLs8Xxo0I4CU5FK+FOuwvEeREbcRk46dtT6sE+rE= -github.com/pulumi/pulumi/sdk/v3 v3.17.0 h1:CxdgdmFEvo99JviXP6d332Y2AyAIPbLI6fu4K33vhAg= -github.com/pulumi/pulumi/sdk/v3 v3.17.0/go.mod h1:252ou/zAU1g6E8iTwe2Y9ht7pb5BDl2fJlOuAgZCHiA= +github.com/pulumi/pulumi-terraform-bridge/v3 v3.18.0 h1:kdhcwSvTeuCuFjeF1d2mZIEHnrqXn+eJ+wbp2ejcN9s= +github.com/pulumi/pulumi-terraform-bridge/v3 v3.18.0/go.mod h1:Va48ZbCwTP01QFWej7QFtrz47AHrPkBet68dqRqJE44= +github.com/pulumi/pulumi/pkg/v3 v3.23.2 h1:QeaCXhMLX6pAdZzXfNnTQTmtQdROqAj56vboHDzr3JE= +github.com/pulumi/pulumi/pkg/v3 v3.23.2/go.mod h1:yo+15Oh7E+0Xtgk3C4jOMugldRGUTktkRRYmoa0Ib2U= +github.com/pulumi/pulumi/sdk/v3 v3.23.2 h1:m/YfyUsoeRFyHXDm2HtJhK+tBV58nrdmWsAkNQimRU4= +github.com/pulumi/pulumi/sdk/v3 v3.23.2/go.mod h1:WHOQB00iuHZyXhwrymxpKXhpOahSguJIpRjVokmM11w= github.com/pulumi/terraform-diff-reader v0.0.0-20201211191010-ad4715e9285e h1:Dik4Qe/+xguB8JagPyXNlbOnRiXGmq/PSPQTGunYnTk= github.com/pulumi/terraform-diff-reader v0.0.0-20201211191010-ad4715e9285e/go.mod h1:sZ9FUzGO+yM41hsQHs/yIcj/Y993qMdBxBU5mpDmAfQ= github.com/pulumi/terraform-provider-rke v1.2.3-0.20211203121652-e3d88620727a h1:4Z0ziaJVWM5CVH6Os25goTDdkbHZzirvJd/Qf+5zy3U= @@ -942,11 +947,15 @@ github.com/rancher/rke v1.2.13 h1:k20J7P7kck+1EucGUVFtBDzfPzpiSaiOjK10fr17YSc= github.com/rancher/rke v1.2.13/go.mod h1:osU/R8vPjgV3AwNnPamC0eOZ6aI0UfpHTyZ5K/b/vZE= github.com/rancher/wrangler v0.6.2-0.20200515155908-1923f3f8ec3f h1:QPOlhiY3YCPLsEtOmPam+ghtqip/f/zsfz4F4PF70D8= github.com/rancher/wrangler v0.6.2-0.20200515155908-1923f3f8ec3f/go.mod h1:NmtmlLkchboIksYJuBemwcP4RBfv8FpeyhVoWXB9Wdc= +github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rjeczalik/notify v0.9.2 h1:MiTWrPj55mNDHEiIX5YUSKefw/+lCQVoAFmD6oQm5w8= github.com/rjeczalik/notify v0.9.2/go.mod h1:aErll2f0sUX9PXZnVNyeiObbmTlk5jnMoCa4QEjJeqM= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XFkP+Eg= +github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -1084,8 +1093,8 @@ github.com/zclconf/go-cty v1.1.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLE github.com/zclconf/go-cty v1.2.0/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8= github.com/zclconf/go-cty v1.2.1/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8= github.com/zclconf/go-cty v1.3.1/go.mod h1:YO23e2L18AG+ZYQfSobnY4G65nvwvprPCxBHkufUH1k= -github.com/zclconf/go-cty v1.8.4 h1:pwhhz5P+Fjxse7S7UriBrMu6AUJSZM5pKqGem1PjGAs= -github.com/zclconf/go-cty v1.8.4/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= +github.com/zclconf/go-cty v1.9.1 h1:viqrgQwFl5UpSxc046qblj78wZXVDFnSOufaOTER+cc= +github.com/zclconf/go-cty v1.9.1/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8= github.com/zclconf/go-cty-yaml v1.0.1 h1:up11wlgAaDvlAGENcFDnZgkn0qUJurso7k6EpURKNF8= github.com/zclconf/go-cty-yaml v1.0.1/go.mod h1:IP3Ylp0wQpYm50IHK8OZWKMu6sPJIUgKa8XhiVHura0= @@ -1154,8 +1163,9 @@ golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210506145944-38f3c27a63bf h1:B2n+Zi5QeYRDAEodEu72OS36gmTWjgpXr2+cWcBW90o= golang.org/x/crypto v0.0.0-20210506145944-38f3c27a63bf/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= +golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e h1:gsTQYXdTw2Gq7RBsWvlQ91b+aEQ6bXFUngBGuR8sPpI= +golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1353,6 +1363,7 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210502180810-71e4cd670f79/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210503080704-8803ae5d1324/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210503173754-0981d6026fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210816074244-15123e1e1f71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210817190340-bfb29a6856f2 h1:c8PlLMqBbOHoqtjteWm5/kbe6rNY2pbRfbIMVnepueo= diff --git a/sdk/dotnet/Pulumi.Rke.csproj b/sdk/dotnet/Pulumi.Rke.csproj index d6a49622..6d97deed 100644 --- a/sdk/dotnet/Pulumi.Rke.csproj +++ b/sdk/dotnet/Pulumi.Rke.csproj @@ -39,6 +39,11 @@ + + + + + diff --git a/sdk/dotnet/Utilities.cs b/sdk/dotnet/Utilities.cs index 483ec357..0e9b7565 100644 --- a/sdk/dotnet/Utilities.cs +++ b/sdk/dotnet/Utilities.cs @@ -46,18 +46,19 @@ static class Utilities public static double? GetEnvDouble(params string[] names) => double.TryParse(GetEnv(names), out double v) ? (double?)v : null; + [Obsolete("Please use WithDefaults instead")] public static InvokeOptions WithVersion(this InvokeOptions? options) { - if (options?.Version != null) - { - return options; - } - return new InvokeOptions - { - Parent = options?.Parent, - Provider = options?.Provider, - Version = Version, - }; + InvokeOptions dst = options ?? new InvokeOptions{}; + dst.Version = options?.Version ?? Version; + return dst; + } + + public static InvokeOptions WithDefaults(this InvokeOptions? src) + { + InvokeOptions dst = src ?? new InvokeOptions{}; + dst.Version = src?.Version ?? Version; + return dst; } private readonly static string version; diff --git a/sdk/dotnet/pulumi-plugin.json b/sdk/dotnet/pulumi-plugin.json new file mode 100644 index 00000000..4d8f5aac --- /dev/null +++ b/sdk/dotnet/pulumi-plugin.json @@ -0,0 +1,4 @@ +{ + "resource": true, + "name": "rke" +} diff --git a/sdk/go.mod b/sdk/go.mod index dc240ec1..dc94e8dc 100644 --- a/sdk/go.mod +++ b/sdk/go.mod @@ -4,5 +4,5 @@ go 1.15 require ( github.com/blang/semver v3.5.1+incompatible - github.com/pulumi/pulumi/sdk/v3 v3.14.0 + github.com/pulumi/pulumi/sdk/v3 v3.23.2 ) diff --git a/sdk/go.sum b/sdk/go.sum index 3ceee335..ce127565 100644 --- a/sdk/go.sum +++ b/sdk/go.sum @@ -57,8 +57,6 @@ github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2 github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gofrs/flock v0.7.1 h1:DP+LD/t0njgoPBvT5MJLeliUIVQR03hiKR6vezdwHlc= -github.com/gofrs/flock v0.7.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/uuid v3.3.0+incompatible h1:8K4tyRfvU1CYPgJsveYFQMhpFd/wXNM7iK6rR7UHz84= github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -88,6 +86,7 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.4.1 h1:/exdXoGamhu5ONeUJH0deniYLWYvQwW66yvlfiiKTu0= github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= @@ -146,6 +145,7 @@ github.com/opentracing/opentracing-go v1.1.0 h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsq github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/pelletier/go-buffruneio v0.2.0/go.mod h1:JkE26KsDizTr40EUHkXVtNPvgGtbSNq5BcowyYOWdKo= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -162,9 +162,13 @@ github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y8 github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/pulumi/pulumi/sdk/v3 v3.14.0 h1:UXLRHGQCsO1tLWdv4IO3IQOXrUoZUHhDtDXFoGMmAtA= -github.com/pulumi/pulumi/sdk/v3 v3.14.0/go.mod h1:aT7YmFdR6/T7tp2tMIZ68WRD1Xyv5a6Y4BhsuaCNpW0= +github.com/pulumi/pulumi/sdk/v3 v3.23.2 h1:m/YfyUsoeRFyHXDm2HtJhK+tBV58nrdmWsAkNQimRU4= +github.com/pulumi/pulumi/sdk/v3 v3.23.2/go.mod h1:WHOQB00iuHZyXhwrymxpKXhpOahSguJIpRjVokmM11w= +github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XFkP+Eg= +github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sabhiram/go-gitignore v0.0.0-20180611051255-d3107576ba94 h1:G04eS0JkAIVZfaJLjla9dNxkJCPiKIGZlw9AfOhzOD0= github.com/sabhiram/go-gitignore v0.0.0-20180611051255-d3107576ba94/go.mod h1:b18R55ulyQ/h3RaWyloPyER7fWQVZvimKKhnI5OfrJQ= @@ -323,6 +327,7 @@ gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogR gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.28 h1:n1tBJnnK2r7g9OW2btFH91V92STTUevLXYFb8gy9EMk= gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/src-d/go-billy.v4 v4.3.2 h1:0SQA1pRztfTFx2miS8sA97XvooFeNOmvUenF4o0EcVg= gopkg.in/src-d/go-billy.v4 v4.3.2/go.mod h1:nDjArDMp+XMs1aFAESLRjfGSgfvoYN0hDfzEk0GjC98= diff --git a/sdk/go/rke/cluster.go b/sdk/go/rke/cluster.go index 79e51716..41904476 100644 --- a/sdk/go/rke/cluster.go +++ b/sdk/go/rke/cluster.go @@ -669,7 +669,7 @@ type ClusterInput interface { } func (*Cluster) ElementType() reflect.Type { - return reflect.TypeOf((*Cluster)(nil)) + return reflect.TypeOf((**Cluster)(nil)).Elem() } func (i *Cluster) ToClusterOutput() ClusterOutput { @@ -683,7 +683,7 @@ func (i *Cluster) ToClusterOutputWithContext(ctx context.Context) ClusterOutput type ClusterOutput struct{ *pulumi.OutputState } func (ClusterOutput) ElementType() reflect.Type { - return reflect.TypeOf((*Cluster)(nil)) + return reflect.TypeOf((**Cluster)(nil)).Elem() } func (o ClusterOutput) ToClusterOutput() ClusterOutput { diff --git a/sdk/go/rke/config/pulumiUtilities.go b/sdk/go/rke/config/pulumiUtilities.go index a27beaab..1a1da99a 100644 --- a/sdk/go/rke/config/pulumiUtilities.go +++ b/sdk/go/rke/config/pulumiUtilities.go @@ -75,3 +75,11 @@ func PkgVersion() (semver.Version, error) { } return semver.Version{}, fmt.Errorf("failed to determine the package version from %s", pkgPath) } + +// isZero is a null safe check for if a value is it's types zero value. +func isZero(v interface{}) bool { + if v == nil { + return true + } + return reflect.ValueOf(v).IsZero() +} diff --git a/sdk/go/rke/provider.go b/sdk/go/rke/provider.go index 27fea080..dc6192da 100644 --- a/sdk/go/rke/provider.go +++ b/sdk/go/rke/provider.go @@ -27,10 +27,10 @@ func NewProvider(ctx *pulumi.Context, args = &ProviderArgs{} } - if args.Debug == nil { + if isZero(args.Debug) { args.Debug = pulumi.BoolPtr(getEnvOrDefault(false, parseEnvBool, "RKE_DEBUG").(bool)) } - if args.LogFile == nil { + if isZero(args.LogFile) { args.LogFile = pulumi.StringPtr(getEnvOrDefault("", nil, "RKE_LOG_FILE").(string)) } var resource Provider @@ -64,7 +64,7 @@ type ProviderInput interface { } func (*Provider) ElementType() reflect.Type { - return reflect.TypeOf((*Provider)(nil)) + return reflect.TypeOf((**Provider)(nil)).Elem() } func (i *Provider) ToProviderOutput() ProviderOutput { @@ -78,7 +78,7 @@ func (i *Provider) ToProviderOutputWithContext(ctx context.Context) ProviderOutp type ProviderOutput struct{ *pulumi.OutputState } func (ProviderOutput) ElementType() reflect.Type { - return reflect.TypeOf((*Provider)(nil)) + return reflect.TypeOf((**Provider)(nil)).Elem() } func (o ProviderOutput) ToProviderOutput() ProviderOutput { diff --git a/sdk/go/rke/pulumi-plugin.json b/sdk/go/rke/pulumi-plugin.json new file mode 100644 index 00000000..4d8f5aac --- /dev/null +++ b/sdk/go/rke/pulumi-plugin.json @@ -0,0 +1,4 @@ +{ + "resource": true, + "name": "rke" +} diff --git a/sdk/go/rke/pulumiUtilities.go b/sdk/go/rke/pulumiUtilities.go index c0acbefe..ec548f1e 100644 --- a/sdk/go/rke/pulumiUtilities.go +++ b/sdk/go/rke/pulumiUtilities.go @@ -75,3 +75,11 @@ func PkgVersion() (semver.Version, error) { } return semver.Version{}, fmt.Errorf("failed to determine the package version from %s", pkgPath) } + +// isZero is a null safe check for if a value is it's types zero value. +func isZero(v interface{}) bool { + if v == nil { + return true + } + return reflect.ValueOf(v).IsZero() +} diff --git a/sdk/nodejs/cluster.ts b/sdk/nodejs/cluster.ts index bff8fc8d..d47d9e7e 100644 --- a/sdk/nodejs/cluster.ts +++ b/sdk/nodejs/cluster.ts @@ -308,135 +308,133 @@ export class Cluster extends pulumi.CustomResource { */ constructor(name: string, args?: ClusterArgs, opts?: pulumi.CustomResourceOptions) constructor(name: string, argsOrState?: ClusterArgs | ClusterState, opts?: pulumi.CustomResourceOptions) { - let inputs: pulumi.Inputs = {}; + let resourceInputs: pulumi.Inputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState as ClusterState | undefined; - inputs["addonJobTimeout"] = state ? state.addonJobTimeout : undefined; - inputs["addons"] = state ? state.addons : undefined; - inputs["addonsIncludes"] = state ? state.addonsIncludes : undefined; - inputs["apiServerUrl"] = state ? state.apiServerUrl : undefined; - inputs["authentication"] = state ? state.authentication : undefined; - inputs["authorization"] = state ? state.authorization : undefined; - inputs["bastionHost"] = state ? state.bastionHost : undefined; - inputs["caCrt"] = state ? state.caCrt : undefined; - inputs["certDir"] = state ? state.certDir : undefined; - inputs["certificates"] = state ? state.certificates : undefined; - inputs["clientCert"] = state ? state.clientCert : undefined; - inputs["clientKey"] = state ? state.clientKey : undefined; - inputs["cloudProvider"] = state ? state.cloudProvider : undefined; - inputs["clusterCidr"] = state ? state.clusterCidr : undefined; - inputs["clusterDnsServer"] = state ? state.clusterDnsServer : undefined; - inputs["clusterDomain"] = state ? state.clusterDomain : undefined; - inputs["clusterName"] = state ? state.clusterName : undefined; - inputs["clusterYaml"] = state ? state.clusterYaml : undefined; - inputs["controlPlaneHosts"] = state ? state.controlPlaneHosts : undefined; - inputs["customCerts"] = state ? state.customCerts : undefined; - inputs["delayOnCreation"] = state ? state.delayOnCreation : undefined; - inputs["dind"] = state ? state.dind : undefined; - inputs["dindDnsServer"] = state ? state.dindDnsServer : undefined; - inputs["dindStorageDriver"] = state ? state.dindStorageDriver : undefined; - inputs["disablePortCheck"] = state ? state.disablePortCheck : undefined; - inputs["dns"] = state ? state.dns : undefined; - inputs["etcdHosts"] = state ? state.etcdHosts : undefined; - inputs["ignoreDockerVersion"] = state ? state.ignoreDockerVersion : undefined; - inputs["inactiveHosts"] = state ? state.inactiveHosts : undefined; - inputs["ingress"] = state ? state.ingress : undefined; - inputs["internalKubeConfigYaml"] = state ? state.internalKubeConfigYaml : undefined; - inputs["kubeAdminUser"] = state ? state.kubeAdminUser : undefined; - inputs["kubeConfigYaml"] = state ? state.kubeConfigYaml : undefined; - inputs["kubernetesVersion"] = state ? state.kubernetesVersion : undefined; - inputs["monitoring"] = state ? state.monitoring : undefined; - inputs["network"] = state ? state.network : undefined; - inputs["nodes"] = state ? state.nodes : undefined; - inputs["nodesConfs"] = state ? state.nodesConfs : undefined; - inputs["prefixPath"] = state ? state.prefixPath : undefined; - inputs["privateRegistries"] = state ? state.privateRegistries : undefined; - inputs["restore"] = state ? state.restore : undefined; - inputs["rkeClusterYaml"] = state ? state.rkeClusterYaml : undefined; - inputs["rkeState"] = state ? state.rkeState : undefined; - inputs["rotateCertificates"] = state ? state.rotateCertificates : undefined; - inputs["runningSystemImages"] = state ? state.runningSystemImages : undefined; - inputs["services"] = state ? state.services : undefined; - inputs["servicesEtcdDeprecated"] = state ? state.servicesEtcdDeprecated : undefined; - inputs["servicesKubeApiDeprecated"] = state ? state.servicesKubeApiDeprecated : undefined; - inputs["servicesKubeControllerDeprecated"] = state ? state.servicesKubeControllerDeprecated : undefined; - inputs["servicesKubeProxyDeprecated"] = state ? state.servicesKubeProxyDeprecated : undefined; - inputs["servicesKubeSchedulerDeprecated"] = state ? state.servicesKubeSchedulerDeprecated : undefined; - inputs["servicesKubeletDeprecated"] = state ? state.servicesKubeletDeprecated : undefined; - inputs["sshAgentAuth"] = state ? state.sshAgentAuth : undefined; - inputs["sshCertPath"] = state ? state.sshCertPath : undefined; - inputs["sshKeyPath"] = state ? state.sshKeyPath : undefined; - inputs["systemImages"] = state ? state.systemImages : undefined; - inputs["updateOnly"] = state ? state.updateOnly : undefined; - inputs["upgradeStrategy"] = state ? state.upgradeStrategy : undefined; - inputs["workerHosts"] = state ? state.workerHosts : undefined; + resourceInputs["addonJobTimeout"] = state ? state.addonJobTimeout : undefined; + resourceInputs["addons"] = state ? state.addons : undefined; + resourceInputs["addonsIncludes"] = state ? state.addonsIncludes : undefined; + resourceInputs["apiServerUrl"] = state ? state.apiServerUrl : undefined; + resourceInputs["authentication"] = state ? state.authentication : undefined; + resourceInputs["authorization"] = state ? state.authorization : undefined; + resourceInputs["bastionHost"] = state ? state.bastionHost : undefined; + resourceInputs["caCrt"] = state ? state.caCrt : undefined; + resourceInputs["certDir"] = state ? state.certDir : undefined; + resourceInputs["certificates"] = state ? state.certificates : undefined; + resourceInputs["clientCert"] = state ? state.clientCert : undefined; + resourceInputs["clientKey"] = state ? state.clientKey : undefined; + resourceInputs["cloudProvider"] = state ? state.cloudProvider : undefined; + resourceInputs["clusterCidr"] = state ? state.clusterCidr : undefined; + resourceInputs["clusterDnsServer"] = state ? state.clusterDnsServer : undefined; + resourceInputs["clusterDomain"] = state ? state.clusterDomain : undefined; + resourceInputs["clusterName"] = state ? state.clusterName : undefined; + resourceInputs["clusterYaml"] = state ? state.clusterYaml : undefined; + resourceInputs["controlPlaneHosts"] = state ? state.controlPlaneHosts : undefined; + resourceInputs["customCerts"] = state ? state.customCerts : undefined; + resourceInputs["delayOnCreation"] = state ? state.delayOnCreation : undefined; + resourceInputs["dind"] = state ? state.dind : undefined; + resourceInputs["dindDnsServer"] = state ? state.dindDnsServer : undefined; + resourceInputs["dindStorageDriver"] = state ? state.dindStorageDriver : undefined; + resourceInputs["disablePortCheck"] = state ? state.disablePortCheck : undefined; + resourceInputs["dns"] = state ? state.dns : undefined; + resourceInputs["etcdHosts"] = state ? state.etcdHosts : undefined; + resourceInputs["ignoreDockerVersion"] = state ? state.ignoreDockerVersion : undefined; + resourceInputs["inactiveHosts"] = state ? state.inactiveHosts : undefined; + resourceInputs["ingress"] = state ? state.ingress : undefined; + resourceInputs["internalKubeConfigYaml"] = state ? state.internalKubeConfigYaml : undefined; + resourceInputs["kubeAdminUser"] = state ? state.kubeAdminUser : undefined; + resourceInputs["kubeConfigYaml"] = state ? state.kubeConfigYaml : undefined; + resourceInputs["kubernetesVersion"] = state ? state.kubernetesVersion : undefined; + resourceInputs["monitoring"] = state ? state.monitoring : undefined; + resourceInputs["network"] = state ? state.network : undefined; + resourceInputs["nodes"] = state ? state.nodes : undefined; + resourceInputs["nodesConfs"] = state ? state.nodesConfs : undefined; + resourceInputs["prefixPath"] = state ? state.prefixPath : undefined; + resourceInputs["privateRegistries"] = state ? state.privateRegistries : undefined; + resourceInputs["restore"] = state ? state.restore : undefined; + resourceInputs["rkeClusterYaml"] = state ? state.rkeClusterYaml : undefined; + resourceInputs["rkeState"] = state ? state.rkeState : undefined; + resourceInputs["rotateCertificates"] = state ? state.rotateCertificates : undefined; + resourceInputs["runningSystemImages"] = state ? state.runningSystemImages : undefined; + resourceInputs["services"] = state ? state.services : undefined; + resourceInputs["servicesEtcdDeprecated"] = state ? state.servicesEtcdDeprecated : undefined; + resourceInputs["servicesKubeApiDeprecated"] = state ? state.servicesKubeApiDeprecated : undefined; + resourceInputs["servicesKubeControllerDeprecated"] = state ? state.servicesKubeControllerDeprecated : undefined; + resourceInputs["servicesKubeProxyDeprecated"] = state ? state.servicesKubeProxyDeprecated : undefined; + resourceInputs["servicesKubeSchedulerDeprecated"] = state ? state.servicesKubeSchedulerDeprecated : undefined; + resourceInputs["servicesKubeletDeprecated"] = state ? state.servicesKubeletDeprecated : undefined; + resourceInputs["sshAgentAuth"] = state ? state.sshAgentAuth : undefined; + resourceInputs["sshCertPath"] = state ? state.sshCertPath : undefined; + resourceInputs["sshKeyPath"] = state ? state.sshKeyPath : undefined; + resourceInputs["systemImages"] = state ? state.systemImages : undefined; + resourceInputs["updateOnly"] = state ? state.updateOnly : undefined; + resourceInputs["upgradeStrategy"] = state ? state.upgradeStrategy : undefined; + resourceInputs["workerHosts"] = state ? state.workerHosts : undefined; } else { const args = argsOrState as ClusterArgs | undefined; - inputs["addonJobTimeout"] = args ? args.addonJobTimeout : undefined; - inputs["addons"] = args ? args.addons : undefined; - inputs["addonsIncludes"] = args ? args.addonsIncludes : undefined; - inputs["authentication"] = args ? args.authentication : undefined; - inputs["authorization"] = args ? args.authorization : undefined; - inputs["bastionHost"] = args ? args.bastionHost : undefined; - inputs["certDir"] = args ? args.certDir : undefined; - inputs["cloudProvider"] = args ? args.cloudProvider : undefined; - inputs["clusterName"] = args ? args.clusterName : undefined; - inputs["clusterYaml"] = args ? args.clusterYaml : undefined; - inputs["customCerts"] = args ? args.customCerts : undefined; - inputs["delayOnCreation"] = args ? args.delayOnCreation : undefined; - inputs["dind"] = args ? args.dind : undefined; - inputs["dindDnsServer"] = args ? args.dindDnsServer : undefined; - inputs["dindStorageDriver"] = args ? args.dindStorageDriver : undefined; - inputs["disablePortCheck"] = args ? args.disablePortCheck : undefined; - inputs["dns"] = args ? args.dns : undefined; - inputs["ignoreDockerVersion"] = args ? args.ignoreDockerVersion : undefined; - inputs["ingress"] = args ? args.ingress : undefined; - inputs["kubernetesVersion"] = args ? args.kubernetesVersion : undefined; - inputs["monitoring"] = args ? args.monitoring : undefined; - inputs["network"] = args ? args.network : undefined; - inputs["nodes"] = args ? args.nodes : undefined; - inputs["nodesConfs"] = args ? args.nodesConfs : undefined; - inputs["prefixPath"] = args ? args.prefixPath : undefined; - inputs["privateRegistries"] = args ? args.privateRegistries : undefined; - inputs["restore"] = args ? args.restore : undefined; - inputs["rotateCertificates"] = args ? args.rotateCertificates : undefined; - inputs["services"] = args ? args.services : undefined; - inputs["servicesEtcdDeprecated"] = args ? args.servicesEtcdDeprecated : undefined; - inputs["servicesKubeApiDeprecated"] = args ? args.servicesKubeApiDeprecated : undefined; - inputs["servicesKubeControllerDeprecated"] = args ? args.servicesKubeControllerDeprecated : undefined; - inputs["servicesKubeProxyDeprecated"] = args ? args.servicesKubeProxyDeprecated : undefined; - inputs["servicesKubeSchedulerDeprecated"] = args ? args.servicesKubeSchedulerDeprecated : undefined; - inputs["servicesKubeletDeprecated"] = args ? args.servicesKubeletDeprecated : undefined; - inputs["sshAgentAuth"] = args ? args.sshAgentAuth : undefined; - inputs["sshCertPath"] = args ? args.sshCertPath : undefined; - inputs["sshKeyPath"] = args ? args.sshKeyPath : undefined; - inputs["systemImages"] = args ? args.systemImages : undefined; - inputs["updateOnly"] = args ? args.updateOnly : undefined; - inputs["upgradeStrategy"] = args ? args.upgradeStrategy : undefined; - inputs["apiServerUrl"] = undefined /*out*/; - inputs["caCrt"] = undefined /*out*/; - inputs["certificates"] = undefined /*out*/; - inputs["clientCert"] = undefined /*out*/; - inputs["clientKey"] = undefined /*out*/; - inputs["clusterCidr"] = undefined /*out*/; - inputs["clusterDnsServer"] = undefined /*out*/; - inputs["clusterDomain"] = undefined /*out*/; - inputs["controlPlaneHosts"] = undefined /*out*/; - inputs["etcdHosts"] = undefined /*out*/; - inputs["inactiveHosts"] = undefined /*out*/; - inputs["internalKubeConfigYaml"] = undefined /*out*/; - inputs["kubeAdminUser"] = undefined /*out*/; - inputs["kubeConfigYaml"] = undefined /*out*/; - inputs["rkeClusterYaml"] = undefined /*out*/; - inputs["rkeState"] = undefined /*out*/; - inputs["runningSystemImages"] = undefined /*out*/; - inputs["workerHosts"] = undefined /*out*/; + resourceInputs["addonJobTimeout"] = args ? args.addonJobTimeout : undefined; + resourceInputs["addons"] = args ? args.addons : undefined; + resourceInputs["addonsIncludes"] = args ? args.addonsIncludes : undefined; + resourceInputs["authentication"] = args ? args.authentication : undefined; + resourceInputs["authorization"] = args ? args.authorization : undefined; + resourceInputs["bastionHost"] = args ? args.bastionHost : undefined; + resourceInputs["certDir"] = args ? args.certDir : undefined; + resourceInputs["cloudProvider"] = args ? args.cloudProvider : undefined; + resourceInputs["clusterName"] = args ? args.clusterName : undefined; + resourceInputs["clusterYaml"] = args ? args.clusterYaml : undefined; + resourceInputs["customCerts"] = args ? args.customCerts : undefined; + resourceInputs["delayOnCreation"] = args ? args.delayOnCreation : undefined; + resourceInputs["dind"] = args ? args.dind : undefined; + resourceInputs["dindDnsServer"] = args ? args.dindDnsServer : undefined; + resourceInputs["dindStorageDriver"] = args ? args.dindStorageDriver : undefined; + resourceInputs["disablePortCheck"] = args ? args.disablePortCheck : undefined; + resourceInputs["dns"] = args ? args.dns : undefined; + resourceInputs["ignoreDockerVersion"] = args ? args.ignoreDockerVersion : undefined; + resourceInputs["ingress"] = args ? args.ingress : undefined; + resourceInputs["kubernetesVersion"] = args ? args.kubernetesVersion : undefined; + resourceInputs["monitoring"] = args ? args.monitoring : undefined; + resourceInputs["network"] = args ? args.network : undefined; + resourceInputs["nodes"] = args ? args.nodes : undefined; + resourceInputs["nodesConfs"] = args ? args.nodesConfs : undefined; + resourceInputs["prefixPath"] = args ? args.prefixPath : undefined; + resourceInputs["privateRegistries"] = args ? args.privateRegistries : undefined; + resourceInputs["restore"] = args ? args.restore : undefined; + resourceInputs["rotateCertificates"] = args ? args.rotateCertificates : undefined; + resourceInputs["services"] = args ? args.services : undefined; + resourceInputs["servicesEtcdDeprecated"] = args ? args.servicesEtcdDeprecated : undefined; + resourceInputs["servicesKubeApiDeprecated"] = args ? args.servicesKubeApiDeprecated : undefined; + resourceInputs["servicesKubeControllerDeprecated"] = args ? args.servicesKubeControllerDeprecated : undefined; + resourceInputs["servicesKubeProxyDeprecated"] = args ? args.servicesKubeProxyDeprecated : undefined; + resourceInputs["servicesKubeSchedulerDeprecated"] = args ? args.servicesKubeSchedulerDeprecated : undefined; + resourceInputs["servicesKubeletDeprecated"] = args ? args.servicesKubeletDeprecated : undefined; + resourceInputs["sshAgentAuth"] = args ? args.sshAgentAuth : undefined; + resourceInputs["sshCertPath"] = args ? args.sshCertPath : undefined; + resourceInputs["sshKeyPath"] = args ? args.sshKeyPath : undefined; + resourceInputs["systemImages"] = args ? args.systemImages : undefined; + resourceInputs["updateOnly"] = args ? args.updateOnly : undefined; + resourceInputs["upgradeStrategy"] = args ? args.upgradeStrategy : undefined; + resourceInputs["apiServerUrl"] = undefined /*out*/; + resourceInputs["caCrt"] = undefined /*out*/; + resourceInputs["certificates"] = undefined /*out*/; + resourceInputs["clientCert"] = undefined /*out*/; + resourceInputs["clientKey"] = undefined /*out*/; + resourceInputs["clusterCidr"] = undefined /*out*/; + resourceInputs["clusterDnsServer"] = undefined /*out*/; + resourceInputs["clusterDomain"] = undefined /*out*/; + resourceInputs["controlPlaneHosts"] = undefined /*out*/; + resourceInputs["etcdHosts"] = undefined /*out*/; + resourceInputs["inactiveHosts"] = undefined /*out*/; + resourceInputs["internalKubeConfigYaml"] = undefined /*out*/; + resourceInputs["kubeAdminUser"] = undefined /*out*/; + resourceInputs["kubeConfigYaml"] = undefined /*out*/; + resourceInputs["rkeClusterYaml"] = undefined /*out*/; + resourceInputs["rkeState"] = undefined /*out*/; + resourceInputs["runningSystemImages"] = undefined /*out*/; + resourceInputs["workerHosts"] = undefined /*out*/; } - if (!opts.version) { - opts = pulumi.mergeOptions(opts, { version: utilities.getVersion()}); - } - super(Cluster.__pulumiType, name, inputs, opts); + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); + super(Cluster.__pulumiType, name, resourceInputs, opts); } } diff --git a/sdk/nodejs/config/vars.ts b/sdk/nodejs/config/vars.ts index 2aaaa433..09d6fcc9 100644 --- a/sdk/nodejs/config/vars.ts +++ b/sdk/nodejs/config/vars.ts @@ -10,7 +10,7 @@ const __config = new pulumi.Config("rke"); export declare const debug: boolean; Object.defineProperty(exports, "debug", { get() { - return __config.getObject("debug") ?? (utilities.getEnvBoolean("RKE_DEBUG") || false); + return __config.getObject("debug") ?? (utilities.getEnvBoolean("RKE_DEBUG") || false); }, enumerable: true, }); diff --git a/sdk/nodejs/package.json b/sdk/nodejs/package.json index 5a15e95c..59363037 100644 --- a/sdk/nodejs/package.json +++ b/sdk/nodejs/package.json @@ -10,7 +10,8 @@ "repository": "https://github.com/pulumi/pulumi-rke", "license": "Apache-2.0", "scripts": { - "build": "tsc" + "build": "tsc", + "install": "node scripts/install-pulumi-plugin.js resource rke ${VERSION}" }, "dependencies": { "@pulumi/pulumi": "^3.0.0" diff --git a/sdk/nodejs/provider.ts b/sdk/nodejs/provider.ts index 69d5c459..296907fc 100644 --- a/sdk/nodejs/provider.ts +++ b/sdk/nodejs/provider.ts @@ -35,16 +35,14 @@ export class Provider extends pulumi.ProviderResource { * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args?: ProviderArgs, opts?: pulumi.ResourceOptions) { - let inputs: pulumi.Inputs = {}; + let resourceInputs: pulumi.Inputs = {}; opts = opts || {}; { - inputs["debug"] = pulumi.output((args ? args.debug : undefined) ?? (utilities.getEnvBoolean("RKE_DEBUG") || false)).apply(JSON.stringify); - inputs["logFile"] = (args ? args.logFile : undefined) ?? utilities.getEnv("RKE_LOG_FILE"); + resourceInputs["debug"] = pulumi.output((args ? args.debug : undefined) ?? (utilities.getEnvBoolean("RKE_DEBUG") || false)).apply(JSON.stringify); + resourceInputs["logFile"] = (args ? args.logFile : undefined) ?? utilities.getEnv("RKE_LOG_FILE"); } - if (!opts.version) { - opts = pulumi.mergeOptions(opts, { version: utilities.getVersion()}); - } - super(Provider.__pulumiType, name, inputs, opts); + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); + super(Provider.__pulumiType, name, resourceInputs, opts); } } diff --git a/sdk/nodejs/scripts/install-pulumi-plugin.js b/sdk/nodejs/scripts/install-pulumi-plugin.js new file mode 100644 index 00000000..fefc6e0e --- /dev/null +++ b/sdk/nodejs/scripts/install-pulumi-plugin.js @@ -0,0 +1,26 @@ +"use strict"; +var childProcess = require("child_process"); + +var args = process.argv.slice(2); + +if (args.indexOf("${VERSION}") !== -1) { + process.exit(0); +} + +var res = childProcess.spawnSync("pulumi", ["plugin", "install"].concat(args), { + stdio: ["ignore", "inherit", "inherit"] +}); + +if (res.error && res.error.code === "ENOENT") { + console.error("\nThere was an error installing the resource provider plugin. " + + "It looks like `pulumi` is not installed on your system. " + + "Please visit https://pulumi.com/ to install the Pulumi CLI.\n" + + "You may try manually installing the plugin by running " + + "`pulumi plugin install " + args.join(" ") + "`"); +} else if (res.error || res.status !== 0) { + console.error("\nThere was an error installing the resource provider plugin. " + + "You may try to manually installing the plugin by running " + + "`pulumi plugin install " + args.join(" ") + "`"); +} + +process.exit(0); diff --git a/sdk/nodejs/utilities.ts b/sdk/nodejs/utilities.ts index a152dc1e..4c60e03f 100644 --- a/sdk/nodejs/utilities.ts +++ b/sdk/nodejs/utilities.ts @@ -47,3 +47,8 @@ export function getVersion(): string { } return version; } + +/** @internal */ +export function resourceOptsDefaults(): any { + return { version: getVersion() }; +} diff --git a/sdk/python/pulumi_rke/pulumi-plugin.json b/sdk/python/pulumi_rke/pulumi-plugin.json new file mode 100644 index 00000000..4d8f5aac --- /dev/null +++ b/sdk/python/pulumi_rke/pulumi-plugin.json @@ -0,0 +1,4 @@ +{ + "resource": true, + "name": "rke" +} diff --git a/sdk/python/setup.py b/sdk/python/setup.py index f8269726..fc343972 100644 --- a/sdk/python/setup.py +++ b/sdk/python/setup.py @@ -55,6 +55,7 @@ def readme(): package_data={ 'pulumi_rke': [ 'py.typed', + 'pulumi-plugin.json', ] }, install_requires=[