Skip to content
Open
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

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Secrets gérés par Terraform pour le GIP Plateforme de l'inclusion

Les secrets relatifs à un projet spécifique n'ont pas leur place ici !

<!-- BEGIN_TF_DOCS -->
## Requirements

| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.10 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_scaleway"></a> [scaleway](#provider\_scaleway) | 2.60.5 |
| <a name="provider_scaleway.tmp"></a> [scaleway.tmp](#provider\_scaleway.tmp) | 2.60.5 |

## Modules

No modules.

## Resources

| Name | Type |
|------|------|
| [scaleway_secret.github_backups_api_key](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/resources/secret) | resource |
| [scaleway_account_project.default](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/data-sources/account_project) | data source |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_managed"></a> [managed](#input\_managed) | Indicates the resource is managed by Terraform | `string` | `"Managed by Terraform"` | no |
| <a name="input_scw_region"></a> [scw\_region](#input\_scw\_region) | Scaleway region for resources | `string` | n/a | yes |
| <a name="input_scw_zone"></a> [scw\_zone](#input\_scw\_zone) | Scaleway zone for resources | `string` | n/a | yes |

## Outputs

No outputs.
<!-- END_TF_DOCS -->
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
terraform {
backend "s3" {
bucket = "gip-inclusion-state"
key = "iac-gip-inclusion/secret-manager/terraform/terraform.tfstate"
region = "fr-par"
skip_credentials_validation = true
skip_metadata_api_check = true
skip_region_validation = true
skip_requesting_account_id = true
endpoints = {
s3 = "https://s3.fr-par.scw.cloud"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
data "scaleway_account_project" "default" {
name = "default"
provider = scaleway.tmp
}
15 changes: 15 additions & 0 deletions infrastructure/iac-gip-inclusion/secret-manager/terraform/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
terraform {
required_providers {
scaleway = {
source = "scaleway/scaleway"
}
}
required_version = ">= 1.10"
}

resource "scaleway_secret" "github_backups_api_key" {
name = "github-backups-api-key"
protected = true
description = var.managed
type = "key_value"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
provider "scaleway" {
alias = "tmp"
}

provider "scaleway" {
region = var.scw_region
zone = var.scw_zone
project_id = data.scaleway_account_project.default.id
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
scw_region = "fr-par"
scw_zone = "fr-par-1"
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
variable "scw_region" {
type = string
description = "Scaleway region for resources"
}

variable "scw_zone" {
type = string
description = "Scaleway zone for resources"
}

variable "managed" {
type = string
description = "Indicates the resource is managed by Terraform"
default = "Managed by Terraform"
}