-
Notifications
You must be signed in to change notification settings - Fork 129
Add serverless provider #1374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add serverless provider #1374
Changes from 10 commits
1dcbe0a
3f38c52
4b3da63
21ce687
ef5e47e
c04ee5d
f463215
a54a1aa
7f091eb
98acfbd
3084d0a
27fff3c
57eb28e
81b213c
4e800e3
3302ca2
54395dc
bf42d9f
7850aab
4c448a8
8ff731a
30055e1
d3df203
14fd7ce
2060799
eea6fe3
cd3132a
ea1328f
7a7793e
899495a
bf7d6f3
e211658
f68331e
472095f
d09f0d7
995a14a
5c62733
6416e0f
1165923
97b5a4f
5bf8c32
2644090
aa3f8d4
efa4f76
cc85e3c
948f902
9b669bf
44e3b48
ed9c77a
e695477
ff9cd38
57e890f
b54e095
da1761a
e95d1e5
8717537
6bab96d
1ad954e
74b90d2
5d582b5
acfce7d
a24aa47
02648f8
582bfa9
6757dd3
e90f283
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,8 @@ | ||
| # Directory containing GeoIP databases for stacks managed by elastic-agent. | ||
| # stack.geoip_dir: "/path/to/geoip_dir/" | ||
| # Serverless project type to be created | ||
| # stack.serverless.type: observability | ||
| # Region where the Serverless project is going to be created | ||
| # stack.serverless.region: aws-us-east-1 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It can maybe make sense to add also a setting for the host There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added a new config parameter for that |
||
| # Elastic cloud host URL | ||
| # stack.elastic_cloud.host: https://cloud.elastic.co | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -42,12 +42,10 @@ var ( | |
|
|
||
| func NewClient(opts ...ClientOption) (*Client, error) { | ||
jsoriano marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| hostEnvName := ServerlessHostvironmentVariable | ||
| host, ok := os.LookupEnv(hostEnvName) | ||
| if !ok { | ||
| host = defaultHostURL | ||
| } | ||
| host := os.Getenv(hostEnvName) | ||
| if host == "" { | ||
|
||
| return nil, fmt.Errorf("unable to obtain value from %s environment variable", hostEnvName) | ||
| logger.Debugf("Using default host URL: %s", defaultHostURL) | ||
|
||
| host = defaultHostURL | ||
| } | ||
| apiKeyEnvName := ServerlessApiKeyEnvironmentVariable | ||
| apiKey := os.Getenv(apiKeyEnvName) | ||
|
|
@@ -292,7 +290,7 @@ func (c *Client) GetProject(projectType, projectID string) (*Project, error) { | |
| } | ||
| statusCode, respBody, err := c.get(ctx, resourcePath) | ||
| if err != nil { | ||
| return nil, fmt.Errorf("error deleting project: %w", err) | ||
| return nil, fmt.Errorf("error getting project: %w", err) | ||
| } | ||
|
|
||
| if statusCode == http.StatusNotFound { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.