HNHacker News
TopNewBestAskShowJobs

dmattia

338 karma · joined December 16, 2021

submissionscomments
dmattia··on Consent-O-Matic: Automatic cookie management
It's noteworthy that in the Sephora case for California the AG explicitly called out the Global Privacy Control (gpc) as something that companies need to honor.

From https://oag.ca.gov/news/press-releases/attorney-general-bont...: "“Technologies like the Global Privacy Control are a game changer for consumers looking to exercise their data privacy rights. But these rights are meaningless if businesses hide how they are using their customer's data and ignore requests to opt-out of its sale,” said Attorney General Bonta. “I hope today’s settlement sends a strong message to businesses that are still failing to comply with California’s consumer privacy law. My office is watching, and we will hold you accountable."

dmattia··on Pulumi Insights – AI generated IaC programs
You would have separate JS and Python stacks that could share outputs, similar to a `terraform_remote_state` data source in terraform-land. There's also a yaml "language" support if you just want to use a config language: https://www.pulumi.com/docs/intro/languages/yaml/, but I have never messed with this, as we really just use typescript.

As somebody who maintains public terraform providers though, I do want to point out that "With TF, there is one language and one binary" is not totally accurate. Each provider you install must be installed separately, and runs separately as its own process, and the core terraform library calls out to the providers via gRPC. You can verify this by running `ps` during your next terraform run and seeing all the different providers on their own processes.

Pulumi actually uses the same gRPC setup, and can even communicate with Terraform providers. So the only real different part binary wise is the "core" terraform binary being replaced by a different "core" pulumi binary based on the language you are using, but the rest of the providers will all be the same, and you'll run multiple languages either way.

If your company only supports one or a few languages in your normal production code, you can also just use those languages for Pulumi, and still get one language and one binary. There's nothing forcing you to use multiple different languages.

dmattia··on Pulumi Insights – AI generated IaC programs
You've used Pulumi extensively and don't see a single benefit?

Here's setting up Guardduty in AWS in multiple regions using a terraform module: https://github.com/gruntwork-io/terraform-aws-security/blob/...

In pulumi, it would be:

``` import * as pulumi from "@pulumi/pulumi"; import * as aws from "@pulumi/aws";

[ "us-east-1", "us-east-2", "us-west-1", "us-west-2", "ap-south-1", "ap-northeast-2", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ca-central-1", "eu-central-1", "eu-west-1", "eu-west-2", "eu-west-3", "sa-east-1", ].forEach((region) => { const provider = new aws.Provider(`aws-provider-${region}`, { region: region, });

    const guardDuty = new aws.guardduty.Detector(`detector-${region}`, {
        enable: true,
    }, { provider: provider });
}); ```
dmattia··on Pulumi Insights – AI generated IaC programs
I've also made the switch from managing a few thousand Terraform modules to handling most app-code things in Pulumi and have run into some of these limitations.

With Terraform + Terragrunt + Atlantis, we created https://github.com/transcend-io/terragrunt-atlantis-config and had an extremely robust and easy to use flow for updating all infra code.

We've since moved to an approach where more of our infra/security things are managed in Terraform (like Guardduty, SSO, Github repo settings, etc.) maintained by more devops folks, and our app code is mostly in Pulumi (lambdas, Fargate, CloudFront/CloudFlare CDNs, etc.). To accomplish this without something like Atlantis, we moved the app code infra deployments from being deployed continuously pre-merge via Atlantis to being deployed via `pulumi up` calls in our normal CI flows, so like right next to where we build the docker images and restart ECS services, as an example.

Overall I actually really love this flow. It is so, so much easier to create multi-regional infra in Pulumi with a quick for loop, and it's also much easier to do things like run esbuild over our code in typescript, and then bundle the output of that call and send it up to a Lambda function all from pulumi/typescript without needing separate build steps or to do things like using terragrunt pre-hooks or Docker build steps inside terraform provisioners, which I always found slow and clunky.

I would agree that Pulumi's plans are a disappointment though, exactly as you said.

Overall I've been happy with the change, and we've seen some improvements I think in the velocity that developers can launch services that meet our requirements.

dmattia··on Pulumi Insights – AI generated IaC programs
Pulumi is an IAC tool similar to Terraform (it actually usually calls terraform providers over gRPC under the hood), just written in languages like Typescript/Python. I think the intention would be to use this AI prompt thing to generate pulumi and then to insert it into your codebase, just like you'd do with terraform, and then it becomes deterministic.

I've used ChatGPT and other tools to generate Pulumi before, so I'm not totally sure how this specific tool from Pulumi is different, but I'd guess they've somehow trained it more specifically on their sdks/docs or something

dmattia··on Problems with AWS Amplify and its use of DynamoDB
I use Amplify in a lot of my personal projects because it's backed by mostly serverless components and I can run my personal websites on it essentially for free. While in my job, I often lean for other infra for the services I manage. So I overall agree with the thesis, but I just couldn't get myself to agree with much of the reasoning in this article :/

Parts I liked:

- Callouts of the subscription model are good. I have used Firebase rtdb and firestore quite a bit, and agree it's much easier with those tools to just get an up-to-date view. With amplify, I often avoid subscriptions and just re-call list methods after updates (supported well in Apollo, but still unideal)

- The discussions on Amplify/NoSQL/Dynamo being difficult to pivot match my experience, especially when I was less experienced with NoSQL patterns

> Amplify's approach in using DynamoDB is literally called out as something you should avoid by AWS

Alex DeBrie is a wonderful resource, and I love his books, but I wouldn't go as far as to say that all of AWS calls out using multiple tables. There is lots of active debate on the single-table vs multi-table designs

> the fundamental mistake that's made here is that AWS Amplify puts your data into DynamoDB, which is not a general-purpose database

Citation needed. It's a fairly standard NoSQL database and can be used generally.

> But DynamoDB Scales?

I was a bit confused on this article between the frequent mentions of DynamoDB only being worth it at a large scale ("If you're storing that much plain text data, good for you—maybe DynamoDB can help you!", "But you should only use it when a traditional database won't cut it", etc.) while also claiming more broadly that Amplify will not be useful for large apps because it doesn't scale. It seems to contradict itself there?

I do think this section brings up a great point on the inflexibility of Amplify and trying to pivot a data model, which can absolutely be tricky! But the core message of this section doesn't seem to support the thesis.

> If I was AWS, I would… provide Postgres or similar as a database choice

I use RDS with Aurora/postgres with Amplify by using lambda resolvers and it works well. You can't use VTL, but in my mind that's a feature, as VTL is not my favorite for a few reasons like being hard to test.

In general, this was one of my larger frustrations with this article: it doesn't mention the flexibility of Amplify. Amplify comes with highly opinionated built-ins, but you don't have to use almost any of it, and it's quite easy to plug-and-play other tools if you want. Lambda resolvers are a good example because they're extremely flexible, you can use many different languages/tools/even docker to run your resolvers. But also, I opt to not use Amplify hosting and it's fine. And you can also use your own auth without Cognito if you'd like (especially if you're already using custom resolvers).

It sounds like the author inherited some parts of the codebase in question, so if some of these things were already setup I could see it being time consuming to pivot.

> rethink whether GraphQL is actually fit for purpose: It's just not very good

Again, while I'm not a huge GraphQL fan, this is very much an opinion and a highly debatable one. For many use cases, GraphQL can work well, and I think from a technical perspective it is at minimum arguable that something like GraphQL makes sense for a tool like Amplify where one of its core use cases is multi-platform usage across web/mobile.

dmattia··on We built a Terraform provider for data privacy at Transcend
Our new open source tools make it easier to define infrastructure for data mapping and data governance in code.

I work at Transcend, please let me know if you have any questions!

dmattia··on A Terraform Provider for Transcend
Transcend is a privacy company that enables companies to discover where they have user data, automates the completion of privacy requests covering that data, and manages consent management.

This is the initial release of our provider, which does not yet support all features that are available in our Admin Dashboard, but provides a foundation for building privacy proactively into your tech stack.

← PreviousPage 3 of 3