-
-
Notifications
You must be signed in to change notification settings - Fork 725
doc: add terraform instructions to public cloud platforms in aws, azure and gcp #10376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Killpit
wants to merge
1
commit into
siderolabs:main
Choose a base branch
from
Killpit:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
67 changes: 67 additions & 0 deletions
67
website/content/v1.10/talos-guides/infrastructure-as-code/terraform.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# How to Deploy Talos Cluster in Public Cloud Platforms | ||
|
||
In his guide, we will learn how to deploy Talos resources by using Terraform with cloud platforms. | ||
|
||
You can look at [terraform module docs](https://registry.terraform.io/providers/siderolabs/talos/latest/docs) which provide explanations on guides, resources and data sources as the latest version. | ||
|
||
### How to Deploy Talos Cluster in AWS | ||
|
||
#### Prerequisites | ||
|
||
- AWS Account | ||
- AWS CLI | ||
- Getting keys from AWS IAM and configuring it locally | ||
- Terraform | ||
- kubectl | ||
- talosctl | ||
- SSH key to connect to EC2 instances in talos (if necessary, use secrets manager to secure your secrets) | ||
|
||
#### Setting up the environment | ||
|
||
- Clone the [Sidero Labs' contribution repo](https://github.com/siderolabs/contrib) to your GitHub Account and then clone the repo on your computer. | ||
- Then, write ```cd contrib``` to go to the directory | ||
- Open up your code editor | ||
- Go to aws file by writing ```cd examples/terraform/aws``` | ||
- In your terminal, write ```terraform init``` to initialize the Terraform file | ||
- Then write ```terraform apply``` to deploy the resources, you may need to customize the command | ||
- After your resources were created in terraform, write ```kubectl apply -f manifests/ccm.yaml``` to deploy the manifest file | ||
|
||
### How to Deploy Talos Cluster in Azure | ||
|
||
#### Prerequisites | ||
|
||
- Azure Account | ||
- Azure CLI | ||
- Terraform | ||
- kubectl | ||
- talosctl | ||
|
||
#### Setting up the environment | ||
|
||
- Clone the [Sidero Labs' contribution repo](https://github.com/siderolabs/contrib) to your GitHub Account and then clone the repo on your computer. | ||
- Then, write ```cd contrib``` to go to the directory | ||
- Open up your code editor | ||
- Go to aws file by writing ```cd examples/terraform/azure``` | ||
- In your terminal, write ```terraform init``` to initialize the Terraform file | ||
- Then write ```terraform apply``` to deploy the resources, you may need to customize the command | ||
|
||
### How to Deploy Talos Cluster in GCP | ||
|
||
#### Prerequisites | ||
|
||
- GCP Account | ||
- gcloud CLI | ||
- Terraform | ||
- kubectl | ||
- talosctl | ||
|
||
#### Setting up the environment | ||
|
||
- Clone the [Sidero Labs' contribution repo](https://github.com/siderolabs/contrib) to your GitHub Account and then clone the repo on your computer. | ||
- Then, write ```cd contrib``` to go to the directory | ||
- Open up your code editor | ||
- Go to aws file by writing ```cd examples/terraform/gcp``` | ||
- In your terminal, write ```terraform init``` to initialize the Terraform file | ||
- Then write ```terraform apply``` to deploy the resources, you may need to customize the command | ||
|
||
In addition to the steps in GCP, in Terraform, you need to define your project and your GCP account, and it is recommended to use secrets management tools |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's easier to just link to contrib repository since it has much more examples with different providers, and probbaly update README there if anything's missing
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The thing is, the docs lack Terraform and there are nothing covering it to begin with, and it took weeks to literally figure it out @frezbo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeh agree, but don;t think it makes sense to put TF commands in talos code, this can link to examples in contrib
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@frezbo Is there a way I can add the docs so that it's easier to understand and accessible for developers while having docs for Terraform too