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

Convert: Golang has wrong casing (lower case letters for attributes) #2824

Open
mutahhir opened this issue Apr 19, 2023 · 1 comment
Open
Assignees
Labels
bug Something isn't working feature/convert priority/important-longterm Medium priority, to be worked on within the following 1-2 business quarters.

Comments

@mutahhir
Copy link
Member

resource "aws_instance" "server" {
  ami           = "ami-a1b2c3d4"
  instance_type = "t2.micro"
}

actual

import constructs "github.com/aws/constructs-go/constructs"
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import "github.com/aws-samples/dummy/gen/providers/aws/instance"
type myConvertedCode struct {
	construct
}

func newMyConvertedCode(scope construct, name *string) *myConvertedCode {
	this := &myConvertedCode{}
	constructs.NewConstruct_Override(this, scope, name)
	instance.NewInstance(this, jsii.String("server"), &instanceConfig{
		ami: jsii.String("ami-a1b2c3d4"),
		instanceType: jsii.String("t2.micro"),
	})
	return this
}

expected

import constructs "github.com/aws/constructs-go/constructs"
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import "github.com/aws-samples/dummy/gen/providers/aws/instance"
type myConvertedCode struct {
	construct
}

func newMyConvertedCode(scope construct, name *string) *myConvertedCode {
	this := &myConvertedCode{}
	constructs.NewConstruct_Override(this, scope, name)
	instance.NewInstance(this, jsii.String("server"), &InstanceConfig{ // <- needs to be upper-case
		Ami: jsii.String("ami-a1b2c3d4"), // <- needs to be upper-case
		InstanceType: jsii.String("t2.micro"), // <- needs to be upper-case
	})
	return this
}
@mutahhir mutahhir added this to the 0.17 (tentative) milestone Apr 19, 2023
@xiehan xiehan added feature/convert bug Something isn't working priority/important-soon High priority, to be worked on as part of our current release or the following one. labels May 9, 2023
@mutahhir mutahhir self-assigned this Jun 13, 2023
@mutahhir mutahhir removed their assignment Jul 5, 2023
@xiehan xiehan added priority/important-longterm Medium priority, to be worked on within the following 1-2 business quarters. and removed priority/important-soon High priority, to be worked on as part of our current release or the following one. labels Jul 20, 2023
@DanielMSchmidt DanielMSchmidt self-assigned this Aug 4, 2023
@DanielMSchmidt
Copy link
Contributor

@xiehan xiehan modified the milestones: 0.18, 0.20 (tentative) Aug 15, 2023
@xiehan xiehan removed this from the 0.20 (tentative) milestone Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working feature/convert priority/important-longterm Medium priority, to be worked on within the following 1-2 business quarters.
Projects
None yet
Development

No branches or pull requests

3 participants