Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GCP Cloud SDK to Terraform deployer image #638

Merged
merged 4 commits into from
Jan 20, 2022
Merged

Add GCP Cloud SDK to Terraform deployer image #638

merged 4 commits into from
Jan 20, 2022

Conversation

endorama
Copy link
Member

@endorama endorama commented Dec 24, 2021

Terraform deployer image may need some additional Cloud Service Provider specific tooling to handle corner cases not handled by Terraform itself.

In this case this commits adds support for bq tool from GCP Cloud SDK.

As bq and the entire GCP Cloud SDK requires python, is easy to add AWS or Azure dedicated tooling in the future (as both are Python-based).

This PR is a follow-up for thread we started in https://github.com/elastic/integrations/pull/2312/files/f9557ea229de629c78ccb5d736efec2ab8ae104b#diff-6f3fb9692206fe5de2c5656d237ad692e6772234331ed60d7c91e674072d417e, where more CSP dedicated tools where needed in the Terraform deployer Docker image.

@endorama endorama requested a review from mtojek December 24, 2021 15:33
@elasticmachine
Copy link
Collaborator

elasticmachine commented Dec 24, 2021

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-01-20T10:42:36.312+0000

  • Duration: 29 min 9 sec

  • Commit: 54883e3

Test stats 🧪

Test Results
Failed 0
Passed 459
Skipped 0
Total 459

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

FROM python:3-alpine

# required by gcloud SDK
RUN apk add curl
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: apk add --no-cache

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also:

I checked here and there is also Git and OpenSSH installed in the original Docker image. Let's add them also to this custom one.


COPY --from=terraform /bin/terraform /usr/bin/terraform

ENV TF_IN_AUTOMATION=true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@mtojek
Copy link
Contributor

mtojek commented Jan 19, 2022

Hey @endorama! Please ping me when this PR is ready for another review round :)

@endorama
Copy link
Member Author

@mtojek Just updated with all requested changes! (Thanks for the ping, it slipped through ;))

@mtojek mtojek self-requested a review January 19, 2022 16:51
Copy link
Contributor

@mtojek mtojek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@endorama Looks good to me, but let's merge latest master branch to make sure that it's ok :)

Terraform deployer image may need some additional Cloud Service Provider
specific tooling to handle corner cases not handled by Terraform itself.

In this case this commits adds support for `bq` tool from GCP Cloud SDK.

As `bq` and the entire GCP Cloud SDK requires python, is easy to add AWS
or Azure dedicated tooling in the future (as both are Python-based).
@mtojek mtojek merged commit c36cbb2 into elastic:master Jan 20, 2022
@endorama endorama deleted the terraform-deployer-gcpsdk branch January 20, 2022 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants