TER-209 Add basic CI.
This commit is contained in:
parent
81157b8da2
commit
ee70881f11
13
.gitignore
vendored
13
.gitignore
vendored
@ -1,10 +1,3 @@
|
||||
# Ignore all volatile files
|
||||
**/.terraform/modules
|
||||
**/.terraform/plugins
|
||||
**/terraform.tfstate*.backup
|
||||
|
||||
# Ignore all credentials files
|
||||
**/terraform.tfvars
|
||||
|
||||
# Ignore all but root state files
|
||||
**/terraform.tfstate
|
||||
.terraform
|
||||
main.tf
|
||||
terraform.tfvars
|
||||
|
||||
15
bitbucket-pipelines.yml
Normal file
15
bitbucket-pipelines.yml
Normal file
@ -0,0 +1,15 @@
|
||||
image: hashicorp/terraform:0.10.8
|
||||
|
||||
pipelines:
|
||||
default:
|
||||
- step:
|
||||
name: Format
|
||||
script:
|
||||
- terraform fmt -write=false -diff -check
|
||||
- step:
|
||||
name: Validate
|
||||
script:
|
||||
- mv main.tf.ci main.tf
|
||||
- mv terraform.tfvars.ci terraform.tfvars
|
||||
- terraform init
|
||||
- terraform validate
|
||||
7
main.tf.ci
Normal file
7
main.tf.ci
Normal file
@ -0,0 +1,7 @@
|
||||
variable "aws_region" {}
|
||||
|
||||
provider "aws" {
|
||||
version = "1.2.0"
|
||||
|
||||
region = "${var.aws_region}"
|
||||
}
|
||||
6
terraform.tfvars.ci
Normal file
6
terraform.tfvars.ci
Normal file
@ -0,0 +1,6 @@
|
||||
aws_region="eu-west-1"
|
||||
region="eu-west-1"
|
||||
env="test"
|
||||
hno_escalation_group="abc"
|
||||
ho_escalation_group="abc"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user