Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
krystian-panek-vmltech committed Aug 15, 2023
1 parent 899178a commit 80506dd
Show file tree
Hide file tree
Showing 7 changed files with 171 additions and 16 deletions.
91 changes: 76 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,79 @@
# Terraform Provider Scaffolding (Terraform Plugin Framework)

_This template repository is built on the [Terraform Plugin Framework](https://github.com/hashicorp/terraform-plugin-framework). The template repository built on the [Terraform Plugin SDK](https://github.com/hashicorp/terraform-plugin-sdk) can be found at [terraform-provider-scaffolding](https://github.com/hashicorp/terraform-provider-scaffolding). See [Which SDK Should I Use?](https://developer.hashicorp.com/terraform/plugin/framework-benefits) in the Terraform documentation for additional information._

This repository is a *template* for a [Terraform](https://www.terraform.io) provider. It is intended as a starting point for creating Terraform providers, containing:

- A resource and a data source (`internal/provider/`),
- Examples (`examples/`) and generated documentation (`docs/`),
- Miscellaneous meta files.

These files contain boilerplate code that you will need to edit to create your own Terraform provider. Tutorials for creating Terraform providers can be found on the [HashiCorp Developer](https://developer.hashicorp.com/terraform/tutorials/providers-plugin-framework) platform. _Terraform Plugin Framework specific guides are titled accordingly._

Please see the [GitHub template repository documentation](https://help.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template) for how to create a new repository from this template on GitHub.

Once you've written your provider, you'll want to [publish it on the Terraform Registry](https://developer.hashicorp.com/terraform/registry/providers/publishing) so that others can use it.
![AEM Compose Logo](https://github.com/wttech/terraform-aem-provider/raw/main/images/logo-with-text.png)
[![WTT Logo](https://github.com/wttech/terraform-aem-provider/raw/main/images/wtt-logo.png)](https://www.wundermanthompson.com/service/technology)

[![Last Release Version](https://img.shields.io/github/v/release/wttech/aemc?color=lightblue&label=Last%20Release)](https://github.com/wttech/terraform-aem-provider/tags)
[![Ansible Galaxy](https://img.shields.io/ansible/collection/2218?label=Ansible%20Galaxy)](https://galaxy.ansible.com/wttech/aem)
[![Apache License, Version 2.0, January 2004](https://github.com/wttech/terraform-aem-provider/raw/main/images/apache-license-badge.svg)](http://www.apache.org/licenses/)

# AEM Compose - Terraform Provider

Allows to manage and provision Adobe Experience Manager (AEM) instances declaratively.
Built on top of [AEM Compose](https://github.com/wttech/aemc).

## Example usage

```hcl
resource "aws_instance" "aem_author" {
// ...
}
resource "aem_aws_instance" "aem_author" {
aws {
id = aws_instance.aem.id
ssm = true // prefer SSM over SSH when connecting to instance to provision it
}
config {
instance_id = "local_author"
file = "aem.yml" // or yml inline below
inline = <<EOT
instance:
config:
local_author:
http_url: http://127.0.0.1:4502
user: admin
password: admin
run_modes: [ int ]
jvm_opts:
- -server
- -Djava.awt.headless=true
- -Djava.io.tmpdir=[[canonicalPath .Path "aem/home/tmp"]]
- -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=0.0.0.0:14502
- -Duser.language=en
- -Duser.country=US
- -Duser.timezone=UTC
start_opts: []
secret_vars:
- ACME_SECRET=value
env_vars:
- ACME_VAR=value
sling_props: []
EOT
}
provision {
commands = [
// assumes usage of standard 'changed' field returned by AEMC
["pkg", "deploy", "--url", "http://github.com/../some-pkg.zip"],
["osgi", "config", "save", "--pid", "xxx", "props", "a: 'b'"]
]
// nicely propagates 'changed' to TF (update in place), also automatically uploads packages to AEM
packages = [
"http://github.com/../some-pkg.zip",
"packages/core-components.zip",
"packages/content-large.zip" // use checksums to avoid re-uploading big packages
]
// or as a last resort (without telling 'changed' to TF)
shell = <<EOT
sh aemw pkg deploy --url "http://github.com/../some-pkg.zip"
sh aemw [do ant
EOT
}
}
```

## Requirements

Expand Down
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/hashicorp/terraform-provider-scaffolding-framework
module terraform-provider-aem

go 1.19

Expand All @@ -8,6 +8,7 @@ require (
github.com/hashicorp/terraform-plugin-go v0.18.0
github.com/hashicorp/terraform-plugin-log v0.9.0
github.com/hashicorp/terraform-plugin-testing v1.4.0
github.com/hashicorp/terraform-provider-scaffolding-framework v0.0.0-20230814070828-899178aa119e
)

require (
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ github.com/hashicorp/terraform-plugin-sdk/v2 v2.27.0 h1:I8efBnjuDrgPjNF1MEypHy48
github.com/hashicorp/terraform-plugin-sdk/v2 v2.27.0/go.mod h1:cUEP4ly/nxlHy5HzD6YRrHydtlheGvGRJDhiWqqVik4=
github.com/hashicorp/terraform-plugin-testing v1.4.0 h1:DVIXxw7VHZvnwWVik4HzhpC2yytaJ5FpiHxz5debKmE=
github.com/hashicorp/terraform-plugin-testing v1.4.0/go.mod h1:b7Bha24iGrbZQjT+ZE8m9crck1YjdVOZ8mfGCQ19OxA=
github.com/hashicorp/terraform-provider-scaffolding-framework v0.0.0-20230814070828-899178aa119e h1:NLxehIRsLDLMWb1Jlfh6wr58kxyT85EdVNrbKiJ6k8o=
github.com/hashicorp/terraform-provider-scaffolding-framework v0.0.0-20230814070828-899178aa119e/go.mod h1:pvlo+iVOs0+lOy9f5SNF4uP8XsLGzzjjNCYM83I8U6Q=
github.com/hashicorp/terraform-registry-address v0.2.1 h1:QuTf6oJ1+WSflJw6WYOHhLgwUiQ0FrROpHPYFtwTYWM=
github.com/hashicorp/terraform-registry-address v0.2.1/go.mod h1:BSE9fIFzp0qWsJUUyGquo4ldV9k2n+psif6NYkBRS3Y=
github.com/hashicorp/terraform-svchost v0.1.1 h1:EZZimZ1GxdqFRinZ1tpJwVxxt49xc/S52uzrw4x0jKQ=
Expand Down
1 change: 1 addition & 0 deletions images/apache-license-badge.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
90 changes: 90 additions & 0 deletions images/logo-only.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/logo-with-text.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/wtt-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 80506dd

Please sign in to comment.