
Show HN: I Made a Terraform Crash Course - movedx
Hi.<p>I made a video crash course about Terraform 0.12. It&#x27;s one of four I want to do. I would love to show you what I&#x27;ve made so far and get your feedback and thoughts.<p>The course is financially free but does require an email to signup (a limitation of the platform I&#x27;m using): https:&#x2F;&#x2F;www.thecloud.coach&#x2F;terraform-crash-course<p>Let me know if you have any questions.<p>Thanks.
======
LilBytes
I'm just starting on my Terraform journey, ~2 months in and building a PoC for
my team. I'll be happy to go through all of your videos in the next few days
and see how it fits in with my current learning's.

Just a brief note, Terraform 0.12's linter is broken in VSCode for HCL2.
You'll find regular syntax errors in for each loops and similar inspite of
them being accurate.

[https://github.com/mauve/vscode-
terraform/issues/157](https://github.com/mauve/vscode-terraform/issues/157)

Till HCL2 is completely supported, I and my colleagues have been using
IntelliJ based IDE's such as PyCharm which AFAIK has the only working HCL2
working syntax linter.

~~~
movedx
Thanks for checking out the tutorials. Please reach out with any feedback so I
can improve it.

> Just a brief note, Terraform 0.12's linter is broken in VSCode for HCL2

If you hit Command+Shift+P (or Cntrl+Shift+P on Windows/Linux) to bring up the
command box and enter, "terraform enable", you'll see an option that reads:
"Terraform: Enable/Disable Language Server" \- this loads a language server
that has 0.12 support.

~~~
LilBytes
It certainly does but the HCL2 linter still is in beta at best. I'm not
contributing to the code base but I am throwing some effort behind the testing
at [https://github.com/mauve/vscode-
terraform/issues/157](https://github.com/mauve/vscode-terraform/issues/157)

There's also an active bounty on Bountysource for Julio who's actively
building HCL2 support (I really don't want to use PyCharm _just_ for
Terraform.

    
    
      https://www.bountysource.com/issues/70767330-feat-terraform-0-12-support-was-hcl2-support
    

Syntax errors will still be found when using for each loops and variables.
E.g, the Jonny variable below shows syntax errors in VSCode.

    
    
      variable "some-accounts" {
      description = "A map of the ARN's of the listed accounts Role and SAML Provided objects"
      type = list(object({
        username = string
        firstname = string
        lastname = string
      }))
      Jonny = {
        username = "myemail@domain.com"
        firstname = "Bob, The"
        lastname = "Builder"
      }
    
    

The ```var.some-accounts``` also spits out a syntax error below, as does
```each.key```

    
    
      for_each = var.some-accounts
    
      resource "okta_app_saml" "Okta_App" {
        for_each = var.aws-accounts
        label = each.key
        sso_url = "https://signin.aws.amazon.com/saml"
        recipient = "https://signin.aws.amazon.com/saml"
        destination = "https://signin.aws.amazon.com/saml"
        audience = "https://signin.aws.amazon.com/saml"
        subject_name_id_template = "$${user.userName}"
        subject_name_id_format = "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified"
        response_signed = true
        signature_algorithm = "RSA_SHA256"
        digest_algorithm = "SHA256"
        honor_force_authn = false
        authn_context_class_ref = "urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport"
      }

------
isubasinghe
I absolutely love terraform. It is so much more readable than cloudformation.
Thanks for the tutorial, I will check it out

~~~
movedx
Thank you so much. And yes, I agree. It's also vendor agnostic and you only
have to learn HCL once to apply Terraform to those vendors :-)

------
correct_horse
Stopping by to say that I couldn't find the video without JavaScript, so I
closed the tab. I get that you want to paywall later videos in this series,
but for feedback purposes, it would probably be better to link a(n unlisted)
YouTube video (watchable without JS, although doing so is a pain).

These are the kinds of problems that only exist in the HN audience, sorry
¯\\_(ツ)_/¯

~~~
movedx
> These are the kinds of problems that only exist in the HN audience, sorry
> ¯\\_(ツ)_/¯

And an extremely small subset of that audience, too.

Automatically disabling JavaScript makes sense on first load, but after the
website has been established as trustworthy, I don't see why you wouldn't then
let the relevant scripts load (the ones you need/desire; not the Google ones.)

So yeah, I'm sorry I can't offer you an alternative.

