You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hi there,
I've spent ages googling and looking at all of the documentation I can find and I need some help so I'm calling in the big guns and posting on the forums :).
I am using a terraform image for 99% of my pipeline but there is one command I need the aws cliv2 for. I was hoping to use that image as a service container butevery configuration I try ends with the same error
"aws: error: the following arguments are required: command"
in all of the documentation I've seen this seems like it should work in theory and I am just making a silly syntax mistake somewhere... any guidance would be much appreciated here
I've pasted the relevant bitbucket-pipelines.yml snippets below.
image: hashicorp/terraform
pipelines:
default:
- step:
name: New Code Detected
services:
- aws-cli
script:
- echo "New code pushed to ${BITBUCKET_BRANCH}"
- aws-cli aws help
definitions:
services:
aws-cli:
image: amazon/aws-cli
any advice on how I can get this working?
EDIT: I tried the same with the atlassian/pipelines-awscli image and got the same error.
Hi @[deleted]
Thank you for contacting Atlassian Community, my name is Norbert and I'm a Bitbucket Cloud Support Engineer, it's nice to meet with you.
Unfortunately it seems, that the aws-cli images are not working as services and it's not able to run the aws commands. When I had the following configuration in bitbucket-pipelines.yml file, I was able to run the "aws help" command:
image: amazon/aws-cli
pipelines:
default:
- step:
name: New Code Detected
script:
- echo "New code pushed to ${BITBUCKET_BRANCH}"
- aws help
As a workaround, can I ask you to use the following image? This image contains both terraform and aws-cli, so I believe with this image, you can achieve what you would like to: https://hub.docker.com/r/zenika/terraform-aws-cli
Please let me know how it goes.
Best Regards,
Norbert
Atlassian Bitbucket Cloud Support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.