Difference between revisions of "Main.tf"
Jump to navigation
Jump to search
(21 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | [[provider]] "[[random]]" { | + | {{lowercase}} |
+ | |||
+ | [[Terraform examples]]: | ||
+ | * [[AWS instance example: main.tf]] | ||
+ | * [[Deploy EKS cluster using Terraform]] | ||
+ | |||
+ | * [[Terraform resources]] | ||
+ | |||
+ | == [[Terraform providers]] == | ||
+ | [[Terraform: provider|provider]] "[[random]]" { | ||
} | } | ||
+ | provider "aws" { | ||
+ | profile = "[[default]]" | ||
+ | } | ||
+ | |||
+ | [[provider "aws"]] { | ||
+ | version = "~> 3.38.0" | ||
+ | region = "us-west-2" | ||
+ | [[profile]] = "your_profile_name" | ||
+ | } | ||
provider "mysql" { | provider "mysql" { | ||
Line 9: | Line 27: | ||
} | } | ||
− | + | == Errors == | |
− | + | [[error: error validating]] "[[main.tf]]": error validating data: invalid object to validate; if you choose to ignore these errors, turn validation off with [[--validate=false]] | |
− | |||
− | |||
− | |||
− | |||
== Related commands == | == Related commands == | ||
− | * <code>[[terraform init]]</code> | + | * <code>[[terraform init]]</code>, <code>[[terraform plan]]</code>, <code>[[terraform apply]]</code> |
* <code>[[variables.tf]]</code> | * <code>[[variables.tf]]</code> | ||
* <code>[[outputs.tf]]</code> | * <code>[[outputs.tf]]</code> | ||
* <code>[[.terraform.d/]]</code> | * <code>[[.terraform.d/]]</code> | ||
* Examples: [[AWS EC2 Terraform example]] | * Examples: [[AWS EC2 Terraform example]] | ||
+ | * [[Terraform S3 backend]] | ||
+ | * [[Best practices for using Terraform]] | ||
+ | * <code>[[provider.tf]]</code> | ||
== See also == | == See also == | ||
+ | * {{main.tf}} | ||
* {{tf files}} | * {{tf files}} | ||
− | * {{terraform}} | + | * {{terraform apply}} |
[[Category:Terraform]] | [[Category:Terraform]] |
Latest revision as of 11:26, 10 October 2024
Terraform providers[edit]
provider "random" { }
provider "aws" { profile = "default" }
provider "aws" { version = "~> 3.38.0" region = "us-west-2" profile = "your_profile_name" }
provider "mysql" { endpoint = "my-database.example.com:3306" username = "app-user" password = "app-password" }
Errors[edit]
error: error validating "main.tf": error validating data: invalid object to validate; if you choose to ignore these errors, turn validation off with --validate=false
Related commands[edit]
terraform init
,terraform plan
,terraform apply
variables.tf
outputs.tf
.terraform.d/
- Examples: AWS EC2 Terraform example
- Terraform S3 backend
- Best practices for using Terraform
provider.tf
See also[edit]
- Terraform examples,
main.tf
, Aws instance example: main.tf,terraform apply
- Terraform configuration files, Terraform state files:
.tf
,.tfvars
,main.tf, outputs.tf
,variables.tf
,.terraform.d/
,terraform init
,providers.tf
,.terraform/
,terraform.tfstate
,.terraform.lock.hcl
,terraform.tfstate.d, override.tf, versions.tf
terraform apply
[-auto-approve
|-refresh-only, -destroy | --help ]
, Terraform examples,Still creating...
, Terraform apply examples with errors
Advertising: