Difference between revisions of "Terraform modules"
Jump to navigation
Jump to search
Line 4: | Line 4: | ||
Modules naming convention: <code>terraform-[[PROVIDER]]-NAME</code> | Modules naming convention: <code>terraform-[[PROVIDER]]-NAME</code> | ||
+ | == Modules == | ||
* <code>module "[[vpc]]"</code> | * <code>module "[[vpc]]"</code> | ||
* <code>module "[[iam]]"</code> | * <code>module "[[iam]]"</code> | ||
Line 14: | Line 15: | ||
* <code>module [[route53]]</code>: zones, record (https://registry.terraform.io/modules/terraform-aws-modules/route53/aws/latest) | * <code>module [[route53]]</code>: zones, record (https://registry.terraform.io/modules/terraform-aws-modules/route53/aws/latest) | ||
* <code>module [[cicd (terraform module)|cicd]]</code> https://registry.terraform.io/modules/cloudposse/cicd/aws/latest | * <code>module [[cicd (terraform module)|cicd]]</code> https://registry.terraform.io/modules/cloudposse/cicd/aws/latest | ||
+ | |||
+ | == Examples in [[main.tf]] == | ||
+ | [[Terraform modules|module]] "[[consul]]" { | ||
+ | source = "./path/to/you/module" | ||
+ | } | ||
+ | |||
+ | module "yourmodule" { | ||
+ | source = "[[github.com]]/your-project/terraform-your-templates/modules/yourmodule" | ||
+ | } | ||
+ | |||
== Related terms == | == Related terms == |
Revision as of 14:39, 19 October 2021
- https://learn.hashicorp.com/tutorials/terraform/module
- Terraform registry: https://registry.terraform.io/browse/modules
Modules naming convention: terraform-PROVIDER-NAME
Modules
module "vpc"
module "iam"
module "aws_instance"
module "rds"
module "cdn"
(AWS CloudFront)module "vm"
(Terraform Libvirt module: https://registry.terraform.io/modules/MonolithProjects/vm/libvirt/latest)module s3-bucket
(https://registry.terraform.io/modules/terraform-aws-modules/s3-bucket/aws/latest)- aws_s3_bucket https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket
module route53
: zones, record (https://registry.terraform.io/modules/terraform-aws-modules/route53/aws/latest)module cicd
https://registry.terraform.io/modules/cloudposse/cicd/aws/latest
Examples in main.tf
module "consul" { source = "./path/to/you/module" }
module "yourmodule" { source = "github.com/your-project/terraform-your-templates/modules/yourmodule" }
Related terms
source
- Terragrunt
- Ansible modules
- Terraform resources
- Provider (Terraform):
aws
terraform get
terraform get -update
- Error: Module not installed
See also
- Terraform modules,
terraform get
,module { source }
, AWS modules,module.
, child modules, Terraform modules inputs, submodules,terraform init -upgrade
- Terraform AWS resources: IAM, Net, EC2, ECS, ECR, S3, Route53, ACM, CloudWatch, CloudFront SES, RDS, DLM
terraform
[untaint | fmt
|apply
|show
|state
|init | plan | console | output
|validate
|destroy
|debug
|import
|providers
|get
|graph
|workspaces
|resource
|login
|-var-file
|state mv
|state pull
|state push
|state replace-provider
|state rm
|force-unlock
|env
|tfe
|--version
|remote-exec
|delete on termination
| deprecated commands |terraform --help
]
Advertising: