Skip to content

Commit 4110683

Browse files
Remove IP validation for host of on-premise instance (#9225) (#16235)
* Remove IP validation for host of on-premise instance In admin API, we don't have validation for host of on-premise instances. Host can take the value of IP address or DNS address. As of now it is validating that host contain the IP address in terraform, in order to be consistent with admin API and accept DNS address as well, removing the validation function for host. * Update the description of the host field [upstream:e8667f2683131ffa0b14914d9e4821c1ad6a43f6] Signed-off-by: Modular Magician <[email protected]>
1 parent 29eae79 commit 4110683

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

.changelog/9225.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:bug
2+
sql: removed host validation to support IP address and DNS address in host in `google_sql_source_representation_instance` resource
3+
```

google/services/sql/resource_sql_source_representation_instance.go

+4-5
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,10 @@ func ResourceSQLSourceRepresentationInstance() *schema.Resource {
7070
Description: `The name of the source representation instance. Use any valid Cloud SQL instance name.`,
7171
},
7272
"host": {
73-
Type: schema.TypeString,
74-
Required: true,
75-
ForceNew: true,
76-
ValidateFunc: verify.ValidateIpAddress,
77-
Description: `The externally accessible IPv4 address for the source database server.`,
73+
Type: schema.TypeString,
74+
Required: true,
75+
ForceNew: true,
76+
Description: `The IPv4 address and port for the external server, or the the DNS address for the external server. If the external server is hosted on Cloud SQL, the port is 5432.`,
7877
},
7978
"ca_certificate": {
8079
Type: schema.TypeString,

website/docs/r/sql_source_representation_instance.html.markdown

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ The following arguments are supported:
8989

9090
* `host` -
9191
(Required)
92-
The externally accessible IPv4 address for the source database server.
92+
The IPv4 address and port for the external server, or the the DNS address for the external server. If the external server is hosted on Cloud SQL, the port is 5432.
9393

9494

9595
- - -

0 commit comments

Comments
 (0)