Compare commits

..

No commits in common. "2d7a519839d6587a3311c35a7e6e805fb4e5bb9d" and "f2516ed6e042add59f822dd7527d52624a99da0a" have entirely different histories.

28 changed files with 90 additions and 901 deletions

View File

@ -1,113 +0,0 @@
String cloud_provider = "aws"
String aws_region = "ca-north-1"
String default_stage = "live"
String aws_access_credentials = "vsds_${aws_region}_${default_stage}_infrastructure.automation.user"
String dynatrace_api_token_credentials = "api_token_dynatrace_${aws_region}_${default_stage}"
pipeline {
agent {
node {
label 'vsds-terraform'
}
}
environment {
GIT_SSH_COMMAND = "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
AWS_ID = credentials("${aws_access_credentials}")
AWS_ACCESS_KEY_ID = "${env.AWS_ID_USR}"
AWS_SECRET_ACCESS_KEY = "${env.AWS_ID_PSW}"
AWS_REGION = "${aws_region}"
STAGE = "${default_stage}"
CLOUD_PROVIDER = "${cloud_provider}"
API_TOKEN = credentials("${dynatrace_api_token_credentials}")
TF_VAR_dt_api_token = "${env.API_TOKEN}"
}
options {
timestamps()
ansiColor('xterm')
disableConcurrentBuilds(abortPrevious: true)
timeout(time: 1, unit: 'HOURS')
}
stages {
stage('terraform init') {
steps {
sshagent(credentials: ['sofa-user-automation']) {
container('terraform') {
sh """
set -e
cd environments/${CLOUD_PROVIDER}/${AWS_REGION}/${STAGE}
terraform init
"""
}
}
}
}
stage('Terraform plan') {
steps {
sshagent(credentials: ['sofa-user-automation']) {
container('terraform') {
script {
env.PLAN_STATUS = sh(script: "cd environments/${CLOUD_PROVIDER}/${AWS_REGION}/${STAGE} && terraform plan -out=.terraform/plan.out -input=false -detailed-exitcode", returnStatus: true)
if (env.PLAN_STATUS == "1") {
currentBuild.result = "FAILURE"
error('Aborting the build.')
return
}
}
}
}
}
}
stage('Interactive') {
when {
allOf {
expression { env.PLAN_STATUS == "2" }
}
}
steps {
timeout(time: 15, unit: "MINUTES") {
input "Is this plan acceptable?"
milestone 1
}
}
}
stage("terraform apply") {
when {
allOf {
expression { env.PLAN_STATUS == "2" }
}
}
steps {
container('terraform') {
sshagent(credentials: ['sofa-user-automation']) {
script {
sh "cd environments/${CLOUD_PROVIDER}/${AWS_REGION}/${STAGE} "
sh("terraform apply -input=false .terraform/plan.out")
}
}
}
}
}
}
post {
always {
cleanWs()
script {
currentBuild.result = currentBuild.result ?: 'SUCCESS'
notifyBitbucket()
}
}
}
}

View File

@ -1,21 +0,0 @@
terraform {
required_providers {
dynatrace = {
version = "1.33.0"
source = "dynatrace-oss/dynatrace"
}
aws = {
source = "hashicorp/aws"
version = "5.1.0"
}
}
}
provider "aws" {
region = var.aws_region
}
provider "dynatrace" {
dt_env_url = var.dt_env_url
dt_api_token = var.dt_api_token
}

View File

@ -1,3 +0,0 @@
aws_region = "ca-north-1"
dt_env_url = "https://console.eu.mon.vsds.swarm.audi/e/558a3c22-84ba-4132-804e-e862f57a6eb1/api"

View File

@ -1,11 +0,0 @@
variable "aws_region" {
description = "The aws region to deploy in"
}
variable "dt_env_url" {
description = "Dynatrace Environment URL"
}
variable "dt_api_token" {
description = "Dynatrace API Token"
}

View File

@ -1,113 +0,0 @@
String cloud_provider = "aws"
String aws_region = "ca-north-1"
String default_stage = "prelive"
String aws_access_credentials = "vsds_${aws_region}_${default_stage}_infrastructure.automation.user"
String dynatrace_api_token_credentials = "api_token_dynatrace_${aws_region}_${default_stage}"
pipeline {
agent {
node {
label 'vsds-terraform'
}
}
environment {
GIT_SSH_COMMAND = "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
AWS_ID = credentials("${aws_access_credentials}")
AWS_ACCESS_KEY_ID = "${env.AWS_ID_USR}"
AWS_SECRET_ACCESS_KEY = "${env.AWS_ID_PSW}"
AWS_REGION = "${aws_region}"
STAGE = "${default_stage}"
CLOUD_PROVIDER = "${cloud_provider}"
API_TOKEN = credentials("${dynatrace_api_token_credentials}")
TF_VAR_dt_api_token = "${env.API_TOKEN}"
}
options {
timestamps()
ansiColor('xterm')
disableConcurrentBuilds(abortPrevious: true)
timeout(time: 1, unit: 'HOURS')
}
stages {
stage('terraform init') {
steps {
sshagent(credentials: ['sofa-user-automation']) {
container('terraform') {
sh """
set -e
cd environments/${CLOUD_PROVIDER}/${AWS_REGION}/${STAGE}
terraform init
"""
}
}
}
}
stage('Terraform plan') {
steps {
sshagent(credentials: ['sofa-user-automation']) {
container('terraform') {
script {
env.PLAN_STATUS = sh(script: "cd environments/${CLOUD_PROVIDER}/${AWS_REGION}/${STAGE} && terraform plan -out=.terraform/plan.out -input=false -detailed-exitcode", returnStatus: true)
if (env.PLAN_STATUS == "1") {
currentBuild.result = "FAILURE"
error('Aborting the build.')
return
}
}
}
}
}
}
stage('Interactive') {
when {
allOf {
expression { env.PLAN_STATUS == "2" }
}
}
steps {
timeout(time: 15, unit: "MINUTES") {
input "Is this plan acceptable?"
milestone 1
}
}
}
stage("terraform apply") {
when {
allOf {
expression { env.PLAN_STATUS == "2" }
}
}
steps {
container('terraform') {
sshagent(credentials: ['sofa-user-automation']) {
script {
sh "cd environments/${CLOUD_PROVIDER}/${AWS_REGION}/${STAGE} "
sh("terraform apply -input=false .terraform/plan.out")
}
}
}
}
}
}
post {
always {
cleanWs()
script {
currentBuild.result = currentBuild.result ?: 'SUCCESS'
notifyBitbucket()
}
}
}
}

View File

@ -1,21 +0,0 @@
terraform {
required_providers {
dynatrace = {
version = "1.33.0"
source = "dynatrace-oss/dynatrace"
}
aws = {
source = "hashicorp/aws"
version = "5.1.0"
}
}
}
provider "aws" {
region = var.aws_region
}
provider "dynatrace" {
dt_env_url = var.dt_env_url
dt_api_token = var.dt_api_token
}

View File

@ -1,3 +0,0 @@
aws_region = "ca-north-1"
dt_env_url = "https://console.prelive.eu.mon.vsds.swarm.audi/e/307daede-db0a-4f56-90db-8953368c3d29/api"

View File

@ -1,11 +0,0 @@
variable "aws_region" {
description = "The aws region to deploy in"
}
variable "dt_env_url" {
description = "Dynatrace Environment URL"
}
variable "dt_api_token" {
description = "Dynatrace API Token"
}

View File

@ -1,8 +1,8 @@
String cloud_provider = "aws"
String aws_region = "eu-west-1"
String default_stage = "int"
String aws_access_credentials = "fdc_${aws_region}_${default_stage}_infrastructure.automation.user"
String dynatrace_api_token_credentials = "api_token_dynatrace_${aws_region}_${default_stage}"
String stage = "int"
String aws_access_credentials = "fdc_${aws_region}_${stage}_infrastructure.automation.user"
String dynatrace_api_toke_credentials = "api_token_dynatrace_${aws_region}_${stage}"
pipeline {
@ -20,10 +20,10 @@ pipeline {
AWS_SECRET_ACCESS_KEY = "${env.AWS_ID_PSW}"
AWS_REGION = "${aws_region}"
STAGE = "${default_stage}"
STAGE = "${stage}"
CLOUD_PROVIDER = "${cloud_provider}"
API_TOKEN = credentials("${dynatrace_api_token_credentials}")
API_TOKEN = credentials("${dynatrace_api_toke_credentials}")
TF_VAR_dt_api_token = "${env.API_TOKEN}"
}
@ -34,8 +34,10 @@ pipeline {
timeout(time: 1, unit: 'HOURS')
}
stages {
stage('terraform init') {
stage("terraform init") {
steps {
sshagent(credentials: ['sofa-user-automation']) {
container('terraform') {
@ -43,70 +45,21 @@ pipeline {
set -e
cd environments/${CLOUD_PROVIDER}/${AWS_REGION}/${STAGE}
terraform init
terraform fmt
"""
}
}
}
}
stage('Terraform plan') {
steps {
sshagent(credentials: ['sofa-user-automation']) {
container('terraform') {
script {
env.PLAN_STATUS = sh(script: "cd environments/${CLOUD_PROVIDER}/${AWS_REGION}/${STAGE} && terraform plan -out=.terraform/plan.out -input=false -detailed-exitcode", returnStatus: true)
if (env.PLAN_STATUS == "1") {
currentBuild.result = "FAILURE"
error('Aborting the build.')
return
}
}
}
}
}
}
stage('Interactive') {
when {
allOf {
expression { env.PLAN_STATUS == "2" }
}
}
steps {
timeout(time: 15, unit: "MINUTES") {
input "Is this plan acceptable?"
milestone 1
}
}
}
stage("terraform apply") {
when {
allOf {
expression { env.PLAN_STATUS == "2" }
}
}
steps {
container('terraform') {
sshagent(credentials: ['sofa-user-automation']) {
script {
sh "cd environments/${CLOUD_PROVIDER}/${AWS_REGION}/${STAGE} "
sh("terraform apply -input=false .terraform/plan.out")
}
}
}
}
}
}
post {
always {
cleanWs()
script {
currentBuild.result = currentBuild.result ?: 'SUCCESS'
notifyBitbucket()
notifyBitbucket(projectKey: 'packages')
}
}
}

View File

@ -1,113 +0,0 @@
String cloud_provider = "aws"
String aws_region = "eu-west-1"
String default_stage = "live"
String aws_access_credentials = "fdc_${aws_region}_${default_stage}_infrastructure.automation.user"
String dynatrace_api_token_credentials = "api_token_dynatrace_${aws_region}_${default_stage}"
pipeline {
agent {
node {
label 'vsds-terraform'
}
}
environment {
GIT_SSH_COMMAND = "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
AWS_ID = credentials("${aws_access_credentials}")
AWS_ACCESS_KEY_ID = "${env.AWS_ID_USR}"
AWS_SECRET_ACCESS_KEY = "${env.AWS_ID_PSW}"
AWS_REGION = "${aws_region}"
STAGE = "${default_stage}"
CLOUD_PROVIDER = "${cloud_provider}"
API_TOKEN = credentials("${dynatrace_api_token_credentials}")
TF_VAR_dt_api_token = "${env.API_TOKEN}"
}
options {
timestamps()
ansiColor('xterm')
disableConcurrentBuilds(abortPrevious: true)
timeout(time: 1, unit: 'HOURS')
}
stages {
stage('terraform init') {
steps {
sshagent(credentials: ['sofa-user-automation']) {
container('terraform') {
sh """
set -e
cd environments/${CLOUD_PROVIDER}/${AWS_REGION}/${STAGE}
terraform init
"""
}
}
}
}
stage('Terraform plan') {
steps {
sshagent(credentials: ['sofa-user-automation']) {
container('terraform') {
script {
env.PLAN_STATUS = sh(script: "cd environments/${CLOUD_PROVIDER}/${AWS_REGION}/${STAGE} && terraform plan -out=.terraform/plan.out -input=false -detailed-exitcode", returnStatus: true)
if (env.PLAN_STATUS == "1") {
currentBuild.result = "FAILURE"
error('Aborting the build.')
return
}
}
}
}
}
}
stage('Interactive') {
when {
allOf {
expression { env.PLAN_STATUS == "2" }
}
}
steps {
timeout(time: 15, unit: "MINUTES") {
input "Is this plan acceptable?"
milestone 1
}
}
}
stage("terraform apply") {
when {
allOf {
expression { env.PLAN_STATUS == "2" }
}
}
steps {
container('terraform') {
sshagent(credentials: ['sofa-user-automation']) {
script {
sh "cd environments/${CLOUD_PROVIDER}/${AWS_REGION}/${STAGE} "
sh("terraform apply -input=false .terraform/plan.out")
}
}
}
}
}
}
post {
always {
cleanWs()
script {
currentBuild.result = currentBuild.result ?: 'SUCCESS'
notifyBitbucket()
}
}
}
}

View File

@ -1,21 +0,0 @@
terraform {
required_providers {
dynatrace = {
version = "1.33.0"
source = "dynatrace-oss/dynatrace"
}
aws = {
source = "hashicorp/aws"
version = "5.1.0"
}
}
}
provider "aws" {
region = var.aws_region
}
provider "dynatrace" {
dt_env_url = var.dt_env_url
dt_api_token = var.dt_api_token
}

View File

@ -1,3 +0,0 @@
aws_region = "eu-west-1"
dt_env_url = "https://console.eu.mon.vsds.swarm.audi/e/3c8c4119-bfa9-420a-b590-479c543e2f05/api"

View File

@ -1,11 +0,0 @@
variable "aws_region" {
description = "The aws region to deploy in"
}
variable "dt_env_url" {
description = "Dynatrace Environment URL"
}
variable "dt_api_token" {
description = "Dynatrace API Token"
}

View File

@ -1,113 +0,0 @@
String cloud_provider = "aws"
String aws_region = "eu-west-1"
String default_stage = "prelive"
String aws_access_credentials = "fdc_${aws_region}_${default_stage}_infrastructure.automation.user"
String dynatrace_api_token_credentials = "api_token_dynatrace_${aws_region}_${default_stage}"
pipeline {
agent {
node {
label 'vsds-terraform'
}
}
environment {
GIT_SSH_COMMAND = "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
AWS_ID = credentials("${aws_access_credentials}")
AWS_ACCESS_KEY_ID = "${env.AWS_ID_USR}"
AWS_SECRET_ACCESS_KEY = "${env.AWS_ID_PSW}"
AWS_REGION = "${aws_region}"
STAGE = "${default_stage}"
CLOUD_PROVIDER = "${cloud_provider}"
API_TOKEN = credentials("${dynatrace_api_token_credentials}")
TF_VAR_dt_api_token = "${env.API_TOKEN}"
}
options {
timestamps()
ansiColor('xterm')
disableConcurrentBuilds(abortPrevious: true)
timeout(time: 1, unit: 'HOURS')
}
stages {
stage('terraform init') {
steps {
sshagent(credentials: ['sofa-user-automation']) {
container('terraform') {
sh """
set -e
cd environments/${CLOUD_PROVIDER}/${AWS_REGION}/${STAGE}
terraform init
"""
}
}
}
}
stage('Terraform plan') {
steps {
sshagent(credentials: ['sofa-user-automation']) {
container('terraform') {
script {
env.PLAN_STATUS = sh(script: "cd environments/${CLOUD_PROVIDER}/${AWS_REGION}/${STAGE} && terraform plan -out=.terraform/plan.out -input=false -detailed-exitcode", returnStatus: true)
if (env.PLAN_STATUS == "1") {
currentBuild.result = "FAILURE"
error('Aborting the build.')
return
}
}
}
}
}
}
stage('Interactive') {
when {
allOf {
expression { env.PLAN_STATUS == "2" }
}
}
steps {
timeout(time: 15, unit: "MINUTES") {
input "Is this plan acceptable?"
milestone 1
}
}
}
stage("terraform apply") {
when {
allOf {
expression { env.PLAN_STATUS == "2" }
}
}
steps {
container('terraform') {
sshagent(credentials: ['sofa-user-automation']) {
script {
sh "cd environments/${CLOUD_PROVIDER}/${AWS_REGION}/${STAGE} "
sh("terraform apply -input=false .terraform/plan.out")
}
}
}
}
}
}
post {
always {
cleanWs()
script {
currentBuild.result = currentBuild.result ?: 'SUCCESS'
notifyBitbucket()
}
}
}
}

View File

@ -4,7 +4,7 @@ terraform {
key = "dynatrace/configuration.tfstate"
region = "eu-west-1"
encrypt = true
dynamodb_table = "fdc-eu-west-1-prelive-tfstate-lock"
dynamodb_table = "fdc-eu-west-1-live-tfstate-lock"
kms_key_id = "arn:aws:kms:eu-west-1:626466754332:key/8edf34f3-ac75-4515-b2da-f784e425c87b"
}
}

View File

@ -0,0 +1,3 @@
resource "dynatrace_audit_log" "test" {
enabled = false
}

View File

@ -1,7 +1,7 @@
terraform {
required_providers {
dynatrace = {
version = "1.33.0"
version = "1.31.0"
source = "dynatrace-oss/dynatrace"
}
aws = {
@ -13,9 +13,4 @@ terraform {
provider "aws" {
region = var.aws_region
}
provider "dynatrace" {
dt_env_url = var.dt_env_url
dt_api_token = var.dt_api_token
}
}

View File

@ -1,3 +1,13 @@
stack = "acdc"
stage = "prelive"
name = "dynatrace-prelive"
aws_region = "eu-west-1"
dt_env_url = "https://console.prelive.eu.mon.vsds.swarm.audi/e/dfe67e08-75f1-4c0f-9433-16af192faf88/api"
tags = {
"Managed_By" : "NTT_team"
}
kms = {
"s3" = "arn:aws:kms:eu-west-1:248567303878:key/8d860956-4033-4782-ab30-6cb84b31964e"
}

View File

@ -2,10 +2,29 @@ variable "aws_region" {
description = "The aws region to deploy in"
}
variable "dt_env_url" {
description = "Dynatrace Environment URL"
variable "name" {
description = "Name to be used on all the resources as identifier"
type = string
default = ""
}
variable "dt_api_token" {
description = "Dynatrace API Token"
variable "stack" {
description = "Environment stack"
default = "vsds"
}
variable "stage" {
description = "Environment stage"
}
variable "tags" {
description = "A map of tags to add to all resources"
type = map(string)
default = {}
}
variable "kms" {
description = "A map of kms keys to be used for any resources."
type = map(string)
default = {}
}

View File

@ -1,113 +0,0 @@
String cloud_provider = "aws"
String aws_region = "us-east-1"
String default_stage = "live"
String aws_access_credentials = "fdc_${aws_region}_${default_stage}_infrastructure.automation.user"
String dynatrace_api_token_credentials = "api_token_dynatrace_${aws_region}_${default_stage}"
pipeline {
agent {
node {
label 'vsds-terraform'
}
}
environment {
GIT_SSH_COMMAND = "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
AWS_ID = credentials("${aws_access_credentials}")
AWS_ACCESS_KEY_ID = "${env.AWS_ID_USR}"
AWS_SECRET_ACCESS_KEY = "${env.AWS_ID_PSW}"
AWS_REGION = "${aws_region}"
STAGE = "${default_stage}"
CLOUD_PROVIDER = "${cloud_provider}"
API_TOKEN = credentials("${dynatrace_api_token_credentials}")
TF_VAR_dt_api_token = "${env.API_TOKEN}"
}
options {
timestamps()
ansiColor('xterm')
disableConcurrentBuilds(abortPrevious: true)
timeout(time: 1, unit: 'HOURS')
}
stages {
stage('terraform init') {
steps {
sshagent(credentials: ['sofa-user-automation']) {
container('terraform') {
sh """
set -e
cd environments/${CLOUD_PROVIDER}/${AWS_REGION}/${STAGE}
terraform init
"""
}
}
}
}
stage('Terraform plan') {
steps {
sshagent(credentials: ['sofa-user-automation']) {
container('terraform') {
script {
env.PLAN_STATUS = sh(script: "cd environments/${CLOUD_PROVIDER}/${AWS_REGION}/${STAGE} && terraform plan -out=.terraform/plan.out -input=false -detailed-exitcode", returnStatus: true)
if (env.PLAN_STATUS == "1") {
currentBuild.result = "FAILURE"
error('Aborting the build.')
return
}
}
}
}
}
}
stage('Interactive') {
when {
allOf {
expression { env.PLAN_STATUS == "2" }
}
}
steps {
timeout(time: 15, unit: "MINUTES") {
input "Is this plan acceptable?"
milestone 1
}
}
}
stage("terraform apply") {
when {
allOf {
expression { env.PLAN_STATUS == "2" }
}
}
steps {
container('terraform') {
sshagent(credentials: ['sofa-user-automation']) {
script {
sh "cd environments/${CLOUD_PROVIDER}/${AWS_REGION}/${STAGE} "
sh("terraform apply -input=false .terraform/plan.out")
}
}
}
}
}
}
post {
always {
cleanWs()
script {
currentBuild.result = currentBuild.result ?: 'SUCCESS'
notifyBitbucket()
}
}
}
}

View File

@ -1,21 +0,0 @@
terraform {
required_providers {
dynatrace = {
version = "1.33.0"
source = "dynatrace-oss/dynatrace"
}
aws = {
source = "hashicorp/aws"
version = "5.1.0"
}
}
}
provider "aws" {
region = var.aws_region
}
provider "dynatrace" {
dt_env_url = var.dt_env_url
dt_api_token = var.dt_api_token
}

View File

@ -1,3 +0,0 @@
aws_region = "us-east-1"
dt_env_url = "https://console.eu.mon.vsds.swarm.audi/e/bd72f2c1-7614-44cc-870a-77ffc2d3ce35/api"

View File

@ -1,11 +0,0 @@
variable "aws_region" {
description = "The aws region to deploy in"
}
variable "dt_env_url" {
description = "Dynatrace Environment URL"
}
variable "dt_api_token" {
description = "Dynatrace API Token"
}

View File

@ -1,113 +0,0 @@
String cloud_provider = "aws"
String aws_region = "us-east-1"
String default_stage = "prelive"
String aws_access_credentials = "fdc_${aws_region}_${default_stage}_infrastructure.automation.user"
String dynatrace_api_token_credentials = "api_token_dynatrace_${aws_region}_${default_stage}"
pipeline {
agent {
node {
label 'vsds-terraform'
}
}
environment {
GIT_SSH_COMMAND = "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
AWS_ID = credentials("${aws_access_credentials}")
AWS_ACCESS_KEY_ID = "${env.AWS_ID_USR}"
AWS_SECRET_ACCESS_KEY = "${env.AWS_ID_PSW}"
AWS_REGION = "${aws_region}"
STAGE = "${default_stage}"
CLOUD_PROVIDER = "${cloud_provider}"
API_TOKEN = credentials("${dynatrace_api_token_credentials}")
TF_VAR_dt_api_token = "${env.API_TOKEN}"
}
options {
timestamps()
ansiColor('xterm')
disableConcurrentBuilds(abortPrevious: true)
timeout(time: 1, unit: 'HOURS')
}
stages {
stage('terraform init') {
steps {
sshagent(credentials: ['sofa-user-automation']) {
container('terraform') {
sh """
set -e
cd environments/${CLOUD_PROVIDER}/${AWS_REGION}/${STAGE}
terraform init
"""
}
}
}
}
stage('Terraform plan') {
steps {
sshagent(credentials: ['sofa-user-automation']) {
container('terraform') {
script {
env.PLAN_STATUS = sh(script: "cd environments/${CLOUD_PROVIDER}/${AWS_REGION}/${STAGE} && terraform plan -out=.terraform/plan.out -input=false -detailed-exitcode", returnStatus: true)
if (env.PLAN_STATUS == "1") {
currentBuild.result = "FAILURE"
error('Aborting the build.')
return
}
}
}
}
}
}
stage('Interactive') {
when {
allOf {
expression { env.PLAN_STATUS == "2" }
}
}
steps {
timeout(time: 15, unit: "MINUTES") {
input "Is this plan acceptable?"
milestone 1
}
}
}
stage("terraform apply") {
when {
allOf {
expression { env.PLAN_STATUS == "2" }
}
}
steps {
container('terraform') {
sshagent(credentials: ['sofa-user-automation']) {
script {
sh "cd environments/${CLOUD_PROVIDER}/${AWS_REGION}/${STAGE} "
sh("terraform apply -input=false .terraform/plan.out")
}
}
}
}
}
}
post {
always {
cleanWs()
script {
currentBuild.result = currentBuild.result ?: 'SUCCESS'
notifyBitbucket()
}
}
}
}

View File

@ -0,0 +1,3 @@
resource "dynatrace_audit_log" "test" {
enabled = false
}

View File

@ -1,7 +1,7 @@
terraform {
required_providers {
dynatrace = {
version = "1.33.0"
version = "1.31.0"
source = "dynatrace-oss/dynatrace"
}
aws = {
@ -13,9 +13,4 @@ terraform {
provider "aws" {
region = var.aws_region
}
provider "dynatrace" {
dt_env_url = var.dt_env_url
dt_api_token = var.dt_api_token
}
}

View File

@ -1,3 +1,13 @@
stack = "acdc"
stage = "prelive"
name = "dynatrace-prelive"
aws_region = "us-east-1"
dt_env_url = "https://console.prelive.eu.mon.vsds.swarm.audi/e/e7acd689-2169-4b83-aace-8c4e75c67446/api"
tags = {
"Managed_By" : "NTT_team"
}
kms = {
"s3" = "arn:aws:kms:eu-west-1:248567303878:key/8d860956-4033-4782-ab30-6cb84b31964e"
}

View File

@ -2,10 +2,29 @@ variable "aws_region" {
description = "The aws region to deploy in"
}
variable "dt_env_url" {
description = "Dynatrace Environment URL"
variable "name" {
description = "Name to be used on all the resources as identifier"
type = string
default = ""
}
variable "dt_api_token" {
description = "Dynatrace API Token"
variable "stack" {
description = "Environment stack"
default = "vsds"
}
variable "stage" {
description = "Environment stage"
}
variable "tags" {
description = "A map of tags to add to all resources"
type = map(string)
default = {}
}
variable "kms" {
description = "A map of kms keys to be used for any resources."
type = map(string)
default = {}
}