hundreds-lunch-5706
10/27/2023, 3:06 PMenough-garden-22763
10/31/2023, 6:54 PMgreat-night-26645
11/07/2023, 12:05 PMmake build_sdks
succeeds (except for C# which I don't care about at the moment). Now I tried to reference the generated Python SDK from another repository based on its path in my filesystem. With Poetry:
[tool.poetry.dependencies]
...
pulumi-butane = {path = "/home/dev/DEVOPS/pulumi-butane/sdk/python"}
...
With this configuration PyLance in VS code is able to resolve the Python code. When I run pulumi up
it fails with something like:
error: Could not automatically download and install resource plugin 'pulumi-resource-butane' at version v0.0.0, install the plugin using `pulumi plugin install resource butane v0.0.0 ...
I followed the instructions and installed the plugin:
❯ poetry run pulumi plugin install resource butane v0.0.0 --file /home/dev/DEVOPS/pulumi-butane/sdk/python
[resource plugin butane-0.0.0] installing
❯
But it still doesn't work:
error: failed to load plugin /home/dev/.pulumi/plugins/resource-butane-v0.0.0/pulumi-resource-butane: loading PulumiPlugin.yaml: open /home/dev/.pulumi/plugins/resource-butane-v0.0.0/PulumiPlugin.yaml: no such file or directory
What am I doing wrong?hundreds-lunch-5706
11/16/2023, 12:45 PMbig-architect-71258
12/03/2023, 7:43 PMeager-accountant-59554
12/04/2023, 1:05 AMkind-jelly-61624
12/05/2023, 9:24 PMboundless-honey-98509
12/24/2023, 12:55 PMdbt_cloud_
prefix, while the current ones have a dbtcloud_
prefix. I have ignored the legacy TF resources using IgnoreMappings
to allow tfgen to run.
Now I am trying to run a typescript test as outlined in the README, and I still get an error when running pulumi up
, also related to the legacy prefix. Any wisdom on how to solve this?
Diagnostics:
pulumi:providers:dbtcloud (default_0_0_1_alpha_1703345033_17e7028a_dirty_https_/github.com/a-schot/pulumi-dbtcloud/releases/download/v__VERSION_):
error: could not read plugin [/root/go/bin/pulumi-resource-dbtcloud] stdout: EOF
pulumi:pulumi:Stack (ts-dev):
warning: using pulumi-resource-dbtcloud from $PATH at /root/go/bin/pulumi-resource-dbtcloud
panic: fatal: An assertion has failed: Expected all Terraform resources in this module to have a 'dbtcloud_' prefix
big-architect-71258
12/28/2023, 1:48 PMancient-policeman-24615
12/28/2023, 1:58 PM.MuxWith
(for sdk, pf and muxed providers). At minimum, we need to show that the new providers have their schemas added and that runtime dispatch works as expected. I think the clearest way to do that will be to write a test provider that uses .MuxWith
. We have a couple of these test providers already in the bridge:
https://github.com/pulumi/pulumi-terraform-bridge/blob/fe7b24d6a9128e06d8c281bd0f2f089676abadc7/internal/testprovider/schema_mini_random.go#L21-L23
https://github.com/pulumi/pulumi-terraform-bridge/blob/fe7b24d6a9128e06d8c281bd0f2f089676abadc7/pkg/tfgen/internal/testprovider/minirandom.go#L[…]28
For documentation, I meant that muxer.Provider
and tfbridge.ProviderInfo.MuxWith
need doc comments explaining what they do.limited-rainbow-51650
12/30/2023, 7:41 PMfeat(vpcgw): add support for ip id on ipam config (#2240)
enough-garden-22763
01/22/2024, 2:13 PMerror: Resource azapi_resource has a problem: no "id" attribute. To map this resource consider specifying ResourceInfo.ComputeID
error: Resource azapi_update_resource has a problem: no "id" attribute. To map this resource consider specifying ResourceInfo.ComputeID
error: Resource azapi_resource_action has a problem: no "id" attribute. To map this resource consider specifying ResourceInfo.ComputeID
error: Resource azapi_data_plane_resource has a problem: no "id" attribute. To map this resource consider specifying ResourceInfo.ComputeID
big-architect-71258
02/02/2024, 6:23 PMautomatic
(default) The template will emit code to utilize the auto discovery mechanism of Pulumi Terraform Bridge to map resources and data sources. It is still possible to manually map resources and data sources with special configurations.
• `manual`: all resources and data sources must be manually added as with before
The resource naming strategy configures the way how to create a Pulumi name from a Terraform resource or data source name and what part of the Terraform name become a part of the Pulumi module and what part becomes the actual name of the Pulumi object. The template supports three modes:
• singlelevel
(default): all resources and data sources will be mapped one level deep into a namespace extracted along the underscores in the Terraform name
Terraform name: dbtcloud_environment_variable_job_override
Module: environment
Name: VariableJobOverride
• `structured`: resources will be placed in namespaces along the underscores in the Terraform name
Terraform name: dbtcloud_environment_variable_job_override
Module: environment/variable/job
Name: Override
• `flat`: all resources will be placed in the top-level (nameless) root module
Terraform name: dbtcloud_environment_variable_job_override
Module: empty
Name: EnvironmentVariableJobOverride
When singlelevel
or structured
is selected, the template emits a dictionary module_overrides
in resources.go
which can be used to map a generated module name to a different module name.
Happy wrapping!
@ancient-policeman-24615 @enough-garden-22763 @limited-rainbow-51650 @delightful-salesclerk-16161 #contribute #pulumiverse #announcementsacoustic-tiger-77630
02/05/2024, 6:34 PMmake tfgen
[ -x /opt/homebrew/bin/pulumi ] || curl -fsSL <https://get.pulumi.com> | sh
pulumi plugin install resource random 4.8.2
(cd provider && go build -o /Users/wguilherme/go/src/github.com/zscaler/pulumi-zpa/bin/pulumi-tfgen-zpa -ldflags "-X <http://github.com/zscaler/pulumi-zpa/provider/pkg/version.Version=0.0.1-alpha.1707113237+ddbd1aa8.dirty|github.com/zscaler/pulumi-zpa/provider/pkg/version.Version=0.0.1-alpha.1707113237+ddbd1aa8.dirty>" <http://github.com/zscaler/pulumi-zpa/provider/cmd/pulumi-tfgen-zpa)|github.com/zscaler/pulumi-zpa/provider/cmd/pulumi-tfgen-zpa)>
# <http://github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema|github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema>
../../../../../pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20230710100801-03a71d0fca3d/helper/schema/provider.go:511:9: cannot use NewGRPCProviderServer(p) (value of type *GRPCProviderServer) as tfprotov5.ProviderServer value in return statement: *GRPCProviderServer does not implement tfprotov5.ProviderServer (missing method GetMetadata)
make: *** [tfgen] Error 1
➜ pulumi-zpa (master) ✗ make build_sdks
[ -x /opt/homebrew/bin/pulumi ] || curl -fsSL <https://get.pulumi.com> | sh
pulumi plugin install resource random 4.8.2
(cd provider && go build -o /Users/wguilherme/go/src/github.com/zscaler/pulumi-zpa/bin/pulumi-tfgen-zpa -ldflags "-X <http://github.com/zscaler/pulumi-zpa/provider/pkg/version.Version=0.0.1-alpha.1707113237+ddbd1aa8.dirty|github.com/zscaler/pulumi-zpa/provider/pkg/version.Version=0.0.1-alpha.1707113237+ddbd1aa8.dirty>" <http://github.com/zscaler/pulumi-zpa/provider/cmd/pulumi-tfgen-zpa)|github.com/zscaler/pulumi-zpa/provider/cmd/pulumi-tfgen-zpa)>
# <http://github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema|github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema>
../../../../../pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20230710100801-03a71d0fca3d/helper/schema/provider.go:511:9: cannot use NewGRPCProviderServer(p) (value of type *GRPCProviderServer) as tfprotov5.ProviderServer value in return statement: *GRPCProviderServer does not implement tfprotov5.ProviderServer (missing method GetMetadata)
make: *** [tfgen] Error 1
How can I correct this problem?
Thank youworried-energy-90920
02/06/2024, 11:54 AMbig-architect-71258
02/06/2024, 11:58 AMMuxWith
Property on the ProviderInfo
struct. https://github.com/pulumi/pulumi-terraform-bridge/blob/f2504a55bf4289b93cad1cb7d54165bbb3af9c68/pkg/tfbridge/info.go#L137
A sample how to use the Muxer can be found in my Pulumi Azure repo.
https://github.com/tmeckel/pulumi-azure/commits/feat/mux-provider-go/big-architect-71258
02/06/2024, 12:01 PMpf
Version of Pulumi Terraform Bridge.big-architect-71258
02/06/2024, 12:03 PMMustComputeTokens
resource and data source mapping is done automatically by TF Bridge and you only need to manually add resource and data source mappings if you encounter issues with the automapper.
You could even try my Cookiecutter Template to (re-)create a new wrapped provider with PF support.
https://github.com/tmeckel/pulumi-tf-provider-cookiecuttersalmon-helicopter-31908
02/07/2024, 5:59 PMrandom
provider which also does not have its own storage and relies completely on pulumi state.
I'm now wondering how an import for such a provider looks like.
The schema of the bulk import file does not support specifying the properties: https://www.pulumi.com/docs/using-pulumi/adopting-pulumi/import/#bulk-import-operations
I looked into how the random
provider does it, and afaict, they just use the id
as the value (btw. isn't that a security risk given the id is not stored encrypted in the state files?)
That won't work for me, because my resources are more than just one property.
The best I could come up with was to have my own custom import file that acts like the "service" a traditional provider would have when importing. I.e., the provider checks first in that file if the resource exists, and if yes, reads it from there during the create.
Note that currently my provider only does Create, maybe I'm missing an action that would solve my issue.
Grateful for any pointers 🙏microscopic-afternoon-22702
02/15/2024, 7:38 PMthankful-match-46035
02/20/2024, 1:27 PMupgrade-provider ovh/pulumi-ovh
, I have an error:
error: failed to gather package metadata: problem gathering data sources: 1 error occurred:
* Pulumi token "ovh:CloudProjectDatabase/getIpRestrictions:getIpRestrictions" is mapped to TF provider data source "ovh_cloud_project_database_ip_restrictions", but no such data source found. Remove the mapping and try again
make: *** [Makefile:59: tfgen] Error 255
After analyzing our Terraform provider, it appears that the datasource have not disapeared BUT we are currently migrating our resources and datasources to use the new terraform-plugin-framework
instead of old terraform-plugin-sdk/v2
This is the new SDK that should and will be used to declare new resources/datasources.
The terraform provider now uses a mux server that allows to have both SDKs used at the same time (see: https://github.com/ovh/terraform-provider-ovh/blob/master/main.go#L33-L43).
So is it possible to say to Pulumi to take in account resources and datasources declared with the old and the new terraform plugin framework?
FYI, for the moment, we only declared in the new way this datasource:
https://github.com/ovh/terraform-provider-ovh/blob/master/ovh/provider_new.go#L163
but all of the others are still declared in the old way:
https://github.com/ovh/terraform-provider-ovh/blob/master/ovh/provider.go#L50
Is it possible to help us in this issue, because right now we can’t upgrade.sync the pulumi provider.
Thanks 🙂bland-address-49163
02/23/2024, 12:35 PMbig-architect-71258
02/26/2024, 5:37 PMTFProviderModuleVersion
property in tfbridge.ProviderInfo
. This addition kicks in when the Go module specifies a version that's equal or greater than v2. It ensures that TFGEN
can seamlessly locate the correct resources to convert the Terraform provider documentation.
✨ For those of you who are facing issues with Terraform providers that include invalid GO module definitions, the next feature is a lifesaver. I introduced support for the upstream directory in the provider repository. The template will now smartly emit code that takes care of cloning the Terraform provider source from its repository via the Makefile
. It then sets up the UpstreamRepoPath
property within tfbridge.ProviderInfo
accordingly to assist TFGEN
with the documentation conversion. Problem solved!
✨ Speaking of module definitions. I improved the strategy for automatically detecting when a wrapped Terraform provider's Go module definition goes awry, such as with the NCloud or Configcat Terraform Providers, or if the Terraform provider version must be referenced by a Git SHA commit. If it does, the template now generates the necessary replace
statements in the go.mod
file more flawlessly. This is also applicable to a SHIM required for a provider instance located in an internal package of the Terraform provider. It's all about making the process smoother while wrapping a Terraform provider.
✨ We don't just roll out features without making sure they work as intended. Rigorous testing? Check ✅. I’ve added testing code to ensure that the created project is valid according to the created GO code and the GitHub workflows.
✨ And a little note for our Pulumiverse CI/CD aficionados: I've updated the PYPI_PASSWORD
secret name to PYPI_PASSWORD
from PYPI_API_TOKEN
. So, when instructing the template to create code for publishing the provider via Pulumiverse, the GitHub workflows are configured correctly out of the box now.
Your feedback is incredibly valuable to me, so please reach out if you have any impressions to share or suggestions on where we can head next with the template.
#pulumiverse #announcements #C01T8BSGTHC @enough-garden-22763 @ancient-policeman-24615 @limited-rainbow-51650 @many-telephone-49025 @echoing-dinner-19531 @delightful-salesclerk-16161salmon-dream-92808
02/27/2024, 5:30 PMexamples/simple
. The package is called platform
and the component class I'm creating is called Platform
Error: unknown resource type platform:index:Platform: Error: unknown resource type platform:index:Platform
at Provider.<anonymous> (/snapshot/pulumi-resource-platform/bin/provider.js:38:27)
at Generator.next (<anonymous>)
at /snapshot/pulumi-resource-platform/bin/provider.js:21:71
at new Promise (<anonymous>)
at __awaiter (/snapshot/pulumi-resource-platform/bin/provider.js:17:12)
at Provider.construct (/snapshot/pulumi-resource-platform/bin/provider.js:33:16)
at Server.<anonymous> (/snapshot/pulumi-resource-platform/node_modules/@pulumi/pulumi/provider/server.js:316:52)
at Generator.next (<anonymous>)
at fulfilled (/snapshot/pulumi-resource-platform/node_modules/@pulumi/pulumi/provider/server.js:18:58)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
I don't know why this default case in the autogenerated code is being run because the bin/provider.js
file has a switch case 'platform:index:Platform'
which is the same type indicated in the thrown error.brash-gigabyte-81569
02/28/2024, 4:18 PMmelodic-tomato-39005
03/07/2024, 12:36 PMthankful-match-46035
03/13/2024, 6:47 AM$ upgrade-provider ovh/pulumi-ovh
--- Set Up Environment ---
- GOWORK=off
- PULUMI_MISSING_DOCS_ERROR=false
- PULUMI_EXTRA_MAPPING_ERROR=true
--- done ---
...
The scripts found some missing mapping, ok not a problem, indeed, in TF provider side we removed a resources and two datasources.
I edited the provider/resources.go
file but when I’m executing the script again (and again), it sound that the changes are not seen, I stil have the issues even if I make the changes in resources.go file 😞
FYI the provider is the OVHcloud provider: https://github.com/ovh/pulumi-ovh
Is it possible to help us in this blocking behavior?
Thxbrainy-accountant-88780
03/14/2024, 2:21 PMbored-sandwich-44626
03/14/2024, 7:49 PMupgrade-provider
and I'm getting this error
$ ~/go/bin/upgrade-provider emailbob/pulumi-twingate --upstream-provider-name terraform-provider-twingate --upstream-provider-org Twingate
--- Set Up Environment ---
- GOWORK=off
- PULUMI_MISSING_DOCS_ERROR=true
- PULUMI_EXTRA_MAPPING_ERROR=true
--- done ---
--- Discover Provider ---
...
- Upgrade Pulumi version in all places
- ✓ Get Pulumi SDK version: v3.108.1
- X /opt/homebrew/bin/go get <http://github.com/pulumi/pulumi/sdk/v3@v3.108.1|github.com/pulumi/pulumi/sdk/v3@v3.108.1>: exit status 1:
go: go.mod file not found in current directory or any parent directory.
'go get' is no longer supported outside a module.
To build and install a command, use 'go install' with a version,
like 'go install <http://example.com/cmd@latest|example.com/cmd@latest>'
For more information, see <https://golang.org/doc/go-get-install-deprecation>
or run 'go help get' or 'go help install'.
This happens when I run it from the root and provider directory. The is currently in a test repo.