-
Notifications
You must be signed in to change notification settings - Fork 89
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
ec_extension: implement extension resource #216
Conversation
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
💚 CLA has been signed |
471fe81
to
b61c70b
Compare
implement ec_extension resource and make example Closes elastic#102
b61c70b
to
b9a0301
Compare
@marclop Could you review this PR? |
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.
Thank you for your contribution, I appreciate the time you put in the development of this new resource.
I left a few comments on code structure and on the terraform flow.
Additionally there's two important things that are missing in this pull request before it can be merged; resource docs and acceptance tests, both are required before we can mark this as done.
The acceptance tests are underway ec/acc
, three acceptance tests should be added:
- Test 1 with the
download_url
set to a location where a file exists. - Test 2 with a bundle creation without any
file_path
andfile_hash
set. This test should a also test update changes (description, etc.) - Test 3 with a bundle creation with a
file_path
andfile_hash
set. This test should also test the behavior wherefile_hash
changes and the file is re-uploaded.
Under the docs folder (docs/resources
) a new ec_extension.md
file should be added with a similar format to the other existing resources. It should describe what this resource does, its arguments with their default values and attributes.
Let me know if you need any help.
examples/extension/README.md
Outdated
# Extension example | ||
|
||
This example shows how to create an Elastic Cloud extension using Terraform. | ||
You can create the extension by `files/content.json` |
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'm not sure what you meant in this sentence, it should be changed to something that guides the user how to create an actual extension, possibly to the Elasticsearch docs?
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.
fixed by a55feb8. Please check this README?
examples/extension/README.md
Outdated
@@ -0,0 +1,12 @@ | |||
# Extension example |
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.
We might want to change this and the folder name to extension_bundle
since it doesn't cover the plugin extension type.
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.
changed by a55feb8. (Sorry, I can't check plugin type extension in my environment.)
Thank you very much for your review. I'll check and fix. |
b2bf604
to
f96f143
Compare
f96f143
to
5e66825
Compare
e7e1343
to
73dfb89
Compare
61bdf4c
to
89f1147
Compare
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.
Some additional comments on a few things I missed on the initial review.
0281f6d
to
ecb300f
Compare
@marclop Thanks for your support. I'm writing acc test, and I have a question. What should I set |
e389fd7
to
b4246f9
Compare
616ac0b
to
cd26327
Compare
@snowhork I'm trying to get a |
Jenkins test this please. |
@snowhork you can use this link to obtain the You could change it to any version that's published by changing the
|
@marclop Thank you very much. I will fix soon. |
@marclop I have added acc tests. please review. |
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.
last nits, otherwise looks good.
@nrichers @alaudazzi can you have a look at the @karencfv do you want to give it a lass pass? |
Jenkins test this please |
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.
Looking good! Just left a few very minor comments, thanks for working on this @snowhork
ec_extension: fix some comments Co-authored-by: Karen Cárcamo <[email protected]>
6670e04
to
adbac57
Compare
Jenkins test this please |
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.
Looks good to me.
This PR is for #102.
Our team want to manage extension with terraform.
Please review.
Description
This PR is new resource for extension.
How Has This Been Tested?
Execute commands below.
And then, I have checked the created extension.
Next, I have changed terraform file (changed description) and applied, then I have watched the extension description changed.
Next, I have removed
ec_extension
in terraform file and applied, then I have watched the extension removed.Types of Changes
Readiness Checklist