Skip to content
This repository has been archived by the owner on Feb 5, 2020. It is now read-only.

AWS Terraform config doesn't work due to invalid aws_autoscaling_group argument #571

Closed
aknuds1 opened this issue May 6, 2017 · 4 comments

Comments

@aknuds1
Copy link
Contributor

aknuds1 commented May 6, 2017

The Terraform config for AWS doesn't work since an invalid aws_autoscaling_group is in use: tags:

terraform plan ../../platforms/aws
2 error(s) occurred:

* module.masters.aws_autoscaling_group.masters: : invalid or unknown key: tags
* module.workers.aws_autoscaling_group.workers: : invalid or unknown key: tags
@s-urbaniak
Copy link
Contributor

Thanks for the report! Nevertheless, this is not a bug, but a feature ;-) We rely on a not-yet-merged AWS tagging feature, see [1] and include a custom AWS plugin in this repository.

Please follow the top-level README [2] to build an installer binary which includes the custom AWS plugin. More concretely it should be sufficient to invoke make build in the installer directory.

I am closing this issue then for now.

[1] hashicorp/terraform#13574
[2] https://github.com/coreos/tectonic-installer/blob/master/README.md

@aknuds1
Copy link
Contributor Author

aknuds1 commented May 8, 2017

@s-urbaniak I'm wondering if something changed, since the build fails differently from before (I also run make build in the installer dir):

$ PLATFORM=aws make -s build -C installer && PLATFORM=aws make plan
Using build directory [/Users/arve/go/src/github.com/coreos/tectonic-installer/build/demo]
sed "s|<PATH_TO_INSTALLER>|/Users/arve/go/src/github.com/coreos/tectonic-installer/installer/bin/darwin/installer|g" terraformrc.example > .terraformrc
cd /Users/arve/go/src/github.com/coreos/tectonic-installer/build/demo && TERRAFORM_CONFIG=/Users/arve/go/src/github.com/coreos/tectonic-installer/.terraformrc terraform plan /Users/arve/go/src/github.com/coreos/tectonic-installer/platforms/aws
Failed to load root config module: Error loading modules: module vpc: not found, may need to be downloaded using 'terraform get'
make: *** [plan] Error 1

What do you think?

@aknuds1
Copy link
Contributor Author

aknuds1 commented May 8, 2017

@s-urbaniak I found out that the reason for the module error was that the directory build/<cluster>/.terraform already existed, which in turn means that make won't invoke terraform get. Might it be a good idea to always invoke terraform get to ensure that modules are installed? According to the terraform get documentation, updates aren't performed (unless you provide the -update flag) so it should be safe to call terraform get repeatedly.

@aknuds1
Copy link
Contributor Author

aknuds1 commented May 8, 2017

@s-urbaniak I made a PR for always running terraform get instead of checking that the .terraform dir exists.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants