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

Allow to automatically read terraform state from directory #495

Merged
merged 3 commits into from
Jun 17, 2019

Conversation

eqrx
Copy link
Contributor

@eqrx eqrx commented Jun 14, 2019

What this PR does / why we need it:
Solves #421

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #421

Special notes for your reviewer:

Documentation:
None

Release note:

Terraform state can now be read from stdin, file or be collected from a directory

@kubermatic-bot kubermatic-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: no Denotes that at least one commit in the pull request doesn't have a valid DCO signoff message. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 14, 2019
@eqrx eqrx force-pushed the terraformreadout branch from 70a182f to aa6eeb8 Compare June 14, 2019 10:21
@kubermatic-bot kubermatic-bot added dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. and removed dco-signoff: no Denotes that at least one commit in the pull request doesn't have a valid DCO signoff message. labels Jun 14, 2019
@eqrx eqrx requested review from kron4eg and xmudrii June 14, 2019 10:21
@eqrx eqrx added this to the v0.9 milestone Jun 14, 2019
@eqrx eqrx force-pushed the terraformreadout branch 2 times, most recently from 7d37b35 to ec1799d Compare June 14, 2019 11:22
Copy link
Member

@kron4eg kron4eg left a comment

Choose a reason for hiding this comment

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

/lgtm

@kubermatic-bot kubermatic-bot added the lgtm Indicates that a PR is ready to be merged. label Jun 14, 2019
@kubermatic-bot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 3c6c97914dc725db47d90f0d4fd3a5e3839df9b9

@kron4eg
Copy link
Member

kron4eg commented Jun 14, 2019

/assign @xmudrii

PTAL

@kron4eg
Copy link
Member

kron4eg commented Jun 14, 2019

@eqrx probably some log message is needed. Something like "exec terraform output".

@kron4eg kron4eg removed the lgtm Indicates that a PR is ready to be merged. label Jun 14, 2019
@kron4eg
Copy link
Member

kron4eg commented Jun 14, 2019

I've testes this with

$ kubeone install config.yaml -t .
$ kubeone reset config.yaml -t .

works quite good!

@eqrx
Copy link
Contributor Author

eqrx commented Jun 14, 2019

I could include the output, should I just write it to stdout or use some logger?

@kron4eg
Copy link
Member

kron4eg commented Jun 14, 2019

oh, the output should be output only when -v flag is used (Verbose).

@eqrx
Copy link
Contributor Author

eqrx commented Jun 14, 2019

Should I pass the logger down to loadClusterConfig then?

@kron4eg
Copy link
Member

kron4eg commented Jun 14, 2019

Context.Logger it is

@xmudrii
Copy link
Member

xmudrii commented Jun 14, 2019

Looks great to me 💯 As @kron4eg mentioned, it would be nice to add some output, but besides that lgtm.

@eqrx
Copy link
Contributor Author

eqrx commented Jun 14, 2019

util.Context is created after that function runs and is not available :(

@kron4eg
Copy link
Member

kron4eg commented Jun 14, 2019

@eqrx then... call logger creation before running terraform output :)

@eqrx
Copy link
Contributor Author

eqrx commented Jun 14, 2019

@kron4eg alright :D on it

@kubermatic-bot kubermatic-bot added dco-signoff: no Denotes that at least one commit in the pull request doesn't have a valid DCO signoff message. and removed dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. labels Jun 17, 2019
@kubermatic-bot kubermatic-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 17, 2019
Alexander Sowitzki and others added 2 commits June 17, 2019 11:47
Signed-off-by: Alexander Sowitzki <alexander@loodse.com>
Signed-off-by: Artiom Diomin <kron82@gmail.com>
@eqrx eqrx force-pushed the terraformreadout branch from 4eb7203 to 8097980 Compare June 17, 2019 09:47
Signed-off-by: Alexander Sowitzki <alexander@loodse.com>
@eqrx eqrx force-pushed the terraformreadout branch from 8097980 to fb1fc0d Compare June 17, 2019 09:49
@kubermatic-bot kubermatic-bot added dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. and removed dco-signoff: no Denotes that at least one commit in the pull request doesn't have a valid DCO signoff message. labels Jun 17, 2019
@eqrx eqrx requested a review from kron4eg June 17, 2019 09:49
Copy link
Member

@kron4eg kron4eg left a comment

Choose a reason for hiding this comment

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

/approve

@kubermatic-bot kubermatic-bot added the lgtm Indicates that a PR is ready to be merged. label Jun 17, 2019
@kubermatic-bot
Copy link
Contributor

LGTM label has been added.

Git tree hash: bc2196511c42189c12378bb6c90390ed475f4c82

@kubermatic-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kron4eg

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubermatic-bot kubermatic-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 17, 2019
@kubermatic-bot kubermatic-bot merged commit 557ac4b into master Jun 17, 2019
@kubermatic-bot kubermatic-bot deleted the terraformreadout branch June 17, 2019 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Read terraform outputs directly from terraform state file (if it's accessible)
4 participants