Skip to content

Commit a84d6d0

Browse files
committed
first commit
0 parents  commit a84d6d0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+2342
-0
lines changed

.gitignore

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Local .terraform directories
2+
**/.terraform/*
3+
4+
# .tfstate files
5+
*.tfstate
6+
*.tfstate.*
7+
8+
#terraform lock file
9+
.terraform.lock.hcl
10+
11+
# .tfvars files
12+
*.tfvars
13+
14+
# provider file for testing - should be manually added
15+
provider.tf
16+
17+
# visual code
18+
**/.vscode/*

CHANGELOG.adoc

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
= CHANGELOG
2+
:idprefix:
3+
:idseparator: *
4+
5+
:uri-changelog: http://keepachangelog.com/
6+
All notable changes to this project are documented in this file.
7+
8+
The format is based on {uri-changelog}[Keep a Changelog].

CONTRIBUTING.adoc

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
= CONTRIBUTING
2+
3+
:uri-oracle-oca: https://www.oracle.com/technetwork/community/oca-486395.html
4+
5+
Oracle welcomes contributions to this repository from anyone.
6+
7+
If you want to submit a pull request to fix a bug or enhance an existing
8+
feature, please first open an issue and link to that issue when you
9+
submit your pull request.
10+
11+
If you have any questions about a possible submission, feel free to open
12+
an issue too.
13+
14+
== Contributing to the terraform-oci-logging repository
15+
16+
Pull requests can be made under
17+
{uri-oracle-oca}[The Oracle Contributor Agreement](OCA).
18+
19+
For pull requests to be accepted, the bottom of your commit message must have
20+
the following line using your name and e-mail address as it appears in the
21+
OCA Signatories list.
22+
23+
----
24+
Signed-off-by: Your Name <[email protected]>
25+
----
26+
27+
This can be automatically added to pull requests by committing with:
28+
29+
----
30+
git commit --signoff
31+
----
32+
33+
Only pull requests from committers that can be verified as having
34+
signed the OCA can be accepted.
35+
36+
=== Pull request process
37+
38+
. Fork this repository
39+
. Create a branch in your fork to implement the changes. We recommend using
40+
the issue number as part of your branch name, e.g. `1234-fixes`
41+
. Ensure that any documentation is updated with the changes that are required
42+
by your fix.
43+
. Ensure that any samples are updated if the base image has been changed.
44+
. Submit the pull request. *Do not leave the pull request blank*. Explain exactly
45+
what your changes are meant to do and provide simple steps on how to validate
46+
your changes. Ensure that you reference the issue you created as well.
47+
We will assign the pull request to 2-3 people for review before it is merged.

CONTRIBUTORS.adoc

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
== GitHub userids of contributors
2+
3+
=== Maintainers
4+
5+
_maintainers have admin access and can merge code to main_
6+
7+
- https://github.com/hyder[@karthicgit]
8+
- https://github.com/markxnelson[@markxnelson]
9+
10+
=== CONTRIBUTORS
11+
12+
- https://github.com/karthicgit[@karthicgit]
13+
- https://github.com/hyder[@hyder]

LICENSE

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Copyright (c) 2019, 2021 Oracle and/or its affiliates.
2+
3+
The Universal Permissive License (UPL), Version 1.0
4+
5+
Subject to the condition set forth below, permission is hereby granted to any
6+
person obtaining a copy of this software, associated documentation and/or data
7+
(collectively the "Software"), free of charge and under any and all copyright
8+
rights in the Software, and any and all patent rights owned or freely
9+
licensable by each licensor hereunder covering either (i) the unmodified
10+
Software as contributed to or provided by such licensor, or (ii) the Larger
11+
Works (as defined below), to deal in both
12+
13+
(a) the Software, and
14+
(b) any piece of software and/or hardware listed in the lrgrwrks.txt file if
15+
one is included with the Software (each a "Larger Work" to which the Software
16+
is contributed by such licensors),
17+
18+
without restriction, including without limitation the rights to copy, create
19+
derivative works of, display, perform, and distribute the Software and make,
20+
use, sell, offer for sale, import, export, have made, and have sold the
21+
Software and the Larger Work(s), and to sublicense the foregoing rights on
22+
either these or other terms.
23+
24+
This license is subject to the following condition:
25+
The above copyright notice and either this complete permission notice or at
26+
a minimum a reference to the UPL must be included in all copies or
27+
substantial portions of the Software.
28+
29+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
30+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
32+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
33+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
34+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
35+
SOFTWARE.

README.md

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Terraform Logging for Oracle Cloud Infrastructure
2+
3+
The [Terraform Logging][repo] for [Oracle Cloud Infrastructure][OCI] provides a reusable [Terraform][terraform] module that provisions logging resource on OCI.
4+
5+
It creates the following resources:
6+
7+
* Loggroups and logs for supported OCI service
8+
* Loggroups,logs and unified agent configuration for custom logs.
9+
* Parser types are defined with default values.Additional parser details like regex expression ,grok pattern and other parser options are not supported now.
10+
11+
## [Documentation][docs]
12+
13+
### [Pre-requisites][prerequisites]
14+
15+
#### Instructions
16+
17+
* [Quickstart][quickstart]
18+
* [Reusing as a Terraform module][reuse]
19+
* [Terraform Options][terraform_options]
20+
21+
## Related Documentation, Blog
22+
23+
* [Oracle Cloud Infrastructure Documentation][oci_documentation]
24+
* [Terraform OCI Provider Documentation][terraform_oci]
25+
26+
27+
## Changelog
28+
29+
View the [CHANGELOG][changelog].
30+
31+
## Contributors
32+
33+
[Folks who contributed with explanations, code, feedback, ideas, testing etc.][contributors]
34+
35+
Learn how to [contribute][contributing].
36+
37+
## License
38+
39+
Copyright (c) 2019, 2021 Oracle and/or its associates.
40+
41+
Licensed under the [Universal Permissive License 1.0][license] as shown at
42+
[https://oss.oracle.com/licenses/upl][canonical_license].
43+
44+
<!-- Links reference section -->
45+
[changelog]: https://github.com/oracle-terraform-modules/terraform-oci-logging/blob/main/CHANGELOG.adoc
46+
[contributing]: https://github.com/oracle-terraform-modules/terraform-oci-logging/blob/main/CONTRIBUTING.adoc
47+
[contributors]: https://github.com/oracle-terraform-modules/terraform-oci-logging/blob/main/CONTRIBUTORS.adoc
48+
[docs]: https://github.com/oracle-terraform-modules/terraform-oci-logging/tree/main/docs
49+
50+
[license]: https://github.com/oracle-terraform-modules/terraform-oci-logging/blob/main/LICENSE
51+
[canonical_license]: https://oss.oracle.com/licenses/upl/
52+
53+
[oci]: https://cloud.oracle.com/cloud-infrastructure
54+
[oci_documentation]: https://docs.cloud.oracle.com/iaas/Content/home.htm
55+
56+
[oracle]: https://www.oracle.com
57+
[prerequisites]: https://github.com/oracle-terraform-modules/terraform-oci-logging/blob/main/docs/prerequisites.adoc
58+
59+
[quickstart]: https://github.com/oracle-terraform-modules/terraform-oci-logging/blob/main/docs/quickstart.adoc
60+
[repo]: https://github.com/oracle/terraform-oci-logging
61+
[reuse]: https://github.com/oracle/terraform-oci-logging/examples
62+
[terraform]: https://www.terraform.io
63+
[terraform_oci]: https://www.terraform.io/docs/providers/oci/index.html
64+
[terraform_options]: https://github.com/oracle-terraform-modules/terraform-oci-logging/blob/main/docs/terraformoptions.adoc
65+
<!-- Links reference section -->

docs/codingconventions.adoc

+103
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
= Coding conventions
2+
ifdef::env-github[]
3+
:tip-caption: :bulb:
4+
:note-caption: :information_source:
5+
:important-caption: :heavy_exclamation_mark:
6+
:caution-caption: :fire:
7+
:warning-caption: :warning:
8+
endif::[]
9+
:toc:
10+
11+
:uri-terraform-standard-module-structure: https://www.terraform.io/docs/language/modules/develop/structure.html
12+
13+
This is a list of coding conventions you should observe when contributing code for this project.
14+
15+
Current conventions:
16+
17+
- module structure
18+
- adopting the right case type
19+
- good names for files and terraform objects (resources, variables, outputs)
20+
21+
It is not an exhaustive list and it will be updated as we go. In the mean time, your PR reviewer may suggest conventions that are not listed here.
22+
23+
Use PR comments and the GitHub suggestion feature to agree on the final result.
24+
25+
== Module Structure
26+
27+
- We adhere to the {uri-terraform-standard-module-structure}[Terraform Standard Module Structure]
28+
- Any nested module calls should be in the main file: `main.tf` is the primary entrypoint of the module
29+
- All variables and ouputs declarations should be in `variables.tf` and `outputs.tf`
30+
- All variables and outputs should have descriptions
31+
- Nested modules should exist under the `modules/` folder
32+
- Examples of using the module should exist under the `examples/` folder and have a README to explain the goal and usage of the example
33+
34+
== Documentation format
35+
36+
We use https://asciidoc.org/[AsciiDoc] with the `*.adoc` file extension. The only exception is for the README files that need to be displayed on the Terraform Registry: as the Terraform Registry does not support AsciiDoc, the `README` and certain other documentation must be available in Markdown format.
37+
38+
[NOTE]
39+
====
40+
As GitHub renders AsciiDoc files using https://asciidoctor.org/[AsciiDoctor], it is the current reference regarding AsciiDoc syntax we use in the documentation.
41+
====
42+
43+
=== Internal links
44+
45+
For internal links to AsciiDoc file (repo documentation content), we use relative links with the `xref:` macro.
46+
47+
```
48+
xref:CONTRIBUTING.adoc[CONTRIBUTING]
49+
```
50+
51+
For internal links to non-AsciiDoc file (e.g: README files), we use relative links with the `link:` macro.
52+
53+
```
54+
link:examples/README.md[examples README]
55+
```
56+
57+
=== External links
58+
59+
For external links, we use https://docs.asciidoctor.org/asciidoc/latest/macros/autolinks/[autolinks].
60+
61+
[TIP]
62+
====
63+
Links that are used multiple times must be defined in the header using the `:uri-xxx:` reference format. This makes any future updates to the URI much simpler.
64+
65+
. Defining a link in the document header
66+
. Calling the reference
67+
68+
----
69+
:uri-repo: https://github.com/oracle-terraform-modules/terraform-oci-logging
70+
71+
{uri-repo}[link caption]
72+
----
73+
74+
====
75+
76+
=== Terraform registry requirements
77+
78+
- README files must be in Markdown format
79+
- All links must use absolute path, relative links are not supported
80+
81+
== Terraform code
82+
83+
=== Case type, Files, Names
84+
85+
- Use `snake_case` when naming Terraform files, variables and resources
86+
- If you need a new .tf file at the root of the module for better clarity, use this naming scheme: `<module_name>_<resources_group>`: e.g. `vcn_gateways.tf`, `vcn_defaultresources.tf`
87+
- If your variable is controlling a behaviour, use imperative style to name it: e.g. `create_internet_gateway`
88+
89+
=== Variable blocks
90+
91+
Variables should always be in the format below:
92+
93+
. description. Add `(Updatable)` at the begining of the description if this value do not triggers a resource `recreate`)
94+
. type
95+
. default (if any)
96+
97+
Do not hesitate to insert a brief comment in the variable block if it helps to clarify your intention.
98+
99+
WARNING: No default value for `compartment_id` or any other variables related to provider authentication in module or examples files. The user will have to explicitly set these values.
100+
101+
=== Examples
102+
103+
Examples should promote good practices as much as possible: avoid creating resources in the tenancy root compartment.

0 commit comments

Comments
 (0)