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.