Open
Description
Confirmation
- My issue isn't already found on the issue tracker.
- I have replicated my issue using the latest version of the library and it is still present.
cf-terraforming version
ERRO[0000] failed to exec to git
ERRO[0000] failed to exec to git
cf-terraforming -dev+
Expected outcome
cloudflare_account_member
resources should be generated.
Actual outcome
DEBU[0000] initializing cloudflare-go with API Token account_Id=xyz zone_id=
DEBU[0000] initializing Terraform in .
DEBU[0000] detected provider version=5.1.0
DEBU[0000] reading Terraform schema for Cloudflare provider
DEBU[0000] reading and building resource resource=cloudflare_account_member
DEBU[0001] generating resource output count=12 resource=cloudflare_account_member
DEBU[0001] got unknown attribute configuration: key email, value <nil>, value type <nil>
DEBU[0001] attribute "policies" has not been generated
panic: interface conversion: interface {} is map[string]interface {}, not string
goroutine 1 [running]:
github.com/cloudflare/cf-terraforming/internal/app/cf-terraforming/cmd.writeAttrLine({0xc0000136b0, 0x5}, {0xc47920, 0xc000faa000}, {0x0?, 0x3?}, 0xc000a803f0)
/home/anders/go/pkg/mod/github.com/cloudflare/[email protected]/internal/app/cf-terraforming/cmd/util.go:229 +0x16bd
github.com/cloudflare/cf-terraforming/internal/app/cf-terraforming/cmd.writeAttrLine({0xc0000136b0, 0x5}, {0xc4cfe0, 0xc000a2e390}, {0x0, 0x0}, 0xc000a803f0)
/home/anders/go/pkg/mod/github.com/cloudflare/[email protected]/internal/app/cf-terraforming/cmd/util.go:276 +0x133d
github.com/cloudflare/cf-terraforming/internal/app/cf-terraforming/cmd.init.generateResources.func2(0x16722a0, {0xeba628?, 0x4?, 0xeba560?})
/home/anders/go/pkg/mod/github.com/cloudflare/[email protected]/internal/app/cf-terraforming/cmd/generate.go:1518 +0x746e
github.com/spf13/cobra.(*Command).execute(0x16722a0, {0xc0000fab40, 0x9, 0x9})
/home/anders/go/pkg/mod/github.com/spf13/[email protected]/command.go:989 +0xa91
github.com/spf13/cobra.(*Command).ExecuteC(0x1672860)
/home/anders/go/pkg/mod/github.com/spf13/[email protected]/command.go:1117 +0x3ff
github.com/spf13/cobra.(*Command).Execute(...)
/home/anders/go/pkg/mod/github.com/spf13/[email protected]/command.go:1041
github.com/cloudflare/cf-terraforming/internal/app/cf-terraforming/cmd.Execute()
/home/anders/go/pkg/mod/github.com/cloudflare/[email protected]/internal/app/cf-terraforming/cmd/root.go:30 +0x1a
main.main()
/home/anders/go/pkg/mod/github.com/cloudflare/[email protected]/cmd/cf-terraforming/main.go:8 +0xf
Steps to reproduce
- Install cf-terraforming
go install github.com/cloudflare/cf-terraforming/cmd/[email protected]
- Install opentofu
sudo snap install --classic opentofu
/snap/bin/tofu --version
OpenTofu v1.9.0
on linux_amd64
- Create provider.tf. I set
CLOUDFLARE_API_TOKEN
via env.
terraform {
required_providers {
cloudflare = {
source = "cloudflare/cloudflare"
version = "~> 5"
}
}
}
provider "cloudflare" {
# token pulled from $CLOUDFLARE_API_TOKEN
}
- Initialize with
tofu init
. - Trying to generate
cloudflare_account_member
resource.
cf-terraforming -a xyz generate --provider-registry-hostname registry.opentofu.org --terraform-binary-path /snap/bin/tofu --resource-type cloudflare_account_member -v
References
I am not able to get the current version of cf-terraforming when installing the go
way.
Reference issue: #780. Latest #780 (comment) stated it's ok to open a new issue.
Metadata
Metadata
Assignees
Labels
No labels