File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 1414 * limitations under the License.
1515 */
1616
17- resource "google_sql_database_instance" "master " {
17+ resource "google_sql_database_instance" "default " {
1818 name = " ${ var . name } "
1919 project = " ${ var . project } "
2020 region = " ${ var . region } "
@@ -44,7 +44,7 @@ resource "google_sql_database" "default" {
4444 count = " ${ var . master_instance_name == " " ? 1 : 0 } "
4545 name = " ${ var . db_name } "
4646 project = " ${ var . project } "
47- instance = " ${ google_sql_database_instance . master . name } "
47+ instance = " ${ google_sql_database_instance . default . name } "
4848 charset = " ${ var . db_charset } "
4949 collation = " ${ var . db_collation } "
5050}
@@ -57,7 +57,7 @@ resource "google_sql_user" "default" {
5757 count = " ${ var . master_instance_name == " " ? 1 : 0 } "
5858 name = " ${ var . user_name } "
5959 project = " ${ var . project } "
60- instance = " ${ google_sql_database_instance . master . name } "
60+ instance = " ${ google_sql_database_instance . default . name } "
6161 host = " ${ var . user_host } "
6262 password = " ${ var . user_password == " " ? random_id . user-password . hex : var . user_password } "
6363}
Original file line number Diff line number Diff line change 1616
1717output instance_name {
1818 description = " The name of the database instance"
19- value = " ${ google_sql_database_instance . master . name } "
19+ value = " ${ google_sql_database_instance . default . name } "
2020}
2121
2222output instance_address {
2323 description = " The IPv4 address of the master database instnace"
24- value = " ${ google_sql_database_instance . master . ip_address . 0 . ip_address } "
24+ value = " ${ google_sql_database_instance . default . ip_address . 0 . ip_address } "
2525}
2626
2727output instance_address_time_to_retire {
2828 description = " The time the master instance IP address will be reitred. RFC 3339 format."
29- value = " ${ google_sql_database_instance . master . ip_address . 0 . time_to_retire } "
29+ value = " ${ google_sql_database_instance . default . ip_address . 0 . time_to_retire } "
3030}
3131
3232output self_link {
3333 description = " Self link to the master instance"
34- value = " ${ google_sql_database_instance . master . self_link } "
34+ value = " ${ google_sql_database_instance . default . self_link } "
3535}
3636
3737output generated_user_password {
You can’t perform that action at this time.
0 commit comments