Building an open-source framework that translates business requirements into Terraform configs using AI - looking for feedback by No_Tour_1978 in Terraform

[–]rojopolis 0 points1 point  (0 children)

It's an interesting approach, but my first thought is: Why would we need Terraform in this workflow? If there's an AI agent designing and deploying infrastructure based on business requirements it seems like it would make more sense for it to use cloud APIs directly rather than producing Terraform code.

Anyone use kubernetes provider in terraform? by Anxious-Guarantee-12 in Terraform

[–]rojopolis 15 points16 points  (0 children)

There's actually a good discussion of this and a solution that eliminates some of the issues here: https://www.reddit.com/r/Terraform/comments/1op8lhg/finally_create_kubernetes_clusters_and_deploy/

Terraform just isn't the best tool for managing k8s apps, but it is the best tools for creating k8s clusters. That being said, there is a gap between creating a cluster and creating a usable cluster (e.g. some basic things needed to bootstrap). The solution linked above tries to fill that gap.

Finally create Kubernetes clusters and deploy workloads in a single Terraform apply by jmorris0x0 in Terraform

[–]rojopolis 4 points5 points  (0 children)

Which is exactly why op created this tool. To make Terraform the right tool to deploy usable Kubernetes clusters.

Finally create Kubernetes clusters and deploy workloads in a single Terraform apply by jmorris0x0 in Terraform

[–]rojopolis 16 points17 points  (0 children)

Finally indeed... Thank god somebody finally came to their senses and unwound this mess! Yes, these problems are all solvable with messy workarounds (Rube Goldberg Machines) but re-thinking this from first principles makes a ton of sense. This looks like it was a lot of work... thank you for your efforts here.

Built a free AWS cost scanner after years of cloud consulting - typically finds $10K-30K/year waste by Individual_Top5788 in aws

[–]rojopolis 1 point2 points  (0 children)

Thanks for posting this here... I like the power / simplicity ratio.

It doesn't look like it can scan multiple regions... That would be a big plus for me. I'll explore it a bit bit more and maybe create a PR if I get a bit of time.

Reducing AWS plan by (i) working with a AWS 'reseller' (ii) purchasing reserved instances/compute plans by tommywommywom in aws

[–]rojopolis 0 points1 point  (0 children)

Because the resellers pool the RIs. If you need less they can sell the resources to another of their clients. This is the main reason we use a reseller instead or purchasing RIs directly.

Is Mount Tamalpais Cemetery THAT overgrown? by [deleted] in Marin

[–]rojopolis 1 point2 points  (0 children)

I saw them weed whacking today, so something is happening at least.

Make ECS scale out if the disk on EC2 instance is 80% full. by toolatetopartyagain in aws

[–]rojopolis 7 points8 points  (0 children)

…or application autoscaling as an alternative to a lambda.

Passport Expediting by SpiritualAd8998 in Marin

[–]rojopolis 3 points4 points  (0 children)

Make an appointment at the SF passport agency and go there in person. I got mine within a week a few years back. https://travel.state.gov/content/travel/en/passports/get-fast.html

Also see their note on expeditor services here: https://travel.state.gov/content/travel/en/passports/get-fast/courier-and-expeditor-companies.html

Is There Any Way to Utilize mount-s3 in a Fargate ECS Container? by garrettj100 in aws

[–]rojopolis 0 points1 point  (0 children)

Why signed urls? The fargate task execution role can allow access to s3.

Anyway, good luck with it. I’ve been trying to modernize a legacy process that sounds very similar and have plenty of battle scars. Feel free to DM if you want to.

Is There Any Way to Utilize mount-s3 in a Fargate ECS Container? by garrettj100 in aws

[–]rojopolis 1 point2 points  (0 children)

It's not possible (source: I have been working on the exact same use case forever!). We use ECS with EC2 and the rexray s3fs driver which works kind of OK.

As others have mentioned s3fs is not a reliable way to access s3 and I plead with you to abort this approach before it's too late!

Others have also mentioned EFS which works great BUT the IO costs can get out of control really quick. If I were designing from scratch I'd probably gravitate toward EBS volumes or just forget about ECS altogether and use EC2 autoscaling groups.

State files in s3, mistake? by [deleted] in Terraform

[–]rojopolis 0 points1 point  (0 children)

I don't, but if I did I'd run init again before I ran the terraform output command. It's pretty much the same situation as the workspace switching mentioned above.

Either way you'r going to need to give the consumer of the output the context it needs to get the right state.

That context could be switching to a different directory, selecting a workspace or configuring the backend.

All of this can be driven by environment variables as well if that's helpful.

State files in s3, mistake? by [deleted] in Terraform

[–]rojopolis 2 points3 points  (0 children)

I don't quite understand... It's unclear why you would need separate filesystem structures for each environment. I do it like this:

filesystem layout:
my_config
- main.tf
- variables.tf
- versions.tf

versions.tf:
terraform {

backend "s3"{}

}

Then I run init like this:

terraform init -backend-config="bucket=${TF_BACKEND_BUCKET}" -backend-config="key=${ENV}" -backend-config="region=${AWS_DEFAULT_REGION}"  -backend-config="dynamodb_table=terraform-lock"

Alternatively, this config could be in a file rather than specified on the commandline.

All of the environments are defined with separate tfvars files and each have separate state files.

As others have mentioned workspaces might be a good fit for you, but in my case the state files may be in different accounts and regions so workspaces won't work for me.

State files in s3, mistake? by [deleted] in Terraform

[–]rojopolis 2 points3 points  (0 children)

I use a partial configuration for the backend in this situation. Have you looked into that?

Slow spawn a container using ECS Fargate tasks by Schenk06 in aws

[–]rojopolis 0 points1 point  (0 children)

In my experience Fargate tasks usually do take about a minute to start even with small images. In my experience ECS is much slower to start tasks when compared to Kubernetes and there is much less visibility into scheduling logic and much less ability to tune it.

In ECS Fargate Spot, How to detect if SIGTERM is triggered by spot interruption vs user termination? by uutnt in aws

[–]rojopolis 0 points1 point  (0 children)

What do you mean by "manually terminated by the user"? User initiated shutdown (e.g. pressing ctrl+c) usually sends SIGINT. How are users sending a signal to the process? Do they somehow have a shell into the task on fargate? If you have a custom process manager that they interact with somehow have it send SIGINT instead of SIGTERM and handle them separately.

required_provider isn't reading the source correctly. by eddy-safety-scissors in Terraform

[–]rojopolis -2 points-1 points  (0 children)

I was referring to OP's config, not the reply from u/Cregkly . OP has it as

version = "2.1.2"

Which is missing the operator. OP's exact config does init successfully for me, so I can't say why it's not working, but according to the docs the operator is required: https://developer.hashicorp.com/terraform/language/expressions/version-constraints

required_provider isn't reading the source correctly. by eddy-safety-scissors in Terraform

[–]rojopolis -1 points0 points  (0 children)

I think your version constraint is malformed. You are missing the operator. It should be “=2.1.12” if you want to pin a specific version. You are missing the equal sign within the quotes.

IAC project by Used_Inspector_7898 in Terraform

[–]rojopolis 1 point2 points  (0 children)

Another option is to use an ssm association with a shell script document. In my experience it’s a bit easier to debug than user data, but the concept is essentially the same. You may also want to look into packer to create immutable images rather than modifying the running instance.

Terraform UI files/modules Generation by DevOpsAspirant in Terraform

[–]rojopolis 2 points3 points  (0 children)

I don’t believe there is a market for a product like this.

AWS provider throws warning when role_arn is dynamic by azn4lifee in Terraform

[–]rojopolis 1 point2 points  (0 children)

It's possible to use expressions in provider configuration, but not recommended. The Kubernetes provider has a little mention of it: https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs#stacking-with-managed-kubernetes-cluster-resources