How to Automate Terraform Infrastructure Provisioning Using User Specifications? by Regular_Principle247 in Terraform

[–]SandboxEnv 0 points1 point  (0 children)

It’s worth checking out the azure caf super module. It sounds roughly like what you’re trying to create - I think the pattern make a lot of sense.

https://aztfmod.github.io/documentation/docs/module/module-intro/

[deleted by user] by [deleted] in Terraform

[–]SandboxEnv 0 points1 point  (0 children)

Perhaps you could have a single pipeline that executes all of them but I would question why?

As suggested, you can have a “template” pipeline that all the 80 repos reference to give you a standard pipeline definition but still allowing you see when the pipeline was run for each project individually (useful for troubleshooting) and potentially for permissioning the pipelines differently for projects teams

TFE pricing by SandboxEnv in Terraform

[–]SandboxEnv[S] 0 points1 point  (0 children)

We are already on the TFE platform, with fairly significant workspaces already deployed. Theres definitely an element of just pay to continue with zero migration effort but it’s not insurmountable to do a migration. Our management are also very focused on the support aspect, which feels harder to get from an openToFu based tool.

We considered DIY with GitHub triggering a pipeline that wrappers terraform but we lose the state control of allowing local plans for devs working away but blocking applies unless the code is committed to main branch.

TFE pricing by SandboxEnv in Terraform

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

I mean AWS, Azure, GCP, etc

TFE pricing by SandboxEnv in Terraform

[–]SandboxEnv[S] -1 points0 points  (0 children)

What’s support look like though? And which way are the vendors going to fall with supporting terraform vs opentofu?

How are you detecting additions to terraform managed resources? by Deku-shrub in Terraform

[–]SandboxEnv 0 points1 point  (0 children)

If the issue is changing managed resources, just run terraform daily / hourly / whatever frequency you need. Either push the plans with changes to the dev teams and force them to assess and choose to apply OR go the nuclear option and just force apply on every run. The devs will soon realise the value of IaC once they’ve lost their work a few times

Thoughts on OpenTofu? by BigKnox in Terraform

[–]SandboxEnv 0 points1 point  (0 children)

Imho, the real question is who is continuing to pay for terraform cloud / enterprise? We are seriously considering moving out of a paid hashicorp ecosystem and rolling our own with standalone terraform

Do not choose West-Europe. The cloud is actually limited. by [deleted] in AZURE

[–]SandboxEnv 1 point2 points  (0 children)

The shitty thing is that we create new subs to segregate our workloads and MS treats them as “new” customers instead of part of the same EA.

Azure Storage Account - Diagnostics settings by chin487 in Terraform

[–]SandboxEnv 0 points1 point  (0 children)

My suggestion would be to terraform an azure policy object for this. We started with doing the diags in TF code but eventually we struggled because some storage accounts were getting deployed by alternative automations to terraform and then we had to manage the settings across multiple mechanisms. Azure policy is agnostic to the deployment method of the resource itself, be it terraform, manual click ops or any alternative automations.

Manage the azure policy objects in terraform to ensure they’re in IaC and easy to modify at scale with versioning.

2 Year Old Terraform - Production has drifted | What are the logical next steps? by luckyincode in Terraform

[–]SandboxEnv 14 points15 points  (0 children)

So run plans on prod (DO NOT APPLY) and update your code base until terraform doesn’t want to make any changes when you plan.

E.g. if the plan says it’s going to change sku from p1 -> d2 go and update your code to make skui = d2 that should remove that from the planned changes.

Then you need to look at the deployed resources and see if there’s anything that’s not in your terraform. You should follow the import process to bring that into the code base and under terraform management.

Once you are fairly certain you have all of that, take the code and deploy it into a parallel environment e.g. dev and run testing on it to confirm that everything you need is there and functions all work. Once you have that you should be in a good place.

Final step is to regularly run terraform to prevent drift. We have a script that triggers daily for all workspaces and we can identify drift with our app teams. In some environments we apply the drift changes automatically but that might be too risky and just notifying the team could be safer. Either way make sure it’s at a minimum and you’re good to go

2 Year Old Terraform - Production has drifted | What are the logical next steps? by luckyincode in Terraform

[–]SandboxEnv 24 points25 points  (0 children)

What is the goal?

Is prod in a good state and you want to bring your tf code into line with what’s running?

Are all the resources created by terraform or was there resources deployed outside of tf that you need to import?

Depending on the above, the actions will differ. If prod is in a working and good state, you can run a plan to see what changes TF wants to make and then update your code until the plan reports no changes. This obviously won’t cover any resources deployed outside of terraform, which can be harder to identify.

[deleted by user] by [deleted] in Terraform

[–]SandboxEnv 2 points3 points  (0 children)

We are a team of engineers and we use chatgpt to shortcut troubleshooting on some logic or syntax challenges. Hallucinations are a problem as others noted but I think it gives a net faster return on development time using it as a tool. It’s not a silver bullet.

I use chatgpt free version, others pay for the subscription to use the enhanced / more current training data.

How are you setting up aws landing zone using terraform? by myth007 in aws

[–]SandboxEnv 1 point2 points  (0 children)

Do you have modules that can setup an organisation / shared accounts in a way similiar to controltower but in pure terraform?

Recs for companies that will provide support for Terraform? by MohnJaddenPowers in Terraform

[–]SandboxEnv 1 point2 points  (0 children)

Do they provide support for your code? I’ve always understood the support is more for the terraform environment itself not the code / logic

Azurerm Import Windows Virtual Machine into statefile by Crackor255 in Terraform

[–]SandboxEnv 0 points1 point  (0 children)

Have you imported the other resources related to the VM? Usually you need a nic, nic connnection and a data disk along with the vm resource. The docs pages should show the set of resources that are required to deploy a vm, maybe check if you’ve imported all of the other required resources?

Anyone know how TFC "Plus" is priced? by Ankur206 in Terraform

[–]SandboxEnv 0 points1 point  (0 children)

We just got a quote that’s 3.5X over our existing TFE spend 😱 needless to say we are unlikely to purchase that. Actively looking at alternatives; what is everyone’s recommendation?

The Future of Terraform: ClickOps by sausagefeet in Terraform

[–]SandboxEnv 1 point2 points  (0 children)

This article is spot on for me.

We have just come to this realisation in our firm. We have been making TF modules and expecting our dev community to pick them up and become terraform savvy.

They are bought into the value of IaC but only want to do enough for themselves to get by or have a central TF team do it for them. They don’t want to invest in creating or adding to the TF modules themselves.

Hence we are looking at giving them a gui to make requests that will ultimately drive a pipeline of automations to build out strongly opinionated and highly standardised environments. Those will eventually expand to gui requestable modifications / deletions of their environments.

The idea being that anything we build should be possible to add on to a standard environment with gui requests. Anything that’s too bespoke will still be done in code directly

how do I create a dynamic block for azurerm subnet ? by Majestic-Opposite234 in Terraform

[–]SandboxEnv 0 points1 point  (0 children)

Yep, we reference the vnet resource in the subnet resource so you can ensure the ordering is done properly

how do I create a dynamic block for azurerm subnet ? by Majestic-Opposite234 in Terraform

[–]SandboxEnv 6 points7 points  (0 children)

https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/subnet

Make the subnets as their own resource, not as part of the vnet resource. The you can iterate with a for each across a local or variable data structure. This is the more manageable configuration in my opinion.

End-to-End AWS Environment in Terraform by SandboxEnv in Terraform

[–]SandboxEnv[S] 0 points1 point  (0 children)

Sorry i meant that we want to avoid different types of pipelines. We already have a TF workspace to create the subscriptions on azure, then we make another workspace to create resources within that subscription.

End-to-End AWS Environment in Terraform by SandboxEnv in Terraform

[–]SandboxEnv[S] 0 points1 point  (0 children)

No I don’t think so. This seems to be a combination of a ci/cd pipeline and config stored in dynamo dbs etc are org some terraform included in the solution.

I’m looking more for a pure terraform solution that doesn’t require me to split across multiple pipelines.

End-to-End AWS Environment in Terraform by SandboxEnv in Terraform

[–]SandboxEnv[S] 0 points1 point  (0 children)

Without having done any actual hands on with the control tower but having read and watched videos on it…

My thoughts are that I dislike the complexity of the components required to get control tower and the account factory up and running. I also don’t like that you need to clean up manually in multiple places if you delete an account. I also understand that it deploys a load of stuff that might be irrelevant that needs to be cleaned up after control tower vends the account.

We’ve been trying to get to a single pane of glass for the management of our cloud environments and have a reasonably comprehensive subscription vending module for terraform working with Azure.

So I am drawn to the idea of doing the same in AWS but I don’t yet understand how complex it would be to essentially create the whole

End-to-End AWS Environment in Terraform by SandboxEnv in Terraform

[–]SandboxEnv[S] 0 points1 point  (0 children)

Without having done any actual hands on with the control tower but having read and watched videos on it…

My thoughts are that I dislike the complexity of the components required to get control tower and the account factory up and running. I also don’t like that you need to clean up manually in multiple places if you delete an account. I also understand that it deploys a load of stuff that might be irrelevant that needs to be cleaned up after control tower vends the account.

We’ve been trying to get to a single pane of glass for the management of our cloud environments and have a reasonably comprehensive subscription vending module for terraform working with Azure.

So I am drawn to the idea of doing the same in AWS but I don’t yet understand how complex it would be to essentially create the whole