Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pulumi convert from terraform handles git ref incorrectly #216

Open
figadore opened this issue Oct 23, 2024 · 1 comment
Open

pulumi convert from terraform handles git ref incorrectly #216

figadore opened this issue Oct 23, 2024 · 1 comment
Labels
kind/bug Some behavior is incorrect or out of spec

Comments

@figadore
Copy link

What happened?

pulumi convert --from terraform --language go adds the git ref into the file name, function/variable/type names

Example

module "gcp_labels" {
  source      = "github.com/vivantehealth/terraform-gcp-labels?ref=v0"
}

results in a file called terraform-gcp-labels.git?ref=v0.go with the following code

type TerraformGcpLabelsGit?ref=v0Args struct {
    Description pulumi.StringInput
    StackName pulumi.StringInput
    EnvConfig *EnvConfigArgs
}

type TerraformGcpLabelsGit?ref=v0 struct {
    pulumi.ResourceState
    Labels pulumi.AnyOutput
}

func NewTerraformGcpLabelsGit?ref=v0(
    ctx *pulumi.Context,
    name string,
    args *TerraformGcpLabelsGit?ref=v0Args,
    opts ...pulumi.ResourceOption,
) (*TerraformGcpLabelsGit?ref=v0, error) {
    var componentResource TerraformGcpLabelsGit?ref=v0
    err := ctx.RegisterComponentResource("components:index:TerraformGcpLabelsGit?ref=v0", name, &componentResource, opts...)
...

Output of pulumi about

CLI          
Version      3.137.0
Go Version   go1.23.2
Go Compiler  gc

Plugins
KIND      NAME  VERSION
resource  gcp   8.2.0
language  go    unknown

Host     
OS       darwin
Version  15.0
Arch     x86_64

This project is written in go: executable='/usr/local/go/bin/go' version='go version go1.23.2 darwin/arm64'

Dependencies:
NAME                                 VERSION
github.com/pulumi/pulumi-gcp/sdk/v8  v8.2.0
github.com/pulumi/pulumi/sdk/v3      v3.130.0

Pulumi locates its logs in /var/folders/73/2r6x3pzs5mx1xhzgnv6bxn3c0000gn/T/ by default

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@figadore figadore added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Oct 23, 2024
@justinvp
Copy link
Member

Thanks for opening the issue! Moving this to https://github.com/pulumi/pulumi-converter-terraform

@justinvp justinvp transferred this issue from pulumi/pulumi Oct 28, 2024
@justinvp justinvp removed the needs-triage Needs attention from the triage team label Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

2 participants