Skip to content

Commit b7ee070

Browse files
committed
create module
1 parent 9038d4e commit b7ee070

File tree

8 files changed

+843
-0
lines changed

8 files changed

+843
-0
lines changed

.gitignore

Lines changed: 209 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,209 @@
1+
### Linux template
2+
*~
3+
4+
# temporary files which can be created if a process still has a handle open of a deleted file
5+
.fuse_hidden*
6+
7+
# KDE directory preferences
8+
.directory
9+
10+
# Linux trash folder which might appear on any partition or disk
11+
.Trash-*
12+
13+
# .nfs files are created when an open file is removed but is still being accessed
14+
.nfs*
15+
### Eclipse template
16+
17+
.metadata
18+
bin/
19+
tmp/
20+
*.tmp
21+
*.bak
22+
*.swp
23+
*~.nib
24+
local.properties
25+
.settings/
26+
.loadpath
27+
.recommenders
28+
29+
# External tool builders
30+
.externalToolBuilders/
31+
32+
# Locally stored "Eclipse launch configurations"
33+
*.launch
34+
35+
# PyDev specific (Python IDE for Eclipse)
36+
*.pydevproject
37+
38+
# CDT-specific (C/C++ Development Tooling)
39+
.cproject
40+
41+
# Java annotation processor (APT)
42+
.factorypath
43+
44+
# PDT-specific (PHP Development Tools)
45+
.buildpath
46+
47+
# sbteclipse plugin
48+
.target
49+
50+
# Tern plugin
51+
.tern-project
52+
53+
# TeXlipse plugin
54+
.texlipse
55+
56+
# STS (Spring Tool Suite)
57+
.springBeans
58+
59+
# Code Recommenders
60+
.recommenders/
61+
62+
# Scala IDE specific (Scala & Java development for Eclipse)
63+
.cache-main
64+
.scala_dependencies
65+
.worksheet
66+
### Windows template
67+
# Windows thumbnail cache files
68+
Thumbs.db
69+
ehthumbs.db
70+
ehthumbs_vista.db
71+
72+
# Dump file
73+
*.stackdump
74+
75+
# Folder config file
76+
[Dd]esktop.ini
77+
78+
# Recycle Bin used on file shares
79+
$RECYCLE.BIN/
80+
81+
# Windows Installer files
82+
*.cab
83+
*.msi
84+
*.msm
85+
*.msp
86+
87+
# Windows shortcuts
88+
*.lnk
89+
### Ansible template
90+
*.retry
91+
### macOS template
92+
# General
93+
.DS_Store
94+
.AppleDouble
95+
.LSOverride
96+
97+
# Icon must end with two \r
98+
Icon
99+
100+
# Thumbnails
101+
._*
102+
103+
# Files that might appear in the root of a volume
104+
.DocumentRevisions-V100
105+
.fseventsd
106+
.Spotlight-V100
107+
.TemporaryItems
108+
.Trashes
109+
.VolumeIcon.icns
110+
.com.apple.timemachine.donotpresent
111+
112+
# Directories potentially created on remote AFP share
113+
.AppleDB
114+
.AppleDesktop
115+
Network Trash Folder
116+
Temporary Items
117+
.apdisk
118+
### Archives template
119+
# It's better to unpack these files and commit the raw source because
120+
# git has its own built in compression methods.
121+
*.7z
122+
*.jar
123+
*.rar
124+
*.zip
125+
*.gz
126+
*.tgz
127+
*.bzip
128+
*.bz2
129+
*.xz
130+
*.lzma
131+
*.cab
132+
133+
# Packing-only formats
134+
*.iso
135+
*.tar
136+
137+
# Package management formats
138+
*.dmg
139+
*.xpi
140+
*.gem
141+
*.egg
142+
*.deb
143+
*.rpm
144+
*.msi
145+
*.msm
146+
*.msp
147+
### JetBrains template
148+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
149+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
150+
151+
/.idea/
152+
# User-specific stuff:
153+
.idea/**/workspace.xml
154+
.idea/**/tasks.xml
155+
.idea/dictionaries
156+
157+
# Sensitive or high-churn files:
158+
.idea/**/dataSources/
159+
.idea/**/dataSources.ids
160+
.idea/**/dataSources.xml
161+
.idea/**/dataSources.local.xml
162+
.idea/**/sqlDataSources.xml
163+
.idea/**/dynamic.xml
164+
.idea/**/uiDesigner.xml
165+
166+
# Gradle:
167+
.idea/**/gradle.xml
168+
.idea/**/libraries
169+
170+
# CMake
171+
cmake-build-debug/
172+
173+
# Mongo Explorer plugin:
174+
.idea/**/mongoSettings.xml
175+
176+
## File-based project format:
177+
*.iws
178+
179+
## Plugin-specific files:
180+
181+
# IntelliJ
182+
out/
183+
184+
# mpeltonen/sbt-idea plugin
185+
.idea_modules/
186+
# User-specific stuff:
187+
.idea/*
188+
# JIRA plugin
189+
atlassian-ide-plugin.xml
190+
191+
# Cursive Clojure plugin
192+
.idea/replstate.xml
193+
194+
# TFstste
195+
*.tfstate*
196+
197+
deployment/_logs/ansible-log.json
198+
deployment/_logs/ansible-log.log
199+
deployment/_logs/facts/*
200+
deployment/_logs/retry/*
201+
_app/*
202+
ansible-log.json
203+
.terraform
204+
terraform.tfstate
205+
206+
*.tfstate
207+
*.tfstate.backup
208+
*.iml
209+
*.terraform.lock.hcl

example/main.tf

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
provider "azurerm" {
2+
features {}
3+
}
4+
5+
6+
module "flexible-postgresql" {
7+
source = "./../."
8+
name = "postgresql"
9+
resource_group_name = ""
10+
location = ""
11+
12+
#**************************server configuration***************************
13+
postgresql_version = "16"
14+
admin_username = "postgresqlusername"
15+
admin_password = "ba5yatgfgfhdsv6A3ns2lu4gqzzc"
16+
tier = "Burstable"
17+
size = "B1ms"
18+
database_names = ["maindb"]
19+
high_availability = {
20+
mode = "ZoneRedundant"
21+
standby_availability_zone = 2
22+
}
23+
24+
#**************************private server*********************************
25+
#(Resources to recreate when changing private to public cluster or vise-versa )
26+
virtual_network_id = ""
27+
private_dns = true
28+
delegated_subnet_id = ""
29+
registration_enabled = true
30+
31+
public_network_access_enabled = true
32+
allowed_cidrs = {
33+
"allowed_all_ip" = "0.0.0.0/0"
34+
"allowed_specific_ip" = "157.48.192.208/32"
35+
}
36+
37+
38+
}

example/output.tf

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
output "flexible-postgresql_server_id" {
2+
value = module.flexible-postgresql.postgresql_flexible_server_id
3+
description = "The ID of the PostgreSQL Flexible Server."
4+
}
5+
6+
output "azurerm_private_dns_zone_virtual_network_link_id" {
7+
value = module.flexible-postgresql.azurerm_private_dns_zone_virtual_network_link_id
8+
description = "The ID of the Private DNS Zone Virtual Network Link."
9+
}
10+
11+
output "azurerm_private_dns_zone_id" {
12+
value = module.flexible-postgresql.azurerm_private_dns_zone_id
13+
description = "The Private DNS Zone ID."
14+
}
15+
16+
17+

example/versions.tf

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Terraform version
2+
terraform {
3+
required_version = ">= 1.9.5"
4+
}
5+
6+
terraform {
7+
required_providers {
8+
azurerm = {
9+
source = "hashicorp/azurerm"
10+
version = ">=3.89.0"
11+
}
12+
azuread = {
13+
source = "hashicorp/azuread"
14+
version = ">= 2.53.1"
15+
}
16+
17+
}
18+
}

0 commit comments

Comments
 (0)