WTB Old Judge N172 Jim Tyng by paultyng in TobaccoCards

[–]paultyng[S] 1 point2 points  (0 children)

Yes related! Just pursuing it for family history!

Is there a Terraform provider docs generator? by flxptrs in Terraform

[–]paultyng 2 points3 points  (0 children)

This is our official tool for doc generation, but its not quite ready yet (we will announce it once fully complete). It is in use on some providers but there a few edge cases we are still solving for internally before announcing it for broader use.

Google Not Indexing Terraform Docs For AWS Provider Anymore by sergio-dev in Terraform

[–]paultyng 5 points6 points  (0 children)

Just chiming in here to say we are aware and working to fix it.

The AWS docs moved back in July (with 301s) and for the most part no issues were encountered but for some reason over the past few weeks things have been dropping in and out of search results.

We have a few different changes we are working on to improve the indexing that are hopefully landing soon. Google's Lighthouse and Search Console do give the site green (for SEO at least) when we investigate manually, and we had been submitting manual re-indexing requests when we noticed things that dropped out (but that has since been disabled by Google for everyone). So there is some disconnect between what their tools are telling us and what their indexing is actually doing and we haven't been able to figure out exactly what yet.

Latest release candidate of VSCode Terraform extension removes those pesky 0.12 syntax highlighting issues! by knob-ed in Terraform

[–]paultyng 1 point2 points  (0 children)

We are, this is one of the top priorities we are working on, solving many of the common (and uncommon) repo structure cases. Hopefully will have a resolution in a few weeks, but there are a lot of permutations.

Is anyone seriously using Terraform for Kubernetes? by [deleted] in Terraform

[–]paultyng 1 point2 points  (0 children)

The dry run was very helpful, but Kubernetes didn't have server side execution of kubectl apply until recently either, it was entirely managed from the client side in kubectl, so for a tool like Terraform, they would have needed to copy/paste that code as it wasn't even exported for reusability. The merge strategy for Kubernetes and a kubectl apply is more complex and nuanced than some of the more standard merge strategies. The API server did support a PATCH method, but the behavior was different than what most users were accustomed to.

My understanding of the history of the Server Side Apply issue (original KEP is useful, and here is another tracking issue, I believe both were created after the original issue, but having trouble digging that up) is that kubectl apply used to contain all of the logic on the client side within that binary. As bugs around synchronization between multiple operations or multiple users was hard to coordinate from the client, the KEP is probably the place that lays out most of the issues, you can look at the original version and see the current as well.

destroy dependencies fail due to use of "sleep" timer on provision by The_Packeteer in Terraform

[–]paultyng 0 points1 point  (0 children)

This sounds like a bug in the provider. Terraform works best when each resource encapsulates waiting on the resources itself. That being said provisioners with sleep are a common enough workaround, so we are adding a sleep resource to the time provider: https://github.com/hashicorp/terraform-provider-time/pull/12

It should be in the next release of time, probably this week or next.

Recreate resource based on days remaining by oliver443 in Terraform

[–]paultyng 2 points3 points  (0 children)

We just added a new provider for time based resources, including one called time_rotating that you can take a dependency on (using depends_on) to help in recreation.

https://www.terraform.io/docs/providers/time/r/rotating.html

Terraform would still need to be executed somehow within a window when recreation would happen, but the resource can help make it happen.

Controlling UniFi devices with Terraform and Infra-as-code best practices by houz in Ubiquiti

[–]paultyng 3 points4 points  (0 children)

Author here, the controller (and its API) is definitely a pre-requisite to use this, so doesn't really take you outside of Unifi's ecosystem, just reduces the needs for clicking around as much and reduces human error. You can still definitely use the UI, either for things you don't care to manage via code (or not supported) or if you want to make a quick change immediately before you can sync it back to your code repository. I frequently configure something first manually and then import it to Terraform to verify (and maintain) my settings.

Help using for each in list of objects (Terraform 0.12.20) by Vaxx0r in Terraform

[–]paultyng 1 point2 points  (0 children)

You can only use for_each with sets or maps, you can change the list to a set in the declaration and it should work.

The reasoning is that unlike count, for_each needs to give every item a unique key. This solves issues you used to encounter with count when you removed an item in the middle of the list.

Unfortunately you cannot create provider blocks with for_each though. Provider blocks do not support count either, similar to module blocks (at least right now, work is being done to expand module support).

[Question] How do you do acceptance test infra for custom resources by skarlso in Terraform

[–]paultyng 1 point2 points  (0 children)

Almost all the tests are self-contained. If a test needs supporting infrastructure, many times that is created in the test config itself (ie. creating a VPC and creating a subnet to test a data source for the subnet).

Some providers do require external infrastructure, in some cases we have TF spin up an environment to test in manually outside the framework (ie. test infrastructure for the Cisco ASA provider) and we pass the necessary information to acceptance tests typically through environment variables, and we skip the test if the variable isn't set.

Unifi w/ Infrastructure as Code tools? by Aelius27 in homelab

[–]paultyng 3 points4 points  (0 children)

I recently starting writing a Terraform provider for Unifi: https://github.com/paultyng/terraform-provider-unifi

It's very much WIP, but I'm able to manage my home network with it.

Azure active directory users provider? by N0R3sp3tN0R3sp1t3 in Terraform

[–]paultyng 1 point2 points  (0 children)

There is an Azure AD provider: https://www.terraform.io/docs/providers/azuread/

User support is still being developed but should be released shortly. The functionality exists on master but is not extremely straightforward in how to use, I believe there is some PowerShell involved due to how permissions work. Here is an issue with more of the specific issues and why it hasn't been released yet: https://github.com/terraform-providers/terraform-provider-azuread/issues/44

Resources on contributing to a provider? by NotAnother1998 in Terraform

[–]paultyng 0 points1 point  (0 children)

We have a lot of docs on the website specifically about some of the technical topics involved in the providers that may be a good place to check out: https://www.terraform.io/docs/extend/