coreos / tectonic-forum

Apache License 2.0
30 stars 9 forks source link

OpenStack installer references a non existent terraform datasource #197

Open tomstockton opened 6 years ago

tomstockton commented 6 years ago

Issue Report Template

Tectonic Version

tectonic-1.7.3-tectonic.2

Environment

Tectonic is being executed on OS X El Capitan

What hardware/cloud provider/hypervisor is being used with Tectonic?

OpenStack

Expected Behavior

Terraform plan completes without error.

Actual Behavior

1 error(s) occurred:

* module.dns.data.openstack_dns_zone_v2.tectonic: Provider doesn't support data source: openstack_dns_zone_v2

Reproduction Steps

Follow the tectonic openstack installer guide 😉

  1. https://coreos.com/tectonic/docs/latest/install/openstack/openstack-terraform.html

Other Information

It appears that the OpenStack installer code is referencing a terraform datasource that does not exist.

The code (linked above) references data "openstack_dns_zone_v2" "tectonic", however this appears to not yet exist! See https://www.terraform.io/docs/providers/openstack/index.html# for a list of currently supported data sources.

robszumski commented 6 years ago

Any ideas on this @lblackstone?

lblackstone commented 6 years ago

Yes, that error means the OpenStack environment you're deploying to does not include Designate support. In this case, you can use an alternative DNS provider like Route53.

To use Route53, export the relevant AWS creds and then follow these steps:

  1. Change https://github.com/coreos/tectonic-installer/blob/1.7.3-tectonic.2/platforms/openstack/neutron/main.tf#L182 to be source = "../../../modules/dns/route53"
  2. Delete https://github.com/coreos/tectonic-installer/blob/1.7.3-tectonic.2/platforms/openstack/neutron/main.tf#L187
nwright-nz commented 6 years ago

Hi @lblackstone - I use an OpenStack environment with Designate enabled and fully functional and received the same error as @tomstockton . The datasource doesn't exist in the OpenStack provider. I had to change the datasource to a resource in the designate module, and reference it accordingly in the templates. This works fine, and all the DNS entries are populated in Designate.

lblackstone commented 6 years ago

@nwright-nz Ah, good catch. I'm using a different DNS provider, so I didn't notice that bug earlier. Submitted a fix upstream. ^

lblackstone commented 6 years ago

Took another look at this today, and realized that the behavior you were seeing was actually intentional. This module expects that the DNS zone has already been created prior to running the plan, which allows multiple clusters to use the same zone. If needed, it should be possible to make that behavior configurable, but you'd need to open an issue on https://github.com/coreos/tectonic-installer/

Reverting my previous change at https://github.com/coreos/tectonic-installer/pull/2247