Skip to content

guidoilbaldo/terraform-provider-mongodb

 
 

Repository files navigation

Terraform Provider Mongodb

This repository is a Terraform Mongodb for Terraform.

Requirements

Installation

  1. Clone the repository
  2. Enter the repository directory
  3. Build the provider using the make install command:
git clone https://github.com/Kaginari/terraform-provider-mongodb
cd terraform-provider-mongodb
make install

To test locally

1.1: create mongo image with ssl

cd docker/docker-mongo-ssl
docker build -t mongo-local .

1.2: create ssl for localhost

follow the instruction in this link

https://ritesh-yadav.github.io/tech/getting-valid-ssl-certificate-for-localhost-from-letsencrypt/

nano /etc/hosts
127.0.0.1   kaginar.herokuapp.com   ### add this line 

1.3: start the docker-compose

cd docker
docker-compose up -d

1.4 : create admin user in mongo

$ docker exec -it mongo -c mongo
> use admin
> db.createUser({ user: "root" , pwd: "root", roles: ["userAdminAnyDatabase", "dbAdminAnyDatabase", "readWriteAnyDatabase"]})

2: Build the provider

follow the Installation

3: Use the provider

cd mongodb
make apply

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • Go 91.3%
  • Shell 4.5%
  • Makefile 2.9%
  • Other 1.3%