Comments (15)
Hi, @sebastiansirch
Thank you for your feedback! I'm very happy to hear that migration efforts were successful! :)
I'll notify you once PR get merged, it's under code review which shouldn't take much time.
Please note: there are #53 and #54 opened for interface changes, so you might need to adjust your side code as well after those get merged.
Thanks
from terraform-google-lb-http.
As part of this 0.12 move is it worth moving straight to using for_each
(0.12.6+) over the count/index method for managing resources.
I know other modules are looking to move to using for_each now that is it released e.g. GKE with node-pools, in this module it can be used for backend_services/health_checks
from terraform-google-lb-http.
@Dev25 Yes, I think that's a good idea. @ivankorn Please switch to using for_each
.
from terraform-google-lb-http.
Fixed by #49
from terraform-google-lb-http.
I'm moving discussion from closed PR #49 here
@itscaro, thank you for doing a good job on migrating examples!
Unfortunately your PR for it uses deprecated MIG template, so terraform plan
discovers a lot of errors like this
$ terraform plan
Error: Invalid value for module argument
on main.tf line 65, in module "gce-lb-http":
65: target_tags = [module.mig1.target_tags, module.mig2.target_tags]
The given value is not suitable for child module variable "target_tags"
defined at ../../variables.tf:48,1-23: element 0: string required.
Error: Unsupported block type
on mig.tf line 20, in data "template_file" "group-startup-script":
20: vars {
Blocks of type "vars" are not expected here. Did you mean to define argument
"vars"? If so, use the equals sign to assign it a value.
As @morgante advised here the older MIG module is deprecated and we should use https://github.com/terraform-google-modules/terraform-google-vm/tree/master/modules/mig instead.
@itscaro, unless you're willing to continue your work I'm going to pick up from where you left and proceed with following:
- Switch MIG and other depdency-modules to TF 0.12 compatible
- Add strict types for variables
- Remove instances of unnecessary string interpolation from the code base (if any left)
- Remove unnecessary "element" calls (if any left)
- Update types to number/bool where necessary
Also I'd like to alight this module a bit with terraform-google-modules
By adding terraform, bash and white-space linters + doc_generator as a first step in this direction.
from terraform-google-lb-http.
@ivankorn please go ahead, I'm going to be off till Sep. Thank you.
from terraform-google-lb-http.
@ivankorn please go ahead, I'm going to be off till Sep. Thank you.
Okay, then :) have a good time @itscaro
from terraform-google-lb-http.
@ivankorn I've been following your work on this. I'm looking for this internal lb example
are you working on this? if not, are the items you mentioned above needed to convert this to TF 0.12? Thanks
from terraform-google-lb-http.
@jtfogarty We're hoping to update all the LB modules to v0.12 in the next week or two.
from terraform-google-lb-http.
@ivankorn I've been following your work on this. I'm looking for this internal lb example
are you working on this?
@jtfogarty, not at the moment. But given the update Morgante provided - there are chances for me to pick up some more of lb modules soon.
if not, are the items you mentioned above needed to convert this to TF 0.12? Thanks
More than that, I think in addition to those, we should take care of following:
- Add linters and updated helper scripts
- Standardize tests
- Switch to new CI
Just to satisfy immediate functionality needs last two points can probably be addressed out of migration scope.
All the TF modules will likely follow the terraform-google-modules new approach
from terraform-google-lb-http.
@Dev25 Yes, I think that's a good idea. @ivankorn Please switch to using
for_each
.
for_each
switch is commited here
For now interface is kept everywhere but here. That can be easily reverted, but I don't see any sense in keeping at list that. I'm also going to come up with a proposal on more changes as discussed with @aaron-lane on the call today
Since the PR is still in draft I left some comments here and there on interface changes I'd like to make. Followed by migration plan in readme/changelog of course
from terraform-google-lb-http.
@morgante @Dev25 fyi: for_each
adds a bit to a good amount of entropy on the migration task.
We're migrating
- from 0.11 to 0.12
- from
GoogleCloudPlatform/managed-instance-group
toterraform-google-modules/vm/google//modules/instance_template
andterraform-google-modules/vm/google//modules/mig
(and adding a number of resources as deps for them) - from
GoogleCloudPlatform/nat-gateway/google
toterraform-google-modules/cloud-nat
As I reported currently for_each
has a bug which brakes all multi-backend examples down
cc: @paulpalamarchuk @nick4fake @kopachevsky
from terraform-google-lb-http.
Update: As @morgante advised I pushed for_each
changes in a separate branch aside and reverted them back
TF issue ref: hashicorp/terraform#22735
cc: @kopachevsky @nick4fake @paulpalamarchuk @ingwarr @aaron-lane
from terraform-google-lb-http.
Hi @ivankorn ,
just want to let you know that I already tested and used your current working state in a project where we needed a Terraform 12 compatible version :-) Works fine.
Best,
Sebastian
from terraform-google-lb-http.
Thank you for this.
I already have a custom version of this module removing everything wasnt working.
I will switch to this official when possible.
Thank you very much.
from terraform-google-lb-http.
Related Issues (20)
- Create a sub-module for DNS Authorization-based Managed Certificates HOT 3
- Should be possible change network tier HOT 3
- LB is not re-created when address is assigned after initial creation without address HOT 2
- Issue using certificate map HOT 2
- disable cross region backend test HOT 1
- Add test for cross project backend using new testing framework HOT 5
- Release 9.3.0 for TPG v5 compatibility HOT 1
- enable_ipv6 without create_ipv6_address or ipv6_address creates ipv4 frontends HOT 5
- Source is not setup properly in module nat-mig-http-lb HOT 2
- the mig-nat-http-lb outputs.tf file require a sensitive data HOT 1
- Latest release is breaking HOT 2
- Logs are not disabled properly HOT 2
- Output forwarding rule names HOT 3
- Terraform Cloud - Error creating ManagedSslCertificate HOT 1
- Module requires health_check when some lb configurations do not accept it.
- Use SSL certificate from host project HOT 4
- Can't use the 10.2.0 version when pointing to terraform registry module HOT 2
- Heath checks using port_name only fail to create FW rules
- Custom url_map resource inside the module HOT 1
- Can't set cache mode for serverless NEG to FORCE_CACHE_ALL
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-google-lb-http.