Skip to content
New issue

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

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

Already on GitHub? # to your account

Add explicit "create_ca" bool #1

Merged
merged 3 commits into from
Aug 24, 2018
Merged

Add explicit "create_ca" bool #1

merged 3 commits into from
Aug 24, 2018

Conversation

bendrucker
Copy link

In order to allow the user to pass in a CA cert or otherwise autogenerate one, this module uses the following:

count = "${var.ca_certificate == "" ? 1 : 0}"

That works fine if you pass in the ca cert as a string, but not if it's dynamic. If it's dynamic you run into this: hashicorp/terraform#17421

In https://github.com/TakeScoop/kubernetes/pull/60, we're passing this in as the result of https://github.com/TakeScoop/kubernetes/blob/master/modules/ca/main.tf#L7-L25

This means that terraform can't figure out whether it should create the CA cert here at plan time and fails with an error. I've added this create_ca var that can be set statically to determine count. Then the actual CA cert can be passed dynamically with no problem.

Copy link

@beyondbill beyondbill left a comment

Choose a reason for hiding this comment

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

👍

@bendrucker bendrucker merged commit 2bdabbc into master Aug 24, 2018
@bendrucker bendrucker deleted the explicit-custom-ca branch August 24, 2018 00:47
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants