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

Remove percent sign when parsing metadata name #7417

Merged
merged 2 commits into from
Mar 9, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mmv1/provider/terraform_kcc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def guess_metadata_mapping_name(object)
# Split the last import format by '/' and take the last part. Then use
# the regex to verify if it is a value field in the format of {{value}}.
last_import_part =
import_id_formats_from_resource(object)[-1].split('/')[-1].scan(/{{[[:word:]]+}}/)
import_id_formats_from_resource(object)[-1].gsub('%', '').split('/')[-1].scan(/{{[[:word:]]+}}/)
# If it is a value field, the length of last_import_part will be 1;
# otherwise it'll be 0.
# Remove '{{' and '}}' and only return the field name.
Expand Down