'Is there a simple way to import account ids from app.rb in Terraspace?

We're using the very handy app.rb to map our account ids to each env name, like so:

Terraspace.configure do |config|
    config.logger.level = :info
    config.test_framework = "rspec"
    config.layering.names = {
        "1234567890": "dev",
...
    }
end

But is there a good way to reverse this and fetch the account id to use in a stack via some helper like "<%= account_id %>" ?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source