Skip to content

Commit 1c21a3e

Browse files
authored
feat(tem) : add ressource smtp auth user and exemple export gitlab variable in doc (#2428)
1 parent 55dffa1 commit 1c21a3e

File tree

2 files changed

+39
-1
lines changed

2 files changed

+39
-1
lines changed

docs/resources/tem_domain.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,37 @@ resource "scaleway_domain_record" "mx" {
5151
}
5252
```
5353

54+
55+
### Configuring GitLab Project Variables
56+
57+
```terraform
58+
59+
variable "domain_name" {
60+
type = string
61+
}
62+
63+
data "scaleway_tem_domain" "my_domain" {
64+
name = var.domain_name
65+
}
66+
67+
resource "gitlab_project_variable" "smtp_host" {
68+
key = "SMTP_AUTH_USER"
69+
value = data.scaleway_tem_domain.my_domain.smtps_auth_user
70+
}
71+
72+
resource "gitlab_project_variable" "smtp_port" {
73+
key = "SMTP_PORT"
74+
value = data.scaleway_tem_domain.my_domain.smtps_port
75+
}
76+
77+
resource "gitlab_project_variable" "smtp_host" {
78+
key = "SMTP_HOST"
79+
value = data.scaleway_tem_domain.my_domain.smtps_host
80+
}
81+
82+
```
83+
84+
5485
## Argument Reference
5586

5687
The following arguments are supported:
@@ -101,6 +132,8 @@ In addition to all arguments above, the following attributes are exported:
101132

102133
- `smtps_port_alternative` - The SMTPS port to use to send emails over TLS Wrapper.
103134

135+
- `smtps_auth_user` - SMTPS auth user refers to the identifier for a user authorized to send emails via SMTPS, ensuring secure email transmission.
136+
104137
- `mx_blackhole` - The Scaleway's blackhole MX server to use if you do not have one.
105138

106139
- `reputation` - The domain's reputation.

scaleway/resource_tem_domain.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,11 @@ func resourceScalewayTemDomain() *schema.Resource {
111111
Computed: true,
112112
Description: fmt.Sprintf("SMTPS port to use to send emails over TLS Wrapper. (Port %d)", tem.SMTPSPort),
113113
},
114+
"smtps_auth_user": {
115+
Type: schema.TypeString,
116+
Computed: true,
117+
Description: "SMTPS auth user refers to the identifier for a user authorized to send emails via SMTPS, ensuring secure email transmission",
118+
},
114119
"smtps_port_alternative": {
115120
Type: schema.TypeInt,
116121
Computed: true,
@@ -220,7 +225,7 @@ func resourceScalewayTemDomainRead(ctx context.Context, d *schema.ResourceData,
220225
_ = d.Set("reputation", flattenDomainReputation(domain.Reputation))
221226
_ = d.Set("region", string(region))
222227
_ = d.Set("project_id", domain.ProjectID)
223-
228+
_ = d.Set("smtps_auth_user", domain.ProjectID)
224229
return nil
225230
}
226231

0 commit comments

Comments
 (0)