perfectsense / gyro

Gyro is a command-line tool for creating, updating, and maintaining cloud infrastructure. Gyro makes infrastructure-as-code possible.
https://gyro.dev
Apache License 2.0
134 stars 7 forks source link

Allow @uses-credentials directive to be used inside root scope directives #327

Closed deepanjan90 closed 4 years ago

deepanjan90 commented 4 years ago

Is your feature request related to a problem? Please describe. There should be a way for specifying custom credentials inside root scope directives. Ex for different file backend implementation.

@file-backend 'aws::s3', 'builds'
    bucket: $data-bucket
    @uses-credentials: "us-east-21"
@end

Describe the solution you'd like The @uses-credentials already exists that is used to specify the credentials while creating a resource. This can be extended to support file-backend directives as well. like:

@file-backend 'aws::s3', 'builds'
    bucket: $data-bucket
    @uses-credentials: "us-east-2"
@end

Additional context This is a feature required when @file-bakend needs to specify a particular region which foe some cases s supplied as part of the credential definition. Ref : https://github.com/perfectsense/gyro-aws-provider/issues/310