01-07-2016 09:26 AM - edited 03-12-2019 07:21 AM
Is it possible to use multiple 'ios-config" lines in the userdata section when creating a CSR with Cloudformation? When I add multiple lines it appears that they get combined when pushed to the CSR.
There is no problem when using the userdata section in the GUI, just with CloudFormation.
I used this as the foundation for my test:
https://supportforums.cisco.com/discussion/12700076/restapi-and-automated-deployment-support
01-11-2016 07:58 AM
Any help here would be appreciated!
05-29-2016 08:34 AM
Here is an example of providing multi-line UserData in CloudFormation. You'll notice every line contains a newline character (\n), in-line quotes are escaped, and finally the entire string is base64 encoded. Hope this helps.
"UserData" : { "Fn::Base64":
{ "Fn::Join": [ "", [
"ios-config-1=\"interface Tunnel2\"\n",
"ios-config-2=\"no shutdown\"\n",
"ios-config-3=\"exit\"\n"
] ]
}
}
06-03-2016 08:02 AM
Hi,
i also struggle with " in CloudFormation UserData CSR config.
and tried a workaround
As i already have access to my corporate network during the last lines of the "ios-config-xxx" i just loaded the EEM scripts via TFTP to the router
as follows ->
"ios-config-0085=file prompt quiet\n",
"ios-config-0086=do copy tftp://x.x.x.x/tacacs system:/running-config\n",
"ios-config-0087=do copy tftp://x.x.x.x/aws-cloud-config system:/running-config\n"
but also failed for the moment
06-05-2016 11:39 PM
Finally found a solution
!
"ios-config-0071=file prompt quiet\n",
"ios-config-0072=kron policy-list SETUP\n",
"ios-config-0073= cli copy tftp://x.x.x.x/aws-cloud-setup running-config\n",
"ios-config-0074=kron occurrence SETUP in 1 oneshot\n",
"ios-config-0075=policy-list SETUP\n"
Edit:
But is not stable :( Most of the time it fails :(
08-26-2016 05:24 AM
The user-data for an instance is available for any process on the instance to retrieve at this location:
http://169.254.169.254/latest/user-data
The DNS name "instance-data" resolves to that IP address, Pega so if you trust DNS to be up, you can also use the easier to remember:
http://instance-data/latest/user-data
Here are the Amazon docs:
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AESDG-chapter-instancedata.html
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide