This module is used to create GCP resources to support Chainlink IAC setups.
See the chainlink nodes for a usage example.
module "chainlinknode" {
source = "avinava-mycelium/chainlinknode/gcp"
version = "1.0.11" # Use latest version for Apple Silicon compatibility
# Required variables
project_id = var.project_id
machine_type = var.machine_type
node_name = var.node_name
node_type = var.node_type
boot_disk_size = var.boot_disk_size
}
This module is fully compatible with Apple Silicon Macs starting from version 1.0.11. If you're using an M1/M2 Mac, make sure to use version 1.0.11
or later to avoid the deprecated template provider compatibility issues.
This module follows Semantic Versioning:
- MAJOR (x.0.0): Breaking changes that require user action
- MINOR (0.x.0): New features that are backward compatible
- PATCH (0.0.x): Bug fixes and improvements
Before creating a new release:
-
Test the changes locally:
terraform init terraform plan terraform validate
-
Ensure compatibility:
- Test on both Intel and Apple Silicon Macs
- Verify no deprecated provider dependencies
- Check that all required variables are documented
-
Update documentation:
- Update this README if new variables/outputs are added
- Update examples if functionality changes
- Document any breaking changes
-
Prepare the release:
# Ensure you're on master and up to date git checkout master git pull origin master # Check current tags git tag --sort=-version:refname | head -5
-
Create and push the release:
# Create the new tag (replace x.y.z with actual version) git tag vx.y.z # Push the tag to trigger Terraform Registry release git push origin vx.y.z
-
Verify the release:
- Check that the new version appears on Terraform Registry
- Test the new version in a development environment
- Update production deployments as needed
When creating a GitHub release, use this template:
## vx.y.z - Release Title
### 🚀 New Features
- Feature description
### 🐛 Bug Fixes
- Bug fix description
### ⚠️ Breaking Changes
- Breaking change description (for major versions only)
### 📋 Notes
- Additional notes or migration instructions
- Development environments: Can use latest version immediately
- Production nodes: Test in staging first, then gradual rollout
- Apple Silicon developers: Always use version 1.0.11 or later
If a release has issues:
- Identify the last known good version
- Update module version in affected deployments
- Create a patch release with the fix
- Document the issue and resolution
Name | Description | Type | Default | Required |
---|---|---|---|---|
access_config | Access configurations, i.e. IPs via which the VM instance can be accessed via the Internet. | list(object({ |
[] |
no |
add_hostname_suffix | Adds a suffix to the hostname | bool |
true |
no |
hostname | Hostname of instances | string |
"" |
no |
instance_template | Instance template self_link used to create compute instances | any |
n/a | no |
network | Network to deploy to. Only one of network or subnetwork should be specified. | string |
"" |
no |
num_instances | Number of instances to create. This value is ignored if static_ips is provided. | string |
"1" |
no |
region | Region where the instances should be created. | string |
us-central1 |
no |
static_ips | List of static IPs for VM instances | list(string) |
[] |
no |
subnetwork | Subnet to deploy to. Only one of network or subnetwork should be specified. | string |
"" |
no |
subnetwork_project | The project that subnetwork belongs to | string |
"" |
no |
zone | Zone where the instances should be created. If not specified, instances will be spread across available zones in the region. | string |
us-central1-a |
no |
machine_type | Machine configuration for CPU and Memory. | string |
`` | yes |
node_name | Name of CL node. | string |
`` | yes |
node_type | Type of CL node. | string |
`` | yes |
project_id | Project ID in GCP for the code to be deployed. | string |
`` | yes |
Name | Description |
---|---|
disk_names | The boot disk name of the node |
instance_name | The name of the VM instance holding the node |
disk_size | The disk size allocated to the node |
gcs_startup_script | The private bucket location for the startup script of the node |
external_ip_addresses | The static public IP address of the node |
external_ip_names | The static public IP name of the node |
internal_ip_addresses | The internal static IP address of the node |
internal_ip_names | The internal static IP names of the node |