puresec / aws-parsecf Goto Github PK
View Code? Open in Web Editor NEWParse AWS CloudFormation's intrinsic functions in the template
License: Other
Parse AWS CloudFormation's intrinsic functions in the template
License: Other
See also:
replace() argument 2 must be str, not bool
The issue is happening when the bool is being replaced AS IS.
Here is an example
VARIABLES: {'Param1': 'http://proxy.xxxxx.com', 'Param2': 'http://proxy.xxxxx.com', 'Param3': '127.0.0.1,localhost,instance-data,xxx.xxxx.xxx.xxx,.elb.amazonaws.com,.verizon.com,.ebiz.verizon.com,oneartifactory.verizon.com', '_exploded': True}
name: Param1 VALUE: sed -i 's#Starting cfn-hup: "#Starting cfn-hup: "\n export https_proxy=${Param1} http_proxy=${Param2} no_proxy=${Param3}\n#' /etc/init.d/cfn-hup target: http://proxy.xxxx.com TYPE: <class 'str'>
name: Param2 VALUE: sed -i 's#Starting cfn-hup: "#Starting cfn-hup: "\n export https_proxy=http://proxy.xxxx.com http_proxy=${Param2} no_proxy=${Param3}\n#' /etc/init.d/cfn-hup target: http://proxy.xxx.com TYPE: <class 'str'>
name: Param3 VALUE: sed -i 's#Starting cfn-hup: "#Starting cfn-hup: "\n export https_proxy=http://proxy.xxx.com http_proxy=http://proxy.xxx.com no_proxy=${Param3}\n#' /etc/init.d/cfn-hup target: 127.0.0.1,localhost,instance-data,xxx.xxx.xxx.xxx,.elb.amazonaws.com,.xxx.com,.xxx.com,oneartifactory.xxx.com TYPE: <class 'str'>
name: _exploded VALUE: sed -i 's#Starting cfn-hup: "#Starting cfn-hup: "\n export https_proxy=http://proxy.xxx.com http_proxy=http://proxy.xxx.com no_proxy=127.0.0.1,localhost,instance-data,xxx.xxx.xxx.xxx,.elb.amazonaws.com,.xxx.com,.xxx.com,oneartifactory.xxx.com\n#' /etc/init.d/cfn-hup target: True TYPE: <class 'bool'>
ERRORS: ERROR: internal exception in aws_parsecf caused issue while parsing the template file!! - replace() argument 2 must be str, not bool
I have a solution for it that I have tested.
'isinstance(<variable>, unicode) needs to be added when 'isinstance(<variable>, str) is used in 'conditions.py', 'functions.py' and 'parse.py'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.