Closed ringods closed 8 years ago
@catsby I very much hope this ends in upstream. A general remark I have is that any provider which doesn't make it in upstream, can't be used in Atlas. Or are you guys working on a way for Atlas to pull third-party providers?
Possibly a silly question from my end, but wouldn't this fall into the realm of a Chef provisioner instead of a provider?
If I understood correctly, providers exist to provide the "hardware" (of sorts) and the provisioners to configure / setup that hardware further. Seems to me that PostgreSQL would be a classic example of "provisioning software on hardware provided by XYZ" (openstack for example)
Edit: in other words... you'd probably be better off writing a Chef cookbook?
This seems like a natural complement to #3122, with similar motivations.
In particular, provisioning the database with Chef implies that the database is running on a server to which you have SSH access. That is not true when you are using a service like Amazon RDS where the only access you have is via the database's native network protocol.
I can see your point regarding RDS. My feeling is that this should be a provisioner instead of a provider, but I was just curious. :smile:
@mvdkleijn My take on having the PostgreSQL support as a provider comes from Terraform's own documentation:
Terraform provides a flexible abstraction of resources and providers.
This model allows for representing everything from physical hardware,
virtual machines, and containers, to email and DNS providers.
You can use a provisioner to install bind
and it's configuration on a Linux machine, but if you want to rely on DNS as a service, then it's well suited for a provider. In my view, DNS is not much different from a database service. In the AWS RDS case, you get a pre-provisioned machine with PostgreSQL. From there on, I consider it PostgreSQL-as-a-Service, which then matches the Terraform description of a provider.
My short-sighted view:
Given the fact the Google SQL provider (instance+database) pull request (#3617) is merged into upstream, I think the generic PostgreSQL provider pull request (#3653) and generic MySQL provider pull request (#3122) should end up in 0.6.7 too!
All of this database support in the same version, now wouldn't that be handy? :-)
This was fixed by closing #3653. If folks want to add additional resources to this provider, let's make separate issues and/or pull requests for those.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
One of the last pieces missing for me to complete a full Terraform setup is a PostgreSQL provider. One of my colleagues is already working on this, but I wanted to chime in to see whether this work could get accepted upstream.
My AWS setup ends currently with the creation of an RDS instance, but I want the ability to create more than one database on this server, with more than a single owner role. That's what the PostgreSQL provider is for.
The initial resources which will be supported are:
postgresql_role
postgresql_database
An example of how it would show in Terraform:
If this is something which might be helpful for Terraform, we will submit a pull request shortly to accompany this ticket.