Closed dkEdiIly closed 8 months ago
Reference server module terraform/server/server.tf from the root configuration file See witch directories are being recognized by terraform run terraform providers
terraform/server/server.tf
root
terraform providers
Providers required by configuration: ├── provider[registry.terraform.io/hashicorp/local] 2.1.0 ├── provider[registry.terraform.io/hashicorp/tls] 3.1.0 ├── provider[registry.terraform.io/hashicorp/aws] ~> 4.0 ├── provider[registry.terraform.io/hashicorp/http] ~> 2.1.0 ├── provider[registry.terraform.io/hashicorp/random] ~> 3.1.0 ├── module.server │ └── provider[registry.terraform.io/hashicorp/aws] └── module.subnet_addrs
terraform state list to see the newly created resources terraform state show module.server.aws_instance.web
terraform state list
terraform state show module.server.aws_instance.web
Official doc
tree to see the folder structure
tree
├── MyAWSKey.pem ├── credentials.auto.tfvars ├── main.tf ├── modules │ └── server │ └── server.tf ├── output.tf ├── providers.tf ├── readme.md ├── terraform.tfstate ├── terraform.tfstate.backup ├── terraform.tfstate.d │ └── development │ ├── terraform.tfstate │ └── terraform.tfstate.backup ├── variables.tf └── versions.tf
Resources within Child Modules
terraform console > module.autoscaling
Terraform assumes version numbers follow the Semantic Versioning 2.0 convention. Major.Minor.Patch
Semantic Versioning
Major.Minor.Patch
version = ">3.0.0"
Terraform Modules
Reference server module
terraform/server/server.tf
from theroot
configuration file See witch directories are being recognized by terraform runterraform providers
terraform state list
to see the newly created resourcesterraform state show module.server.aws_instance.web
Terraform Module Sources
Official doc
tree
to see the folder structureTerraform Module Scope
Resources within Child Modules
Terraform Module Versions
Terraform assumes version numbers follow the
Semantic Versioning
2.0 convention.Major.Minor.Patch
version = ">3.0.0"
anything higher than v3