-
Notifications
You must be signed in to change notification settings - Fork 82
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
TypeError in overrides.py with ResourceGroup #290
Comments
Thanks for reporting this issue @eightnoneone I think I understand what is happening here. Cloudformation tags are normally in list like this: Tags:
- Key: Foo
Value: Bar We have to convert these into the form Terraform uses: tags = {
Foo = "Bar"
} The problem here is that we are attempting to do the conversion but the tags = locals.IsApplicationNameProvided == true ? { Key = "ApplicationName", Value = aws_some_resouce.ApplicationName.arn } : {} Let me do some digging into the code and see if I can come up with a fix. At the very least, we shouldn't stop the conversion for every error we encounter. |
I'm also seeing what looks like a repeating problem in dealing with this overly complicated CF that the I know it's a weird case, but with the May 26 2024 deadline for OpsWorks sunset, you might be getting more and more users trying what I'm trying (Opsworks->CF->TF). I appreciate the tool and I can easily edit around the output it's produced. Just a "head's up." For an ASG in the CF template:
Resulting TF:
|
@eightnoneone I thought I had responded but I guess I forgot to hit send. When you have a commented-out property like In your case, you have so many because We use I just opened my laptop to take a look at this, but I have to do updates first =/ |
Here it is with debug logging:
I think it didn't like the camel case split. When I remove it we get better results:
But there seems to be some additional problems...
|
Now we are getting somewhere
This looks better: data "aws_caller_identity" "current" {}
data "aws_partition" "current" {}
resource "aws_autoscaling_group" "application_asg" {
health_check_grace_period = 30
health_check_type = "ELB"
launch_template {
// CF Property(LaunchTemplateId) = "LaunchTemplateId"
version = "LaunchTemplateVersion"
}
name = "ClassicELB"
max_size = "0"
min_size = "0"
service_linked_role_arn = "arn:${data.aws_partition.current.partition}:iam::${data.aws_caller_identity.current.account_id}:role/aws-service-role/autoscaling.amazonaws.com/foo"
target_group_arns = "ALBTargetGroup1"
termination_policies = "Default"
vpc_zone_identifier = "Subnet1,Subnet2"
} but it's not perfect:
That seems right but this:
Seems like it should have matched =/ |
@eightnoneone Can you install the latest "pre-release" version and confirm that things are better?
|
Closing this now that v0.8.0 is released. Feel free to reopen this issue or create new ones =) Thansk! |
I'm Doing a test conversion on a CF template produced by the OpsWorks-to-SystemsManager script that AWS provides.
The ResourceGroup is:
Getting this TypeError:
The text was updated successfully, but these errors were encountered: