mirror of
https://github.com/Dannecron/netology-devops-gw-infra.git
synced 2025-12-25 15:22:36 +03:00
[stage-1] complete pre-configuration and terraform init
This commit is contained in:
38
terraform/.gitignore
vendored
Normal file
38
terraform/.gitignore
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
# Local .terraform directories
|
||||
**/.terraform/*
|
||||
|
||||
# .tfstate files
|
||||
*.tfstate
|
||||
*.tfstate.*
|
||||
|
||||
# Crash log files
|
||||
crash.log
|
||||
crash.*.log
|
||||
|
||||
# Exclude all .tfvars files, which are likely to contain sentitive data, such as
|
||||
# password, private keys, and other secrets. These should not be part of version
|
||||
# control as they are data points which are potentially sensitive and subject
|
||||
# to change depending on the environment.
|
||||
#
|
||||
*.tfvars
|
||||
|
||||
# Ignore override files as they are usually used to override resources locally and so
|
||||
# are not checked in
|
||||
override.tf
|
||||
override.tf.json
|
||||
*_override.tf
|
||||
*_override.tf.json
|
||||
|
||||
# Include override files you do wish to add to version control using negated pattern
|
||||
#
|
||||
# !example_override.tf
|
||||
|
||||
# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan
|
||||
# example: *tfplan*
|
||||
|
||||
# Ignore CLI configuration files
|
||||
.terraformrc
|
||||
terraform.rc
|
||||
.terraform.lock.hcl
|
||||
|
||||
variables.tf
|
||||
28
terraform/provider.tf
Normal file
28
terraform/provider.tf
Normal file
@@ -0,0 +1,28 @@
|
||||
terraform {
|
||||
required_providers {
|
||||
yandex = {
|
||||
source = "yandex-cloud/yandex"
|
||||
}
|
||||
}
|
||||
required_version = ">= 0.13"
|
||||
|
||||
|
||||
backend "s3" {
|
||||
endpoint = "storage.yandexcloud.net"
|
||||
bucket = "bucket"
|
||||
region = "ru-central1"
|
||||
key = "tf/state.tfstate"
|
||||
access_key = "access_key"
|
||||
secret_key = "secret_key"
|
||||
|
||||
skip_region_validation = true
|
||||
skip_credentials_validation = true
|
||||
}
|
||||
}
|
||||
|
||||
provider "yandex" {
|
||||
token = var.yandex_cloud_token
|
||||
cloud_id = var.yandex_cloud_id
|
||||
folder_id = var.yandex_folder_id
|
||||
zone = "ru-central1-a"
|
||||
}
|
||||
Reference in New Issue
Block a user