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

dep check fails in pkg/terraform/exec #1471

Closed
serbrech opened this issue Mar 26, 2019 · 6 comments · Fixed by #1472
Closed

dep check fails in pkg/terraform/exec #1471

serbrech opened this issue Mar 26, 2019 · 6 comments · Fixed by #1472

Comments

@serbrech
Copy link
Contributor

serbrech commented Mar 26, 2019

Version

dev environment

Platform (all):

I want to add the azure terraform provider, and I'm looking at how I should manage the dependencies under pkg/terraform/exec.
from latest master, running dep check under the exec folder fails with :

~/go/src/github.com/openshift/installer/pkg/terraform/exec master
% dep check            
# Gopkg.lock is out of sync:
github.com/hashicorp/terraform/version: in Gopkg.lock's input-imports, but neither imported nor required

dep version :

% dep version
dep:
 version     : v0.5.0
 build date  : 2018-07-26
 git hash    : 224a564
 go version  : go1.10.3
 go compiler : gc
 platform    : darwin/amd64
 features    : ImportDuringSolve=false

I'll just send a PR to fix the above if in case it's not expected.

I am unsure how you manage the dependencies under this folder as there seems to be a hierarchy between exec and the plugins?
Do you have docs around how to manage the dependencies for terraform?

Thanks

@wking
Copy link
Member

wking commented Mar 26, 2019

I am unsure how you manage the dependencies under this folder as there seems to be a hierarchy between exec and the plugins?

I'm also not all that clear on the Terraform/plugin split. @abhinavdahiya?

Do you have docs around how to manage the dependencies for terraform?

Here, but it doesn't go into detail about the Terraform nesting.

@serbrech
Copy link
Contributor Author

More concretely, how would I go about adding github.com/terraform-providers/terraform-provider-azurerm to support my other PRs?
so far, I am using MODE=dev to hit this :

// +build !release
when building.

I then point the installer at the data/data folder for the assets when creating the cluster.

MODE=dev hack/build.sh
OPENSHIFT_INSTALL_DATA=data/data bin/openshift-install create cluster

And I'm not sure if that was a clever hack, or the intended way to do it, but it works for my dev environment. 😆

@abhinavdahiya
Copy link
Contributor

abhinavdahiya commented Mar 26, 2019

More concretely, how would I go about adding github.com/terraform-providers/terraform-provider-azurerm to support my other PRs?

maybe this will help abhinavdahiya@7b71c90

@wking
Copy link
Member

wking commented Mar 26, 2019

And I'm not sure if that was a clever hack, or the intended way to do it...

MODE=dev is intended for iterating on Terraform modules without having to recompile the installer, so yeah, that was the plan ;). In practice, compilation is cheap, so I rarely bother :p.

@serbrech
Copy link
Contributor Author

@abhinavdahiya I figured out the plugins.go but the constraint part wasn't clear. thanks

@DanyC97
Copy link
Contributor

DanyC97 commented Apr 3, 2019

do you think #1471 (comment) should be added in the hack dir / dev readme ?

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 a pull request may close this issue.

4 participants