Creating a postgres data service#
To create the postgres data service, you need to;
- Create a network access resource.
- Create the postgres data service attached to the network access resource.
Create a network access resource#
In the Ametnes Cloud console;
- Navigate to the Network Access left menu.
- On the network access dashboard, click New Network.
- Enter Name:
PostgresTutorialNetwork
. - Select Kind:
Load Balancer
. - Select the Location:
You Data Service Location
. - Client Create Network.
- After a while, your network access resource will be created and have the status
ready
.
Install terraform#
Follow instructions here to install terraform on your computer.
Create your project#
Add these files to an empty folder on your workstation.
Setup the variables#
Add your API key secrets#
Define your resources#
provider.tf | |
---|---|
Define your resources#
data.tf | |
---|---|
Define your resources#
network.tf | |
---|---|
Proceed to create your postgres data service.
Create the postgres data service#
In the Ametnes Cloud console;
- Navigate to the Services left menu.
- On the network access dashboard, click New Service.
- Enter Name:
PostgresService
. - Select Kind:
Postgres 13.0 Service
. - Select the Location:
You Data Service Location
. - Select the Network:
PostgresTutorialNetwork
. - Click Create Service
- After a while, your postgres data service will be created and have the status
ready
.
Setup the variables#
- Now run
terraform plan
and check the resources going to be created. - Once happy with the changes, please run
terraform apply -auto-approve