You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/index.md
+2-8Lines changed: 2 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,10 +45,7 @@ terraform {
45
45
}
46
46
47
47
provider "semaphoreui" {
48
-
hostname = "example.com"
49
-
port = 3000 # Default: 3000
50
-
path = "/api" # Default: "/api"
51
-
protocol = "http" # Default: "https"
48
+
api_base_url = "http://localhost:3000/api"
52
49
api_token = "your token"
53
50
}
54
51
```
@@ -58,9 +55,6 @@ provider "semaphoreui" {
58
55
59
56
### Optional
60
57
58
+
-`api_base_url` (String)
61
59
-`api_token` (String, Sensitive) SemaphoreUI API token. This can also be defined by the `SEMAPHOREUI_API_TOKEN` environment variable.
62
-
-`hostname` (String) SemaphoreUI API hostname. This can also be defined by the `SEMAPHOREUI_HOSTNAME` environment variable. Example: `example.com`.
63
-
-`path` (String) SemaphoreUI API base path. This can also be defined by the `SEMAPHOREUI_PATH` environment variable. Default: `/api`.
64
-
-`port` (Number) SemaphoreUI API port. This can also be defined by the `SEMAPHOREUI_PORT` environment variable. Default: `3000`.
65
-
-`protocol` (String) SemaphoreUI API protocol. This can also be defined by the `SEMAPHOREUI_PROTOCOL` environment variable. Must be one of `http` or `https`. Default: `https`.
66
60
-`tls_skip_verify` (Boolean) Skip TLS verification for the SemaphoreUI API when using https. This can also be defined by the `SEMAPHOREUI_TLS_SKIP_VERIFY` environment variable. Default: `false`.
The token will be printed in the console. This token will grant the same level of access as the logged in user. Copy the token value and use it to configure the provider. The token is sensitive and should be treated as a secret. It is recommended to use the `+"`SEMAPHOREUI_API_TOKEN`"+` environment variable to configure the provider.
65
61
`,
66
62
Attributes: map[string]schema.Attribute{
67
-
"hostname": schema.StringAttribute{
68
-
MarkdownDescription: "SemaphoreUI API hostname. This can also be defined by the `SEMAPHOREUI_HOSTNAME` environment variable. Example: `example.com`.",
69
-
Optional: true,
70
-
},
71
-
"port": schema.Int32Attribute{
72
-
MarkdownDescription: "SemaphoreUI API port. This can also be defined by the `SEMAPHOREUI_PORT` environment variable. Default: `3000`.",
73
-
Optional: true,
74
-
},
75
-
"path": schema.StringAttribute{
76
-
MarkdownDescription: "SemaphoreUI API base path. This can also be defined by the `SEMAPHOREUI_PATH` environment variable. Default: `/api`.",
77
-
Optional: true,
78
-
},
79
-
"protocol": schema.StringAttribute{
80
-
MarkdownDescription: "SemaphoreUI API protocol. This can also be defined by the `SEMAPHOREUI_PROTOCOL` environment variable. Must be one of `http` or `https`. Default: `https`.",
81
-
Optional: true,
82
-
Validators: []validator.String{
83
-
stringvalidator.OneOf("http", "https"),
84
-
},
85
-
},
86
63
"api_token": schema.StringAttribute{
87
64
MarkdownDescription: "SemaphoreUI API token. This can also be defined by the `SEMAPHOREUI_API_TOKEN` environment variable.",
88
65
Sensitive: true,
89
66
Optional: true,
90
67
},
68
+
"api_base_url": schema.StringAttribute{
69
+
MarkdownDescription: "SemaphoreUI API base URL. This can also be defined by the `SEMAPHOREUI_API_BASE_URL` environment variable. Default: `http://localhost:3000/api`.",
70
+
Optional: true,
71
+
},
91
72
"tls_skip_verify": schema.BoolAttribute{
92
73
MarkdownDescription: "Skip TLS verification for the SemaphoreUI API when using https. This can also be defined by the `SEMAPHOREUI_TLS_SKIP_VERIFY` environment variable. Default: `false`.",
"The provider cannot create the SemaphoreUI API client as there is an unknown configuration value for the SemaphoreUI API hostname. "+
113
-
"Either target apply the source of the value first, set the value statically in the configuration, or use the SEMAPHOREUI_HOSTNAME environment variable.",
114
-
)
115
-
}
116
-
117
-
ifconfig.Port.IsUnknown() {
118
-
resp.Diagnostics.AddAttributeError(
119
-
path.Root("port"),
120
-
"Unknown SemaphoreUI API Port",
121
-
"The provider cannot create the SemaphoreUI API client as there is an unknown configuration value for the SemaphoreUI API port. "+
122
-
"Either target apply the source of the value first, set the value statically in the configuration, or use the SEMAPHOREUI_PORT environment variable.",
123
-
)
124
-
}
125
-
126
-
ifconfig.Path.IsUnknown() {
127
-
resp.Diagnostics.AddAttributeError(
128
-
path.Root("path"),
129
-
"Unknown SemaphoreUI API Path",
130
-
"The provider cannot create the SemaphoreUI API client as there is an unknown configuration value for the SemaphoreUI API path. "+
131
-
"Either target apply the source of the value first, set the value statically in the configuration, or use the SEMAPHOREUI_PATH environment variable.",
132
-
)
133
-
}
134
-
135
-
ifconfig.Protocol.IsUnknown() {
89
+
ifconfig.ApiToken.IsUnknown() {
136
90
resp.Diagnostics.AddAttributeError(
137
-
path.Root("protocol"),
138
-
"Unknown SemaphoreUI API Protocol",
139
-
"The provider cannot create the SemaphoreUI API client as there is an unknown configuration value for the SemaphoreUI API protocol. "+
140
-
"Either target apply the source of the value first, set the value statically in the configuration, or use the SEMAPHOREUI_PROTOCOL environment variable.",
91
+
path.Root("api_token"),
92
+
"Unknown SemaphoreUI API Token",
93
+
"The provider cannot create the SemaphoreUI API client as there is an unknown configuration value for the SemaphoreUI API token. "+
94
+
"Either target apply the source of the value first, set the value statically in the configuration, or use the SEMAPHOREUI_API_TOKEN environment variable.",
"The provider cannot create the SemaphoreUI API client as the API base URL is invalid. "+
174
+
"Either target apply the source of the value first, set the value statically in the configuration, or use the SEMAPHOREUI_API_BASE_URL environment variable.",
0 commit comments