So I'm trying to compile the Foritnet FortiOS Terr...
# pulumiverse
f
So I'm trying to compile the Foritnet FortiOS Terraform provider through the bridge framework. I've been chasing error after error, but this one just leaves me scratching my head:
Copy code
/Users/dhagen/Projects/Work/pulumi-fortios/bin/pulumi-tfgen-fortios schema --out provider/cmd/pulumi-resource-fortios
error: failed to create Pulumi schema: <nil>: #/resources/fortios:switchcontroller~18021Xsettings:8021Xsettings: doesn't validate with '/$defs/token'; , and 5 other diagnostic(s)
make: *** [tfgen] Error 255
I'm going to guess this is an issue with the resource starting with a numeral. My Go is... Rough at best, so I'm honestly not sure if this is coming from the original Terraform module or something in my mapping code.
I'd also be interested in how to get around deploying this resource for now. I did a Go Update command for other reasons, and the latest
make tfgen
errors with:
Copy code
error: failed to gather package metadata: problem gathering resources: 2 errors occurred:
        * TF resource "fortios_switchcontroller_8021Xsettings" not mapped to the Pulumi provider
        * TF resource "fortios_switchcontrollersecuritypolicy_8021X" not mapped to the Pulumi provider
Repo is here with current code: https://github.com/aspyrmedia/pulumi-fortios
b
@fresh-scientist-56300 First off: I scaffolded a new project based on the Aspyrmedia Fortios Terraform provider using my cookiecutter template (https://github.com/tmeckel/pulumi-tf-provider-cookiecutter). Worked like a charm and I didn't run into any of the issues you described above (i.e. it compiled instantly). Using the boilerplate GitHub repository, as still favored and described by Pulumi, is quite demanding, especially when you're not an expert in Go and it's module infrastructure. Second: you MUST define all resources and datasources of the Terraform provider in the
resources.go
file, located in the
provider
directory.
tfgen
creates a schema file for the pulumi provider which must contain all components exposed by the Terraform provider.
tfgen
will check this requirement and issue an error respectively. If you want to use a more gradual approach, you can add data sources and resources to the
IgnoreMappings: []string{}
property of
tfbridge.ProviderInfo
. As the name implies, `tfgen`will ignore the elements. But be warned: the generated Pulumi provider will not support those components at all.
image.png
Oh and BTW I forked your repo, and it didn't compile šŸ˜ž
But I think it's because I didn't add any resources or data sources to the
resources.go
when I created a new repo using the Cookiecutter template.
By using some AWK magic I added all resources and data sources to
resources.go
in the project I scaffolded using my Cookiecutter template. I can successfully generate the provider. Find attached
resources.go
f
@big-architect-71258 you rock! Thanks for these tips! I'll give that a shot using your repo and see if I can replicate.
b
@fresh-scientist-56300 if you need any assistance let me know
f
@big-architect-71258 had a chance to mess with it... Getting an error using your
resources.go
file:
Copy code
/pulumi-fortios on ī‚  main [?] on šŸ³ v23.0.5 via vcookiecutter 
āžœ make tfgen
[ -x /opt/homebrew/bin/pulumi ] || curl -fsSL <https://get.pulumi.com> | sh
pulumi plugin install resource random 4.3.1
(cd provider && go build -o /Users/dhagen/Projects/Work/pulumi-fortios/pulumi-fortios/bin/pulumi-tfgen-fortios -ldflags "-X <http://github.com/pulumiverse/pulumi-fortios/provider/pkg/version.Version=0.0.1-alpha.1685467686+7123a155|github.com/pulumiverse/pulumi-fortios/provider/pkg/version.Version=0.0.1-alpha.1685467686+7123a155>" <http://github.com/pulumiverse/pulumi-fortios/provider/cmd/pulumi-tfgen-fortios)|github.com/pulumiverse/pulumi-fortios/provider/cmd/pulumi-tfgen-fortios)>
# <http://github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/sdk-v2|github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/sdk-v2>
/Users/dhagen/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.44.3/pkg/tfshim/sdk-v2/cty.go:55:21: undefined: schema.HCL2ValueFromConfigValue
/Users/dhagen/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.44.3/pkg/tfshim/sdk-v2/upgrade_state.go:38:31: undefined: schema.UpgradeFlatmapState
/Users/dhagen/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.44.3/pkg/tfshim/sdk-v2/upgrade_state.go:44:21: undefined: schema.UpgradeJSONState
/Users/dhagen/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.44.3/pkg/tfshim/sdk-v2/upgrade_state.go:52:9: undefined: schema.RemoveAttributes
/Users/dhagen/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.44.3/pkg/tfshim/sdk-v2/upgrade_state.go:69:13: undefined: schema.NormalizeObjectFromLegacySDK
make: *** [tfgen] Error 2
b
@fresh-scientist-56300 is the new code available in a GitHub repo?
f
No, but I can push it in.
b
@fresh-scientist-56300 Have you recreated the Pulumi provider in an empty directory?
f
By the way, the only reason I'm referencing a fork (ours) of https://github.com/fortinetdev/terraform-provider-fortios is because their
go.mod
still specifies:
module <http://github.com/terraform-providers/terraform-provider-fortios|github.com/terraform-providers/terraform-provider-fortios>
instead of
module <http://github.com/fortinetdev/terraform-provider-fortios|github.com/fortinetdev/terraform-provider-fortios>
, which I fixed in our fork. I'm trying to get a PR into the original repo, but... :šŸ¤·:
b
@fresh-scientist-56300 The cookiecutter template is able to handle this typical diversion. You don't need a fork for that.
f
Ok. It errored out when I tried it. I'll try that again and see what the error was.
Don't want to destract going this way, but here's the output from referencing their original.
Copy code
cookiecutter -f gh:tmeckel/pulumi-tf-provider-cookiecutter
You've downloaded /Users/dhagen/.cookiecutters/pulumi-tf-provider-cookiecutter before. Is it okay to delete and re-download it? [yes]:
terraform_provider_name [terraform-provider-name]: fortios
terraform_provider_org [terraform-providers]: fortinetdev
terraform_provider_source [<http://github.com/fortinetdev/terraform-provider-fortios|github.com/fortinetdev/terraform-provider-fortios>]:
terraform_provider_version_or_commit [0.0.0]: 1.16.0
terraform_provider_module [<http://github.com/fortinetdev/terraform-provider-fortios|github.com/fortinetdev/terraform-provider-fortios>]:
terraform_provider_package_name [fortios]:
Select terraform_sdk_version:
1 - 1
2 - 2
3 - plugin-framework
Choose from 1, 2, 3 [1]:
provider [pulumi-fortios]:
provider_display_name [Fortios]:
provider_github_organization [pulumiverse]:
provider_publisher [pulumiverse]:
provider_homepage [<https://github.com/pulumiverse/pulumi-fortios>]:
provider_logoUrl [<https://raw.githubusercontent.com/pulumiverse/pulumi-fortios/main/docs/fortios.png>]:
provider_description [A Pulumi package for creating and managing Fortios resources]:
Select provider_category:
1 - cloud
2 - database
3 - infrastructure
4 - monitoring
5 - network
6 - utility
7 - versioncontrol
Choose from 1, 2, 3, 4, 5, 6, 7 [1]: 5
provider_download_url [<github://api.github.com/pulumiverse/pulumi-fortios>]:
provider_javascript_package [@pulumiverse/fortios]:
provider_dotnet_rootnamespace [Pulumiverse]:
provider_python_package [pulumiverse_fortios]:
provider_java_base_package [com.pulumiverse]:
create_github_workflows [yes]:
skip_go_mod_tidy [no]:
skip_git_init [no]:
go: <http://github.com/fortinetdev/terraform-provider-fortios@v1.16.0|github.com/fortinetdev/terraform-provider-fortios@v1.16.0>: parsing go.mod:
	module declares its path as: <http://github.com/terraform-providers/terraform-provider-fortios|github.com/terraform-providers/terraform-provider-fortios>
	        but was required as: <http://github.com/fortinetdev/terraform-provider-fortios|github.com/fortinetdev/terraform-provider-fortios>
Initialized empty Git repository in /Users/dhagen/Projects/Work/pulumi-fortios/pulumi-fortios/.git/
[main (root-commit) 7c88da9] Initial Commit.
Copy code
pulumi-fortios on ī‚  main [?] on šŸ³ v23.0.5 via vcookiecutter 
āžœ make tfgen                                                        
[ -x /opt/homebrew/bin/pulumi ] || curl -fsSL <https://get.pulumi.com> | sh
pulumi plugin install resource random 4.3.1
(cd provider && go build -o /Users/dhagen/Projects/Work/pulumi-fortios/pulumi-fortios/bin/pulumi-tfgen-fortios -ldflags "-X <http://github.com/pulumiverse/pulumi-fortios/provider/pkg/version.Version=0.0.1-alpha.1685471875+7c88da98|github.com/pulumiverse/pulumi-fortios/provider/pkg/version.Version=0.0.1-alpha.1685471875+7c88da98>" <http://github.com/pulumiverse/pulumi-fortios/provider/cmd/pulumi-tfgen-fortios)|github.com/pulumiverse/pulumi-fortios/provider/cmd/pulumi-tfgen-fortios)>
resources.go:23:2: <http://github.com/fortinetdev/terraform-provider-fortios@v1.16.0|github.com/fortinetdev/terraform-provider-fortios@v1.16.0>: parsing go.mod:
        module declares its path as: <http://github.com/terraform-providers/terraform-provider-fortios|github.com/terraform-providers/terraform-provider-fortios>
                but was required as: <http://github.com/fortinetdev/terraform-provider-fortios|github.com/fortinetdev/terraform-provider-fortios>
resources.go:31:2: <http://github.com/fortinetdev/terraform-provider-fortios@v1.16.0|github.com/fortinetdev/terraform-provider-fortios@v1.16.0>: parsing go.mod:
        module declares its path as: <http://github.com/terraform-providers/terraform-provider-fortios|github.com/terraform-providers/terraform-provider-fortios>
                but was required as: <http://github.com/fortinetdev/terraform-provider-fortios|github.com/fortinetdev/terraform-provider-fortios>
resources.go:26:2: <http://github.com/fortinetdev/terraform-provider-fortios@v1.16.0|github.com/fortinetdev/terraform-provider-fortios@v1.16.0>: parsing go.mod:
        module declares its path as: <http://github.com/terraform-providers/terraform-provider-fortios|github.com/terraform-providers/terraform-provider-fortios>
                but was required as: <http://github.com/fortinetdev/terraform-provider-fortios|github.com/fortinetdev/terraform-provider-fortios>
cmd/pulumi-tfgen-fortios/main.go:20:2: <http://github.com/fortinetdev/terraform-provider-fortios@v1.16.0|github.com/fortinetdev/terraform-provider-fortios@v1.16.0>: parsing go.mod:
        module declares its path as: <http://github.com/terraform-providers/terraform-provider-fortios|github.com/terraform-providers/terraform-provider-fortios>
                but was required as: <http://github.com/fortinetdev/terraform-provider-fortios|github.com/fortinetdev/terraform-provider-fortios>
resources.go:27:2: <http://github.com/fortinetdev/terraform-provider-fortios@v1.16.0|github.com/fortinetdev/terraform-provider-fortios@v1.16.0>: parsing go.mod:
        module declares its path as: <http://github.com/terraform-providers/terraform-provider-fortios|github.com/terraform-providers/terraform-provider-fortios>
                but was required as: <http://github.com/fortinetdev/terraform-provider-fortios|github.com/fortinetdev/terraform-provider-fortios>
resources.go:28:2: <http://github.com/fortinetdev/terraform-provider-fortios@v1.16.0|github.com/fortinetdev/terraform-provider-fortios@v1.16.0>: parsing go.mod:
        module declares its path as: <http://github.com/terraform-providers/terraform-provider-fortios|github.com/terraform-providers/terraform-provider-fortios>
                but was required as: <http://github.com/fortinetdev/terraform-provider-fortios|github.com/fortinetdev/terraform-provider-fortios>
resources.go:30:2: <http://github.com/fortinetdev/terraform-provider-fortios@v1.16.0|github.com/fortinetdev/terraform-provider-fortios@v1.16.0>: parsing go.mod:
        module declares its path as: <http://github.com/terraform-providers/terraform-provider-fortios|github.com/terraform-providers/terraform-provider-fortios>
                but was required as: <http://github.com/fortinetdev/terraform-provider-fortios|github.com/fortinetdev/terraform-provider-fortios>
resources.go:24:2: <http://github.com/fortinetdev/terraform-provider-fortios@v1.16.0|github.com/fortinetdev/terraform-provider-fortios@v1.16.0>: parsing go.mod:
        module declares its path as: <http://github.com/terraform-providers/terraform-provider-fortios|github.com/terraform-providers/terraform-provider-fortios>
                but was required as: <http://github.com/fortinetdev/terraform-provider-fortios|github.com/fortinetdev/terraform-provider-fortios>
resources.go:25:2: <http://github.com/fortinetdev/terraform-provider-fortios@v1.16.0|github.com/fortinetdev/terraform-provider-fortios@v1.16.0>: parsing go.mod:
        module declares its path as: <http://github.com/terraform-providers/terraform-provider-fortios|github.com/terraform-providers/terraform-provider-fortios>
                but was required as: <http://github.com/fortinetdev/terraform-provider-fortios|github.com/fortinetdev/terraform-provider-fortios>
make: *** [tfgen] Error 1
b
@fresh-scientist-56300 I'll have a look at this. This should work indeed. I'll get back to you. Have to try it myself locally.
f
Thank you!
b
@fresh-scientist-56300 As expected, worked like a charm. Well except the fact that
tfgen
is complaining about missing resource and data source mapping. Find attached the generated
go.mod
file from the
provider
directory. And the used cookiecutter replay JSON file. The most important line in the
go.mod
file:
replace <http://github.com/terraform-providers/terraform-provider-fortios|github.com/terraform-providers/terraform-provider-fortios> => <http://github.com/fortinetdev/terraform-provider-fortios|github.com/fortinetdev/terraform-provider-fortios> v1.16.0
@fresh-scientist-56300 If you simply use the
resources.go
that I sent you, into the scaffolded provider which uses the original repo of Fortios you'll receive the following error
Copy code
resources.go:21:2: no required module provides package <http://github.com/aspyrmedia/pulumi-fortios/provider/pkg/version;|github.com/aspyrmedia/pulumi-fortios/provider/pkg/version;> to add it:
        go get <http://github.com/aspyrmedia/pulumi-fortios/provider/pkg/version|github.com/aspyrmedia/pulumi-fortios/provider/pkg/version>
resources.go:22:2: no required module provides package <http://github.com/aspyrmedia/terraform-provider-fortios/fortios;|github.com/aspyrmedia/terraform-provider-fortios/fortios;> to add it:
        go get <http://github.com/aspyrmedia/terraform-provider-fortios/fortios|github.com/aspyrmedia/terraform-provider-fortios/fortios>
What is correct because the import statements do not match (see image).
@fresh-scientist-56300 The correct import statements would be:
Copy code
"<http://github.com/pulumiverse/pulumi-fortios/provider/pkg/version|github.com/pulumiverse/pulumi-fortios/provider/pkg/version>"
"<http://github.com/terraform-providers/terraform-provider-fortios/fortios|github.com/terraform-providers/terraform-provider-fortios/fortios>"
@fresh-scientist-56300 One additional info: because of issue [1168](https://github.com/pulumi/pulumi-terraform-bridge/issues/1168) you will not be able to create the required documentation for the Fortios provider directly. What you can do, is to manually download (clone) the Fortios provider into a local directory and set the
PULUMI_REPO_PATH
environment variable. Suppose you cloned the Fortios provider to
$HOME/code/terraform-provider-fortios
then the
PULUMI_REPO_PATH
must be set to
export PULUMI_REPO_PATHS="<http://github.com/fortinetdev/terraform-provider-fortios=$HOME/code/terraform-provider-fortios|github.com/fortinetdev/terraform-provider-fortios=$HOME/code/terraform-provider-fortios>"
@fresh-scientist-56300 The AWS provider is using this approach. https://github.com/pulumi/pulumi-aws/blob/master/Makefile
@fresh-scientist-56300 I just published a new release of the Cookiecutter template with a couple of improvements. https://github.com/tmeckel/pulumi-tf-provider-cookiecutter/releases/tag/v0.0.8
f
@big-architect-71258 tried with the new template:
Copy code
āžœ cookiecutter -f gh:tmeckel/pulumi-tf-provider-cookiecutter
You've downloaded /Users/dhagen/.cookiecutters/pulumi-tf-provider-cookiecutter before. Is it okay to delete and re-download it? [yes]: yes
Unable to load extension: No module named 'packaging'
b
@fresh-scientist-56300 what version of Python you're using?
@fresh-scientist-56300 My bad! I forgot to update the documentation. The 3rd party library
packaging
is now required. I'll update the documentation accordingly tomorrow. Please install
packaging
via
pip
into your virtual environment:
pip install packaging
f
@big-architect-71258 still feeling pretty silly on this. Generated a new package using the new cookiecutter, copied in the code from your
go.mod
and
resource.go
files and still erroring out.
go mod tidy
in
/provider
results in:
Copy code
pulumi-fortios/provider on ī‚  main [?] via šŸ¹ v1.19 on šŸ³ v23.0.5 via vcookiecutter 
āžœ go mod tidy
go: finding module for package <http://github.com/fortinetdev/terraform-provider-fortios/fortios|github.com/fortinetdev/terraform-provider-fortios/fortios>
go: found <http://github.com/fortinetdev/terraform-provider-fortios/fortios|github.com/fortinetdev/terraform-provider-fortios/fortios> in <http://github.com/fortinetdev/terraform-provider-fortios|github.com/fortinetdev/terraform-provider-fortios> v1.16.0
go: <http://github.com/pulumiverse/pulumi-fortios/provider|github.com/pulumiverse/pulumi-fortios/provider> imports
        <http://github.com/fortinetdev/terraform-provider-fortios/fortios|github.com/fortinetdev/terraform-provider-fortios/fortios>: <http://github.com/fortinetdev/terraform-provider-fortios@v1.16.0|github.com/fortinetdev/terraform-provider-fortios@v1.16.0>: parsing go.mod:
        module declares its path as: <http://github.com/terraform-providers/terraform-provider-fortios|github.com/terraform-providers/terraform-provider-fortios>
                but was required as: <http://github.com/fortinetdev/terraform-provider-fortios|github.com/fortinetdev/terraform-provider-fortios>
Everything is pushed up to https://github.com/aspyrmedia/pulumi-fortios
b
@fresh-scientist-56300 do not copy the go.mod. But I can upload my working version of the provider into a GitHub repo tomorrow. You can copy the code if you like.
@fresh-scientist-56300 In addition: do not copy the go.mod file
f
@big-architect-71258 merge might have been a better term to use, but ok.
I just invited you to my repo. Feel free to push there. Hoping this ends up in the Pulumiverse anyway.
b
@fresh-scientist-56300 okay šŸ‘ŒšŸ¼ I'll check on this tomorrow. Received the invitation.
@fresh-scientist-56300 I pushed the initial version. Known issue: the dotnet sdk can't be compiled. Do not have the time to dig in to this any further today.
Copy code
CSC : warning CS2002: Source file '/home/vagrant/code/pulumi-fortios-aspyrmedia/sdk/dotnet/Inputs/RouterbgpNeighborConditionalAdvertise6Args.cs' specified multiple times [/home/vagrant/code/pulumi-fortios-aspyrmedia/sdk/dotnet/Pulumiverse.Fortios.csproj]
CSC : warning CS2002: Source file '/home/vagrant/code/pulumi-fortios-aspyrmedia/sdk/dotnet/Inputs/RouterBgpNeighborConditionalAdvertise6GetArgs.cs' specified multiple times [/home/vagrant/code/pulumi-fortios-aspyrmedia/sdk/dotnet/Pulumiverse.Fortios.csproj]
CSC : warning CS2002: Source file '/home/vagrant/code/pulumi-fortios-aspyrmedia/sdk/dotnet/Inputs/RouterBgpNeighborConditionalAdvertiseArgs.cs' specified multiple times [/home/vagrant/code/pulumi-fortios-aspyrmedia/sdk/dotnet/Pulumiverse.Fortios.csproj]
CSC : warning CS2002: Source file '/home/vagrant/code/pulumi-fortios-aspyrmedia/sdk/dotnet/Inputs/RouterBgpNeighborConditionalAdvertiseGetArgs.cs' specified multiple times [/home/vagrant/code/pulumi-fortios-aspyrmedia/sdk/dotnet/Pulumiverse.Fortios.csproj]
CSC : warning CS2002: Source file '/home/vagrant/code/pulumi-fortios-aspyrmedia/sdk/dotnet/Inputs/RouterOspf6Ospf6InterfaceIpsecKeyArgs.cs' specified multiple times [/home/vagrant/code/pulumi-fortios-aspyrmedia/sdk/dotnet/Pulumiverse.Fortios.csproj]
CSC : warning CS2002: Source file '/home/vagrant/code/pulumi-fortios-aspyrmedia/sdk/dotnet/Inputs/Routerospf6Ospf6interfaceIpsecKeyGetArgs.cs' specified multiple times [/home/vagrant/code/pulumi-fortios-aspyrmedia/sdk/dotnet/Pulumiverse.Fortios.csproj]
CSC : warning CS2002: Source file '/home/vagrant/code/pulumi-fortios-aspyrmedia/sdk/dotnet/Inputs/Routerospf6Ospf6interfaceNeighborArgs.cs' specified multiple times [/home/vagrant/code/pulumi-fortios-aspyrmedia/sdk/dotnet/Pulumiverse.Fortios.csproj]
CSC : warning CS2002: Source file '/home/vagrant/code/pulumi-fortios-aspyrmedia/sdk/dotnet/Inputs/RouterOspf6Ospf6InterfaceNeighborGetArgs.cs' specified multiple times [/home/vagrant/code/pulumi-fortios-aspyrmedia/sdk/dotnet/Pulumiverse.Fortios.csproj]
CSC : warning CS2002: Source file '/home/vagrant/code/pulumi-fortios-aspyrmedia/sdk/dotnet/Inputs/RouterospfOspfinterfaceMd5KeyArgs.cs' specified multiple times [/home/vagrant/code/pulumi-fortios-aspyrmedia/sdk/dotnet/Pulumiverse.Fortios.csproj]
CSC : warning CS2002: Source file '/home/vagrant/code/pulumi-fortios-aspyrmedia/sdk/dotnet/Inputs/RouterospfOspfinterfaceMd5KeyGetArgs.cs' specified multiple times [/home/vagrant/code/pulumi-fortios-aspyrmedia/sdk/dotnet/Pulumiverse.Fortios.csproj]
CSC : warning CS2002: Source file '/home/vagrant/code/pulumi-fortios-aspyrmedia/sdk/dotnet/Outputs/GetRouterbgpNeighborConditionalAdvertise6Result.cs' specified multiple times [/home/vagrant/code/pulumi-fortios-aspyrmedia/sdk/dotnet/Pulumiverse.Fortios.csproj]
CSC : warning CS2002: Source file '/home/vagrant/code/pulumi-fortios-aspyrmedia/sdk/dotnet/Outputs/GetRouterBgpNeighborConditionalAdvertiseResult.cs' specified multiple times [/home/vagrant/code/pulumi-fortios-aspyrmedia/sdk/dotnet/Pulumiverse.Fortios.csproj]
CSC : warning CS2002: Source file '/home/vagrant/code/pulumi-fortios-aspyrmedia/sdk/dotnet/Outputs/RouterbgpNeighborConditionalAdvertise.cs' specified multiple times [/home/vagrant/code/pulumi-fortios-aspyrmedia/sdk/dotnet/Pulumiverse.Fortios.csproj]
CSC : warning CS2002: Source file '/home/vagrant/code/pulumi-fortios-aspyrmedia/sdk/dotnet/Outputs/RouterBgpNeighborConditionalAdvertise6.cs' specified multiple times [/home/vagrant/code/pulumi-fortios-aspyrmedia/sdk/dotnet/Pulumiverse.Fortios.csproj]
CSC : warning CS2002: Source file '/home/vagrant/code/pulumi-fortios-aspyrmedia/sdk/dotnet/Outputs/RouterOspf6Ospf6InterfaceIpsecKey.cs' specified multiple times [/home/vagrant/code/pulumi-fortios-aspyrmedia/sdk/dotnet/Pulumiverse.Fortios.csproj]
CSC : warning CS2002: Source file '/home/vagrant/code/pulumi-fortios-aspyrmedia/sdk/dotnet/Outputs/RouterOspf6Ospf6InterfaceNeighbor.cs' specified multiple times [/home/vagrant/code/pulumi-fortios-aspyrmedia/sdk/dotnet/Pulumiverse.Fortios.csproj]
CSC : warning CS2002: Source file '/home/vagrant/code/pulumi-fortios-aspyrmedia/sdk/dotnet/Outputs/RouterospfOspfinterfaceMd5Key.cs' specified multiple times [/home/vagrant/code/pulumi-fortios-aspyrmedia/sdk/dotnet/Pulumiverse.Fortios.csproj]
I think the codegen must be tweaked for Dotnet or
tfgen
has a bug. I don't want to rule it out, as the Fortios provider is really very poorly implemented. NodeJs, Go and Python seem to be fine though. If you wanna test the provider you can just build it via
make provider
and create an (empty) Pulumi YAML project. Ensure that Pulumi can find the provider implementation by expanding the
PATH
environment variable.
@fresh-scientist-56300 My suggestion would be to apply for a repo in Pulumiverse now anyway. If the colleagues have not changed the process, then you need to create a PR in the repo infra with the necessary information. You can use my last PR https://github.com/pulumiverse/infra/pull/59/files as an example if you want. I wouldn't do a transfer of the current repo to Pulumiverse. If that is still supported at all.
@fresh-scientist-56300 About the Dotnet problem: I think the resources and datasources must be in different namespaces (modules). Currently the provider code puts everything into the toplevel
index
module. When you look at huge providers like Aws or Azure (Classic) you'll see that resources and datasources go to different modules to prevent clashes and duplicate names.
f
@big-architect-71258 builds for me! I originally was planning on splitting the areas into sub-modules. I'll likely do that before submitting the PR to Pulumiverse as well as fixing the documentation.
Never mind, I see you have upstream embedded there which you used to get the doc bug worked around.
b
Everything should be fine, except the dotnet SDK and the list of ignored resources and data sources. Added a couple of deprecated resources to resources.go becauee they created trouble while creating the nodejs SDK. But I didn't check if there are others which are deprecated as well.