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

Upgrade type structure for Fn::FindInMappings #76

Merged
merged 1 commit into from
Oct 23, 2022
Merged
Changes from all commits
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
8 changes: 5 additions & 3 deletions src/ir/resources.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,9 +350,11 @@ pub fn translate_resource(
Ok(ResourceIr::Sub(r))
}
ResourceValue::FindInMap(mapper, first, second) => {
let mapper_str = translate_resource(mapper, resource_translator)?;
let first_str = translate_resource(first, resource_translator)?;
let second_str = translate_resource(second, resource_translator)?;
let mut rt = resource_translator.clone();
rt.complexity = Complexity::Simple(SimpleType::String);
let mapper_str = translate_resource(mapper, &rt)?;
let first_str = translate_resource(first, &rt)?;
let second_str = translate_resource(second, &rt)?;
Ok(ResourceIr::Map(
Box::new(mapper_str),
Box::new(first_str),
Expand Down