-
Notifications
You must be signed in to change notification settings - Fork 142
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 support for FTP logging #235
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description: "The unique name of the FTP logging endpoint", | ||
}, | ||
|
||
"address": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just making note that for FTP we don't explicitly expose IPV4 or Hostname because Address includes these values.
if errRes, ok := err.(*fst.HTTPError); ok { | ||
if errRes.StatusCode != 404 { | ||
return err | ||
} | ||
} else if err != nil { | ||
return err | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't a 404 error returned from DeleteFTP
result in a nil error being returned from this function? Is that expected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why can't we simply have the following here:
return conn.DeleteFTP(i)
@@ -1574,6 +1575,7 @@ func resourceServiceV1Update(d *schema.ResourceData, meta interface{}) error { | |||
"splunk", | |||
"blobstoragelogging", | |||
"httpslogging", | |||
"logging_ftp", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with this decision of starting to introduce consistency with logging_foo
Force-pushed rebasing master. |
Force-pushed rebasing master. |
fc903ab
to
6b55c98
Compare
path = "/path" | ||
port = 27 | ||
format = "%%h %%l %%u %%t \"%%r\" %%>s %%b" | ||
gzip_level = 3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This really bothers me. This must be my tab width or something. It looks fine locally.
It would be nice if we could leverage Terraform's terraform fmt
. Maybe if we pulled these out into *.tf
test fixtures?
But I also kind of don't like pulling the test data that far from the test itself. Thoughts? Other ideas?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the idea of .tf test fixtures to solve this issue, though does add some overhead to adding tests.
87fc21e
to
f19b4dc
Compare
Address: "ftp2.example.com", | ||
Username: "user", | ||
Password: "p@ssw0rd2", | ||
PublicKey: pgpPublicKey() + "\n", // The '\n' is necessary becaue of the heredocs (i.e., EOF) in the config below. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note this ugly + "\n"
and accompanying comment.
This is b/c of this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 LGTM
ae1c1e1
to
66d909d
Compare
Signed-off-by: Colton J. McCurdy <[email protected]>
Adds support for configuring FTP log streaming (API docs) to provider.
cc: @phamann