Mysql table creation in terraform

Hi Team,
I have created AWS RDS, Database, schema and users in mysql through terraform.
I want to create the tables and insert the data, is it possible? If so please provide me sample script

Thanks in advance.

have you tried using this:

Hi, thanks for reply!
I have tried this and able to create the db server, db and users with previlizes.
But while creating table I have used (resource “mysql_table” “table”) and I got the below error :
The provider provider.mysql does not support resource type “mysql_table”.
If any sample script to create table that will be helpful.

looks like there is no mysql_table resource at all, so I guess you’ll have to create the table using something else.

Hi there!

One of Atlas’s creators here.

The Atlas Terraform Provider is precisely what you’re looking for - it supports both a declarative flow and a version migrations flow.

We are seeing many teams use it to successfully connect their IaC and schema change management workflows into one. We have also recently become official HashiCorp partners, as seen on the TF registry.

If you need any help setting up, please ping me on our Discord server!

1 Like