akamai / cli-terraform

Akamai CLI plugin Admin Support for multiple OpenAPI resource types

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DXE-3244 Multiline note in Activation leads to invalid property.tf

mehanig opened this issue · comments

Hello,

I wanted to report an issue with Multiline comment in activation, which leads to invalid configuration file produced by akamai terraform --section default export-property <property_name>

To repro the issue:

  1. activate property version with multiline comment:
image 2) run `akamai terraform --section default export-property {{property_name}}`

resulted property.tf contains multiline comment, but it's not properly formatted and results in terraform init not working:

Terraform can determine which modules and providers need to be installed.
╷
│ Error: Invalid multi-line string
│ 
│   on property.tf line 44, in resource "akamai_property_activation" {{property_name}}:
│   44:   note                           = "Multiline
│   45: Comment"
│ 
│ Quoted strings may not be split over multiple lines. To produce a multi-line string, either use the \n escape to represent a newline character or use the "heredoc"
│ multi-line template syntax.
╵

╷
│ Error: Unterminated template string
│ 
│   on property.tf line 44, in resource "akamai_property_activation" {{property_name}}:
│   44:   note                           = "Multiline
│   45: Comment"
│ 
│ No closing marker was found for the string.

I can see that the similar issue was reported with #24 but there was no repro provided.

I also searched a bit through the source code, to find if the issue was easy to spot, but wasn't able to find a problem with how configuration is created.

Hi @mehanig,

The issue you're describing is being already worked on.

With regards,
Cyryl

Fix for this was included in end of October release.