amazon web services - Cloudformation: Outputs - Can you return a value from a file -
cloudformation appears have "outputs" section can have value referenced other stacks, or display user, etc.
is possible use make contents of file available?
e.g. i've got jenkins install initial admin password stored within:
/var/lib/jenkins/secrets/initialadminpassword
i'd love have value available after deploying our jenkins cloudformation stack without having ssh server.
is possible outputs section, or other way cloudformation templates?
the outputs section cloud formation template meant find resource easily.
for resource create, can output properties defined in fb::getatt documentation.
for example, connection string rds instance created using cloud formation template, can use following
"outputs" : { "jdbcconnectionstring": { "description" : "jdbc connection string master database", "value" : { "fn::join": [ "", [ "jdbc:mysql://", { "fn::getatt": [ "mydatabase", "endpoint.address" ] }, ":", { "fn::getatt": [ "mydatabase", "endpoint.port" ] }, "/", { "ref": "mydbname" }] ]} } }
it not possible output contents file. moreover, outputs visible users having access aws account. so, having password output not recommended.
i suggest upload secrets private s3 bucket after cloud formation create stack operation successful , download secrets whenever required.
hope helps.
Comments
Post a Comment