If you love terraform, please also look at Pulumi (I have no affiliation with them). https://pulumi.io/reference/vs/terraform.html https://github.com/pulumi/tf2pulumi
I see there's a way to not use the hosted service for storing state files, but how do you address things like locking in Pulumi?
Terraform 0.12
111–120 of 167 posts
Re: Terraform 0.12
#112As someone using Terraform from it's first release on I still think that Terraform has one fundamental flaw: It always looks at things using provider specific resource, while IMHO it should just expose a bunch of predefined resource types (see rOCCI specs e.g.) and then allow you to attach a specific provider to it. IMHO the biggest win as a user would be having not to have an implementation for every provider over a…
Re: Terraform 0.12
#113On the other hand, I'm usong React-Native, lol
Re: Terraform 0.12
#114I switched from Terraform to Pulumi for a personal project recently and haven't looked back (no affiliation). Writing it with Typescript means you get excellent IDE support (using VSCode here) and access to the enormous JS ecosystem. I've also found myself creating a number of useful abstractions - that I would never have bothered to with HCL - like IAM helper functions, eg:
const limitedReadAccessPolicy = createPolicy(
"product-table-read-access",
allow(
["dynamodb:Get*", "dynamodb:Query"],
[table.arn, interpolate`${table.arn}/index/*`]
)
);
vs resource "aws_iam_policy" "product_read_access" {
name = "madu_${var.env_name}_product_read"
policy = Re: Terraform 0.12
#115Earlier quoted context omitted.
Yeah, HCL's limitations have been an enormous thorn in my side for a long time. HCL2 (Terraform 0.12) is a big step forward, but even still I pine for a proper programming language, even if it has foot-guns. I do think you're selling Terraform short, though. Sure, the core is the toposort-create-things. But it also stores the state of its created things and (crucially) has the ability to diff the actual state of reso…
Long-time user of Terraform here, never used CloudFormation. Where does CloudFormation beat Terraform?
Also CF is the “native” language of AWS. There are plenty of getting started examples from AWS where they give you the template. Also Elastic Beanstalk extensibility is built on top of CF.
Not to mention Codestar that will set up environments for you for common use cases and exports templates and the lambda environment lets you configure everything from the console, test it and then you can export the CF definition.
Re: Terraform 0.12
#116Earlier quoted context omitted.
this is short-sighted. Terraform and CloudFormation are not even in the same league. One of them works and actually can be used for Infrastructure as Code, the other one does not roll back in the face of failure - it effectively craps for reasons ranging from network failure, process crash, even normal operation. One is heavy kool-aid with bugs that go unresolved for years, the other behaves as advertised. Sorry, but…
Well, if you don't follow the obvious advice of storing your state in a S3 bucket... If the idea of storing your state somewhere is so abhorrent for you, you can also tag your resources and import them with Ansible/Bash as per the obligatory CloudFormation workflow. Then your state becomes local-only. That's a pretty useless thing to do for purely ideological reasons, though: storing your state in a cloud-agnostic wa…
Re: Terraform 0.12
#117Earlier quoted context omitted.
Well, if you don't follow the obvious advice of storing your state in a S3 bucket... If the idea of storing your state somewhere is so abhorrent for you, you can also tag your resources and import them with Ansible/Bash as per the obligatory CloudFormation workflow. Then your state becomes local-only. That's a pretty useless thing to do for purely ideological reasons, though: storing your state in a cloud-agnostic wa…
Yes it can run external commands via custom resources.
Re: Terraform 0.12
#118Earlier quoted context omitted.
Viewing Terraform solely through the lens of cloud automation and in comparison with CloudFormation is a shortsighted mistake. Terraform has providers for plenty of other services that don't qualify as "cloud things" and lack proper configuration of their own. In a very general sense, Terraform is a terrific resource management tool with state versioning & locking built in. For example, there's a terraform-kafka-prov…
Someday folks will rediscover the potential of Puppet for these use cases. Until then, I'm content to watch countless alternative implementations come and go.
Re: Terraform 0.12
#119I honestly love Terraform as a product. It was one of probably three tools I've used in my entire career that made me feel immediately more productive. After using it for a very short period of time I was shocked developers continued to struggle through CF templates and the fragility the whole process entailed.
I'm an ex Googler and 2nd time founder of a company in the computer vision / robotics space and started hacking when I was 14. I'd consider myself pretty knowledgeable in my area -- yet, I must admit that I have absolutely no clue what Hashicorp and Terraform do and why everybody likes it. I am very curious though. Would you mind explaining this from a high level (to someone who knows cloud technology about as well a…
Given something like "I want three auto-scaling groups, each containing a minimum of three instances of type m4.xlarge, in the AWS us-west-2 region. And I want an S3 bucket that has permissions set up so that only the code running on those instances can read and write to the bucket. And I want a load balancer between all of them. And I want the instances to run Ubuntu 18.04 and to install these 6 dependencies on startup. And I want a large pepperoni pizza[1]." Terraform will read your credentials and make it happen.
[1] https://github.com/ndmckinley/terraform-provider-dominos
Re: Terraform 0.12
#120Earlier quoted context omitted.
Honestly I like the idea of using declarative code for infra stuff because this way it becomes an inventory-like configuration language. There is a reason why YAML dominates today.
Terraform does not use YAML. And in the last updates they try to make their HCL more "programming language like". Pulumi is already there (they are using an actual programming language)
Having your infrastructure in an inventory-like codebase makes it clearer to reason about. It can't go too crazy like most programs end up like