-
-
Notifications
You must be signed in to change notification settings - Fork 138
Description
Describe the Bug
Despite that gomplate has timeout settings configured in atmos.yaml as gomplate.timeout or env.AWS_TIMEOUT - the framework does not seem to respect timeout setting and still uses the default AWS SDK Go timeout.
When I execute atmos plan for a component which uses datasource gomplates function - plan fails with timeout error:
RequestError: send request failed
caused by: Get "https://portal.sso.us-east-1.amazonaws.com/federation/credentials?account_id=<account-id>&role_name=<role-name>": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
When I ran the same atmos command with env variable set by the shell - there is no timeout error, e.g AWS_TIMEOUT="5000" atmos terraform plan <component> -s <stack>.
AWS SDK Go has a default timeout set at 500ms, which kind of explains the timeout error.
Expected Behavior
When templates.settings.gomplate.timeout set to 5 (seconds) or templates.settings.env.AWS_TIMEOUT set to 5000 (ms) in atmos.yaml - gotemplate datasource function will respect the settings
Steps to Reproduce
- in
atmos.yamlconfigure template settings:
templates:
settings:
env:
AWS_TIMEOUT: "5000"
gomplate:
enabled: true
timeout: 10
datasources:
datasource-from-secret:
url: "aws+sm:<secret-name>"- Use
gomplatedatasourcefunction in a component:
components/sns-topic:
metadata:
component: sns-topic
inherits:
- sns-topic/defaults
vars:
name: 'component'
...
endpoint: 'https://host.example/{{ (datasource "datasource-from-secret") }}/example'
...
- run `atmos terraform plan component/sns-topic -s
Screenshots
No response
Environment
- atmos version 1.168.0
- Terraform version 1.9.8
Additional Context
No response