This message was deleted.
# general
s
This message was deleted.
s
Yes .. only difference is, that Pulumi provides you the full environment of a progamming language where Terraform is a declarative system
w
can i have some example of that? Still not clear on ur meants "declarative system" ?
please!
s
Lets say you want to create an amount of x resources
In Pulumi you can do this simply in a loop ..
How do you do this with Terraform?
w
i will do that with declare it in main.tf file, right? and the output itself
s
One way would be something like this:
Copy code
ressource "aws_ec2_instance" "first" {}
ressource "aws_ec2_instance" "second" {}
ressource "aws_ec2_instance" "third" {}
But thats unrealistic and painful to write
w
ok, so how pulumi can make it easier ?
s
A better way would be to use
count
and interpolation syntax in TF:
Copy code
resource "aws_instance" "vpn" {
  count = "${var.something ? 1 : 0}"
}
Like I said, in pulumi you just use the the different loops that come with Python, C#, TS or Go ..
w
so, we can use any languages that accompany with pulumi, right?
and, does it support some kind of "atlantis" to check for the code as terraform can do ?
s
I don't know an answer to that question, sorry
p
yes - @worried-flower-49798 - there are some CI/CD mechanisms for displaying what would be applied.
“preview”
and then you can use something like the pulumi actions for Github Actions to get the gitops style flow you are probably used to with Atlantis - if i remember atlantis properly
w
ok, but the way doing with "Pulumi" is we have to register an online account and then, use it for online tasks? put all the state to Cloud?