-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
removing examples into starter github repos
- Loading branch information
1 parent
7bc4cf5
commit f81af47
Showing
27 changed files
with
88 additions
and
278 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package cmd | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/stretchr/testify/require" | ||
) | ||
|
||
func TestNew(t *testing.T) { | ||
tests := map[string]string{ | ||
"foobar": "foobar", | ||
"foo()bar": "foo__bar", | ||
"!234 Test": "_234_Test", | ||
"!@#$%^&*()": "__________", | ||
"trailing space ": "trailing_space", | ||
"\nwhite space\n\t": "white_space", | ||
"domain\\user": "domain_user", | ||
} | ||
|
||
for in, expected := range tests { | ||
result := sanitizeMachineName(in) | ||
|
||
require.Equal(t, expected, result, "sanitizeMachineName(\"%s\") = \"%s\"; want \"%s\"", in, result, expected) | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...es/terraform-azure-hello-world/runiac.yml → ...azure-hello-world-multi-region/runiac.yml
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,4 @@ | ||
project: azure-hello-world | ||
primary_region: centralus | ||
regional_regions: centralus | ||
regional_regions: centralus,eastus,westus,uksouth,southeastasia | ||
runner: terraform |
File renamed without changes.
4 changes: 4 additions & 0 deletions
4
examples/terraform-azure-hello-world-multi-region/step1_default/main.tf
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 @@ | ||
resource azurerm_resource_group hub { | ||
name = "${local.namespace-}rg-runiac-hub-${var.runiac_region}" | ||
location = var.runiac_region | ||
} |
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...-gcp-hello-world/step1_default/backend.tf → ...-region/step1_default/regional/backend.tf
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,6 +1,6 @@ | ||
terraform { | ||
backend "local" { | ||
path = "default.tfstate" | ||
path = "azure/${var.runiac_step}/terraform.tfstate" | ||
workspace_dir = "/runiac/tfstate" | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
examples/terraform-azure-hello-world-multi-region/step1_default/regional/main.tf
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 @@ | ||
resource "azurerm_resource_group" "spoke" { | ||
name = "${local.namespace-}rg-runiac-spoke-${var.runiac_region}" | ||
location = var.runiac_region | ||
} |
14 changes: 14 additions & 0 deletions
14
examples/terraform-azure-hello-world-multi-region/step1_default/regional/providers.tf
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 @@ | ||
# Configure the Azure Provider | ||
provider "azurerm" { | ||
subscription_id = var.runiac_account_id | ||
features {} | ||
} | ||
|
||
terraform { | ||
required_providers { | ||
azurerm = { | ||
source = "hashicorp/azurerm" | ||
version = "~> 2.58.0" | ||
} | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
examples/terraform-azure-hello-world-multi-region/step1_default/regional/variables.tf
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,27 @@ | ||
locals { | ||
namespace- = var.runiac_namespace == "" ? "" : "${var.runiac_namespace}-" | ||
} | ||
|
||
variable "runiac_account_id" { | ||
type = string | ||
} | ||
|
||
variable "runiac_region" { | ||
type = string | ||
} | ||
|
||
variable "runiac_environment" { | ||
type = string | ||
} | ||
|
||
variable "runiac_namespace" { | ||
type = string | ||
} | ||
|
||
variable "runiac_step" { | ||
type = string | ||
} | ||
|
||
variable "runiac_primary_region" { | ||
type = string | ||
} |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
examples/terraform-gcp-hello-world/step1_default/providers.tf
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.