In addition to setting parameter values directly within CloudTruth, values can also be created which reference external sources. In this example, we will connect a value from a JSON file within an AWS S3 bucket.
Start by connecting an existing AWS account. Under "Integrations", choose "Add AWS Account". Provide a unique account name for use within CloudTruth, as well as the account # for the external AWS account, and the name of a role to be used for granting access to the account. Once this is complete, click "Mark as Pending". The account will now be listed in a Pending state under Integrations.
Next, follow the instructions under Assets of Setting up AWS Role, in order to establish an AWS Role and Policy for allowing CloudTruth to access your S3 buckets.
Once this is complete, your account status should change from Pending to Connected. Note: once the role has been created, your account may temporarily show an Error state until the specified policy has been applied.
Congratulations, your account is now ready to use! View the details of a parameter, and select an environment.
Click "Edit Value" and toggle the value type to "Dynamic".
You are now presented with a dynamic screen for locating reference values. Use the Location window on the left to browse your S3 buckets and locate a configuration file. Once selected, the contents of the file will displayed in the lower left. Use the JMESPath selector to input the location of the value.
In our example, "timeout' is specified in order to locate a top-level parameter by name. You can test your reference by clicking "See Value" in order to display the contents of the Reference Value. If the JMESPath does not return a valid result, error details will be displayed. Please see "JMESPath Reference" for additional details on using JMESPath to locate values.
Once you are satisfied with your referenced value, click "Save", and you will be returned to the Parameter detail screen.