Closed mjschultz closed 6 years ago
IMHO there must be some validation that it's working with the IAM role OR key and secret.
Do you mean a parameter that explicitly says "use the IAM role"? That is you'd have to provide either (access_key+secret_key) OR (use_iam: true)?
I've added the logic to verify that the .drone.yml includes either the (access_key and secret_key) or a use_iam flag.
If none are specified it will print a message stating that some must be specified (will not cause a build failure).
If all are specified it treats that as ambiguous, and exits the plugin with a status of 1 (causing a build failure).
@tboerger @bradrydzewski any feedback/clarifications?
lgtm
i think this is a reasonable solution, i do think you should update the docs to make sure it's very clear that use_iam
cannot be used with the access_key
/secret_key
pair though
https://github.com/drone-plugins/drone-s3/pull/19 is also an interesting discussion.
with .5 it's moved to using the verified yml for using instance roles. #20 is pulled into the latest. Not sure if we should close this PR unless it's for .4 only?
+1
This can be closed, the plugin already uses the default authentication (IAM) if no key and secret is defined: https://github.com/drone-plugins/drone-s3/blob/master/plugin.go#L95-L99
Projects should be careful about what they try to upload and use the more generic
when: repo: owner/name
method instead.Closes: https://github.com/drone-plugins/drone-s3/issues/11