From adf0cb91acce11577a23d0c085f0bad89a309c03 Mon Sep 17 00:00:00 2001 From: pulumi-bot Date: Mon, 24 Jun 2024 20:07:36 +0000 Subject: [PATCH 1/2] make tfgen --- examples/go.mod | 15 +++--- examples/go.sum | 30 +++++------ .../cmd/pulumi-resource-rancher2/schema.json | 2 +- provider/go.mod | 20 ++++---- provider/go.sum | 40 +++++++-------- sdk/go.mod | 25 +++++----- sdk/go.sum | 50 ++++++++++--------- 7 files changed, 94 insertions(+), 88 deletions(-) diff --git a/examples/go.mod b/examples/go.mod index 5c7c9c670..5e6780c51 100644 --- a/examples/go.mod +++ b/examples/go.mod @@ -2,7 +2,7 @@ module github.com/pulumi/pulumi-rancher2/examples/v6 go 1.21 -require github.com/pulumi/pulumi/pkg/v3 v3.118.0 +require github.com/pulumi/pulumi/pkg/v3 v3.121.0 require ( cloud.google.com/go v0.112.1 // indirect @@ -20,6 +20,7 @@ require ( github.com/Azure/azure-sdk-for-go/sdk/keyvault/azkeys v0.10.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/keyvault/internal v0.7.1 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 // indirect + github.com/BurntSushi/toml v1.2.1 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/ProtonMail/go-crypto v1.0.0 // indirect github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da // indirect @@ -45,7 +46,7 @@ require ( github.com/blang/semver v3.5.1+incompatible // indirect github.com/cenkalti/backoff/v3 v3.2.2 // indirect github.com/charmbracelet/bubbles v0.16.1 // indirect - github.com/charmbracelet/bubbletea v0.24.2 // indirect + github.com/charmbracelet/bubbletea v0.25.0 // indirect github.com/charmbracelet/lipgloss v0.7.1 // indirect github.com/cheggaaa/pb v1.0.29 // indirect github.com/cloudflare/circl v1.3.7 // indirect @@ -121,8 +122,8 @@ require ( github.com/pkg/term v1.1.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 // indirect - github.com/pulumi/esc v0.6.2 // indirect - github.com/pulumi/pulumi/sdk/v3 v3.118.0 // indirect + github.com/pulumi/esc v0.9.1 // indirect + github.com/pulumi/pulumi/sdk/v3 v3.121.0 // indirect github.com/rivo/uniseg v0.4.4 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/ryanuber/go-glob v1.0.0 // indirect @@ -154,8 +155,8 @@ require ( gocloud.dev v0.37.0 // indirect gocloud.dev/secrets/hashivault v0.37.0 // indirect golang.org/x/crypto v0.24.0 // indirect - golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect - golang.org/x/mod v0.17.0 // indirect + golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8 // indirect + golang.org/x/mod v0.18.0 // indirect golang.org/x/net v0.26.0 // indirect golang.org/x/oauth2 v0.18.0 // indirect golang.org/x/sync v0.7.0 // indirect @@ -163,7 +164,7 @@ require ( golang.org/x/term v0.21.0 // indirect golang.org/x/text v0.16.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect + golang.org/x/tools v0.22.0 // indirect golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect google.golang.org/api v0.169.0 // indirect google.golang.org/appengine v1.6.8 // indirect diff --git a/examples/go.sum b/examples/go.sum index 530fa350b..18090bbdd 100644 --- a/examples/go.sum +++ b/examples/go.sum @@ -30,6 +30,8 @@ github.com/Azure/azure-sdk-for-go/sdk/keyvault/internal v0.7.1/go.mod h1:9V2j0jn github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 h1:XHOnouVk1mxXfQidrMEnLlPk9UMeRtyBTnEFtxkV0kU= github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak= +github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= @@ -103,8 +105,8 @@ github.com/cenkalti/backoff/v3 v3.2.2/go.mod h1:cIeZDE3IrqwwJl6VUwCN6trj1oXrTS4r github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/charmbracelet/bubbles v0.16.1 h1:6uzpAAaT9ZqKssntbvZMlksWHruQLNxg49H5WdeuYSY= github.com/charmbracelet/bubbles v0.16.1/go.mod h1:2QCp9LFlEsBQMvIYERr7Ww2H2bA7xen1idUDIzm/+Xc= -github.com/charmbracelet/bubbletea v0.24.2 h1:uaQIKx9Ai6Gdh5zpTbGiWpytMU+CfsPp06RaW2cx/SY= -github.com/charmbracelet/bubbletea v0.24.2/go.mod h1:XdrNrV4J8GiyshTtx3DNuYkR1FDaJmO3l2nejekbsgg= +github.com/charmbracelet/bubbletea v0.25.0 h1:bAfwk7jRz7FKFl9RzlIULPkStffg5k6pNt5dywy4TcM= +github.com/charmbracelet/bubbletea v0.25.0/go.mod h1:EN3QDR1T5ZdWmdfDzYcqOCAps45+QIJbLOBxmVNWNNg= github.com/charmbracelet/lipgloss v0.7.1 h1:17WMwi7N1b1rVWOjMT+rCh7sQkvDU75B2hbZpc5Kc1E= github.com/charmbracelet/lipgloss v0.7.1/go.mod h1:yG0k3giv8Qj8edTCbbg6AlQ5e8KNWpFujkNawKNhE2c= github.com/cheggaaa/pb v1.0.29 h1:FckUN5ngEk2LpvuG0fw1GEFx6LtyY2pWI/Z2QgCnEYo= @@ -339,12 +341,12 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 h1:vkHw5I/plNdTr435cARxCW6q9gc0S/Yxz7Mkd38pOb0= github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231/go.mod h1:murToZ2N9hNJzewjHBgfFdXhZKjY3z5cYC1VXk+lbFE= -github.com/pulumi/esc v0.6.2 h1:+z+l8cuwIauLSwXQS0uoI3rqB+YG4SzsZYtHfNoXBvw= -github.com/pulumi/esc v0.6.2/go.mod h1:jNnYNjzsOgVTjCp0LL24NsCk8ZJxq4IoLQdCT0X7l8k= -github.com/pulumi/pulumi/pkg/v3 v3.118.0 h1:i2OJe0Rl6BDxupJ0ix9HczAGKUsc6H6cU9svwDe1TYk= -github.com/pulumi/pulumi/pkg/v3 v3.118.0/go.mod h1:fbDHFdEJtFRkHu3Q6Sd7X3PalUsIXLbHT/pHfsbldlo= -github.com/pulumi/pulumi/sdk/v3 v3.118.0 h1:NboaaB4cNuehzsax38PO1jZOS6Mzbx/jNaDNaHPmg4c= -github.com/pulumi/pulumi/sdk/v3 v3.118.0/go.mod h1:kNea72+FQk82OjZ3yEP4dl6nbAl2ngE8PDBc0iFAaHg= +github.com/pulumi/esc v0.9.1 h1:HH5eEv8sgyxSpY5a8yePyqFXzA8cvBvapfH8457+mIs= +github.com/pulumi/esc v0.9.1/go.mod h1:oEJ6bOsjYlQUpjf70GiX+CXn3VBmpwFDxUTlmtUN84c= +github.com/pulumi/pulumi/pkg/v3 v3.121.0 h1:cLUQJYGJKfgCY0ubJo8dVwmsIm2WcgTprb9Orc/yiFg= +github.com/pulumi/pulumi/pkg/v3 v3.121.0/go.mod h1:aaRixfKOh4DhGtuDJcI56dTPkb7oJBgRgH1aMF1FzbU= +github.com/pulumi/pulumi/sdk/v3 v3.121.0 h1:UsnFKIVOtJN/hQKPkWHL9cZktewPVQRbNUXbXQY/qrk= +github.com/pulumi/pulumi/sdk/v3 v3.121.0/go.mod h1:p1U24en3zt51agx+WlNboSOV8eLlPWYAkxMzVEXKbnY= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= @@ -441,8 +443,8 @@ golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDf golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= -golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= +golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8 h1:LoYXNGAShUG3m/ehNk4iFctuhGX/+R1ZpfJ4/ia80JM= +golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8/go.mod h1:jj3sYF3dwk5D+ghuXyeI3r5MFf+NT2An6/9dOA95KSI= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= @@ -454,8 +456,8 @@ golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91 golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= -golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= +golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -559,8 +561,8 @@ golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= +golang.org/x/tools v0.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA= +golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/provider/cmd/pulumi-resource-rancher2/schema.json b/provider/cmd/pulumi-resource-rancher2/schema.json index d128802dc..e2d990693 100644 --- a/provider/cmd/pulumi-resource-rancher2/schema.json +++ b/provider/cmd/pulumi-resource-rancher2/schema.json @@ -27147,7 +27147,7 @@ } }, "rancher2:index/customUserToken:CustomUserToken": { - "description": "Provides a Rancher v2 Token resource, specifically to create tokens for custom users (i.e. not the 'admin' user configured with the provider config). Custom user tokens can f.e. be used as service account tokens with the Rancher v2 API having limited permissions. To create a custom user token the username/password for the Rancher User must be known.\n\nThere are 2 kind of tokens:\n- not scoped: valid for global system.\n- scoped: valid for just a specific cluster (`cluster_id` should be provided).\n\nTokens can only be created for a Rancher User with at least the `user-base` global role binding in order to enable user login.\n\nTokens can't be updated once created. Any diff in token data will recreate the token. If any token expire, Rancher2 provider will generate a diff to regenerate it.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as rancher2 from \"@pulumi/rancher2\";\n\n// Create a rancher2 Token\nconst foo = new rancher2.User(\"foo\", {\n name: \"foo\",\n username: \"foo\",\n password: \"changeme\",\n enabled: true,\n});\nconst foo_login = new rancher2.GlobalRoleBinding(\"foo-login\", {\n name: \"foo-login-binding\",\n globalRoleId: \"user-base\",\n userId: foo.id,\n});\nconst fooCustomUserToken = new rancher2.CustomUserToken(\"foo\", {\n username: foo.username,\n password: foo.password,\n description: \"foo token\",\n ttl: 0,\n}, {\n dependsOn: [foo_login],\n});\n```\n```python\nimport pulumi\nimport pulumi_rancher2 as rancher2\n\n# Create a rancher2 Token\nfoo = rancher2.User(\"foo\",\n name=\"foo\",\n username=\"foo\",\n password=\"changeme\",\n enabled=True)\nfoo_login = rancher2.GlobalRoleBinding(\"foo-login\",\n name=\"foo-login-binding\",\n global_role_id=\"user-base\",\n user_id=foo.id)\nfoo_custom_user_token = rancher2.CustomUserToken(\"foo\",\n username=foo.username,\n password=foo.password,\n description=\"foo token\",\n ttl=0,\n opts=pulumi.ResourceOptions(depends_on=[foo_login]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Rancher2 = Pulumi.Rancher2;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n // Create a rancher2 Token\n var foo = new Rancher2.User(\"foo\", new()\n {\n Name = \"foo\",\n Username = \"foo\",\n Password = \"changeme\",\n Enabled = true,\n });\n\n var foo_login = new Rancher2.GlobalRoleBinding(\"foo-login\", new()\n {\n Name = \"foo-login-binding\",\n GlobalRoleId = \"user-base\",\n UserId = foo.Id,\n });\n\n var fooCustomUserToken = new Rancher2.CustomUserToken(\"foo\", new()\n {\n Username = foo.Username,\n Password = foo.Password,\n Description = \"foo token\",\n Ttl = 0,\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n foo_login,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-rancher2/sdk/v6/go/rancher2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t// Create a rancher2 Token\n\t\tfoo, err := rancher2.NewUser(ctx, \"foo\", \u0026rancher2.UserArgs{\n\t\t\tName: pulumi.String(\"foo\"),\n\t\t\tUsername: pulumi.String(\"foo\"),\n\t\t\tPassword: pulumi.String(\"changeme\"),\n\t\t\tEnabled: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = rancher2.NewGlobalRoleBinding(ctx, \"foo-login\", \u0026rancher2.GlobalRoleBindingArgs{\n\t\t\tName: pulumi.String(\"foo-login-binding\"),\n\t\t\tGlobalRoleId: pulumi.String(\"user-base\"),\n\t\t\tUserId: foo.ID(),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = rancher2.NewCustomUserToken(ctx, \"foo\", \u0026rancher2.CustomUserTokenArgs{\n\t\t\tUsername: foo.Username,\n\t\t\tPassword: foo.Password,\n\t\t\tDescription: pulumi.String(\"foo token\"),\n\t\t\tTtl: pulumi.Int(0),\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\tfoo_login,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.rancher2.User;\nimport com.pulumi.rancher2.UserArgs;\nimport com.pulumi.rancher2.GlobalRoleBinding;\nimport com.pulumi.rancher2.GlobalRoleBindingArgs;\nimport com.pulumi.rancher2.CustomUserToken;\nimport com.pulumi.rancher2.CustomUserTokenArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n // Create a rancher2 Token\n var foo = new User(\"foo\", UserArgs.builder()\n .name(\"foo\")\n .username(\"foo\")\n .password(\"changeme\")\n .enabled(true)\n .build());\n\n var foo_login = new GlobalRoleBinding(\"foo-login\", GlobalRoleBindingArgs.builder()\n .name(\"foo-login-binding\")\n .globalRoleId(\"user-base\")\n .userId(foo.id())\n .build());\n\n var fooCustomUserToken = new CustomUserToken(\"fooCustomUserToken\", CustomUserTokenArgs.builder()\n .username(foo.username())\n .password(foo.password())\n .description(\"foo token\")\n .ttl(0)\n .build(), CustomResourceOptions.builder()\n .dependsOn(foo_login)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n # Create a rancher2 Token\n foo:\n type: rancher2:User\n properties:\n name: foo\n username: foo\n password: changeme\n enabled: true\n foo-login:\n type: rancher2:GlobalRoleBinding\n properties:\n name: foo-login-binding\n globalRoleId: user-base\n userId: ${foo.id}\n fooCustomUserToken:\n type: rancher2:CustomUserToken\n name: foo\n properties:\n username: ${foo.username}\n password: ${foo.password}\n description: foo token\n ttl: 0\n options:\n dependson:\n - ${[\"foo-login\"]}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Provides a Rancher v2 Token resource, specifically to create tokens for custom users (i.e. not the 'admin' user configured with the provider config). Custom user tokens can f.e. be used as service account tokens with the Rancher v2 API having limited permissions. To create a custom user token the username/password for the Rancher User must be known.\n\nThere are 2 kind of tokens:\n- not scoped: valid for global system.\n- scoped: valid for just a specific cluster (`cluster_id` should be provided).\n\nTokens can only be created for a Rancher User with at least the `user-base` global role binding in order to enable user login.\n\nTokens can't be updated once created. Any diff in token data will recreate the token. If any token expire, Rancher2 provider will generate a diff to regenerate it.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as rancher2 from \"@pulumi/rancher2\";\n\n// Create a rancher2 Token\nconst foo = new rancher2.User(\"foo\", {\n name: \"foo\",\n username: \"foo\",\n password: \"changeme\",\n enabled: true,\n});\nconst foo_login = new rancher2.GlobalRoleBinding(\"foo-login\", {\n name: \"foo-login-binding\",\n globalRoleId: \"user-base\",\n userId: foo.id,\n});\nconst fooCustomUserToken = new rancher2.CustomUserToken(\"foo\", {\n username: foo.username,\n password: foo.password,\n description: \"foo token\",\n ttl: 0,\n}, {\n dependsOn: [foo_login],\n});\n```\n```python\nimport pulumi\nimport pulumi_rancher2 as rancher2\n\n# Create a rancher2 Token\nfoo = rancher2.User(\"foo\",\n name=\"foo\",\n username=\"foo\",\n password=\"changeme\",\n enabled=True)\nfoo_login = rancher2.GlobalRoleBinding(\"foo-login\",\n name=\"foo-login-binding\",\n global_role_id=\"user-base\",\n user_id=foo.id)\nfoo_custom_user_token = rancher2.CustomUserToken(\"foo\",\n username=foo.username,\n password=foo.password,\n description=\"foo token\",\n ttl=0,\n opts = pulumi.ResourceOptions(depends_on=[foo_login]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Rancher2 = Pulumi.Rancher2;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n // Create a rancher2 Token\n var foo = new Rancher2.User(\"foo\", new()\n {\n Name = \"foo\",\n Username = \"foo\",\n Password = \"changeme\",\n Enabled = true,\n });\n\n var foo_login = new Rancher2.GlobalRoleBinding(\"foo-login\", new()\n {\n Name = \"foo-login-binding\",\n GlobalRoleId = \"user-base\",\n UserId = foo.Id,\n });\n\n var fooCustomUserToken = new Rancher2.CustomUserToken(\"foo\", new()\n {\n Username = foo.Username,\n Password = foo.Password,\n Description = \"foo token\",\n Ttl = 0,\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n foo_login,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-rancher2/sdk/v6/go/rancher2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t// Create a rancher2 Token\n\t\tfoo, err := rancher2.NewUser(ctx, \"foo\", \u0026rancher2.UserArgs{\n\t\t\tName: pulumi.String(\"foo\"),\n\t\t\tUsername: pulumi.String(\"foo\"),\n\t\t\tPassword: pulumi.String(\"changeme\"),\n\t\t\tEnabled: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = rancher2.NewGlobalRoleBinding(ctx, \"foo-login\", \u0026rancher2.GlobalRoleBindingArgs{\n\t\t\tName: pulumi.String(\"foo-login-binding\"),\n\t\t\tGlobalRoleId: pulumi.String(\"user-base\"),\n\t\t\tUserId: foo.ID(),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = rancher2.NewCustomUserToken(ctx, \"foo\", \u0026rancher2.CustomUserTokenArgs{\n\t\t\tUsername: foo.Username,\n\t\t\tPassword: foo.Password,\n\t\t\tDescription: pulumi.String(\"foo token\"),\n\t\t\tTtl: pulumi.Int(0),\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\tfoo_login,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.rancher2.User;\nimport com.pulumi.rancher2.UserArgs;\nimport com.pulumi.rancher2.GlobalRoleBinding;\nimport com.pulumi.rancher2.GlobalRoleBindingArgs;\nimport com.pulumi.rancher2.CustomUserToken;\nimport com.pulumi.rancher2.CustomUserTokenArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n // Create a rancher2 Token\n var foo = new User(\"foo\", UserArgs.builder()\n .name(\"foo\")\n .username(\"foo\")\n .password(\"changeme\")\n .enabled(true)\n .build());\n\n var foo_login = new GlobalRoleBinding(\"foo-login\", GlobalRoleBindingArgs.builder()\n .name(\"foo-login-binding\")\n .globalRoleId(\"user-base\")\n .userId(foo.id())\n .build());\n\n var fooCustomUserToken = new CustomUserToken(\"fooCustomUserToken\", CustomUserTokenArgs.builder()\n .username(foo.username())\n .password(foo.password())\n .description(\"foo token\")\n .ttl(0)\n .build(), CustomResourceOptions.builder()\n .dependsOn(foo_login)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n # Create a rancher2 Token\n foo:\n type: rancher2:User\n properties:\n name: foo\n username: foo\n password: changeme\n enabled: true\n foo-login:\n type: rancher2:GlobalRoleBinding\n properties:\n name: foo-login-binding\n globalRoleId: user-base\n userId: ${foo.id}\n fooCustomUserToken:\n type: rancher2:CustomUserToken\n name: foo\n properties:\n username: ${foo.username}\n password: ${foo.password}\n description: foo token\n ttl: 0\n options:\n dependson:\n - ${[\"foo-login\"]}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "properties": { "accessKey": { "type": "string", diff --git a/provider/go.mod b/provider/go.mod index 93feb2602..736013ce9 100644 --- a/provider/go.mod +++ b/provider/go.mod @@ -57,8 +57,8 @@ replace ( require ( github.com/hashicorp/terraform-plugin-sdk v1.17.2 - github.com/pulumi/pulumi-terraform-bridge/v3 v3.84.0 - github.com/pulumi/pulumi/sdk/v3 v3.118.0 + github.com/pulumi/pulumi-terraform-bridge/v3 v3.85.0 + github.com/pulumi/pulumi/sdk/v3 v3.121.0 github.com/rancher/terraform-provider-rancher2 v1.25.1-0.20240306215549-383a664a3660 ) @@ -114,7 +114,7 @@ require ( github.com/cenkalti/backoff/v3 v3.2.2 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/charmbracelet/bubbles v0.16.1 // indirect - github.com/charmbracelet/bubbletea v0.24.2 // indirect + github.com/charmbracelet/bubbletea v0.25.0 // indirect github.com/charmbracelet/lipgloss v0.7.1 // indirect github.com/cheggaaa/pb v1.0.29 // indirect github.com/cloudflare/circl v1.3.7 // indirect @@ -131,7 +131,6 @@ require ( github.com/fatih/color v1.16.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/gedex/inflector v0.0.0-20170307190818-16278e9db813 // indirect github.com/ghodss/yaml v1.0.0 // indirect github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect github.com/go-git/go-billy/v5 v5.5.0 // indirect @@ -246,11 +245,12 @@ require ( github.com/prometheus/common v0.39.0 // indirect github.com/prometheus/procfs v0.8.0 // indirect github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 // indirect - github.com/pulumi/esc v0.6.2 // indirect + github.com/pulumi/esc v0.9.1 // indirect + github.com/pulumi/inflector v0.1.1 // indirect github.com/pulumi/pulumi-java/pkg v0.11.0 // indirect github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.8 // indirect - github.com/pulumi/pulumi-yaml v1.7.0 // indirect - github.com/pulumi/pulumi/pkg/v3 v3.118.0 // indirect + github.com/pulumi/pulumi-yaml v1.8.0 // indirect + github.com/pulumi/pulumi/pkg/v3 v3.121.0 // indirect github.com/pulumi/schema-tools v0.1.2 // indirect github.com/pulumi/terraform-diff-reader v0.0.2 // indirect github.com/rancher/aks-operator v1.2.0-rc2 // indirect @@ -306,8 +306,8 @@ require ( gocloud.dev v0.37.0 // indirect gocloud.dev/secrets/hashivault v0.37.0 // indirect golang.org/x/crypto v0.24.0 // indirect - golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect - golang.org/x/mod v0.17.0 // indirect + golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8 // indirect + golang.org/x/mod v0.18.0 // indirect golang.org/x/net v0.26.0 // indirect golang.org/x/oauth2 v0.18.0 // indirect golang.org/x/sync v0.7.0 // indirect @@ -315,7 +315,7 @@ require ( golang.org/x/term v0.21.0 // indirect golang.org/x/text v0.16.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect + golang.org/x/tools v0.22.0 // indirect golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect google.golang.org/api v0.169.0 // indirect diff --git a/provider/go.sum b/provider/go.sum index bf066b337..87697cbc5 100644 --- a/provider/go.sum +++ b/provider/go.sum @@ -1348,8 +1348,8 @@ github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL github.com/chai2010/gettext-go v1.0.2/go.mod h1:y+wnP2cHYaVj19NZhYKAwEMH2CI1gNHeQQ+5AjwawxA= github.com/charmbracelet/bubbles v0.16.1 h1:6uzpAAaT9ZqKssntbvZMlksWHruQLNxg49H5WdeuYSY= github.com/charmbracelet/bubbles v0.16.1/go.mod h1:2QCp9LFlEsBQMvIYERr7Ww2H2bA7xen1idUDIzm/+Xc= -github.com/charmbracelet/bubbletea v0.24.2 h1:uaQIKx9Ai6Gdh5zpTbGiWpytMU+CfsPp06RaW2cx/SY= -github.com/charmbracelet/bubbletea v0.24.2/go.mod h1:XdrNrV4J8GiyshTtx3DNuYkR1FDaJmO3l2nejekbsgg= +github.com/charmbracelet/bubbletea v0.25.0 h1:bAfwk7jRz7FKFl9RzlIULPkStffg5k6pNt5dywy4TcM= +github.com/charmbracelet/bubbletea v0.25.0/go.mod h1:EN3QDR1T5ZdWmdfDzYcqOCAps45+QIJbLOBxmVNWNNg= github.com/charmbracelet/lipgloss v0.7.1 h1:17WMwi7N1b1rVWOjMT+rCh7sQkvDU75B2hbZpc5Kc1E= github.com/charmbracelet/lipgloss v0.7.1/go.mod h1:yG0k3giv8Qj8edTCbbg6AlQ5e8KNWpFujkNawKNhE2c= github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= @@ -1478,8 +1478,6 @@ github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4 github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/fvbommel/sortorder v1.0.1/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0= -github.com/gedex/inflector v0.0.0-20170307190818-16278e9db813 h1:Uc+IZ7gYqAf/rSGFplbWBSHaGolEQlNLgMgSE3ccnIQ= -github.com/gedex/inflector v0.0.0-20170307190818-16278e9db813/go.mod h1:P+oSoE9yhSRvsmYyZsshflcR6ePWYLql6UU1amW13IM= github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= @@ -2256,22 +2254,24 @@ github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0ua github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 h1:vkHw5I/plNdTr435cARxCW6q9gc0S/Yxz7Mkd38pOb0= github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231/go.mod h1:murToZ2N9hNJzewjHBgfFdXhZKjY3z5cYC1VXk+lbFE= -github.com/pulumi/esc v0.6.2 h1:+z+l8cuwIauLSwXQS0uoI3rqB+YG4SzsZYtHfNoXBvw= -github.com/pulumi/esc v0.6.2/go.mod h1:jNnYNjzsOgVTjCp0LL24NsCk8ZJxq4IoLQdCT0X7l8k= +github.com/pulumi/esc v0.9.1 h1:HH5eEv8sgyxSpY5a8yePyqFXzA8cvBvapfH8457+mIs= +github.com/pulumi/esc v0.9.1/go.mod h1:oEJ6bOsjYlQUpjf70GiX+CXn3VBmpwFDxUTlmtUN84c= +github.com/pulumi/inflector v0.1.1 h1:dvlxlWtXwOJTUUtcYDvwnl6Mpg33prhK+7mzeF+SobA= +github.com/pulumi/inflector v0.1.1/go.mod h1:HUFCjcPTz96YtTuUlwG3i3EZG4WlniBvR9bd+iJxCUY= github.com/pulumi/providertest v0.0.11 h1:mg8MQ7Cq7+9XlHIkBD+aCqQO4mwAJEISngZgVdnQUe8= github.com/pulumi/providertest v0.0.11/go.mod h1:HsxjVsytcMIuNj19w1lT2W0QXY0oReXl1+h6eD2JXP8= github.com/pulumi/pulumi-java/pkg v0.11.0 h1:Jw9gBvyfmfOMq/EkYDm9+zGPxsDAA8jfeMpHmtZ+1oA= github.com/pulumi/pulumi-java/pkg v0.11.0/go.mod h1:sXAk25P47AQVQL6ilAbFmRNgZykC7og/+87ihnqzFTc= -github.com/pulumi/pulumi-terraform-bridge/v3 v3.84.0 h1:WgRvBOGMkuUE6XLq0wzp27RkWuucrKLRPVB/5+7tBwU= -github.com/pulumi/pulumi-terraform-bridge/v3 v3.84.0/go.mod h1:ju1Cn9qmqkStWP0Hyfzt3NOm+PnaiWnodXGx3TYaGyU= +github.com/pulumi/pulumi-terraform-bridge/v3 v3.85.0 h1:Zv6OPQdkGERufe2Mq9D92xbTm5mg3uhllh0ryrcrrds= +github.com/pulumi/pulumi-terraform-bridge/v3 v3.85.0/go.mod h1:a7t2qe4smtB7HlbHlelQxjJQn8DFNB3Gbe5Ot2W7GZU= github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.8 h1:mav2tSitA9BPJPLLahKgepHyYsMzwaTm4cvp0dcTMYw= github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.8/go.mod h1:qUYk2c9i/yqMGNj9/bQyXpS39BxNDSXYjVN1njnq0zY= -github.com/pulumi/pulumi-yaml v1.7.0 h1:SbFSaqkH8UiMEy0ZSH9sHLQlmV8so0iCLfvLbPtVP7s= -github.com/pulumi/pulumi-yaml v1.7.0/go.mod h1:pCfYHSRmdl+5dM/7eT2uDQS528YOhAhiqbn9pwRzW20= -github.com/pulumi/pulumi/pkg/v3 v3.118.0 h1:i2OJe0Rl6BDxupJ0ix9HczAGKUsc6H6cU9svwDe1TYk= -github.com/pulumi/pulumi/pkg/v3 v3.118.0/go.mod h1:fbDHFdEJtFRkHu3Q6Sd7X3PalUsIXLbHT/pHfsbldlo= -github.com/pulumi/pulumi/sdk/v3 v3.118.0 h1:NboaaB4cNuehzsax38PO1jZOS6Mzbx/jNaDNaHPmg4c= -github.com/pulumi/pulumi/sdk/v3 v3.118.0/go.mod h1:kNea72+FQk82OjZ3yEP4dl6nbAl2ngE8PDBc0iFAaHg= +github.com/pulumi/pulumi-yaml v1.8.0 h1:bhmidiCMMuzsJao5FE0UR69iF3WVKPCFrRkzjotFNn4= +github.com/pulumi/pulumi-yaml v1.8.0/go.mod h1:pCfYHSRmdl+5dM/7eT2uDQS528YOhAhiqbn9pwRzW20= +github.com/pulumi/pulumi/pkg/v3 v3.121.0 h1:cLUQJYGJKfgCY0ubJo8dVwmsIm2WcgTprb9Orc/yiFg= +github.com/pulumi/pulumi/pkg/v3 v3.121.0/go.mod h1:aaRixfKOh4DhGtuDJcI56dTPkb7oJBgRgH1aMF1FzbU= +github.com/pulumi/pulumi/sdk/v3 v3.121.0 h1:UsnFKIVOtJN/hQKPkWHL9cZktewPVQRbNUXbXQY/qrk= +github.com/pulumi/pulumi/sdk/v3 v3.121.0/go.mod h1:p1U24en3zt51agx+WlNboSOV8eLlPWYAkxMzVEXKbnY= github.com/pulumi/schema-tools v0.1.2 h1:Fd9xvUjgck4NA+7/jSk7InqCUT4Kj940+EcnbQKpfZo= github.com/pulumi/schema-tools v0.1.2/go.mod h1:62lgj52Tzq11eqWTIaKd+EVyYAu5dEcDJxMhTjvMO/k= github.com/pulumi/terraform-diff-reader v0.0.2 h1:kTE4nEXU3/SYXESvAIem+wyHMI3abqkI3OhJ0G04LLI= @@ -2622,8 +2622,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20220827204233-334a2380cb91/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= -golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= +golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8 h1:LoYXNGAShUG3m/ehNk4iFctuhGX/+R1ZpfJ4/ia80JM= +golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8/go.mod h1:jj3sYF3dwk5D+ghuXyeI3r5MFf+NT2An6/9dOA95KSI= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= @@ -2673,8 +2673,8 @@ golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= -golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= +golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180112015858-5ccada7d0a7b/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180530234432-1e491301e022/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -3100,8 +3100,8 @@ golang.org/x/tools v0.9.3/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= golang.org/x/tools v0.10.0/go.mod h1:UJwyiVBsOA2uwvK/e5OY3GTpDUJriEd+/YlqAwLPmyM= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= +golang.org/x/tools v0.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA= +golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/sdk/go.mod b/sdk/go.mod index 8d561414b..26cf93d72 100644 --- a/sdk/go.mod +++ b/sdk/go.mod @@ -4,11 +4,12 @@ go 1.21 require ( github.com/blang/semver v3.5.1+incompatible - github.com/pulumi/pulumi/sdk/v3 v3.118.0 + github.com/pulumi/pulumi/sdk/v3 v3.121.0 ) require ( dario.cat/mergo v1.0.0 // indirect + github.com/BurntSushi/toml v1.2.1 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/ProtonMail/go-crypto v1.0.0 // indirect github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da // indirect @@ -17,7 +18,7 @@ require ( github.com/atotto/clipboard v0.1.4 // indirect github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/charmbracelet/bubbles v0.16.1 // indirect - github.com/charmbracelet/bubbletea v0.24.2 // indirect + github.com/charmbracelet/bubbletea v0.25.0 // indirect github.com/charmbracelet/lipgloss v0.7.1 // indirect github.com/cheggaaa/pb v1.0.29 // indirect github.com/cloudflare/circl v1.3.7 // indirect @@ -56,7 +57,7 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/pkg/term v1.1.0 // indirect github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 // indirect - github.com/pulumi/esc v0.6.2 // indirect + github.com/pulumi/esc v0.9.1 // indirect github.com/rivo/uniseg v0.4.4 // indirect github.com/rogpeppe/go-internal v1.11.0 // indirect github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 // indirect @@ -73,15 +74,15 @@ require ( github.com/xanzy/ssh-agent v0.3.3 // indirect github.com/zclconf/go-cty v1.13.2 // indirect go.uber.org/atomic v1.9.0 // indirect - golang.org/x/crypto v0.23.0 // indirect - golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect - golang.org/x/mod v0.14.0 // indirect - golang.org/x/net v0.25.0 // indirect - golang.org/x/sync v0.6.0 // indirect - golang.org/x/sys v0.20.0 // indirect - golang.org/x/term v0.20.0 // indirect - golang.org/x/text v0.15.0 // indirect - golang.org/x/tools v0.15.0 // indirect + golang.org/x/crypto v0.24.0 // indirect + golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8 // indirect + golang.org/x/mod v0.18.0 // indirect + golang.org/x/net v0.26.0 // indirect + golang.org/x/sync v0.7.0 // indirect + golang.org/x/sys v0.21.0 // indirect + golang.org/x/term v0.21.0 // indirect + golang.org/x/text v0.16.0 // indirect + golang.org/x/tools v0.22.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect google.golang.org/grpc v1.63.2 // indirect google.golang.org/protobuf v1.33.0 // indirect diff --git a/sdk/go.sum b/sdk/go.sum index eee4f15a0..cad6cb9a8 100644 --- a/sdk/go.sum +++ b/sdk/go.sum @@ -1,5 +1,7 @@ dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= +github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak= +github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= @@ -26,8 +28,8 @@ github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnweb github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/charmbracelet/bubbles v0.16.1 h1:6uzpAAaT9ZqKssntbvZMlksWHruQLNxg49H5WdeuYSY= github.com/charmbracelet/bubbles v0.16.1/go.mod h1:2QCp9LFlEsBQMvIYERr7Ww2H2bA7xen1idUDIzm/+Xc= -github.com/charmbracelet/bubbletea v0.24.2 h1:uaQIKx9Ai6Gdh5zpTbGiWpytMU+CfsPp06RaW2cx/SY= -github.com/charmbracelet/bubbletea v0.24.2/go.mod h1:XdrNrV4J8GiyshTtx3DNuYkR1FDaJmO3l2nejekbsgg= +github.com/charmbracelet/bubbletea v0.25.0 h1:bAfwk7jRz7FKFl9RzlIULPkStffg5k6pNt5dywy4TcM= +github.com/charmbracelet/bubbletea v0.25.0/go.mod h1:EN3QDR1T5ZdWmdfDzYcqOCAps45+QIJbLOBxmVNWNNg= github.com/charmbracelet/lipgloss v0.7.1 h1:17WMwi7N1b1rVWOjMT+rCh7sQkvDU75B2hbZpc5Kc1E= github.com/charmbracelet/lipgloss v0.7.1/go.mod h1:yG0k3giv8Qj8edTCbbg6AlQ5e8KNWpFujkNawKNhE2c= github.com/cheggaaa/pb v1.0.29 h1:FckUN5ngEk2LpvuG0fw1GEFx6LtyY2pWI/Z2QgCnEYo= @@ -146,10 +148,10 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 h1:vkHw5I/plNdTr435cARxCW6q9gc0S/Yxz7Mkd38pOb0= github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231/go.mod h1:murToZ2N9hNJzewjHBgfFdXhZKjY3z5cYC1VXk+lbFE= -github.com/pulumi/esc v0.6.2 h1:+z+l8cuwIauLSwXQS0uoI3rqB+YG4SzsZYtHfNoXBvw= -github.com/pulumi/esc v0.6.2/go.mod h1:jNnYNjzsOgVTjCp0LL24NsCk8ZJxq4IoLQdCT0X7l8k= -github.com/pulumi/pulumi/sdk/v3 v3.118.0 h1:NboaaB4cNuehzsax38PO1jZOS6Mzbx/jNaDNaHPmg4c= -github.com/pulumi/pulumi/sdk/v3 v3.118.0/go.mod h1:kNea72+FQk82OjZ3yEP4dl6nbAl2ngE8PDBc0iFAaHg= +github.com/pulumi/esc v0.9.1 h1:HH5eEv8sgyxSpY5a8yePyqFXzA8cvBvapfH8457+mIs= +github.com/pulumi/esc v0.9.1/go.mod h1:oEJ6bOsjYlQUpjf70GiX+CXn3VBmpwFDxUTlmtUN84c= +github.com/pulumi/pulumi/sdk/v3 v3.121.0 h1:UsnFKIVOtJN/hQKPkWHL9cZktewPVQRbNUXbXQY/qrk= +github.com/pulumi/pulumi/sdk/v3 v3.121.0/go.mod h1:p1U24en3zt51agx+WlNboSOV8eLlPWYAkxMzVEXKbnY= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= @@ -205,18 +207,18 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= -golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= -golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= -golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= +golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= +golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= +golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8 h1:LoYXNGAShUG3m/ehNk4iFctuhGX/+R1ZpfJ4/ia80JM= +golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8/go.mod h1:jj3sYF3dwk5D+ghuXyeI3r5MFf+NT2An6/9dOA95KSI= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= -golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= +golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -228,15 +230,15 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= -golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= +golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= +golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= -golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -257,15 +259,15 @@ golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= -golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= +golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.20.0 h1:VnkxpohqXaOBYJtBmEppKUG6mXpi+4O6purfc2+sMhw= -golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= +golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA= +golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -273,8 +275,8 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= -golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -283,8 +285,8 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.15.0 h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8= -golang.org/x/tools v0.15.0/go.mod h1:hpksKq4dtpQWS1uQ61JkdqWM3LscIS6Slf+VVkm+wQk= +golang.org/x/tools v0.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA= +golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= From 5f9409b8557524e770daf7e020dc95661e29b253 Mon Sep 17 00:00:00 2001 From: pulumi-bot Date: Mon, 24 Jun 2024 20:09:40 +0000 Subject: [PATCH 2/2] make build_sdks --- sdk/python/pulumi_rancher2/_inputs.py | 48 ++++------------ sdk/python/pulumi_rancher2/_utilities.py | 35 ++++++++++++ sdk/python/pulumi_rancher2/cluster.py | 8 +-- .../pulumi_rancher2/custom_user_token.py | 4 +- sdk/python/pulumi_rancher2/outputs.py | 56 +++++-------------- sdk/python/pulumi_rancher2/provider.py | 4 +- 6 files changed, 66 insertions(+), 89 deletions(-) diff --git a/sdk/python/pulumi_rancher2/_inputs.py b/sdk/python/pulumi_rancher2/_inputs.py index 806502235..10aef33f0 100644 --- a/sdk/python/pulumi_rancher2/_inputs.py +++ b/sdk/python/pulumi_rancher2/_inputs.py @@ -1426,13 +1426,11 @@ def service_cidr(self, value: Optional[pulumi.Input[str]]): @property @pulumi.getter + @_utilities.deprecated("""Use tags argument instead as []string""") def tag(self) -> Optional[pulumi.Input[Mapping[str, Any]]]: """ Tags for Kubernetes cluster. For example, foo=bar """ - warnings.warn("""Use tags argument instead as []string""", DeprecationWarning) - pulumi.log.warn("""tag is deprecated: Use tags argument instead as []string""") - return pulumi.get(self, "tag") @tag.setter @@ -19214,13 +19212,11 @@ def etcd_snapshot_restore(self, value: Optional[pulumi.Input['ClusterV2RkeConfig @property @pulumi.getter(name="localAuthEndpoint") + @_utilities.deprecated("""Use rancher2_cluster_v2.local_auth_endpoint instead""") def local_auth_endpoint(self) -> Optional[pulumi.Input['ClusterV2RkeConfigLocalAuthEndpointArgs']]: """ Local auth endpoint configures the Authorized Cluster Endpoint (ACE) which can be used to directly access the Kubernetes API server, without requiring communication through Rancher. For more information, please refer to [Rancher Documentation](https://ranchermanager.docs.rancher.com/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/register-existing-clusters#authorized-cluster-endpoint-support-for-rke2-and-k3s-clusters). """ - warnings.warn("""Use rancher2_cluster_v2.local_auth_endpoint instead""", DeprecationWarning) - pulumi.log.warn("""local_auth_endpoint is deprecated: Use rancher2_cluster_v2.local_auth_endpoint instead""") - return pulumi.get(self, "local_auth_endpoint") @local_auth_endpoint.setter @@ -23100,13 +23096,11 @@ def cpu_count(self, value: Optional[pulumi.Input[str]]): @property @pulumi.getter(name="diskBus") + @_utilities.deprecated("""Use disk_info instead""") def disk_bus(self) -> Optional[pulumi.Input[str]]: """ Disk bus """ - warnings.warn("""Use disk_info instead""", DeprecationWarning) - pulumi.log.warn("""disk_bus is deprecated: Use disk_info instead""") - return pulumi.get(self, "disk_bus") @disk_bus.setter @@ -23127,13 +23121,11 @@ def disk_info(self, value: Optional[pulumi.Input[str]]): @property @pulumi.getter(name="diskSize") + @_utilities.deprecated("""Use disk_info instead""") def disk_size(self) -> Optional[pulumi.Input[str]]: """ Disk size (in GiB) """ - warnings.warn("""Use disk_info instead""", DeprecationWarning) - pulumi.log.warn("""disk_size is deprecated: Use disk_info instead""") - return pulumi.get(self, "disk_size") @disk_size.setter @@ -23142,13 +23134,11 @@ def disk_size(self, value: Optional[pulumi.Input[str]]): @property @pulumi.getter(name="imageName") + @_utilities.deprecated("""Use disk_info instead""") def image_name(self) -> Optional[pulumi.Input[str]]: """ Image name """ - warnings.warn("""Use disk_info instead""", DeprecationWarning) - pulumi.log.warn("""image_name is deprecated: Use disk_info instead""") - return pulumi.get(self, "image_name") @image_name.setter @@ -23193,13 +23183,11 @@ def network_info(self, value: Optional[pulumi.Input[str]]): @property @pulumi.getter(name="networkModel") + @_utilities.deprecated("""Use network_info instead""") def network_model(self) -> Optional[pulumi.Input[str]]: """ Network model """ - warnings.warn("""Use network_info instead""", DeprecationWarning) - pulumi.log.warn("""network_model is deprecated: Use network_info instead""") - return pulumi.get(self, "network_model") @network_model.setter @@ -23208,13 +23196,11 @@ def network_model(self, value: Optional[pulumi.Input[str]]): @property @pulumi.getter(name="networkName") + @_utilities.deprecated("""Use network_info instead""") def network_name(self) -> Optional[pulumi.Input[str]]: """ Network name """ - warnings.warn("""Use network_info instead""", DeprecationWarning) - pulumi.log.warn("""network_name is deprecated: Use network_info instead""") - return pulumi.get(self, "network_name") @network_name.setter @@ -26481,13 +26467,11 @@ def cpu_count(self, value: Optional[pulumi.Input[str]]): @property @pulumi.getter(name="diskBus") + @_utilities.deprecated("""Use disk_info instead""") def disk_bus(self) -> Optional[pulumi.Input[str]]: """ Disk bus """ - warnings.warn("""Use disk_info instead""", DeprecationWarning) - pulumi.log.warn("""disk_bus is deprecated: Use disk_info instead""") - return pulumi.get(self, "disk_bus") @disk_bus.setter @@ -26508,13 +26492,11 @@ def disk_info(self, value: Optional[pulumi.Input[str]]): @property @pulumi.getter(name="diskSize") + @_utilities.deprecated("""Use disk_info instead""") def disk_size(self) -> Optional[pulumi.Input[str]]: """ Disk size (in GiB) """ - warnings.warn("""Use disk_info instead""", DeprecationWarning) - pulumi.log.warn("""disk_size is deprecated: Use disk_info instead""") - return pulumi.get(self, "disk_size") @disk_size.setter @@ -26523,13 +26505,11 @@ def disk_size(self, value: Optional[pulumi.Input[str]]): @property @pulumi.getter(name="imageName") + @_utilities.deprecated("""Use disk_info instead""") def image_name(self) -> Optional[pulumi.Input[str]]: """ Image name """ - warnings.warn("""Use disk_info instead""", DeprecationWarning) - pulumi.log.warn("""image_name is deprecated: Use disk_info instead""") - return pulumi.get(self, "image_name") @image_name.setter @@ -26574,13 +26554,11 @@ def network_info(self, value: Optional[pulumi.Input[str]]): @property @pulumi.getter(name="networkModel") + @_utilities.deprecated("""Use network_info instead""") def network_model(self) -> Optional[pulumi.Input[str]]: """ Network model """ - warnings.warn("""Use network_info instead""", DeprecationWarning) - pulumi.log.warn("""network_model is deprecated: Use network_info instead""") - return pulumi.get(self, "network_model") @network_model.setter @@ -26589,13 +26567,11 @@ def network_model(self, value: Optional[pulumi.Input[str]]): @property @pulumi.getter(name="networkName") + @_utilities.deprecated("""Use network_info instead""") def network_name(self) -> Optional[pulumi.Input[str]]: """ Network name """ - warnings.warn("""Use network_info instead""", DeprecationWarning) - pulumi.log.warn("""network_name is deprecated: Use network_info instead""") - return pulumi.get(self, "network_name") @network_name.setter diff --git a/sdk/python/pulumi_rancher2/_utilities.py b/sdk/python/pulumi_rancher2/_utilities.py index e3b8564dc..abad7b419 100644 --- a/sdk/python/pulumi_rancher2/_utilities.py +++ b/sdk/python/pulumi_rancher2/_utilities.py @@ -4,6 +4,7 @@ import asyncio +import functools import importlib.metadata import importlib.util import inspect @@ -11,6 +12,7 @@ import os import sys import typing +import warnings import pulumi import pulumi.runtime @@ -19,6 +21,8 @@ from semver import VersionInfo as SemverVersion from parver import Version as PEP440Version +C = typing.TypeVar("C", bound=typing.Callable) + def get_env(*args): for v in args: @@ -287,5 +291,36 @@ async def _await_output(o: pulumi.Output[typing.Any]) -> typing.Tuple[object, bo await o._resources, ) + +# This is included to provide an upgrade path for users who are using a version +# of the Pulumi SDK (<3.121.0) that does not include the `deprecated` decorator. +def deprecated(message: str) -> typing.Callable[[C], C]: + """ + Decorator to indicate a function is deprecated. + + As well as inserting appropriate statements to indicate that the function is + deprecated, this decorator also tags the function with a special attribute + so that Pulumi code can detect that it is deprecated and react appropriately + in certain situations. + + message is the deprecation message that should be printed if the function is called. + """ + + def decorator(fn: C) -> C: + if not callable(fn): + raise TypeError("Expected fn to be callable") + + @functools.wraps(fn) + def deprecated_fn(*args, **kwargs): + warnings.warn(message) + pulumi.warn(f"{fn.__name__} is deprecated: {message}") + + return fn(*args, **kwargs) + + deprecated_fn.__dict__["_pulumi_deprecated_callable"] = fn + return typing.cast(C, deprecated_fn) + + return decorator + def get_plugin_download_url(): return None diff --git a/sdk/python/pulumi_rancher2/cluster.py b/sdk/python/pulumi_rancher2/cluster.py index 4b0d89f5c..9d7e91c70 100644 --- a/sdk/python/pulumi_rancher2/cluster.py +++ b/sdk/python/pulumi_rancher2/cluster.py @@ -1029,13 +1029,11 @@ def enable_cluster_alerting(self, value: Optional[pulumi.Input[bool]]): @property @pulumi.getter(name="enableClusterIstio") + @_utilities.deprecated("""Deploy istio using App resource instead""") def enable_cluster_istio(self) -> Optional[pulumi.Input[bool]]: """ Deploy istio on `system` project and `istio-system` namespace, using App resource instead. See above example. """ - warnings.warn("""Deploy istio using App resource instead""", DeprecationWarning) - pulumi.log.warn("""enable_cluster_istio is deprecated: Deploy istio using App resource instead""") - return pulumi.get(self, "enable_cluster_istio") @enable_cluster_istio.setter @@ -2862,13 +2860,11 @@ def enable_cluster_alerting(self) -> pulumi.Output[bool]: @property @pulumi.getter(name="enableClusterIstio") + @_utilities.deprecated("""Deploy istio using App resource instead""") def enable_cluster_istio(self) -> pulumi.Output[bool]: """ Deploy istio on `system` project and `istio-system` namespace, using App resource instead. See above example. """ - warnings.warn("""Deploy istio using App resource instead""", DeprecationWarning) - pulumi.log.warn("""enable_cluster_istio is deprecated: Deploy istio using App resource instead""") - return pulumi.get(self, "enable_cluster_istio") @property diff --git a/sdk/python/pulumi_rancher2/custom_user_token.py b/sdk/python/pulumi_rancher2/custom_user_token.py index 9f2e72749..d8c5012bc 100644 --- a/sdk/python/pulumi_rancher2/custom_user_token.py +++ b/sdk/python/pulumi_rancher2/custom_user_token.py @@ -479,7 +479,7 @@ def __init__(__self__, password=foo.password, description="foo token", ttl=0, - opts=pulumi.ResourceOptions(depends_on=[foo_login])) + opts = pulumi.ResourceOptions(depends_on=[foo_login])) ``` :param str resource_name: The name of the resource. @@ -533,7 +533,7 @@ def __init__(__self__, password=foo.password, description="foo token", ttl=0, - opts=pulumi.ResourceOptions(depends_on=[foo_login])) + opts = pulumi.ResourceOptions(depends_on=[foo_login])) ``` :param str resource_name: The name of the resource. diff --git a/sdk/python/pulumi_rancher2/outputs.py b/sdk/python/pulumi_rancher2/outputs.py index e605b7a51..cccd6b0bf 100644 --- a/sdk/python/pulumi_rancher2/outputs.py +++ b/sdk/python/pulumi_rancher2/outputs.py @@ -1617,13 +1617,11 @@ def service_cidr(self) -> Optional[str]: @property @pulumi.getter + @_utilities.deprecated("""Use tags argument instead as []string""") def tag(self) -> Optional[Mapping[str, Any]]: """ Tags for Kubernetes cluster. For example, foo=bar """ - warnings.warn("""Use tags argument instead as []string""", DeprecationWarning) - pulumi.log.warn("""tag is deprecated: Use tags argument instead as []string""") - return pulumi.get(self, "tag") @property @@ -18244,13 +18242,11 @@ def etcd_snapshot_restore(self) -> Optional['outputs.ClusterV2RkeConfigEtcdSnaps @property @pulumi.getter(name="localAuthEndpoint") + @_utilities.deprecated("""Use rancher2_cluster_v2.local_auth_endpoint instead""") def local_auth_endpoint(self) -> Optional['outputs.ClusterV2RkeConfigLocalAuthEndpoint']: """ Local auth endpoint configures the Authorized Cluster Endpoint (ACE) which can be used to directly access the Kubernetes API server, without requiring communication through Rancher. For more information, please refer to [Rancher Documentation](https://ranchermanager.docs.rancher.com/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/register-existing-clusters#authorized-cluster-endpoint-support-for-rke2-and-k3s-clusters). """ - warnings.warn("""Use rancher2_cluster_v2.local_auth_endpoint instead""", DeprecationWarning) - pulumi.log.warn("""local_auth_endpoint is deprecated: Use rancher2_cluster_v2.local_auth_endpoint instead""") - return pulumi.get(self, "local_auth_endpoint") @property @@ -21887,13 +21883,11 @@ def cpu_count(self) -> Optional[str]: @property @pulumi.getter(name="diskBus") + @_utilities.deprecated("""Use disk_info instead""") def disk_bus(self) -> Optional[str]: """ Disk bus """ - warnings.warn("""Use disk_info instead""", DeprecationWarning) - pulumi.log.warn("""disk_bus is deprecated: Use disk_info instead""") - return pulumi.get(self, "disk_bus") @property @@ -21906,24 +21900,20 @@ def disk_info(self) -> Optional[str]: @property @pulumi.getter(name="diskSize") + @_utilities.deprecated("""Use disk_info instead""") def disk_size(self) -> Optional[str]: """ Disk size (in GiB) """ - warnings.warn("""Use disk_info instead""", DeprecationWarning) - pulumi.log.warn("""disk_size is deprecated: Use disk_info instead""") - return pulumi.get(self, "disk_size") @property @pulumi.getter(name="imageName") + @_utilities.deprecated("""Use disk_info instead""") def image_name(self) -> Optional[str]: """ Image name """ - warnings.warn("""Use disk_info instead""", DeprecationWarning) - pulumi.log.warn("""image_name is deprecated: Use disk_info instead""") - return pulumi.get(self, "image_name") @property @@ -21952,24 +21942,20 @@ def network_info(self) -> Optional[str]: @property @pulumi.getter(name="networkModel") + @_utilities.deprecated("""Use network_info instead""") def network_model(self) -> Optional[str]: """ Network model """ - warnings.warn("""Use network_info instead""", DeprecationWarning) - pulumi.log.warn("""network_model is deprecated: Use network_info instead""") - return pulumi.get(self, "network_model") @property @pulumi.getter(name="networkName") + @_utilities.deprecated("""Use network_info instead""") def network_name(self) -> Optional[str]: """ Network name """ - warnings.warn("""Use network_info instead""", DeprecationWarning) - pulumi.log.warn("""network_name is deprecated: Use network_info instead""") - return pulumi.get(self, "network_name") @property @@ -24920,13 +24906,11 @@ def cpu_count(self) -> Optional[str]: @property @pulumi.getter(name="diskBus") + @_utilities.deprecated("""Use disk_info instead""") def disk_bus(self) -> Optional[str]: """ Disk bus """ - warnings.warn("""Use disk_info instead""", DeprecationWarning) - pulumi.log.warn("""disk_bus is deprecated: Use disk_info instead""") - return pulumi.get(self, "disk_bus") @property @@ -24939,24 +24923,20 @@ def disk_info(self) -> Optional[str]: @property @pulumi.getter(name="diskSize") + @_utilities.deprecated("""Use disk_info instead""") def disk_size(self) -> Optional[str]: """ Disk size (in GiB) """ - warnings.warn("""Use disk_info instead""", DeprecationWarning) - pulumi.log.warn("""disk_size is deprecated: Use disk_info instead""") - return pulumi.get(self, "disk_size") @property @pulumi.getter(name="imageName") + @_utilities.deprecated("""Use disk_info instead""") def image_name(self) -> Optional[str]: """ Image name """ - warnings.warn("""Use disk_info instead""", DeprecationWarning) - pulumi.log.warn("""image_name is deprecated: Use disk_info instead""") - return pulumi.get(self, "image_name") @property @@ -24985,24 +24965,20 @@ def network_info(self) -> Optional[str]: @property @pulumi.getter(name="networkModel") + @_utilities.deprecated("""Use network_info instead""") def network_model(self) -> Optional[str]: """ Network model """ - warnings.warn("""Use network_info instead""", DeprecationWarning) - pulumi.log.warn("""network_model is deprecated: Use network_info instead""") - return pulumi.get(self, "network_model") @property @pulumi.getter(name="networkName") + @_utilities.deprecated("""Use network_info instead""") def network_name(self) -> Optional[str]: """ Network name """ - warnings.warn("""Use network_info instead""", DeprecationWarning) - pulumi.log.warn("""network_name is deprecated: Use network_info instead""") - return pulumi.get(self, "network_name") @property @@ -28837,13 +28813,11 @@ def subscription_id(self) -> str: @property @pulumi.getter + @_utilities.deprecated("""Use tags argument instead as []string""") def tag(self) -> Mapping[str, Any]: """ Tags for Kubernetes cluster. For example, foo=bar """ - warnings.warn("""Use tags argument instead as []string""", DeprecationWarning) - pulumi.log.warn("""tag is deprecated: Use tags argument instead as []string""") - return pulumi.get(self, "tag") @property @@ -40667,13 +40641,11 @@ def etcd_snapshot_restore(self) -> Optional['outputs.GetClusterV2RkeConfigEtcdSn @property @pulumi.getter(name="localAuthEndpoint") + @_utilities.deprecated("""Use rancher2_cluster_v2.local_auth_endpoint instead""") def local_auth_endpoint(self) -> Optional['outputs.GetClusterV2RkeConfigLocalAuthEndpointResult']: """ Cluster V2 local auth endpoint """ - warnings.warn("""Use rancher2_cluster_v2.local_auth_endpoint instead""", DeprecationWarning) - pulumi.log.warn("""local_auth_endpoint is deprecated: Use rancher2_cluster_v2.local_auth_endpoint instead""") - return pulumi.get(self, "local_auth_endpoint") @property diff --git a/sdk/python/pulumi_rancher2/provider.py b/sdk/python/pulumi_rancher2/provider.py index 2250d6642..357e2d0f6 100644 --- a/sdk/python/pulumi_rancher2/provider.py +++ b/sdk/python/pulumi_rancher2/provider.py @@ -122,13 +122,11 @@ def insecure(self, value: Optional[pulumi.Input[bool]]): @property @pulumi.getter + @_utilities.deprecated("""Use timeout instead""") def retries(self) -> Optional[pulumi.Input[int]]: """ Rancher connection retries """ - warnings.warn("""Use timeout instead""", DeprecationWarning) - pulumi.log.warn("""retries is deprecated: Use timeout instead""") - return pulumi.get(self, "retries") @retries.setter