Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ✨ Add support for assume-role block in S3 backend for Terraform #74

Merged
merged 7 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
terraform {
backend "local" {
path = "pretrack/${var.runiac_step}/terraform.tfstate"
path = "pretrack/${var.runiac_step}/terraform.tfstate"
workspace_dir = "/runiac/tfstate"
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// deploy a PagerDuty team
resource "pagerduty_team" "example" {
name = "Engineering"
description = "All engineering"
description = "All engineering"
}

// deploy a user account into PagerDuty
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
output "pagerduty_policy_id" {
value = pagerduty_escalation_policy.example.id
value = pagerduty_escalation_policy.example.id
}
26 changes: 13 additions & 13 deletions examples/kitchen-sink/tracks/_pretrack/step1_pagerduty/variables.tf
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
variable pagerduty_token {
type = string
variable "pagerduty_token" {
type = string
}

variable runiac_account_id {
type = string
variable "runiac_account_id" {
type = string
}

variable runiac_region {
type = string
variable "runiac_region" {
type = string
}

variable runiac_environment {
type = string
variable "runiac_environment" {
type = string
}

variable resource_group {
type = string
default = "rg-runiac-sample"
variable "resource_group" {
type = string
default = "rg-runiac-sample"
}

variable runiac_step {
type = string
variable "runiac_step" {
type = string
}
2 changes: 1 addition & 1 deletion examples/kitchen-sink/tracks/azure/step1_infra/backend.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
terraform {
backend "local" {
path = "azure/${var.runiac_step}/terraform.tfstate"
path = "azure/${var.runiac_step}/terraform.tfstate"
workspace_dir = "/runiac/tfstate"
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
terraform {
backend "local" {
path = "azure/${var.runiac_step}/terraform.tfstate"
path = "azure/${var.runiac_step}/terraform.tfstate"
workspace_dir = "/runiac/tfstate"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ terraform {
source = "hashicorp/azurerm"
version = "~> 2.28.0"
}

pagerduty = {
source = "PagerDuty/pagerduty"
version = "~> 1.8.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
locals {
docker_image = "heroku/nodejs-hello-world:latest"
docker_image = "heroku/nodejs-hello-world:latest"
}

variable pagerduty_token {
type = string
variable "pagerduty_token" {
type = string
}

variable pretrack-pagerduty-pagerduty_policy_id {
type = string
variable "pretrack-pagerduty-pagerduty_policy_id" {
type = string
}

variable runiac_account_id {
type = string
variable "runiac_account_id" {
type = string
}

variable runiac_region {
type = string
variable "runiac_region" {
type = string
}

variable runiac_environment {
type = string
variable "runiac_environment" {
type = string
}

variable resource_group {
type = string
default = "rg-runiac-sample"
variable "resource_group" {
type = string
default = "rg-runiac-sample"
}

variable runiac_step {
type = string
variable "runiac_step" {
type = string
}

variable "runiac_primary_region" {
type = string
type = string
}
24 changes: 12 additions & 12 deletions examples/kitchen-sink/tracks/azure/step1_infra/variables.tf
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
locals {
docker_image = "heroku/nodejs-hello-world"
docker_image = "heroku/nodejs-hello-world"
}

variable runiac_account_id {
type = string
variable "runiac_account_id" {
type = string
}

variable runiac_region {
type = string
variable "runiac_region" {
type = string
}

variable runiac_environment {
type = string
variable "runiac_environment" {
type = string
}

variable resource_group {
type = string
default = "rg-runiac-sample"
variable "resource_group" {
type = string
default = "rg-runiac-sample"
}

variable runiac_step {
type = string
variable "runiac_step" {
type = string
}
2 changes: 1 addition & 1 deletion examples/kitchen-sink/tracks/gcp/step1_infra/backend.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
terraform {
backend "local" {
path = "gcp/${var.runiac_step}/terraform.tfstate"
path = "gcp/${var.runiac_step}/terraform.tfstate"
workspace_dir = "/runiac/tfstate"
}
}
6 changes: 3 additions & 3 deletions examples/kitchen-sink/tracks/gcp/step1_infra/providers.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Configure the Azure Provider
provider "google" {
project = var.gcp_project_id
region = var.runiac_region
project = var.gcp_project_id
region = var.runiac_region
}

provider "pagerduty" {
Expand All @@ -14,7 +14,7 @@ terraform {
source = "hashicorp/google"
version = "~> 3.51.0"
}

pagerduty = {
source = "PagerDuty/pagerduty"
version = "~> 1.8.0"
Expand Down
42 changes: 21 additions & 21 deletions examples/kitchen-sink/tracks/gcp/step1_infra/variables.tf
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
locals {
docker_image = "gcr.io/cloudrun/hello"
docker_image = "gcr.io/cloudrun/hello"

region = lookup({
"centralus": "us-central1"
}, var.runiac_region, "centralus")
region = lookup({
"centralus" : "us-central1"
}, var.runiac_region, "centralus")
}

variable pagerduty_token {
type = string
variable "pagerduty_token" {
type = string
}

variable pretrack-pagerduty-pagerduty_policy_id {
type = string
variable "pretrack-pagerduty-pagerduty_policy_id" {
type = string
}

variable gcp_project_id {
type = string
variable "gcp_project_id" {
type = string
}

variable runiac_account_id {
type = string
variable "runiac_account_id" {
type = string
}

variable runiac_region {
type = string
variable "runiac_region" {
type = string
}

variable runiac_environment {
type = string
variable "runiac_environment" {
type = string
}

variable resource_group {
type = string
default = "rg-runiac-sample"
variable "resource_group" {
type = string
default = "rg-runiac-sample"
}

variable runiac_step {
type = string
variable "runiac_step" {
type = string
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
terraform {
backend "local" {
path = "${var.runiac_step}.terraform.tfstate"
path = "${var.runiac_step}.terraform.tfstate"
workspace_dir = "/runiac/tfstate"
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resource azurerm_resource_group hub {
resource "azurerm_resource_group" "hub" {
name = "${local.namespace-}rg-runiac-hub-${var.runiac_region}"
location = var.runiac_region
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
terraform {
backend "local" {
path = "azure/${var.runiac_step}/terraform.tfstate"
path = "azure/${var.runiac_step}/terraform.tfstate"
workspace_dir = "/runiac/tfstate"
}
}
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
locals {
namespace- = var.runiac_namespace == "" ? "" : "${var.runiac_namespace}-"
namespace- = var.runiac_namespace == "" ? "" : "${var.runiac_namespace}-"
}

variable "runiac_account_id" {
type = string
type = string
}

variable "runiac_region" {
type = string
type = string
}

variable "runiac_environment" {
type = string
type = string
}

variable "runiac_namespace" {
type = string
type = string
}

variable "runiac_step" {
type = string
type = string
}

variable "runiac_primary_region" {
type = string
type = string
}
Original file line number Diff line number Diff line change
@@ -1,28 +1,23 @@
locals {
namespace- = var.runiac_namespace == "" ? "" : "${var.runiac_namespace}-"
namespace- = var.runiac_namespace == "" ? "" : "${var.runiac_namespace}-"
}

variable runiac_account_id {
type = string
variable "runiac_account_id" {
type = string
}

variable runiac_region {
type = string
variable "runiac_region" {
type = string
}

variable runiac_environment {
type = string
variable "runiac_environment" {
type = string
}

variable runiac_namespace {
type = string
variable "runiac_namespace" {
type = string
}

variable runiac_step {
type = string
variable "runiac_step" {
type = string
}

variable runiac_step {
type = string
}

Loading
Loading