├── .gitignore ├── LICENSE ├── Makefile ├── README.md ├── bootstrap.tf ├── config.tf ├── examples └── kubernetes.tf ├── main.tf ├── tectonic.tf ├── variables.md └── variables.tf /.gitignore: -------------------------------------------------------------------------------- 1 | .terraform/ 2 | generated 3 | /terraform* 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | 203 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: all checkout docs examples tag test update 2 | 3 | TF_DOCS := $(shell which terraform-docs 2> /dev/null) 4 | TF_EXAMPLES := $(shell which terraform-examples 2> /dev/null) 5 | TF_CMD := terraform 6 | PLATFORM := Azure 7 | PROVIDER := azurerm 8 | LATEST_REF := $(shell curl --silent https://api.github.com/repos/coreos/tectonic-installer/git/refs/heads/master | jq -r '.object.sha') 9 | TAG ?= $(shell curl --silent https://api.github.com/repos/coreos/tectonic-installer/git/refs/tags | jq -r '.[-1].ref' | sed 's|refs/tags/||') 10 | 11 | all: update 12 | 13 | define terraform-docs 14 | $(if $(TF_DOCS),,$(error "terraform-docs revision >= a8b59f8 is required (https://github.com/segmentio/terraform-docs)")) 15 | 16 | @echo '' > $1 17 | @echo '# Terraform variables' >> $1 18 | @echo $2 >> $1 19 | terraform-docs --no-required markdown $3 $4 $5 $6 >> $1 20 | endef 21 | 22 | define terraform-examples 23 | $(if $(TF_EXAMPLES),,$(error "terraform-examples revision >= 83d7ad6 is required (https://github.com/s-urbaniak/terraform-examples)")) 24 | 25 | @echo '# DO NOT EDIT. THIS FILE IS GENERATED BY THE MAKEFILE.' > $1 26 | @echo 'module "kubernetes" {' >> $1 27 | @echo ' source = "coreos/kubernetes/$(PROVIDER)"' >> $1 28 | terraform-examples $2 $3 $4 $5 >> $1 29 | @echo '}' >> $1 30 | @terraform fmt $1 31 | endef 32 | 33 | docs: 34 | $(call terraform-docs, variables.md, \ 35 | 'This document gives an overview of variables used in the $(PLATFORM) platform of the Tectonic SDK.', \ 36 | config.tf, variables.tf) 37 | 38 | examples: 39 | @mkdir -p examples 40 | $(call terraform-examples, \ 41 | examples/kubernetes.tf, \ 42 | config.tf, \ 43 | variables.tf) 44 | 45 | # This target is used by the GitHub PR checker to validate canonical syntax on all files. 46 | test: 47 | $(eval FMT_ERR := $(shell terraform fmt -list -write=false .)) 48 | @if [ "$(FMT_ERR)" != "" ]; then echo "misformatted files (run 'terraform fmt .' to fix):" $(FMT_ERR); exit 1; fi 49 | 50 | @if $(MAKE) docs && ! git diff --exit-code; then echo "outdated docs (run 'make docs' to fix)"; exit 1; fi 51 | @if $(MAKE) examples && ! git diff --exit-code; then echo "outdated examples (run 'make examples' to fix)"; exit 1; fi 52 | 53 | build/%: 54 | @rm -f *.tf 55 | @curl -L https://github.com/coreos/tectonic-installer/archive/$(@F).tar.gz -O 56 | @tar -xzf $(@F).tar.gz --strip=3 tectonic-installer-$(@F)/platforms/$(shell echo $(PLATFORM) | tr A-Z a-z) 57 | @tar -xzf $(@F).tar.gz --strip=1 tectonic-installer-$(@F)/config.tf 58 | @rm $(@F).tar.gz 59 | @sed -i 's|source\s\+=\s"[\./]\+\(/modules/.\+\)"|source = "github.com/coreos/tectonic-installer/\1?ref=$(@F)"|' *.tf 60 | @terraform fmt . 61 | 62 | orphan/%: 63 | @git checkout --orphan $(@F) 64 | 65 | checkout: 66 | @git checkout master 67 | 68 | ref/%: | checkout orphan/% build/%; 69 | 70 | update: | checkout build/$(LATEST_REF) docs examples 71 | @git add . 72 | @git commit -m "bump master to: $(LATEST_REF)" 73 | 74 | tag: | ref/$(TAG) docs examples 75 | @git add . 76 | @git commit -m "$(TAG)" 77 | @git tag -s -m "$(TAG)" "$(TAG)" 78 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Install Tectonic on Azure with Terraform 2 | 3 | This module deploys a [Tectonic][tectonic] [Kubernetes][k8s] cluster on Azure using [Terraform][terraform]. Tectonic is an enterprise-ready distribution of Kubernetes including automatic updates, monitoring and alerting, integration with common authentication regimes, and a graphical console for managing clusters in a web browser. 4 | 5 | This module can deploy either a complete Tectonic cluster, requiring a Tectonic license, or a "stock" Kubernetes cluster without Tectonic features. 6 | 7 | The Azure platform templates generally adhere to the standards defined by the project [conventions][conventions] and [generic platform requirements][generic]. This document clarifies the implementation details specific to the Azure platform. 8 | 9 | ## Prerequisites 10 | 11 | ### DNS 12 | 13 | Two methods of providing DNS for the Tectonic installation are supported: 14 | 15 | #### Azure-provided DNS 16 | 17 | This is Azure's default DNS implementation. For more information, see the [Azure DNS overview][azure-dns]. 18 | 19 | To use Azure-provided DNS, `tectonic_base_domain` must be set to `""`(empty string). 20 | 21 | #### DNS delegation and custom zones via Azure DNS 22 | 23 | To configure a custom domain and the associated records in an Azure DNS zone (e.g., `${cluster_name}.foo.bar`): 24 | 25 | * The custom domain must be specified using `tectonic_base_domain` 26 | * 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]. 27 | * 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` 28 | 29 | ### Tectonic Account 30 | 31 | Register for a [Tectonic Account][register], free for up to 10 nodes. The cluster license and pull secret are required during installation. 32 | 33 | ### Azure CLI 34 | 35 | The [Azure CLI][azure-cli] is required to generate Azure credentials. 36 | 37 | ### ssh-agent 38 | 39 | The next step in preparing the environment for installation is to add the key to be used for logging in to each cluster node during initialization to the local `ssh-agent`. 40 | 41 | #### Adding a key to ssh-agent 42 | 43 | Ensure `ssh-agent` is running by listing the known keys: 44 | 45 | ```bash 46 | $ ssh-add -L 47 | ``` 48 | 49 | Add the SSH private key that will be used for the deployment to `ssh-agent`: 50 | 51 | ```bash 52 | $ ssh-add ~/.ssh/id_rsa 53 | ``` 54 | 55 | Verify that the SSH key identity is available to the ssh-agent: 56 | 57 | ```bash 58 | $ ssh-add -L 59 | ``` 60 | 61 | Reference the absolute path of the *public* component of the SSH key in the `tectonic_azure_ssh_key` variable. 62 | 63 | Without this, terraform is not able to SSH copy the assets and start bootkube. 64 | Also, ensure the SSH known_hosts file doesn't have old records for the API DNS name, because key fingerprints will not match. 65 | 66 | ## Configuring the deployment 67 | 68 | ### Get Terraform's Azure modules and providers 69 | 70 | Get the modules and providers for the Azure platform that Terraform will use to create cluster resources: 71 | 72 | ```sh 73 | $ terraform init 74 | Downloading modules... 75 | Get: git::https://github.com/coreos/tectonic-installer.git?ref=1d75718d96c7bdec04d5ffb8a72fa059b1fcb79a 76 | Get: git::https://github.com/coreos/tectonic-installer.git?ref=1d75718d96c7bdec04d5ffb8a72fa059b1fcb79a 77 | Get: git::https://github.com/coreos/tectonic-installer.git?ref=1d75718d96c7bdec04d5ffb8a72fa059b1fcb79a 78 | ... 79 | 80 | 81 | Initializing provider plugins... 82 | - Downloading plugin for provider "template"... 83 | - Downloading plugin for provider "azurerm"... 84 | - Downloading plugin for provider "null"... 85 | - Downloading plugin for provider "ignition"... 86 | ... 87 | ``` 88 | 89 | ### Generate credentials with Azure CLI 90 | 91 | Execute `az login` to obtain an authentication token. See the [Azure CLI docs][login] for more information. Once logged in, note the `id` field of the output from the `az login` command. This is a simple way to retrieve the Subscription ID for the Azure account. 92 | 93 | #### Add Active Directory Service Principal role assignment 94 | 95 | Next, add a new Active Directory (AD) Service Principal (SP) role assignment to grant Terraform access to Azure: 96 | 97 | ```sh 98 | $ az ad sp create-for-rbac -n "http://tectonic" --role contributor 99 | Retrying role assignment creation: 1/24 100 | Retrying role assignment creation: 2/24 101 | { 102 | "appId": "generated-app-id", 103 | "displayName": "azure-cli-2017-01-01", 104 | "name": "http://tectonic-coreos", 105 | "password": "generated-pass", 106 | "tenant": "generated-tenant" 107 | } 108 | ``` 109 | 110 | Export the following environment variables with values obtained from the output of the role assignment. As noted above, `ARM_SUBSCRIPTION_ID` is the `id` of the Azure account returned by `az login`. 111 | 112 | ```sh 113 | # id field in az login output 114 | $ export ARM_SUBSCRIPTION_ID=abc-123-456 115 | # appID field in az ad output 116 | $ export ARM_CLIENT_ID=generated-app-id 117 | # password field in az ad output 118 | $ export ARM_CLIENT_SECRET=generated-pass 119 | # tenant field in az ad output 120 | $ export ARM_TENANT_ID=generated-tenant 121 | ``` 122 | 123 | With the environment set, it's time to specify the deployment details for the cluster. 124 | 125 | ### Customize the deployment 126 | 127 | Customizations to the base installation are made to the Terraform variables for each deployment. Examples of the this module's variables are provided in the file `examples/kubernetes.tf`. 128 | 129 | Edit the variables with the Azure account details, domain name, and [Tectonic license][register]. To install a basic Kubernetes cluster without Tectonic features, set the `tectonic_vanilla_k8s` key to `true` and omit the Tectonic license. 130 | 131 | [View all of the Azure specific options and the common Tectonic variables][vars]. 132 | 133 | #### Key values for basic Azure deployment 134 | 135 | These are the basic values that must be adjusted for each deployment on Azure. See the details of each value in the comments in the `examples/kubernetes.tf` file. 136 | 137 | * `tectonic_admin_email` - For the initial Console login 138 | * `tectonic_admin_password_hash` - Use [`bcrypt-tool`][bcrypt-tool] to encrypt password 139 | * `tectonic_azure_client_secret` - As in `ARM_CLIENT_SECRET` above 140 | * `tectonic_azure_ssh_key` - Full path to the public key part of the key added to `ssh-agent` above 141 | * `tectonic_azure_location` - e.g., `centralus` 142 | * `tectonic_base_domain` - The DNS domain or subdomain delegated to an Azure DNS zone above 143 | * `tectonic_azure_external_dns_zone_id` - Value of `id` in `az network dns zone list` output 144 | * `tectonic_cluster_name` - The name to give the cluster 145 | * `tectonic_license_path` - Full path to `tectonic-license.txt` file downloaded from Tectonic account 146 | * `tectonic_pull_secret_path` - Full path to `config.json` container pull secret file downloaded from Tectonic account 147 | 148 | ### Deploy the cluster 149 | 150 | Check the plan before deploying: 151 | 152 | ```sh 153 | $ terraform plan 154 | ``` 155 | 156 | Next, deploy the cluster: 157 | 158 | ```sh 159 | $ terraform apply 160 | ``` 161 | 162 | This should run for a short time. 163 | 164 | ### Access the cluster 165 | 166 | When `terraform apply` is complete, access Tectonic Console in a web browser at the URL formed by concatenating the cluster name and the domain name configured in the Terraform variables. 167 | 168 | ### CLI cluster operations with kubectl 169 | 170 | Cluster credentials are written beneath the `generated/` directory, including any generated CA certificate and a `kubeconfig`. Use the kubeconfig file to access the cluster with the `kubectl` CLI tool. This is the only method of access for a Kubernetes cluster installed without Tectonic features: 171 | 172 | ```sh 173 | $ export KUBECONFIG=generated/auth/kubeconfig 174 | $ kubectl cluster-info 175 | ``` 176 | 177 | ## Delete the cluster 178 | 179 | Deleting a cluster will remove only the infrastructure elements created by Terraform. For example, an existing DNS resource group is not removed. 180 | 181 | To delete the cluster, run the `terraform destroy` command: 182 | 183 | ``` 184 | $ terraform destroy 185 | ``` 186 | 187 | 188 | [azure-cli]: https://docs.microsoft.com/en-us/cli/azure/install-azure-cli 189 | [azure-dns]: https://docs.microsoft.com/en-us/azure/dns/dns-overview 190 | [bcrypt]: https://github.com/coreos/bcrypt-tool/releases/tag/v1.0.0 191 | [conventions]: https://github.com/coreos/tectonic-docs/blob/master/Documentation/conventions.md 192 | [copy-docs]: https://www.terraform.io/docs/commands/apply.html 193 | [domain-delegation]: https://docs.microsoft.com/en-us/azure/dns/dns-delegate-domain-azure-dns 194 | [generic]: https://github.com/coreos/tectonic-docs/blob/master/Documentation/generic-platform.md 195 | [install-go]: https://golang.org/doc/install 196 | [k8s]: https://kubernetes.io 197 | [login]: https://docs.microsoft.com/en-us/cli/azure/get-started-with-azure-cli 198 | [plan-docs]: https://www.terraform.io/docs/commands/plan.html 199 | [register]: https://account.coreos.com/signup/summary/tectonic-2016-12 200 | [release-notes]: https://coreos.com/tectonic/releases/ 201 | [tectonic]: https://coreos.com/tectonic/ 202 | [terraform]: https://www.terraform.io/downloads.html 203 | [troubleshooting]: https://github.com/coreos/tectonic-docs/blob/master/Documentation/troubleshooting/installer-terraform.md 204 | [vars]: https://github.com/coreos/terraform-azurerm-kubernetes/blob/master/variables.md 205 | [verification-key]: https://coreos.com/security/app-signing-key/ 206 | -------------------------------------------------------------------------------- /bootstrap.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | "bootstrapping_host" = "${var.tectonic_azure_private_cluster ? 3 | module.vnet.master_private_ip_addresses[0] : 4 | module.vnet.api_fqdn}" 5 | } 6 | 7 | module "bootstrapper" { 8 | source = "github.com/coreos/tectonic-installer//modules/bootstrap-ssh?ref=0a22c73d39f67ba4bb99106a9e72322a47179736" 9 | 10 | _dependencies = [ 11 | "${module.masters.master_vm_ids}", 12 | "${module.etcd.etcd_vm_ids}", 13 | "${module.etcd_certs.id}", 14 | "${module.bootkube.id}", 15 | "${module.tectonic.id}", 16 | "${module.flannel_vxlan.id}", 17 | "${module.calico.id}", 18 | "${module.canal.id}", 19 | ] 20 | 21 | bootstrapping_host = "${local.bootstrapping_host}" 22 | } 23 | -------------------------------------------------------------------------------- /config.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_version = ">= 0.10.7" 3 | } 4 | 5 | provider "archive" { 6 | version = "1.0.0" 7 | } 8 | 9 | provider "external" { 10 | version = "1.0.0" 11 | } 12 | 13 | provider "ignition" { 14 | version = "1.0.0" 15 | } 16 | 17 | provider "local" { 18 | version = "1.0.0" 19 | } 20 | 21 | provider "null" { 22 | version = "1.0.0" 23 | } 24 | 25 | provider "random" { 26 | version = "1.0.0" 27 | } 28 | 29 | provider "template" { 30 | version = "1.0.0" 31 | } 32 | 33 | provider "tls" { 34 | version = "1.0.0" 35 | } 36 | 37 | locals { 38 | // The total amount of public CA certificates present in Tectonic. 39 | // That is all custom CAs + kube CA + etcd CA + ingress CA 40 | // This is a local constant, which needs to be dependency inject because TF cannot handle length() on computed values, 41 | // see https://github.com/hashicorp/terraform/issues/10857#issuecomment-268289775. 42 | tectonic_ca_count = "${length(var.tectonic_custom_ca_pem_list) + 3}" 43 | } 44 | 45 | variable "tectonic_config_version" { 46 | description = <,%,&,\,?,/' or control characters. 83 | // tectonic_azure_extra_tags = "" 84 | 85 | 86 | // (optional) Storage account type for the master node(s). Example: Premium_LRS. 87 | // Using Premium storage is constrained by the of instance specified in 'tectonic_azure_master_vm_size'. 88 | // See https://docs.microsoft.com/en-us/azure/storage/storage-premium-storage#supported-vms 89 | // tectonic_azure_master_storage_type = "Premium_LRS" 90 | 91 | 92 | // (optional) Instance size for the master node(s). Example: Standard_DS2_v2. 93 | // tectonic_azure_master_vm_size = "Standard_DS2_v2" 94 | 95 | 96 | // (optional) Setting this to true will result in NO public facing endpoints being created. All traffic is contained within the VNET. 97 | // A VNET with an already configured and active VPN connection is required and needs to be supplied via 'tectonic_azure_external_vnet_id'. 98 | // DNS is currently required, either the Azure managed one or configured via the generic DNS module. 99 | // tectonic_azure_private_cluster = false 100 | 101 | // (required) Path to an SSH public key file to be provisioned as the SSH key for the 'core' user. 102 | tectonic_azure_ssh_key = "" 103 | 104 | // (optional) Network (external) to allow SSH access from. Maps to `source_address_prefix` in Azure. 105 | // Defaults to `*`. Can be external to Azure environment. 106 | // Allowed values: [network CIDR (i.e., 10.0.0.0/16) \| `VirtualNetwork` \| `Internet` \| `*` ] 107 | // tectonic_azure_ssh_network_external = "*" 108 | 109 | 110 | // (optional) Network (internal) to allow SSH access from. Maps to `source_address_prefix` in Azure. 111 | // Defaults to `VirtualNetwork`. Should be internal to Azure environment. 112 | // Allowed values: [network CIDR (i.e., 10.0.0.0/16) \| `VirtualNetwork` \| `Internet` \| `*` ] 113 | // tectonic_azure_ssh_network_internal = "VirtualNetwork" 114 | 115 | 116 | // (optional) Range of IP addresses assigned to the Virtual Network in which the cluster nodes run. 117 | // This should not overlap with any other networks, such as the Kubernetes cluster (pod) range, 118 | // service range or a private datacenter connected via ExpressRoute." 119 | // tectonic_azure_vnet_cidr_block = "10.0.0.0/16" 120 | 121 | 122 | // (optional) Storage account type for the worker node(s). Example: Premium_LRS. 123 | // Using Premium storage is constrained by the of instance specified in 'tectonic_azure_worker_vm_size'. 124 | // See https://docs.microsoft.com/en-us/azure/storage/storage-premium-storage#supported-vms 125 | // tectonic_azure_worker_storage_type = "Premium_LRS" 126 | 127 | 128 | // (optional) Instance size for the worker node(s). Example: Standard_DS2_v2. 129 | // tectonic_azure_worker_vm_size = "Standard_DS2_v2" 130 | 131 | // The base DNS domain of the cluster. It must NOT contain a trailing period. Some 132 | // DNS providers will automatically add this if necessary. 133 | // 134 | // Example: `openstack.dev.coreos.systems`. 135 | // 136 | // Note: This field MUST be set manually prior to creating the cluster. 137 | // This applies only to cloud platforms. 138 | // 139 | // [Azure-specific NOTE] 140 | // To use Azure-provided DNS, `tectonic_base_domain` should be set to `""` 141 | // If using DNS records, ensure that `tectonic_base_domain` is set to a properly configured external DNS zone. 142 | // Instructions for configuring delegated domains for Azure DNS can be found here: https://docs.microsoft.com/en-us/azure/dns/dns-delegate-domain-azure-dns 143 | tectonic_base_domain = "" 144 | 145 | // (optional) The content of the PEM-encoded CA certificate, used to generate Tectonic Console's server certificate. 146 | // If left blank, a CA certificate will be automatically generated. 147 | // tectonic_ca_cert = "" 148 | 149 | 150 | // (optional) The content of the PEM-encoded CA key, used to generate Tectonic Console's server certificate. 151 | // This field is mandatory if `tectonic_ca_cert` is set. 152 | // tectonic_ca_key = "" 153 | 154 | 155 | // (optional) The algorithm used to generate tectonic_ca_key. 156 | // The default value is currently recommended. 157 | // This field is mandatory if `tectonic_ca_cert` is set. 158 | // tectonic_ca_key_alg = "RSA" 159 | 160 | 161 | // (optional) This declares the IP range to assign Kubernetes pod IPs in CIDR notation. 162 | // tectonic_cluster_cidr = "10.2.0.0/16" 163 | 164 | // The name of the cluster. 165 | // If used in a cloud-environment, this will be prepended to `tectonic_base_domain` resulting in the URL to the Tectonic console. 166 | // 167 | // Note: This field MUST be set manually prior to creating the cluster. 168 | // Warning: Special characters in the name like '.' may cause errors on OpenStack platforms due to resource name constraints. 169 | tectonic_cluster_name = "" 170 | 171 | // (optional) The Container Linux update channel. 172 | // 173 | // Examples: `stable`, `beta`, `alpha` 174 | // tectonic_container_linux_channel = "stable" 175 | 176 | // The Container Linux version to use. Set to `latest` to select the latest available version for the selected update channel. 177 | // 178 | // Examples: `latest`, `1465.6.0` 179 | tectonic_container_linux_version = "latest" 180 | 181 | // (optional) A list of PEM encoded CA files that will be installed in /etc/ssl/certs on etcd, master, and worker nodes. 182 | // tectonic_custom_ca_pem_list = "" 183 | 184 | 185 | // (optional) This only applies if you use the modules/dns/ddns module. 186 | // 187 | // Specifies the RFC2136 Dynamic DNS server key algorithm. 188 | // tectonic_ddns_key_algorithm = "" 189 | 190 | 191 | // (optional) This only applies if you use the modules/dns/ddns module. 192 | // 193 | // Specifies the RFC2136 Dynamic DNS server key name. 194 | // tectonic_ddns_key_name = "" 195 | 196 | 197 | // (optional) This only applies if you use the modules/dns/ddns module. 198 | // 199 | // Specifies the RFC2136 Dynamic DNS server key secret. 200 | // tectonic_ddns_key_secret = "" 201 | 202 | 203 | // (optional) This only applies if you use the modules/dns/ddns module. 204 | // 205 | // Specifies the RFC2136 Dynamic DNS server IP/host to register IP addresses to. 206 | // tectonic_ddns_server = "" 207 | 208 | 209 | // (optional) The size in MB of the PersistentVolume used for handling etcd backups. 210 | // tectonic_etcd_backup_size = "512" 211 | 212 | 213 | // (optional) The name of an existing Kubernetes StorageClass that will be used for handling etcd backups. 214 | // tectonic_etcd_backup_storage_class = "" 215 | 216 | 217 | // (optional) The path of the file containing the CA certificate for TLS communication with etcd. 218 | // 219 | // Note: This works only when used in conjunction with an external etcd cluster. 220 | // If set, the variable `tectonic_etcd_servers` must also be set. 221 | // tectonic_etcd_ca_cert_path = "/dev/null" 222 | 223 | 224 | // (optional) The path of the file containing the client certificate for TLS communication with etcd. 225 | // 226 | // Note: This works only when used in conjunction with an external etcd cluster. 227 | // If set, the variables `tectonic_etcd_servers`, `tectonic_etcd_ca_cert_path`, and `tectonic_etcd_client_key_path` must also be set. 228 | // tectonic_etcd_client_cert_path = "/dev/null" 229 | 230 | 231 | // (optional) The path of the file containing the client key for TLS communication with etcd. 232 | // 233 | // Note: This works only when used in conjunction with an external etcd cluster. 234 | // If set, the variables `tectonic_etcd_servers`, `tectonic_etcd_ca_cert_path`, and `tectonic_etcd_client_cert_path` must also be set. 235 | // tectonic_etcd_client_key_path = "/dev/null" 236 | 237 | // The number of etcd nodes to be created. 238 | // If set to zero, the count of etcd nodes will be determined automatically. 239 | // 240 | // Note: This is not supported on bare metal. 241 | tectonic_etcd_count = "0" 242 | 243 | // (optional) List of external etcd v3 servers to connect with (hostnames/IPs only). 244 | // Needs to be set if using an external etcd cluster. 245 | // Note: If this variable is defined, the installer will not create self-signed certs. 246 | // To provide a CA certificate to trust the etcd servers, set "tectonic_etcd_ca_cert_path". 247 | // 248 | // Example: `["etcd1", "etcd2", "etcd3"]` 249 | // tectonic_etcd_servers = "" 250 | 251 | 252 | // (optional) If set to `true`, all etcd endpoints will be configured to use the "https" scheme. 253 | // 254 | // Note: If `tectonic_experimental` is set to `true` this variable has no effect, because the experimental self-hosted etcd always uses TLS. 255 | // tectonic_etcd_tls_enabled = true 256 | 257 | // The path to the tectonic licence file. 258 | // You can download the Tectonic license file from your Account overview page at [1]. 259 | // 260 | // [1] https://account.coreos.com/overview 261 | // 262 | // Note: This field MUST be set manually prior to creating the cluster unless `tectonic_vanilla_k8s` is set to `true`. 263 | tectonic_license_path = "" 264 | // The number of master nodes to be created. 265 | // This applies only to cloud platforms. 266 | tectonic_master_count = "1" 267 | 268 | // (optional) Configures the network to be used in Tectonic. One of the following values can be used: 269 | // 270 | // - "flannel": enables overlay networking only. This is implemented by flannel using VXLAN. 271 | // 272 | // - "canal": [ALPHA] enables overlay networking including network policy. Overlay is implemented by flannel using VXLAN. Network policy is implemented by Calico. 273 | // 274 | // - "calico": [ALPHA] enables BGP based networking. Routing and network policy is implemented by Calico. Note this has been tested on baremetal installations only. 275 | // tectonic_networking = "flannel" 276 | 277 | // The path the pull secret file in JSON format. 278 | // This is known to be a "Docker pull secret" as produced by the docker login [1] command. 279 | // A sample JSON content is shown in [2]. 280 | // You can download the pull secret from your Account overview page at [3]. 281 | // 282 | // [1] https://docs.docker.com/engine/reference/commandline/login/ 283 | // 284 | // [2] https://coreos.com/os/docs/latest/registry-authentication.html#manual-registry-auth-setup 285 | // 286 | // [3] https://account.coreos.com/overview 287 | // 288 | // Note: This field MUST be set manually prior to creating the cluster unless `tectonic_vanilla_k8s` is set to `true`. 289 | tectonic_pull_secret_path = "" 290 | 291 | // (optional) This declares the IP range to assign Kubernetes service cluster IPs in CIDR notation. 292 | // The maximum size of this IP range is /12 293 | // tectonic_service_cidr = "10.3.0.0/16" 294 | 295 | // Validity period of the self-signed certificates (in hours). 296 | // Default is 3 years. 297 | // This setting is ignored if user provided certificates are used. 298 | tectonic_tls_validity_period = "26280" 299 | // If set to true, a vanilla Kubernetes cluster will be deployed, omitting any Tectonic assets. 300 | tectonic_vanilla_k8s = false 301 | // The number of worker nodes to be created. 302 | // This applies only to cloud platforms. 303 | tectonic_worker_count = "3" 304 | } 305 | -------------------------------------------------------------------------------- /main.tf: -------------------------------------------------------------------------------- 1 | provider "azurerm" { 2 | version = "0.3.1" 3 | environment = "${var.tectonic_azure_cloud_environment}" 4 | client_secret = "${var.tectonic_azure_client_secret}" 5 | } 6 | 7 | data "azurerm_client_config" "current" {} 8 | 9 | module "container_linux" { 10 | source = "github.com/coreos/tectonic-installer//modules/container_linux?ref=0a22c73d39f67ba4bb99106a9e72322a47179736" 11 | 12 | release_channel = "${var.tectonic_container_linux_channel}" 13 | release_version = "${var.tectonic_container_linux_version}" 14 | } 15 | 16 | module "resource_group" { 17 | source = "github.com/coreos/tectonic-installer//modules/azure/resource-group?ref=0a22c73d39f67ba4bb99106a9e72322a47179736" 18 | 19 | external_rsg_id = "${var.tectonic_azure_external_resource_group}" 20 | azure_location = "${var.tectonic_azure_location}" 21 | cluster_name = "${var.tectonic_cluster_name}" 22 | cluster_id = "${module.tectonic.cluster_id}" 23 | extra_tags = "${var.tectonic_azure_extra_tags}" 24 | } 25 | 26 | module "vnet" { 27 | source = "github.com/coreos/tectonic-installer//modules/azure/vnet?ref=0a22c73d39f67ba4bb99106a9e72322a47179736" 28 | 29 | location = "${var.tectonic_azure_location}" 30 | resource_group_name = "${module.resource_group.name}" 31 | cluster_name = "${var.tectonic_cluster_name}" 32 | cluster_id = "${module.tectonic.cluster_id}" 33 | base_domain = "${var.tectonic_base_domain}" 34 | vnet_cidr_block = "${var.tectonic_azure_vnet_cidr_block}" 35 | 36 | etcd_count = "${local.etcd_count}" 37 | master_count = "${var.tectonic_master_count}" 38 | worker_count = "${var.tectonic_worker_count}" 39 | etcd_cidr = "${module.vnet.etcd_cidr}" 40 | master_cidr = "${module.vnet.master_cidr}" 41 | worker_cidr = "${module.vnet.worker_cidr}" 42 | ssh_network_internal = "${var.tectonic_azure_ssh_network_internal}" 43 | ssh_network_external = "${var.tectonic_azure_ssh_network_external}" 44 | 45 | external_vnet_id = "${var.tectonic_azure_external_vnet_id}" 46 | external_master_subnet_id = "${var.tectonic_azure_external_master_subnet_id}" 47 | external_worker_subnet_id = "${var.tectonic_azure_external_worker_subnet_id}" 48 | external_nsg_master_id = "${var.tectonic_azure_external_nsg_master_id}" 49 | external_nsg_worker_id = "${var.tectonic_azure_external_nsg_worker_id}" 50 | 51 | extra_tags = "${var.tectonic_azure_extra_tags}" 52 | 53 | private_cluster = "${var.tectonic_azure_private_cluster}" 54 | } 55 | 56 | module "etcd" { 57 | source = "github.com/coreos/tectonic-installer//modules/azure/etcd?ref=0a22c73d39f67ba4bb99106a9e72322a47179736" 58 | 59 | base_domain = "${var.tectonic_base_domain}" 60 | cluster_id = "${module.tectonic.cluster_id}" 61 | cluster_name = "${var.tectonic_cluster_name}" 62 | container_image = "${var.tectonic_container_images["etcd"]}" 63 | container_linux_channel = "${var.tectonic_container_linux_channel}" 64 | container_linux_version = "${module.container_linux.version}" 65 | etcd_count = "${local.etcd_count}" 66 | extra_tags = "${var.tectonic_azure_extra_tags}" 67 | fault_domains = "${var.tectonic_azure_location_fault_domains["${var.tectonic_azure_location}"]}" 68 | ign_etcd_crt_id_list = "${module.ignition_masters.etcd_crt_id_list}" 69 | ign_etcd_dropin_id_list = "${module.ignition_masters.etcd_dropin_id_list}" 70 | location = "${var.tectonic_azure_location}" 71 | network_interface_ids = "${module.vnet.etcd_network_interface_ids}" 72 | public_ssh_key = "${var.tectonic_azure_ssh_key}" 73 | resource_group_name = "${module.resource_group.name}" 74 | storage_id = "${module.resource_group.storage_id}" 75 | storage_type = "${var.tectonic_azure_etcd_storage_type}" 76 | tls_enabled = "${var.tectonic_etcd_tls_enabled}" 77 | versions = "${var.tectonic_versions}" 78 | vm_size = "${var.tectonic_azure_etcd_vm_size}" 79 | } 80 | 81 | # Workaround for https://github.com/hashicorp/terraform/issues/4084 82 | data "null_data_source" "cloud_provider" { 83 | inputs = { 84 | "cloud" = "${var.tectonic_azure_cloud_environment}" 85 | "tenantId" = "${data.azurerm_client_config.current.tenant_id}" 86 | "subscriptionId" = "${data.azurerm_client_config.current.subscription_id}" 87 | "aadClientId" = "${data.azurerm_client_config.current.client_id}" 88 | "aadClientSecret" = "${var.tectonic_azure_client_secret}" 89 | "resourceGroup" = "${module.resource_group.name}" 90 | "location" = "${var.tectonic_azure_location}" 91 | "subnetName" = "${module.vnet.worker_subnet_name}" 92 | "securityGroupName" = "${module.vnet.worker_nsg_name}" 93 | "vnetName" = "${module.vnet.vnet_id}" 94 | "primaryAvailabilitySetName" = "${module.workers.availability_set_name}" 95 | } 96 | } 97 | 98 | data "template_file" "etcd_advertise_name_list" { 99 | count = "${local.etcd_count}" 100 | template = "$$$$$$$${COREOS_AZURE_IPV4_DYNAMIC}" 101 | } 102 | 103 | module "ignition_masters" { 104 | source = "github.com/coreos/tectonic-installer//modules/ignition?ref=0a22c73d39f67ba4bb99106a9e72322a47179736" 105 | 106 | base_domain = "${var.tectonic_base_domain}" 107 | bootstrap_upgrade_cl = "${var.tectonic_bootstrap_upgrade_cl}" 108 | cloud_provider = "azure" 109 | cloud_provider_config = "${jsonencode(data.null_data_source.cloud_provider.inputs)}" 110 | cluster_name = "${var.tectonic_cluster_name}" 111 | container_images = "${var.tectonic_container_images}" 112 | custom_ca_cert_pem_list = "${var.tectonic_custom_ca_pem_list}" 113 | etcd_advertise_name_list = "${data.template_file.etcd_advertise_name_list.*.rendered}" 114 | etcd_ca_cert_pem = "${module.etcd_certs.etcd_ca_crt_pem}" 115 | etcd_client_crt_pem = "${module.etcd_certs.etcd_client_crt_pem}" 116 | etcd_client_key_pem = "${module.etcd_certs.etcd_client_key_pem}" 117 | etcd_count = "${local.etcd_count}" 118 | etcd_initial_cluster_list = "${data.template_file.etcd_hostname_list.*.rendered}" 119 | etcd_peer_crt_pem = "${module.etcd_certs.etcd_peer_crt_pem}" 120 | etcd_peer_key_pem = "${module.etcd_certs.etcd_peer_key_pem}" 121 | etcd_server_crt_pem = "${module.etcd_certs.etcd_server_crt_pem}" 122 | etcd_server_key_pem = "${module.etcd_certs.etcd_server_key_pem}" 123 | etcd_tls_enabled = "${var.tectonic_etcd_tls_enabled}" 124 | image_re = "${var.tectonic_image_re}" 125 | ingress_ca_cert_pem = "${module.ingress_certs.ca_cert_pem}" 126 | kube_ca_cert_pem = "${module.kube_certs.ca_cert_pem}" 127 | kube_dns_service_ip = "${module.bootkube.kube_dns_service_ip}" 128 | kubelet_cni_bin_dir = "${var.tectonic_networking == "calico" || var.tectonic_networking == "canal" ? "/var/lib/cni/bin" : "" }" 129 | kubelet_debug_config = "${var.tectonic_kubelet_debug_config}" 130 | kubelet_node_label = "node-role.kubernetes.io/master" 131 | kubelet_node_taints = "node-role.kubernetes.io/master=:NoSchedule" 132 | tectonic_vanilla_k8s = "${var.tectonic_vanilla_k8s}" 133 | } 134 | 135 | module "masters" { 136 | source = "github.com/coreos/tectonic-installer//modules/azure/master-as?ref=0a22c73d39f67ba4bb99106a9e72322a47179736" 137 | 138 | cloud_provider_config = "${jsonencode(data.null_data_source.cloud_provider.inputs)}" 139 | cluster_id = "${module.tectonic.cluster_id}" 140 | cluster_name = "${var.tectonic_cluster_name}" 141 | container_linux_channel = "${var.tectonic_container_linux_channel}" 142 | container_linux_version = "${module.container_linux.version}" 143 | extra_tags = "${var.tectonic_azure_extra_tags}" 144 | fault_domains = "${var.tectonic_azure_location_fault_domains["${var.tectonic_azure_location}"]}" 145 | ign_azure_udev_rules_id = "${module.ignition_masters.azure_udev_rules_id}" 146 | ign_bootkube_path_unit_id = "${module.bootkube.systemd_path_unit_id}" 147 | ign_bootkube_service_id = "${module.bootkube.systemd_service_id}" 148 | ign_ca_cert_id_list = "${module.ignition_masters.ca_cert_id_list}" 149 | ign_docker_dropin_id = "${module.ignition_masters.docker_dropin_id}" 150 | ign_installer_kubelet_env_id = "${module.ignition_masters.installer_kubelet_env_id}" 151 | ign_installer_runtime_mappings_id = "${module.ignition_masters.installer_runtime_mappings_id}" 152 | ign_k8s_node_bootstrap_service_id = "${module.ignition_masters.k8s_node_bootstrap_service_id}" 153 | ign_kubelet_service_id = "${module.ignition_masters.kubelet_service_id}" 154 | ign_locksmithd_service_id = "${module.ignition_masters.locksmithd_service_id}" 155 | ign_max_user_watches_id = "${module.ignition_masters.max_user_watches_id}" 156 | ign_tectonic_path_unit_id = "${var.tectonic_vanilla_k8s ? "" : module.tectonic.systemd_path_unit_id}" 157 | ign_tectonic_service_id = "${module.tectonic.systemd_service_id}" 158 | ign_tx_off_service_id = "${module.ignition_masters.tx_off_service_id}" 159 | ign_update_ca_certificates_dropin_id = "${module.ignition_masters.update_ca_certificates_dropin_id}" 160 | kubeconfig_content = "${module.bootkube.kubeconfig}" 161 | location = "${var.tectonic_azure_location}" 162 | master_count = "${var.tectonic_master_count}" 163 | network_interface_ids = "${module.vnet.master_network_interface_ids}" 164 | public_ssh_key = "${var.tectonic_azure_ssh_key}" 165 | resource_group_name = "${module.resource_group.name}" 166 | storage_id = "${module.resource_group.storage_id}" 167 | storage_type = "${var.tectonic_azure_master_storage_type}" 168 | vm_size = "${var.tectonic_azure_master_vm_size}" 169 | } 170 | 171 | module "ignition_workers" { 172 | source = "github.com/coreos/tectonic-installer//modules/ignition?ref=0a22c73d39f67ba4bb99106a9e72322a47179736" 173 | 174 | bootstrap_upgrade_cl = "${var.tectonic_bootstrap_upgrade_cl}" 175 | cloud_provider = "azure" 176 | cloud_provider_config = "${jsonencode(data.null_data_source.cloud_provider.inputs)}" 177 | container_images = "${var.tectonic_container_images}" 178 | custom_ca_cert_pem_list = "${var.tectonic_custom_ca_pem_list}" 179 | etcd_ca_cert_pem = "${module.etcd_certs.etcd_ca_crt_pem}" 180 | ingress_ca_cert_pem = "${module.ingress_certs.ca_cert_pem}" 181 | image_re = "${var.tectonic_image_re}" 182 | kube_dns_service_ip = "${module.bootkube.kube_dns_service_ip}" 183 | kube_ca_cert_pem = "${module.kube_certs.ca_cert_pem}" 184 | kubelet_cni_bin_dir = "${var.tectonic_networking == "calico" || var.tectonic_networking == "canal" ? "/var/lib/cni/bin" : "" }" 185 | kubelet_debug_config = "${var.tectonic_kubelet_debug_config}" 186 | kubelet_node_label = "node-role.kubernetes.io/node" 187 | kubelet_node_taints = "" 188 | tectonic_vanilla_k8s = "${var.tectonic_vanilla_k8s}" 189 | } 190 | 191 | module "workers" { 192 | source = "github.com/coreos/tectonic-installer//modules/azure/worker-as?ref=0a22c73d39f67ba4bb99106a9e72322a47179736" 193 | 194 | cloud_provider_config = "${jsonencode(data.null_data_source.cloud_provider.inputs)}" 195 | cluster_id = "${module.tectonic.cluster_id}" 196 | cluster_name = "${var.tectonic_cluster_name}" 197 | container_linux_channel = "${var.tectonic_container_linux_channel}" 198 | container_linux_version = "${module.container_linux.version}" 199 | extra_tags = "${var.tectonic_azure_extra_tags}" 200 | fault_domains = "${var.tectonic_azure_location_fault_domains["${var.tectonic_azure_location}"]}" 201 | ign_azure_udev_rules_id = "${module.ignition_workers.azure_udev_rules_id}" 202 | ign_ca_cert_id_list = "${module.ignition_masters.ca_cert_id_list}" 203 | ign_docker_dropin_id = "${module.ignition_workers.docker_dropin_id}" 204 | ign_installer_kubelet_env_id = "${module.ignition_workers.installer_kubelet_env_id}" 205 | ign_installer_runtime_mappings_id = "${module.ignition_workers.installer_runtime_mappings_id}" 206 | ign_k8s_node_bootstrap_service_id = "${module.ignition_workers.k8s_node_bootstrap_service_id}" 207 | ign_kubelet_service_id = "${module.ignition_workers.kubelet_service_id}" 208 | ign_locksmithd_service_id = "${module.ignition_workers.locksmithd_service_id}" 209 | ign_max_user_watches_id = "${module.ignition_workers.max_user_watches_id}" 210 | ign_tx_off_service_id = "${module.ignition_workers.tx_off_service_id}" 211 | ign_update_ca_certificates_dropin_id = "${module.ignition_workers.update_ca_certificates_dropin_id}" 212 | kubeconfig_content = "${module.bootkube.kubeconfig}" 213 | location = "${var.tectonic_azure_location}" 214 | network_interface_ids = "${module.vnet.worker_network_interface_ids}" 215 | public_ssh_key = "${var.tectonic_azure_ssh_key}" 216 | resource_group_name = "${module.resource_group.name}" 217 | storage_id = "${module.resource_group.storage_id}" 218 | storage_type = "${var.tectonic_azure_worker_storage_type}" 219 | tectonic_kube_dns_service_ip = "${module.bootkube.kube_dns_service_ip}" 220 | vm_size = "${var.tectonic_azure_worker_vm_size}" 221 | worker_count = "${var.tectonic_worker_count}" 222 | } 223 | 224 | module "dns" { 225 | source = "github.com/coreos/tectonic-installer//modules/dns/azure?ref=0a22c73d39f67ba4bb99106a9e72322a47179736" 226 | 227 | etcd_count = "${local.etcd_count}" 228 | master_count = "${var.tectonic_master_count}" 229 | worker_count = "${var.tectonic_worker_count}" 230 | 231 | etcd_ip_addresses = "${module.vnet.etcd_endpoints}" 232 | master_ip_addresses = "${module.vnet.master_private_ip_addresses}" 233 | worker_ip_addresses = "${module.vnet.worker_private_ip_addresses}" 234 | api_ip_addresses = "${module.vnet.api_ip_addresses}" 235 | console_ip_addresses = "${module.vnet.console_ip_addresses}" 236 | 237 | base_domain = "${var.tectonic_base_domain}" 238 | cluster_name = "${var.tectonic_cluster_name}" 239 | cluster_id = "${module.tectonic.cluster_id}" 240 | 241 | location = "${var.tectonic_azure_location}" 242 | external_dns_zone_id = "${var.tectonic_azure_external_dns_zone_id}" 243 | 244 | extra_tags = "${var.tectonic_azure_extra_tags}" 245 | } 246 | -------------------------------------------------------------------------------- /tectonic.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | etcd_count = "${var.tectonic_self_hosted_etcd != "" ? 0 : max(var.tectonic_etcd_count, 1)}" 3 | } 4 | 5 | data "template_file" "etcd_hostname_list" { 6 | count = "${local.etcd_count}" 7 | template = "${var.tectonic_cluster_name}-etcd-${count.index}${var.tectonic_base_domain == "" ? "" : ".${var.tectonic_base_domain}"}" 8 | } 9 | 10 | module "kube_certs" { 11 | source = "github.com/coreos/tectonic-installer//modules/tls/kube/self-signed?ref=0a22c73d39f67ba4bb99106a9e72322a47179736" 12 | 13 | ca_cert_pem = "${var.tectonic_ca_cert}" 14 | ca_key_alg = "${var.tectonic_ca_key_alg}" 15 | ca_key_pem = "${var.tectonic_ca_key}" 16 | kube_apiserver_url = "https://${module.vnet.api_fqdn}:443" 17 | service_cidr = "${var.tectonic_service_cidr}" 18 | validity_period = "${var.tectonic_tls_validity_period}" 19 | } 20 | 21 | module "etcd_certs" { 22 | source = "github.com/coreos/tectonic-installer//modules/tls/etcd/signed?ref=0a22c73d39f67ba4bb99106a9e72322a47179736" 23 | 24 | etcd_ca_cert_path = "${var.tectonic_etcd_ca_cert_path}" 25 | etcd_cert_dns_names = "${data.template_file.etcd_hostname_list.*.rendered}" 26 | etcd_client_cert_path = "${var.tectonic_etcd_client_cert_path}" 27 | etcd_client_key_path = "${var.tectonic_etcd_client_key_path}" 28 | self_signed = "${var.tectonic_self_hosted_etcd != "" ? "true" : length(compact(var.tectonic_etcd_servers)) == 0 ? "true" : "false"}" 29 | service_cidr = "${var.tectonic_service_cidr}" 30 | } 31 | 32 | module "ingress_certs" { 33 | source = "github.com/coreos/tectonic-installer//modules/tls/ingress/self-signed?ref=0a22c73d39f67ba4bb99106a9e72322a47179736" 34 | 35 | base_address = "${module.vnet.ingress_fqdn}" 36 | ca_cert_pem = "${module.kube_certs.ca_cert_pem}" 37 | ca_key_alg = "${module.kube_certs.ca_key_alg}" 38 | ca_key_pem = "${module.kube_certs.ca_key_pem}" 39 | validity_period = "${var.tectonic_tls_validity_period}" 40 | } 41 | 42 | module "identity_certs" { 43 | source = "github.com/coreos/tectonic-installer//modules/tls/identity/self-signed?ref=0a22c73d39f67ba4bb99106a9e72322a47179736" 44 | 45 | ca_cert_pem = "${module.kube_certs.ca_cert_pem}" 46 | ca_key_alg = "${module.kube_certs.ca_key_alg}" 47 | ca_key_pem = "${module.kube_certs.ca_key_pem}" 48 | validity_period = "${var.tectonic_tls_validity_period}" 49 | } 50 | 51 | module "bootkube" { 52 | source = "github.com/coreos/tectonic-installer//modules/bootkube?ref=0a22c73d39f67ba4bb99106a9e72322a47179736" 53 | 54 | cloud_provider = "azure" 55 | cloud_provider_config = "${jsonencode(data.null_data_source.cloud_provider.inputs)}" 56 | 57 | cluster_name = "${var.tectonic_cluster_name}" 58 | 59 | kube_apiserver_url = "https://${module.vnet.api_fqdn}:443" 60 | oidc_issuer_url = "https://${module.vnet.ingress_fqdn}/identity" 61 | 62 | # Platform-independent variables wiring, do not modify. 63 | container_images = "${var.tectonic_container_images}" 64 | versions = "${var.tectonic_versions}" 65 | 66 | service_cidr = "${var.tectonic_service_cidr}" 67 | cluster_cidr = "${var.tectonic_cluster_cidr}" 68 | 69 | advertise_address = "0.0.0.0" 70 | anonymous_auth = "false" 71 | 72 | oidc_username_claim = "email" 73 | oidc_groups_claim = "groups" 74 | oidc_client_id = "tectonic-kubectl" 75 | oidc_ca_cert = "${module.ingress_certs.ca_cert_pem}" 76 | 77 | apiserver_cert_pem = "${module.kube_certs.apiserver_cert_pem}" 78 | apiserver_key_pem = "${module.kube_certs.apiserver_key_pem}" 79 | etcd_ca_cert_pem = "${module.etcd_certs.etcd_ca_crt_pem}" 80 | etcd_client_cert_pem = "${module.etcd_certs.etcd_client_crt_pem}" 81 | etcd_client_key_pem = "${module.etcd_certs.etcd_client_key_pem}" 82 | etcd_peer_cert_pem = "${module.etcd_certs.etcd_peer_crt_pem}" 83 | etcd_peer_key_pem = "${module.etcd_certs.etcd_peer_key_pem}" 84 | etcd_server_cert_pem = "${module.etcd_certs.etcd_server_crt_pem}" 85 | etcd_server_key_pem = "${module.etcd_certs.etcd_server_key_pem}" 86 | kube_ca_cert_pem = "${module.kube_certs.ca_cert_pem}" 87 | kubelet_cert_pem = "${module.kube_certs.kubelet_cert_pem}" 88 | kubelet_key_pem = "${module.kube_certs.kubelet_key_pem}" 89 | 90 | etcd_backup_size = "${var.tectonic_etcd_backup_size}" 91 | etcd_backup_storage_class = "${var.tectonic_etcd_backup_storage_class}" 92 | etcd_endpoints = "${data.template_file.etcd_hostname_list.*.rendered}" 93 | self_hosted_etcd = "${var.tectonic_self_hosted_etcd}" 94 | 95 | master_count = "${var.tectonic_master_count}" 96 | 97 | cloud_config_path = "/etc/kubernetes/cloud" 98 | } 99 | 100 | module "tectonic" { 101 | source = "github.com/coreos/tectonic-installer//modules/tectonic?ref=0a22c73d39f67ba4bb99106a9e72322a47179736" 102 | platform = "azure" 103 | 104 | cluster_name = "${var.tectonic_cluster_name}" 105 | 106 | base_address = "${module.vnet.ingress_fqdn}" 107 | kube_apiserver_url = "https://${module.vnet.api_fqdn}:443" 108 | service_cidr = "${var.tectonic_service_cidr}" 109 | 110 | # Platform-independent variables wiring, do not modify. 111 | container_images = "${var.tectonic_container_images}" 112 | container_base_images = "${var.tectonic_container_base_images}" 113 | versions = "${var.tectonic_versions}" 114 | 115 | license_path = "${var.tectonic_vanilla_k8s ? "/dev/null" : pathexpand(var.tectonic_license_path)}" 116 | pull_secret_path = "${var.tectonic_vanilla_k8s ? "/dev/null" : pathexpand(var.tectonic_pull_secret_path)}" 117 | 118 | admin_email = "${var.tectonic_admin_email}" 119 | admin_password = "${var.tectonic_admin_password}" 120 | 121 | update_channel = "${var.tectonic_update_channel}" 122 | update_app_id = "${var.tectonic_update_app_id}" 123 | update_server = "${var.tectonic_update_server}" 124 | 125 | ca_generated = "${var.tectonic_ca_cert == "" ? false : true}" 126 | ca_cert = "${module.kube_certs.ca_cert_pem}" 127 | 128 | ingress_ca_cert_pem = "${module.ingress_certs.ca_cert_pem}" 129 | ingress_cert_pem = "${module.ingress_certs.cert_pem}" 130 | ingress_key_pem = "${module.ingress_certs.key_pem}" 131 | 132 | identity_client_cert_pem = "${module.identity_certs.client_cert_pem}" 133 | identity_client_key_pem = "${module.identity_certs.client_key_pem}" 134 | identity_server_cert_pem = "${module.identity_certs.server_cert_pem}" 135 | identity_server_key_pem = "${module.identity_certs.server_key_pem}" 136 | 137 | console_client_id = "tectonic-console" 138 | kubectl_client_id = "tectonic-kubectl" 139 | ingress_kind = "NodePort" 140 | self_hosted_etcd = "${var.tectonic_self_hosted_etcd}" 141 | master_count = "${var.tectonic_master_count}" 142 | stats_url = "${var.tectonic_stats_url}" 143 | 144 | image_re = "${var.tectonic_image_re}" 145 | } 146 | 147 | module "flannel_vxlan" { 148 | source = "github.com/coreos/tectonic-installer//modules/net/flannel_vxlan?ref=0a22c73d39f67ba4bb99106a9e72322a47179736" 149 | 150 | cluster_cidr = "${var.tectonic_cluster_cidr}" 151 | enabled = "${var.tectonic_networking == "flannel"}" 152 | container_images = "${var.tectonic_container_images}" 153 | } 154 | 155 | module "calico" { 156 | source = "github.com/coreos/tectonic-installer//modules/net/calico?ref=0a22c73d39f67ba4bb99106a9e72322a47179736" 157 | 158 | container_images = "${var.tectonic_container_images}" 159 | cluster_cidr = "${var.tectonic_cluster_cidr}" 160 | enabled = "${var.tectonic_networking == "calico"}" 161 | } 162 | 163 | module "canal" { 164 | source = "github.com/coreos/tectonic-installer//modules/net/canal?ref=0a22c73d39f67ba4bb99106a9e72322a47179736" 165 | 166 | container_images = "${var.tectonic_container_images}" 167 | cluster_cidr = "${var.tectonic_cluster_cidr}" 168 | enabled = "${var.tectonic_networking == "canal"}" 169 | } 170 | -------------------------------------------------------------------------------- /variables.md: -------------------------------------------------------------------------------- 1 | 2 | # Terraform variables 3 | This document gives an overview of variables used in the Azure platform of the Tectonic SDK. 4 | 5 | ## Inputs 6 | 7 | | Name | Description | Type | Default | 8 | |------|-------------|:----:|:-----:| 9 | | tectonic_admin_email | (internal) The e-mail address used to: 1. login as the admin user to the Tectonic Console. 2. generate DNS zones for some providers.

Note: This field MUST be in all lower-case e-mail address format and set manually prior to creating the cluster. | string | - | 10 | | tectonic_admin_password | (internal) The admin user password to login to the Tectonic Console.

Note: This field MUST be set manually prior to creating the cluster. Backslashes and double quotes must also be escaped. | string | - | 11 | | tectonic_azure_client_secret | (internal) The client secret to use. | string | - | 12 | | tectonic_azure_cloud_environment | (optional) Azure cloud environment to use. See https://github.com/Azure/go-autorest/blob/ec5f4903f77ed9927ac95b19ab8e44ada64c1356/autorest/azure/environments.go#L13 for available environments. | string | `AZUREPUBLICCLOUD` | 13 | | tectonic_azure_config_version | (internal) This declares the version of the Azure configuration variables. It has no impact on generated assets but declares the version contract of the configuration. | string | `1.1` | 14 | | tectonic_azure_etcd_storage_type | (optional) Storage account type for the etcd node(s). Example: Premium_LRS. Using Premium storage is constrained by the of instance specified in 'tectonic_azure_etcd_vm_size'. See https://docs.microsoft.com/en-us/azure/storage/storage-premium-storage#supported-vms | string | `Premium_LRS` | 15 | | tectonic_azure_etcd_vm_size | (optional) Instance size for the etcd node(s). Example: Standard_DS2_v2. | string | `Standard_DS2_v2` | 16 | | tectonic_azure_external_dns_zone_id | (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 | string | `` | 17 | | tectonic_azure_external_master_subnet_id | (optional) Subnet ID within an existing VNet to deploy master nodes into. Required to use an existing VNet.

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/virtualNetworks/test-pre-vnet/subnets/my-k8s-subnet | string | `` | 18 | | tectonic_azure_external_nsg_master_id | (optional) The ID of the external Network Security Group used for masters. Leave blank to have a new one created.

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/networkSecurityGroups/my-master-nsg | string | `` | 19 | | tectonic_azure_external_nsg_worker_id | (optional) The ID of the external Network Security Group used for workers. Leave blank to have a new one created.

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/networkSecurityGroups/my-worker-nsg | string | `` | 20 | | tectonic_azure_external_resource_group | (optional) Name of an external resource group to place created resources in. Leave blank to have a new one created. | string | `` | 21 | | tectonic_azure_external_vnet_id | (optional) Resource ID of an existing Virtual Network to launch nodes into. Leave blank to create a new Virtual Network.

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/virtualNetworks/my-k8s-vnet | string | `` | 22 | | tectonic_azure_external_worker_subnet_id | (optional) Subnet ID within an existing VNet to deploy worker nodes into. Required to use an existing VNet.

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/virtualNetworks/test-pre-vnet/subnets/my-k8s-subnet | string | `` | 23 | | tectonic_azure_extra_tags | (optional) A map of extra Azure tags to be applied to created resources. NOTE: Tags MUST NOT contain reserved characters '<,>,%,&,\,?,/' or control characters. | map | `` | 24 | | tectonic_azure_location | (internal) An Azure location where the cluster will be built. Use the location name as returned in the *Name* column by `az account list-locations` CLI command. Lowercase string with no spaces between words. Example: southcentralus | string | - | 25 | | tectonic_azure_location_fault_domains | (internal) This mapping is for internal use only. It should not be overriden by users. It holds the correspondent number of fault domains for each location, because Azure doesn't provide an API call to query this data per location. The latest version of this data is always available at this location: https://docs.microsoft.com/en-us/azure/virtual-machines/windows/manage-availability | map | `` | 26 | | tectonic_azure_master_storage_type | (optional) Storage account type for the master node(s). Example: Premium_LRS. Using Premium storage is constrained by the of instance specified in 'tectonic_azure_master_vm_size'. See https://docs.microsoft.com/en-us/azure/storage/storage-premium-storage#supported-vms | string | `Premium_LRS` | 27 | | tectonic_azure_master_vm_size | (optional) Instance size for the master node(s). Example: Standard_DS2_v2. | string | `Standard_DS2_v2` | 28 | | tectonic_azure_private_cluster | (optional) Setting this to true will result in NO public facing endpoints being created. All traffic is contained within the VNET. A VNET with an already configured and active VPN connection is required and needs to be supplied via 'tectonic_azure_external_vnet_id'. DNS is currently required, either the Azure managed one or configured via the generic DNS module. | string | `false` | 29 | | tectonic_azure_ssh_key | (required) Path to an SSH public key file to be provisioned as the SSH key for the 'core' user. | string | - | 30 | | tectonic_azure_ssh_network_external | (optional) Network (external) to allow SSH access from. Maps to `source_address_prefix` in Azure. Defaults to `*`. Can be external to Azure environment. Allowed values: [network CIDR (i.e., 10.0.0.0/16) \| `VirtualNetwork` \| `Internet` \| `*` ] | string | `*` | 31 | | tectonic_azure_ssh_network_internal | (optional) Network (internal) to allow SSH access from. Maps to `source_address_prefix` in Azure. Defaults to `VirtualNetwork`. Should be internal to Azure environment. Allowed values: [network CIDR (i.e., 10.0.0.0/16) \| `VirtualNetwork` \| `Internet` \| `*` ] | string | `VirtualNetwork` | 32 | | tectonic_azure_vnet_cidr_block | (optional) Range of IP addresses assigned to the Virtual Network in which the cluster nodes run. This should not overlap with any other networks, such as the Kubernetes cluster (pod) range, service range or a private datacenter connected via ExpressRoute." | string | `10.0.0.0/16` | 33 | | tectonic_azure_worker_storage_type | (optional) Storage account type for the worker node(s). Example: Premium_LRS. Using Premium storage is constrained by the of instance specified in 'tectonic_azure_worker_vm_size'. See https://docs.microsoft.com/en-us/azure/storage/storage-premium-storage#supported-vms | string | `Premium_LRS` | 34 | | tectonic_azure_worker_vm_size | (optional) Instance size for the worker node(s). Example: Standard_DS2_v2. | string | `Standard_DS2_v2` | 35 | | tectonic_base_domain | The base DNS domain of the cluster. It must NOT contain a trailing period. Some DNS providers will automatically add this if necessary.

Example: `openstack.dev.coreos.systems`.

Note: This field MUST be set manually prior to creating the cluster. This applies only to cloud platforms.

[Azure-specific NOTE] To use Azure-provided DNS, `tectonic_base_domain` should be set to `""` If using DNS records, ensure that `tectonic_base_domain` is set to a properly configured external DNS zone. Instructions for configuring delegated domains for Azure DNS can be found here: https://docs.microsoft.com/en-us/azure/dns/dns-delegate-domain-azure-dns | string | - | 36 | | tectonic_bootstrap_upgrade_cl | (internal) Whether to trigger a ContainerLinux upgrade on node bootstrap. | string | `true` | 37 | | tectonic_ca_cert | (optional) The content of the PEM-encoded CA certificate, used to generate Tectonic Console's server certificate. If left blank, a CA certificate will be automatically generated. | string | `` | 38 | | tectonic_ca_key | (optional) The content of the PEM-encoded CA key, used to generate Tectonic Console's server certificate. This field is mandatory if `tectonic_ca_cert` is set. | string | `` | 39 | | tectonic_ca_key_alg | (optional) The algorithm used to generate tectonic_ca_key. The default value is currently recommended. This field is mandatory if `tectonic_ca_cert` is set. | string | `RSA` | 40 | | tectonic_cluster_cidr | (optional) This declares the IP range to assign Kubernetes pod IPs in CIDR notation. | string | `10.2.0.0/16` | 41 | | tectonic_cluster_name | The name of the cluster. If used in a cloud-environment, this will be prepended to `tectonic_base_domain` resulting in the URL to the Tectonic console.

Note: This field MUST be set manually prior to creating the cluster. Warning: Special characters in the name like '.' may cause errors on OpenStack platforms due to resource name constraints. | string | - | 42 | | tectonic_config_version | (internal) This declares the version of the global configuration variables. It has no impact on generated assets but declares the version contract of the configuration. | string | `1.0` | 43 | | tectonic_container_base_images | (internal) Base images of the components to use | map | `` | 44 | | tectonic_container_images | (internal) Container images to use | map | `` | 45 | | tectonic_container_linux_channel | (optional) The Container Linux update channel.

Examples: `stable`, `beta`, `alpha` | string | `stable` | 46 | | tectonic_container_linux_version | The Container Linux version to use. Set to `latest` to select the latest available version for the selected update channel.

Examples: `latest`, `1465.6.0` | string | `latest` | 47 | | tectonic_custom_ca_pem_list | (optional) A list of PEM encoded CA files that will be installed in /etc/ssl/certs on etcd, master, and worker nodes. | list | `` | 48 | | tectonic_ddns_key_algorithm | (optional) This only applies if you use the modules/dns/ddns module.

Specifies the RFC2136 Dynamic DNS server key algorithm. | string | `` | 49 | | tectonic_ddns_key_name | (optional) This only applies if you use the modules/dns/ddns module.

Specifies the RFC2136 Dynamic DNS server key name. | string | `` | 50 | | tectonic_ddns_key_secret | (optional) This only applies if you use the modules/dns/ddns module.

Specifies the RFC2136 Dynamic DNS server key secret. | string | `` | 51 | | tectonic_ddns_server | (optional) This only applies if you use the modules/dns/ddns module.

Specifies the RFC2136 Dynamic DNS server IP/host to register IP addresses to. | string | `` | 52 | | tectonic_etcd_backup_size | (optional) The size in MB of the PersistentVolume used for handling etcd backups. | string | `512` | 53 | | tectonic_etcd_backup_storage_class | (optional) The name of an existing Kubernetes StorageClass that will be used for handling etcd backups. | string | `` | 54 | | tectonic_etcd_ca_cert_path | (optional) The path of the file containing the CA certificate for TLS communication with etcd.

Note: This works only when used in conjunction with an external etcd cluster. If set, the variable `tectonic_etcd_servers` must also be set. | string | `/dev/null` | 55 | | tectonic_etcd_client_cert_path | (optional) The path of the file containing the client certificate for TLS communication with etcd.

Note: This works only when used in conjunction with an external etcd cluster. If set, the variables `tectonic_etcd_servers`, `tectonic_etcd_ca_cert_path`, and `tectonic_etcd_client_key_path` must also be set. | string | `/dev/null` | 56 | | tectonic_etcd_client_key_path | (optional) The path of the file containing the client key for TLS communication with etcd.

Note: This works only when used in conjunction with an external etcd cluster. If set, the variables `tectonic_etcd_servers`, `tectonic_etcd_ca_cert_path`, and `tectonic_etcd_client_cert_path` must also be set. | string | `/dev/null` | 57 | | tectonic_etcd_count | The number of etcd nodes to be created. If set to zero, the count of etcd nodes will be determined automatically.

Note: This is not supported on bare metal. | string | `0` | 58 | | tectonic_etcd_servers | (optional) List of external etcd v3 servers to connect with (hostnames/IPs only). Needs to be set if using an external etcd cluster. Note: If this variable is defined, the installer will not create self-signed certs. To provide a CA certificate to trust the etcd servers, set "tectonic_etcd_ca_cert_path".

Example: `["etcd1", "etcd2", "etcd3"]` | list | `` | 59 | | tectonic_etcd_tls_enabled | (optional) If set to `true`, all etcd endpoints will be configured to use the "https" scheme.

Note: If `tectonic_experimental` is set to `true` this variable has no effect, because the experimental self-hosted etcd always uses TLS. | string | `true` | 60 | | tectonic_image_re | (internal) Regular expression used to extract repo and tag components | string | `/^([^/]+/[^/]+/[^/]+):(.*)$/` | 61 | | tectonic_kubelet_debug_config | (internal) debug flags for the kubelet (used in CI only) | string | `` | 62 | | tectonic_license_path | The path to the tectonic licence file. You can download the Tectonic license file from your Account overview page at [1].

[1] https://account.coreos.com/overview

Note: This field MUST be set manually prior to creating the cluster unless `tectonic_vanilla_k8s` is set to `true`. | string | `` | 63 | | tectonic_master_count | The number of master nodes to be created. This applies only to cloud platforms. | string | `1` | 64 | | tectonic_networking | (optional) Configures the network to be used in Tectonic. One of the following values can be used:

- "flannel": enables overlay networking only. This is implemented by flannel using VXLAN.

- "canal": [ALPHA] enables overlay networking including network policy. Overlay is implemented by flannel using VXLAN. Network policy is implemented by Calico.

- "calico": [ALPHA] enables BGP based networking. Routing and network policy is implemented by Calico. Note this has been tested on baremetal installations only. | string | `flannel` | 65 | | tectonic_pull_secret_path | The path the pull secret file in JSON format. This is known to be a "Docker pull secret" as produced by the docker login [1] command. A sample JSON content is shown in [2]. You can download the pull secret from your Account overview page at [3].

[1] https://docs.docker.com/engine/reference/commandline/login/

[2] https://coreos.com/os/docs/latest/registry-authentication.html#manual-registry-auth-setup

[3] https://account.coreos.com/overview

Note: This field MUST be set manually prior to creating the cluster unless `tectonic_vanilla_k8s` is set to `true`. | string | `` | 66 | | tectonic_self_hosted_etcd | (internal) [ALPHA] If set to one of the following values, self-hosted etcd is deployed:

- "enabled": Deploys a self-hosted etcd cluster.

- "pv_backup": Deploys a self-hosted etcd cluster including backups to Persistence Volumes. `tectonic_etcd_backup_size` and `tectonic_etcd_backup_storage_class` must be configured when using this setting. | string | `` | 67 | | tectonic_service_cidr | (optional) This declares the IP range to assign Kubernetes service cluster IPs in CIDR notation. The maximum size of this IP range is /12 | string | `10.3.0.0/16` | 68 | | tectonic_stats_url | (internal) The Tectonic statistics collection URL to which to report. | string | `https://stats-collector.tectonic.com` | 69 | | tectonic_tls_validity_period | Validity period of the self-signed certificates (in hours). Default is 3 years. This setting is ignored if user provided certificates are used. | string | `26280` | 70 | | tectonic_update_app_id | (internal) The Tectonic Omaha update App ID | string | `6bc7b986-4654-4a0f-94b3-84ce6feb1db4` | 71 | | tectonic_update_channel | (internal) The Tectonic Omaha update channel | string | `tectonic-1.7-production` | 72 | | tectonic_update_server | (internal) The URL of the Tectonic Omaha update server | string | `https://tectonic.update.core-os.net` | 73 | | tectonic_vanilla_k8s | If set to true, a vanilla Kubernetes cluster will be deployed, omitting any Tectonic assets. | string | `false` | 74 | | tectonic_versions | (internal) Versions of the components to use | map | `` | 75 | | tectonic_worker_count | The number of worker nodes to be created. This applies only to cloud platforms. | string | `3` | 76 | 77 | -------------------------------------------------------------------------------- /variables.tf: -------------------------------------------------------------------------------- 1 | variable "tectonic_azure_config_version" { 2 | description = <,%,&,\,?,/' or control characters. 237 | EOF 238 | 239 | default = {} 240 | } 241 | 242 | variable "tectonic_azure_private_cluster" { 243 | description = <