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

Fn::Sub replace error #12

Open
sorkan opened this issue Jun 9, 2023 · 0 comments
Open

Fn::Sub replace error #12

sorkan opened this issue Jun 9, 2023 · 0 comments

Comments

@sorkan
Copy link

sorkan commented Jun 9, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant