Skip to content

Commit 149812f

Browse files
committed
Fix : Added the endpoint type missing variable and update the README.md with new examples.
1 parent 26278b7 commit 149812f

File tree

3 files changed

+82
-22
lines changed

3 files changed

+82
-22
lines changed

README.md

Lines changed: 38 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -66,22 +66,49 @@ This module has a few dependencies:
6666

6767

6868
### Simple Example
69+
### Public
6970
Here is an example of how you can use this module in your inventory structure:
7071
```hcl
71-
module "sftp" {
72-
source = "clouddrove/sftp/aws"
73-
version = "1.3.0"
74-
name = "sftp"
75-
environment = "test"
76-
label_order = ["name", "environment"]
77-
public_key = ""
78-
user_name = "ftp-user"
79-
enable_sftp = true
80-
s3_bucket_id = clouddrove_dev_s3_bucket
81-
endpoint_type = "PUBLIC"
72+
module "sftp" {
73+
source = "clouddrove/sftp/aws"
74+
name = "sftp"
75+
environment = "test"
76+
label_order = ["environment", "name"]
77+
enable_sftp = true
78+
s3_bucket_name = module.s3_bucket.id
79+
endpoint_type = "PUBLIC"
80+
workflow_details = {
81+
on_upload = {
82+
execution_role = "arn:aws:iam::1234567890:role/test-sftp-transfer-role"
83+
workflow_id = "w-12345XXXX6da"
8284
}
85+
}
86+
}
8387
```
8488

89+
### VPC
90+
Here is an example of how you can use this module in your inventory structure:
91+
```hcl
92+
module "sftp" {
93+
source = "clouddrove/sftp/aws"
94+
name = "sftp"
95+
environment = "test"
96+
label_order = ["environment", "name"]
97+
eip_enabled = false
98+
s3_bucket_name = module.s3_bucket.id
99+
sftp_users = var.sftp_users
100+
subnet_ids = module.subnets.private_subnet_id
101+
vpc_id = module.vpc.vpc_id
102+
restricted_home = true
103+
vpc_security_group_ids = [module.security_group_sftp.security_group_id]
104+
workflow_details = {
105+
on_upload = {
106+
execution_role = "arn:aws:iam::1234567890:role/test-sftp-transfer-role"
107+
workflow_id = "w-12345XXXX6da"
108+
}
109+
}
110+
}
111+
```
85112

86113

87114

README.yaml

Lines changed: 38 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,45 @@ include:
3737
# How to use this project
3838
usage : |-
3939
### Simple Example
40+
### PUBLIC
4041
Here is an example of how you can use this module in your inventory structure:
4142
```hcl
4243
module "sftp" {
43-
source = "clouddrove/sftp/aws"
44-
version = "1.3.0"
45-
name = "sftp"
46-
environment = "test"
47-
label_order = ["name", "environment"]
48-
public_key = ""
49-
user_name = "ftp-user"
50-
enable_sftp = true
51-
s3_bucket_id = clouddrove_dev_s3_bucket
52-
endpoint_type = "PUBLIC"
53-
}
44+
source = "clouddrove/sftp/aws"
45+
name = "sftp"
46+
environment = "test"
47+
label_order = ["environment", "name"]
48+
enable_sftp = true
49+
s3_bucket_name = module.s3_bucket.id
50+
endpoint_type = "PUBLIC"
51+
workflow_details = {
52+
on_upload = {
53+
execution_role = "arn:aws:iam::1234567890:role/test-sftp-transfer-role"
54+
workflow_id = "w-12345XXXX6da"
55+
}
56+
}
57+
}
5458
```
59+
60+
### VPC
61+
```hcl
62+
module "sftp" {
63+
source = "clouddrove/sftp/aws"
64+
name = "sftp"
65+
environment = "test"
66+
label_order = ["environment", "name"]
67+
eip_enabled = false
68+
s3_bucket_name = module.s3_bucket.id
69+
sftp_users = var.sftp_users
70+
subnet_ids = module.subnets.private_subnet_id
71+
vpc_id = module.vpc.vpc_id
72+
restricted_home = true
73+
vpc_security_group_ids = [module.security_group_sftp.security_group_id]
74+
workflow_details = {
75+
on_upload = {
76+
execution_role = "arn:aws:iam::1234567890:role/test-sftp-transfer-role"
77+
workflow_id = "w-12345XXXX6da"
78+
}
79+
}
80+
}
81+
```

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,4 +155,10 @@ variable "workflow_details" {
155155
variable "enable_workflow" {
156156
type = bool
157157
default = false
158+
}
159+
160+
variable "endpoint_type" {
161+
type = string
162+
default = "PUBLIC"
163+
description = "The type of endpoint that you want your SFTP server connect to. If you connect to a VPC (or VPC_ENDPOINT), your SFTP server isn't accessible over the public internet. If you want to connect your SFTP server via public internet, set PUBLIC. Defaults to PUBLIC"
158164
}

0 commit comments

Comments
 (0)