minamijoyo / tfupdate

Update version constraints in your Terraform configurations
MIT License
539 stars 23 forks source link

How to bump `git:ssh` internal modules ? #105

Closed nitrocode closed 7 months ago

nitrocode commented 8 months ago

e.g.

-  source = "git::ssh://git@github.com/org/repo.git//modules/component?ref=v1.2.3"
+  source = "git::ssh://git@github.com/org/repo.git//modules/component?ref=v1.2.4"

Is there a way to do this using the cli ?

My current workaround

sed 's,v1.2.3,v1.2.4,g' -i **/*.tf

Thanks!

minamijoyo commented 8 months ago

Give it a try!

$ cat main.tf
module "component" {
  source = "git::ssh://git@github.com/org/repo.git//modules/component?ref=v1.2.3"
}

$ tfupdate module git::ssh://git@github.com/org/repo.git//modules/component -v 1.2.4 main.tf

$ cat main.tf
module "component" {
  source = "git::ssh://git@github.com/org/repo.git//modules/component?ref=v1.2.4"
}
minamijoyo commented 7 months ago

@nitrocode I will close this issue because I believe this feature works as expected. Please feel free to reopen if I missed something.