generated from aws-ia/terraform-repo-template
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from Trapesys/fix-targeted-apply
Fix targeted apply and add basic example
- Loading branch information
Showing
11 changed files
with
140 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
data "null_data_source" "downloaded_package" { | ||
inputs = { | ||
id = null_resource.download_package.id | ||
filename = local.downloaded | ||
} | ||
} | ||
|
||
data "aws_availability_zones" "current" {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Polygon Edge simple deployment on AWS | ||
|
||
## Prerequisites | ||
|
||
Three variables that must be provided, before running the deployment: | ||
|
||
* `account_id` - the AWS account ID that the Polygon Edge blockchain cluster will be deployed on. | ||
* `alb_ssl_certificate` - the ARN of the certificate from AWS Certificate Manager to be used by ALB for https protocol. | ||
The certificate must be generated before starting the deployment, and it must have **Issued** status. | ||
* `premine` - the account/s that will receive pre mined native currency. | ||
Value must follow the official [CLI](https://docs.polygon.technology/docs/edge/get-started/cli-commands#genesis-flags) flag specification. | ||
|
||
## Deployment | ||
To get Polygon Edge cluster quickly up and running default values: | ||
* include this module | ||
* define mandatory variables or provide them at cli prompt | ||
* `terraform init` - to initialize modules | ||
* `terraform apply` - to deploy the infrastructure | ||
|
||
After everything is deployed the JSON-RPC URL should be outputted in the CLI, which needs to be set as a CNAME target | ||
for a domain that you've created the certificate for. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,55 @@ | ||
<!-- BEGIN_TF_DOCS --> | ||
# Polygon Edge simple deployment on AWS | ||
|
||
## Prerequisites | ||
|
||
Three variables that must be provided, before running the deployment: | ||
|
||
* `account_id` - the AWS account ID that the Polygon Edge blockchain cluster will be deployed on. | ||
* `alb_ssl_certificate` - the ARN of the certificate from AWS Certificate Manager to be used by ALB for https protocol. | ||
The certificate must be generated before starting the deployment, and it must have **Issued** status. | ||
* `premine` - the account/s that will receive pre mined native currency. | ||
Value must follow the official [CLI](https://docs.polygon.technology/docs/edge/get-started/cli-commands#genesis-flags) flag specification. | ||
|
||
## Deployment | ||
To get Polygon Edge cluster quickly up and running default values: | ||
* include this module | ||
* define mandatory variables or provide them at cli prompt | ||
* `terraform init` - to initialize modules | ||
* `terraform apply` - to deploy the infrastructure | ||
|
||
After everything is deployed the JSON-RPC URL should be outputted in the CLI, which needs to be set as a CNAME target | ||
for a domain that you've created the certificate for. | ||
|
||
## Requirements | ||
|
||
| Name | Version | | ||
|------|---------| | ||
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.14.0 | | ||
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 3.72.0 | | ||
| <a name="requirement_awscc"></a> [awscc](#requirement\_awscc) | >= 0.9.0 | | ||
No requirements. | ||
|
||
## Providers | ||
|
||
No providers. | ||
|
||
## Modules | ||
|
||
No modules. | ||
| Name | Source | Version | | ||
|------|--------|---------| | ||
| <a name="module_polygon-edge"></a> [polygon-edge](#module\_polygon-edge) | aws-ia/polygon-technology-edge/aws | >=0.0.1 | | ||
|
||
## Resources | ||
|
||
No resources. | ||
|
||
## Inputs | ||
|
||
No inputs. | ||
| Name | Description | Type | Default | Required | | ||
|------|-------------|------|---------|:--------:| | ||
| <a name="input_account_id"></a> [account\_id](#input\_account\_id) | Your AWS Account ID | `string` | n/a | yes | | ||
| <a name="input_alb_ssl_certificate"></a> [alb\_ssl\_certificate](#input\_alb\_ssl\_certificate) | The ARN of SSL certificate that will be placed on JSON-RPC ALB | `string` | n/a | yes | | ||
| <a name="input_premine"></a> [premine](#input\_premine) | Public account that will receive premined native currency | `string` | n/a | yes | | ||
|
||
## Outputs | ||
|
||
No outputs. | ||
| Name | Description | | ||
|------|-------------| | ||
| <a name="output_json_rpc_dns_name"></a> [json\_rpc\_dns\_name](#output\_json\_rpc\_dns\_name) | The dns name for the JSON-RPC API | | ||
<!-- END_TF_DOCS --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module "polygon-edge" { | ||
source = "aws-ia/polygon-technology-edge/aws" | ||
version = ">=0.0.1" | ||
|
||
account_id = var.account_id | ||
premine = var.premine | ||
alb_ssl_certificate = var.alb_ssl_certificate | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
output "json_rpc_dns_name" { | ||
value = module.polygon-edge.jsonrpc_dns_name | ||
description = "The dns name for the JSON-RPC API" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +0,0 @@ | ||
terraform { | ||
required_version = ">= 1.1.0" | ||
required_providers { | ||
aws = { | ||
source = "hashicorp/aws" | ||
version = ">= 3.72.0" | ||
} | ||
awscc = { | ||
source = "hashicorp/awscc" | ||
version = ">= 0.11.0" | ||
} | ||
} | ||
} | ||
|
||
provider "awscc" { | ||
user_agent = [{ | ||
product_name = "terraform-polygon-technology-edge" | ||
product_version = "0.0.1" | ||
comment = "V1/AWS-D69B4015/478186123" | ||
}] | ||
} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
variable "account_id" { | ||
type = string | ||
description = "Your AWS Account ID" | ||
} | ||
|
||
variable "premine" { | ||
type = string | ||
description = "Public account that will receive premined native currency" | ||
} | ||
|
||
variable "alb_ssl_certificate" { | ||
type = string | ||
description = "The ARN of SSL certificate that will be placed on JSON-RPC ALB" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,4 @@ | ||
output "jsonrpc_dns_name" { | ||
value = module.alb.dns_name | ||
description = "The dns name for the JSON-RPC API" | ||
} | ||
|
||
#output "bastion_instance_public_ip" { | ||
# value = module.bastion_instance.bastion_eip | ||
# description = "The public ip address of the bastion instance" | ||
#} | ||
} |