Pass Variable to BuildKite plugin

Hi Team,
I have this pipeline:

plugins:
      - zacharymctague/aws-ssm#v1.0.0:
          parameters:
            SOME_ROLE: /buildkite/dev/some_role
       
      - cultureamp/aws-assume-role#v0.2.0:
          environment: SOME_ROLE
          role: ${SOME_ROLE}

But the role is never getting assumed. Is there something missing or there is some other way to do it?

Hey @ismail!

Taking a look at those plugins, it looks like they both run as a pre-command hook, you could instead try using the “alternate” way of setting the sole in the culture amp plugin, which may work however multiple plugins using the same hook may be resulting in one firing before the other/in an unexpected order.

steps:
  - command: bin/ci-aws-thing
    plugins:
      - zacharymctague/aws-ssm#v1.0.0:
          parameters:
            AWS_ASSUME_ROLE_ARN: /buildkite/dev/some_role
      - cultureamp/aws-assume-role

Alternatively, if you have a build or pipeline you’d like us to look at then you can email us at support@buildkite.com and we’ll be able to take a closer look. That will allow us to take a look in to things like running order if the above doesn’t solve the issue.

Cheers

This worked. Thanks @benmc!

That’s great to hear @ismail! :tada:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.