coreos / tectonic-installer

Install a Kubernetes cluster the CoreOS Tectonic Way: HA, self-hosted, RBAC, etcd Operator, and more
Apache License 2.0
600 stars 267 forks source link

DNS zone error #1315

Closed Anmorata closed 7 years ago

Anmorata commented 7 years ago

hello,

was trying install tectonics through az console.

Error applying plan:

2 error(s) occurred:

Please include the following information in your report:

Terraform Version: 0.9.6
Resource ID: azurerm_resource_group.tectonic_cluster
Mismatch reason: attribute mismatch: location
Diff One (usually from plan): *terraform.InstanceDiff{mu:sync.Mutex{state:0, sema:0x0}, Attributes:map[string]*terraform.ResourceAttrDiff{"name":*terraform.ResourceAttrDiff{Old:"tectonic-cluster-kubernetes", New:"tectonic-cluster-kub

ernetes", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tags.%":terraform.ResourceAttrDiff{Old:"0", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil ), RequiresNew:false, Sensitive:false, Type:0x0}, "location":terraform.ResourceAttrDiff{Old:"northeurope", New:"", NewComputed:false, NewRemoved:false, NewExtra:"", RequiresNew:true, Sensitive:false, Type:0x0}}, Destroy:false, DestroyDe posed:false, DestroyTainted:false, Meta:map[string]interface {}(nil)} Diff Two (usually from apply): terraform.InstanceDiff{mu:sync.Mutex{state:0, sema:0x0}, Attributes:map[string]terraform.ResourceAttrDiff{"name":terraform.ResourceAttrDiff{Old:"", New:"tectonic-cluster-kubernetes", NewComputed:fals e, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Sensitive:false, Type:0x0}, "tags.%":terraform.ResourceAttrDiff{Old:"", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensit ive:false, Type:0x0}}, Destroy:false, DestroyDeposed:false, DestroyTainted:false, Meta:map[string]interface {}(nil)}

Also include as much context as you can about your config, state, and the steps you performed to trigger this error.

I get this error while install, can anyone help me

robszumski commented 7 years ago

What version of Tectonic was this? Through a real release, or from master, etc?

jasmingacic commented 7 years ago

I'm seeing similar problem using master

* module.dns.azurerm_dns_a_record.tectonic-api: 1 error(s) occurred:

* azurerm_dns_a_record.tectonic-api: Error creating DNS A Record: InvalidApiVersionParameter (400) - The api-version '2015-05-04-preview' is invalid. The supported versions are '2017-06-01,2017-05-10,2017-05-01,2017-03-01,2016-09-01,2016-07-01,2016-06-01,2016-02-01,2015-11-01,2015-01-01,2014-04-01-preview,2014-04-01,2014-01-01,2013-03-01,2014-02-26,2014-04'.
* module.dns.azurerm_dns_a_record.tectonic-master: 1 error(s) occurred:

* azurerm_dns_a_record.tectonic-master: Error creating DNS A Record: InvalidApiVersionParameter (400) - The api-version '2015-05-04-preview' is invalid. The supported versions are '2017-06-01,2017-05-10,2017-05-01,2017-03-01,2016-09-01,2016-07-01,2016-06-01,2016-02-01,2015-11-01,2015-01-01,2014-04-01-preview,2014-04-01,2014-01-01,2013-03-01,2014-02-26,2014-04'.
* module.etcd.azurerm_virtual_machine.etcd_node: 1 error(s) occurred:

* azurerm_dns_a_record.tectonic-console: Error creating DNS A Record: InvalidApiVersionParameter (400) - The api-version '2015-05-04-preview' is invalid. The supported versions are '2017-06-01,2017-05-10,2017-05-01,2017-03-01,2016-09-01,2016-07-01,2016-06-01,2016-02-01,2015-11-01,2015-01-01,2014-04-01-preview,2014-04-01,2014-01-01,2013-03-01,2014-02-26,2014-04'.
* module.dns.azurerm_dns_a_record.tectonic-worker: 1 error(s) occurred:

* azurerm_dns_a_record.tectonic-worker: Error creating DNS A Record: InvalidApiVersionParameter (400) - The api-version '2015-05-04-preview' is invalid. The supported versions are '2017-06-01,2017-05-10,2017-05-01,2017-03-01,2016-09-01,2016-07-01,2016-06-01,2016-02-01,2015-11-01,2015-01-01,2014-04-01-preview,2014-04-01,2014-01-01,2013-03-01,2014-02-26,2014-04'.
justaugustus commented 7 years ago

@robszumski @jasminSPC @s-urbaniak confirming that myself (and @tonytcampbell) are seeing this as well on Azure tectonic-installer runs:

* module.dns.azurerm_dns_a_record.tectonic-api: 1 error(s) occurred:

* azurerm_dns_a_record.tectonic-api: Error creating DNS A Record: InvalidApiVersionParameter (400) - The api-version '2015-05-04-preview' is invalid. The supported versions are '2017-06-01,2017-05-10,2017-05-01,2017-03-01,2016-09-01,2016-07-01,2016-06-01,2016-02-01,2015-11-01,2015-01-01,2014-04-01-preview,2014-04-01,2014-01-01,2013-03-01,2014-02-26,2014-04'.
* module.dns.azurerm_dns_a_record.tectonic-master: 1 error(s) occurred:

* azurerm_dns_a_record.tectonic-master: Error creating DNS A Record: InvalidApiVersionParameter (400) - The api-version '2015-05-04-preview' is invalid. The supported versions are '2017-06-01,2017-05-10,2017-05-01,2017-03-01,2016-09-01,2016-07-01,2016-06-01,2016-02-01,2015-11-01,2015-01-01,2014-04-01-preview,2014-04-01,2014-01-01,2013-03-01,2014-02-26,2014-04'.
* module.etcd.azurerm_virtual_machine.etcd_node: 1 error(s) occurred:

* azurerm_dns_a_record.tectonic-console: Error creating DNS A Record: InvalidApiVersionParameter (400) - The api-version '2015-05-04-preview' is invalid. The supported versions are '2017-06-01,2017-05-10,2017-05-01,2017-03-01,2016-09-01,2016-07-01,2016-06-01,2016-02-01,2015-11-01,2015-01-01,2014-04-01-preview,2014-04-01,2014-01-01,2013-03-01,2014-02-26,2014-04'.
* module.dns.azurerm_dns_a_record.tectonic-worker: 1 error(s) occurred:

* azurerm_dns_a_record.tectonic-worker: Error creating DNS A Record: InvalidApiVersionParameter (400) - The api-version '2015-05-04-preview' is invalid. The supported versions are '2017-06-01,2017-05-10,2017-05-01,2017-03-01,2016-09-01,2016-07-01,2016-06-01,2016-02-01,2015-11-01,2015-01-01,2014-04-01-preview,2014-04-01,2014-01-01,2013-03-01,2014-02-26,2014-04'.

This can be tracked to a vendor package: https://github.com/jen20/riviera/blob/master/azure/api.go#L5

I've opened a PR on that project to fix: https://github.com/jen20/riviera/pull/24 But it would also need to be tested and pulled into Terraform.

rajcheval commented 7 years ago

what is the impact of this issue? Does it mean that until this issue we cannot create a new azure K8 cluster? Is there a workaround to get past his issue?

s-urbaniak commented 7 years ago

@justaugustus great catch and thanks for submitting an upstream fix! @rajcheval I believe this is "just" a flake as I didn't experience this issue during my manual deployment tests.

jasmingacic commented 7 years ago

@s-urbaniak I get this error message each time I try running the installer against Azure.

@rajcheval There is a possible workaround if you were to checkout azure plugin and change this line to 2017-06-01 then install the plugin locally before running apply.

s-urbaniak commented 7 years ago

@jasminSPC gah, that seems to be region dependent then :-/ /cc @alexsomesan

alexsomesan commented 7 years ago

Ack @s-urbaniak. I also suspect this is caused by different regions of Azure supporting different subsets of API versions. @justaugustus' fix seems the right thing to do.

@rajcheval are you seeing the same problem when building across different Azure locations?

justaugustus commented 7 years ago

@tombuildsstuff from HashiCorp is sheparding using the Azure SDK for Go for DNS interactions instead of jen20/riviera.

xref: terraform-providers/terraform-provider-azurerm#192

jasmingacic commented 7 years ago

@s-urbaniak I've tried using eastus, westcentralus, centralus and northeurope and each is returning the same error.

jdumars commented 7 years ago

Fix is pending release from Terraform, AFAICT at the moment.

tombuildsstuff commented 7 years ago

👋

Cross-posting this update here: I've just released version 0.1.4 of the AzureRM Provider which includes the fix for this, more details here: https://github.com/terraform-providers/terraform-provider-azurerm/issues/192#issuecomment-318195698

Thanks!

justaugustus commented 7 years ago

@s-urbaniak @alexsomesan @jasminSPC or @metral -- I'm out this week, but can you give the fix referenced here a try: https://github.com/terraform-providers/terraform-provider-azurerm/issues/192#issuecomment-318195698

alexsomesan commented 7 years ago

Tested 0.1.4 of the AzureRM Provider in 3 different regions (northeurope, westeurope and centralus). Worked correctly in all three - can confirm it solves the issue as reported here.

jasmingacic commented 7 years ago

I was not able to test this successfully. But it could be that TF didn't pull correct plugin.

p.s. I'm using Terraform 0.10. dev.

alexsomesan commented 7 years ago

I built the provider myself, from the 0.1.4 tag.

On Thu 27. Jul 2017 at 21:19, Jasmin Gacic notifications@github.com wrote:

I was not able to test this successfully. But it could be that TF didn't pull correct plugin.

p.s. I'm using Terraform 0.10. dev.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/coreos/tectonic-installer/issues/1315#issuecomment-318460502, or mute the thread https://github.com/notifications/unsubscribe-auth/ABC-m0erXJ69RRe7VIeoPGgLuDpQlSxZks5sSOKigaJpZM4OQzI3 .

jasmingacic commented 7 years ago

Rebuilding it myself and testing it.

jasmingacic commented 7 years ago

Location northeurope it seems that 2016-04-01 isn't available either.

* azurerm_dns_a_record.tectonic-api: dns.RecordSetsClient#CreateOrUpdate: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="InvalidApiVersionParameter" Message="The api-version '2016-04-01' is invalid. The supported versions are '2017-06-01,2017-05-10,2017-05-01,2017-03-01,2016-09-01,2016-07-01,2016-06-01,2016-02-01,2015-11-01,2015-01-01,2014-04-01-preview,2014-04-01,2014-01-01,2013-03-01,2014-02-26,2014-04'."
* module.dns.azurerm_dns_a_record.tectonic-console: 1 error(s) occurred:

* azurerm_dns_a_record.tectonic-console: dns.RecordSetsClient#CreateOrUpdate: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="InvalidApiVersionParameter" Message="The api-version '2016-04-01' is invalid. The supported versions are '2017-06-01,2017-05-10,2017-05-01,2017-03-01,2016-09-01,2016-07-01,2016-06-01,2016-02-01,2015-11-01,2015-01-01,2014-04-01-preview,2014-04-01,2014-01-01,2013-03-01,2014-02-26,2014-04'."
* module.dns.azurerm_dns_a_record.tectonic-worker: 1 error(s) occurred:

* azurerm_dns_a_record.tectonic-worker: dns.RecordSetsClient#CreateOrUpdate: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="InvalidApiVersionParameter" Message="The api-version '2016-04-01' is invalid. The supported versions are '2017-06-01,2017-05-10,2017-05-01,2017-03-01,2016-09-01,2016-07-01,2016-06-01,2016-02-01,2015-11-01,2015-01-01,2014-04-01-preview,2014-04-01,2014-01-01,2013-03-01,2014-02-26,2014-04'."
* module.dns.azurerm_dns_a_record.tectonic-master: 1 error(s) occurred:

* azurerm_dns_a_record.tectonic-master: dns.RecordSetsClient#CreateOrUpdate: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="InvalidApiVersionParameter" Message="The api-version '2016-04-01' is invalid. The supported versions are '2017-06-01,2017-05-10,2017-05-01,2017-03-01,2016-09-01,2016-07-01,2016-06-01,2016-02-01,2015-11-01,2015-01-01,2014-04-01-preview,2014-04-01,2014-01-01,2013-03-01,2014-02-26,2014-04'."
echuvyrov commented 7 years ago

hey @jasminSPC @alexsomesan would love to get to the bottom of this. Azure DNS team reporting they have not obsoleted any APIs recently, and I am also able to successfully provision DNS Zone and A Record in both West US and North Europe. Using the config file below - basically, a sample from terraform.io. Can you provide a minimal config file that would allow me to replicate the issues you're seeing:

resource "azurerm_resource_group" "test" { name = "testDNSNE" location = "northeurope" }

resource "azurerm_dns_zone" "test" { name = "mydomain.com" resource_group_name = "${azurerm_resource_group.test.name}" }

resource "azurerm_dns_a_record" "test" { name = "test" zone_name = "${azurerm_dns_zone.test.name}" resource_group_name = "${azurerm_resource_group.test.name}" ttl = "300" records = ["10.0.180.17"] }

jasmingacic commented 7 years ago

@echuvyrov When I run the example you provided everything works fine.

azurerm_resource_group.test: Creating...
  location: "" => "northeurope"
  name:     "" => "testDNSNE"
  tags.%:   "" => "<computed>"
azurerm_resource_group.test: Creation complete (ID: /subscriptions/ef9360be-81fe-44cd-aa34-a0da2ced47f6/resourceGroups/testDNSNE)
azurerm_dns_zone.test: Creating...
  max_number_of_record_sets: "" => "<computed>"
  name:                      "" => "mydomain.com"
  name_servers.#:            "" => "<computed>"
  number_of_record_sets:     "" => "<computed>"
  resource_group_name:       "" => "testDNSNE"
  tags.%:                    "" => "<computed>"
azurerm_dns_zone.test: Creation complete (ID: /subscriptions/ef9360be-81fe-44cd-aa34-...icrosoft.Network/dnszones/mydomain.com)
azurerm_dns_a_record.test: Creating...
  name:                "" => "test"
  records.#:           "" => "1"
  records.1485044028:  "" => "10.0.180.17"
  resource_group_name: "" => "testDNSNE"
  tags.%:              "" => "<computed>"
  ttl:                 "" => "300"
  zone_name:           "" => "mydomain.com"
azurerm_dns_a_record.test: Creation complete (ID: /subscriptions/ef9360be-81fe-44cd-aa34-...t.Network/dnszones/mydomain.com/A/test)

Apply complete! Resources: 3 added, 0 changed, 0 destroyed.

But when I run tectonic-installer from the code PLATFORM=azure CLUSTER=azuredemo make apply I get this error:

* azurerm_dns_a_record.tectonic-api: dns.RecordSetsClient#CreateOrUpdate: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="InvalidApiVersionParameter" Message="The api-version '2016-04-01' is invalid. The supported versions are '2017-06-01,2017-05-10,2017-05-01,2017-03-01,2016-09-01,2016-07-01,2016-06-01,2016-02-01,2015-11-01,2015-01-01,2014-04-01-preview,2014-04-01,2014-01-01,2013-03-01,2014-02-26,2014-04'."
* module.dns.azurerm_dns_a_record.tectonic-worker: 1 error(s) occurred:

* azurerm_dns_a_record.tectonic-worker: dns.RecordSetsClient#CreateOrUpdate: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="InvalidApiVersionParameter" Message="The api-version '2016-04-01' is invalid. The supported versions are '2017-06-01,2017-05-10,2017-05-01,2017-03-01,2016-09-01,2016-07-01,2016-06-01,2016-02-01,2015-11-01,2015-01-01,2014-04-01-preview,2014-04-01,2014-01-01,2013-03-01,2014-02-26,2014-04'."
* module.dns.azurerm_dns_a_record.tectonic-console: 1 error(s) occurred:

* azurerm_dns_a_record.tectonic-console: dns.RecordSetsClient#CreateOrUpdate: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="InvalidApiVersionParameter" Message="The api-version '2016-04-01' is invalid. The supported versions are '2017-06-01,2017-05-10,2017-05-01,2017-03-01,2016-09-01,2016-07-01,2016-06-01,2016-02-01,2015-11-01,2015-01-01,2014-04-01-preview,2014-04-01,2014-01-01,2013-03-01,2014-02-26,2014-04'."
* module.dns.azurerm_dns_a_record.tectonic-master: 1 error(s) occurred:

* azurerm_dns_a_record.tectonic-master: dns.RecordSetsClient#CreateOrUpdate: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="InvalidApiVersionParameter" Message="The api-version '2016-04-01' is invalid. The supported versions are '2017-06-01,2017-05-10,2017-05-01,2017-03-01,2016-09-01,2016-07-01,2016-06-01,2016-02-01,2015-11-01,2015-01-01,2014-04-01-preview,2014-04-01,2014-01-01,2013-03-01,2014-02-26,2014-04'."

I can see that the the api-version is different now. When running apply i get this warning which is confirming that the plugin is indeed picked up by Terraform.

[WARN] /Volumes/Data/go/bin/terraform-provider-azurerm overrides an internal plugin for azurerm-provider.
  If you did not expect to see this message you will need to remove the old plugin.
  See https://www.terraform.io/docs/internals/internal-plugins.html

I looked into the code and I see this reference to the api-version 2016-04-01 https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/vendor/github.com/Azure/azure-sdk-for-go/arm/dns/recordsets.go#L88

Here are terraform.tfvars I used

tectonic_admin_email = "jasmin@stackpointcloud.com"

tectonic_admin_password_hash = "${bcrypt(test1234)}"

tectonic_azure_client_secret = "*****"

tectonic_azure_location = "northeurope"

tectonic_azure_ssh_key = "/Users/jasmingacic/.ssh/id_rsa.pub"

tectonic_base_domain = "test.com"

tectonic_calico_network_policy = false

tectonic_cl_channel = "stable"

tectonic_cluster_cidr = "10.2.0.0/16"

tectonic_cluster_name = "jasmindeleteme"

tectonic_etcd_count = "0"

tectonic_experimental = false

tectonic_license_path = "/Volumes/Data/go/src/github.com/StackPointCloud/tectonic-installer/tectonic-license"

tectonic_master_count = "1"

tectonic_pull_secret_path = "/Volumes/Data/go/src/github.com/StackPointCloud/tectonic-installer/tectonic-pull-secret.json"

tectonic_service_cidr = "10.3.0.0/16"

tectonic_stats_url = "https://stats-collector.tectonic.com"

tectonic_vanilla_k8s = false

tectonic_worker_count = "1"

To replicate what I just had simply follow these instructions under section Initiate the Cluster Configuration

alexsomesan commented 7 years ago

@jasminSPC I think you may be running this with an older revision of the installer. Latest Azure templates in master don't attempt to create a DNS zone anymore, but rather expect a DNS zone resource ID as input var. I think that is why I was able to get successful build with the fixed provider.

jasmingacic commented 7 years ago

@alexsomesan I'm using master branch is that the one I should be using?

alexsomesan commented 7 years ago

Yes, master is also where I'm running from.

On Mon, Jul 31, 2017 at 6:21 PM, Jasmin Gacic notifications@github.com wrote:

@alexsomesan https://github.com/alexsomesan I'm using master branch is that the one I should be using?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/coreos/tectonic-installer/issues/1315#issuecomment-319122272, or mute the thread https://github.com/notifications/unsubscribe-auth/ABC-m07KhQVaw5G7naPvOpT2TpIc0qsrks5sTf8NgaJpZM4OQzI3 .

jasmingacic commented 7 years ago

So I tried master several times and each time it is failing with the same message.

robszumski commented 7 years ago

@alexsomesan did this land in Tectonic 1.7.1-tectonic.1?

alexsomesan commented 7 years ago

@robszumski The fix is done in the stand-alone Azure provider that was created with TF 0.10.0 and it's migration to stand-alone providers. AFIK it's not backported into 0.9.x. The installer still ships with Terraform 0.9.6 so it wouldn't have picked up the fix either because 0.9.6 is very old. I'm working as we speak to migrate the installer to Terraform 0.10.2.

tombuildsstuff commented 7 years ago

@alexsomesan 👋 I'm not sure if you've seen my comment on this issue - but would it be possible to confirm if the resource group name is actually a name, rather than an ID? I've also opened an issue on the Terraform AzureRM Provider to add validation to catch this in future

Thanks!

jsilberm commented 7 years ago

@alexsomesan : any workarounds to get tectonic with your new Azure provider? Looking forward to the fix. Thanks.

jsilberm commented 7 years ago

Still looks like a complete showstopper for Tectonic/Azure, with a release as recent as 1.7.1-tectonic.2

Error applying plan:

10 error(s) occurred:

* module.masters.azurerm_virtual_machine.tectonic_master: 1 error(s) occurred:

* azurerm_virtual_machine.tectonic_master: compute.VirtualMachinesClient#CreateOrUpdate: Failure sending request: StatusCode=0 -- Original Error: Get https://management.azure.com/subscriptions/72c299a4-a431-4b8e-80ef-6855109979d9/providers/Microsoft.Compute/locations/eastus/operations/e842f15b-d71f-4df6-b0ce-d21435fc24ce?api-version=2016-04-30-preview: dial tcp: lookup management.azure.com on 208.67.220.220:53: read udp 192.168.1.47:50396->208.67.220.220:53: i/o timeout
* module.dns.azurerm_dns_a_record.tectonic-console: 1 error(s) occurred:

* azurerm_dns_a_record.tectonic-console: Error creating DNS A Record: InvalidApiVersionParameter (400) - The api-version '2015-05-04-preview' is invalid. The supported versions are '2017-06-01,2017-05-10,2017-05-01,2017-03-01,2016-09-01,2016-07-01,2016-06-01,2016-02-01,2015-11-01,2015-01-01,2014-04-01-preview,2014-04-01,2014-01-01,2013-03-01,2014-02-26,2014-04'.
* module.dns.azurerm_dns_a_record.tectonic-api: 1 error(s) occurred:

* azurerm_dns_a_record.tectonic-api: Error creating DNS A Record: InvalidApiVersionParameter (400) - The api-version '2015-05-04-preview' is invalid. The supported versions are '2017-06-01,2017-05-10,2017-05-01,2017-03-01,2016-09-01,2016-07-01,2016-06-01,2016-02-01,2015-11-01,2015-01-01,2014-04-01-preview,2014-04-01,2014-01-01,2013-03-01,2014-02-26,2014-04'.
* module.dns.azurerm_dns_a_record.tectonic-worker[0]: 1 error(s) occurred:
justaugustus commented 7 years ago

@jsilberm Sorry you're having issues!

Have you had a chance to review our updated documentation for using Tectonic on Azure: https://coreos.com/tectonic/docs/latest/install/azure/azure-terraform.html

Specifically, around DNS:

DNS

Two methods of providing DNS for the Tectonic installation are supported:

Azure-provided DNS

This is Azure's default DNS implementation. For more information, see the [Azure DNS overview][azure-dns].

To use Azure-provided DNS, tectonic_base_domain must be set to ""(empty string).

DNS delegation and custom zones via Azure DNS

To configure a custom domain and the associated records in an Azure DNS zone (e.g., ${cluster_name}.foo.bar):

  • The custom domain must be specified using tectonic_base_domain
  • The domain must be publicly discoverable. The Tectonic installer uses the created record to access the cluster and complete configuration. See the Microsoft Azure documentation for instructions on how to [delegate a domain to Azure DNS][domain-delegation].
  • An Azure DNS zone matching the chosen tectonic_base_domain must be created prior to running the installer. The full resource ID of the DNS zone must then be referenced in tectonic_azure_external_dns_zone_id

I believe you'll need to set tectonic_azure_external_dns_zone_id, which is:

// (optional) The ID of the external Azure DNS zone used for nodes & endpoints FQDNs. // Required when 'tectonic_base_domain' is set. // This must be a pre-existing, properly configured Azure DNS zone that the Azure service principal running the Tectonic installer has permission to perform operations on. // // Note this is the complete ID as returned in the "id" field by the Azure client, not just the name of the resource. // // Example: "/subscriptions/b520eabf-d6c0-4757-8a5e-0fa7d2fe12b5/resourceGroups/my-k8s-cluster/providers/Microsoft.Network/dnszones/my-k8s-dns

After a little testing, I found that when tectonic_azure_external_dns_zone_id was not supplied, I got the same error you did:

Error applying plan:

10 error(s) occurred:

* module.dns.azurerm_dns_a_record.tectonic_etcd[0]: 1 error(s) occurred:

* azurerm_dns_a_record.tectonic_etcd.0: dns.RecordSetsClient#CreateOrUpdate: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="InvalidApiVersionParameter" Message="The api-version '2016-04-01' is invalid. The supported versions are '2017-06-01,2017-05-10,2017-05-01,2017-03-01,2016-09-01,2016-07-01,2016-06-01,2016-02-01,2015-11-01,2015-01-01,2014-04-01-preview,2014-04-01,2014-01-01,2013-03-01,2014-02-26,2014-04'."

Please let us know if that fixes it for you.

/cc: @alexsomesan, @robszumski

jsilberm commented 7 years ago

Indeed. Thanks for the help @justaugustus ! Feel free to close this issue. Much appreciated!

robszumski commented 7 years ago

Awesome, glad you got it worked out.