generated from terraform-ibm-modules/terraform-ibm-module-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: initial creation of autoscale vsi module (#1)
- Loading branch information
Showing
23 changed files
with
1,423 additions
and
111 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,3 +1,28 @@ | ||
{ | ||
"scc_rules": [] | ||
"scc_rules": [ | ||
{ | ||
"scc_rule_id": "rule-0e5151b1-9caf-433c-b4e5-be3d505e458e", | ||
"description": "Check whether Application Load Balancer for VPC is configured with multiple members in the pool", | ||
"ignore_reason": "This rule is not relevant to since the autoscale vsi are not attached at provision time", | ||
"is_valid": false | ||
}, | ||
{ | ||
"scc_rule_id": "rule-8c923215-afdc-41b1-886c-64ce78741f8c", | ||
"description": "Check whether Application Load Balancer for VPC has health check configured when created", | ||
"ignore_reason": "Health check is configured on Application Load Balancer", | ||
"is_valid": false | ||
}, | ||
{ | ||
"scc_rule_id": "rule-65b61a0f-ffdb-41ba-873d-ad329e7fc0ee", | ||
"description": "Check whether Application Load Balancer for VPC is configured to convert HTTP client requests to HTTPS", | ||
"ignore_reason": "This rule is not relevant since example is using a tcp listener", | ||
"is_valid": false | ||
}, | ||
{ | ||
"scc_rule_id": "rule-d544f217-3723-4376-b3aa-037c5f201e8d", | ||
"description": "Check whether Application Load Balancer for VPC uses HTTPS (SSL & TLS) instead of HTTP", | ||
"ignore_reason": "This rule is not relevant since example is using a tcp listener", | ||
"is_valid": false | ||
} | ||
] | ||
} |
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,11 +1,11 @@ | ||
# Basic example | ||
|
||
<!-- | ||
The basic example should call the module(s) stored in this repository with a basic configuration. | ||
Note, there is a pre-commit hook that will take the title of each example and include it in the repos main README.md. | ||
The text below should describe exactly what resources are provisioned / configured by the example. | ||
--> | ||
|
||
An end-to-end basic example that will provision the following: | ||
|
||
- A new resource group if one is not passed in. | ||
- A new Cloud Object Storage instance. | ||
- A new public SSH key if one is not passed in. | ||
- A new VPC with 3 subnets | ||
- A new placement group | ||
- A new instance template | ||
- An instance group manager using the template with an autoscale manager with an minimum membership of 1 VSI and max membership of 4 | ||
- A policy with a CPU metric of 70 |
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
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,33 +1,41 @@ | ||
######################################################################################################################## | ||
# Input variables | ||
######################################################################################################################## | ||
|
||
variable "ibmcloud_api_key" { | ||
description = "APIkey that's associated with the account to provision resources to" | ||
type = string | ||
description = "The IBM Cloud API Key" | ||
sensitive = true | ||
} | ||
|
||
variable "resource_group" { | ||
type = string | ||
description = "An existing resource group name to use for this example, if unset a new resource group will be created" | ||
default = null | ||
} | ||
|
||
variable "region" { | ||
description = "The region to which to deploy the VPC" | ||
type = string | ||
description = "Region to provision all resources created by this example" | ||
default = "us-south" | ||
default = "us-east" | ||
} | ||
|
||
variable "prefix" { | ||
description = "The prefix that you would like to append to your resources" | ||
type = string | ||
description = "Prefix to append to all resources created by this example" | ||
default = "basic" | ||
default = "slz-vsi" | ||
} | ||
|
||
variable "resource_group" { | ||
type = string | ||
description = "The name of an existing resource group to provision resources in to. If not set a new resource group will be created using the prefix variable" | ||
variable "resource_tags" { | ||
description = "List of Tags for the resource created" | ||
type = list(string) | ||
default = null | ||
} | ||
|
||
variable "resource_tags" { | ||
variable "access_tags" { | ||
type = list(string) | ||
description = "Optional list of tags to be added to created resources" | ||
description = "A list of access tags to apply to the VSI resources created by the module." | ||
default = [] | ||
} | ||
|
||
variable "ssh_key" { | ||
type = string | ||
description = "An existing ssh key name to use for this example, if unset a new ssh key will be created" | ||
default = null | ||
} |
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,12 +1,13 @@ | ||
terraform { | ||
required_version = ">= 1.3.0, <1.7.0" | ||
|
||
# Ensure that there is always 1 example locked into the lowest provider version of the range defined in the main | ||
# module's version.tf (usually a basic example), and 1 example that will always use the latest provider version. | ||
required_providers { | ||
ibm = { | ||
source = "IBM-Cloud/ibm" | ||
version = "1.49.0" | ||
version = ">= 1.63.0, < 2.0.0" | ||
} | ||
tls = { | ||
source = "hashicorp/tls" | ||
version = ">= 4.0.4" | ||
} | ||
} | ||
} |
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,4 +1,12 @@ | ||
# Complete example | ||
|
||
<!-- There is a pre-commit hook that will take the title of each example add include it in the repos main README.md --> | ||
<!-- Add text below should describe exactly what resources are provisioned / configured by the example --> | ||
An end-to-end complete example that will provision the following: | ||
|
||
- A new resource group if one is not passed in. | ||
- A new public SSH key if one is not passed in. | ||
- A new VPC with 3 subnets | ||
- A new placement group | ||
- A new instance template | ||
- An instance group manager using the template with an autoscale manager with an minimum membership of 1 VSI and max membership of 4 | ||
- A policy with a CPU metric of 70 | ||
- A VPC Application load balancer which the instances attach to |
Oops, something went wrong.