Editing Terraform modules: source

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
 +
{{lowercase}}
 
* https://www.terraform.io/docs/language/modules/sources.html
 
* https://www.terraform.io/docs/language/modules/sources.html
  
Line 7: Line 8:
 
Terraform uses this during the module installation step of <code>[[terraform init]]</code> to download the source code to a directory on local disk so that it can be used by other Terraform commands.
 
Terraform uses this during the module installation step of <code>[[terraform init]]</code> to download the source code to a directory on local disk so that it can be used by other Terraform commands.
  
== Examples in [[main.tf]] ==
+
 
  [[Terraform module keyword|module]] "[[consul]]" {
+
  module "consul" {
 
   source = "./path/to/you/module"
 
   source = "./path/to/you/module"
 
  }
 
  }
  
module "yourmodule" {
 
  source = "[[github.com]]/your-project/terraform-your-templates/modules/yourmodule"
 
}
 
 
module "vpc" {
 
  source = "git::https://example.com/vpc.git?[[ref=]]v1.2.0"
 
}
 
 
module "db" {
 
  source  = "terraform-aws-modules/rds/aws"
 
}
 
  
== Terraform source types ==
+
== Source types ==
https://www.terraform.io/docs/language/modules/sources.html
+
* Local paths
* [[Local paths]]
+
* Terraform Registry
* [[Terraform Registry]]
+
* GitHub
* [[GitHub]]
+
* Bitbucket
* [[Bitbucket]]
+
* Generic Git, Mercurial repositories
* [[Generic Git]], [[Mercurial repositories]]
+
* HTTP URLs
* [[HTTP URLs]]
+
* S3 buckets
* [[S3 buckets]]
 
 
* [[GCS]] buckets
 
* [[GCS]] buckets
  
== Errors ==
 
* <code>[[Error: Module not found]]: Address could not be resolved</code>
 
  
 
== Related terms ==
 
== Related terms ==
 
* <code>[[terraform init]]</code>
 
* <code>[[terraform init]]</code>
* [[Terraform Associate]]: Contrast module source options
 
* [[Terraform public module registry]]
 
* [[Terraform module keyword]]
 
  
 
== See also ==
 
== See also ==
 
* {{Terraform modules}}
 
* {{Terraform modules}}
 +
* {{Terraform}}
  
[[Category:Terraform]]
+
[[Category:Iac]]

Please note that all contributions to wikieduonline may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Wikieduonline:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)

Template used on this page:

Advertising: