Parsing parameters into workflow from UI

I am running the below command in my config.yml

terraform import aws_ssoadmin_account_assignment.<< pipeline.parameters.account_assignment >> << pipeline.parameters.account_assignment_params >>

For pipeline.parameters.account_assignment , I am passing the value as -

AWSAdministratorAccess["304939220200"]

However, it is read as below (without the quotes):

aws_ssoadmin_account_assignment.AWSAdministratorAccess[304939220200]

How to have the value passed with the quotes in the parameter via the Trigger Pipeline option?

The problem is going to come from the way that CircleCI and the shell is processing the resulting line

if you add

echo aws_ssoadmin_account_assignment.<< pipeline.parameters.account_assignment >> << pipeline.parameters.account_assignment_params >>

to your script, you will see that the output of the step in the build log will show that circleci is going to pass the following to the shell

 aws_ssoadmin_account_assignment.AWSAdministratorAccess[304939220200]

So at this point, the quotes have been removed by CircleCI’s internal processing. You can override this by adding escaped quotes to the parameter value so your input string goes from

 "304939220200"     ->    "/"304939220200/""

But this looks like a complete mess and while the echo command will show the expected output the shell is likely to then remove the quotes as it processes the command. This in turn can be fixed by placing single quotes around the variable so the echo now looks like

echo aws_ssoadmin_account_assignment.<< pipeline.parameters.account_assignment >> << 'pipeline.parameters.account_assignment_params >>`

With all these changes being made to the data input your best option is likely to write some additional shell script to check which parameters are being passed and then add the quotes if needed.