From e7349bd07fd77a581f4e7e02e42b1113da95c0b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=B6nthal?= Date: Tue, 7 Nov 2023 10:19:50 +0100 Subject: [PATCH] cleanup gcp example stack --- example/stack_gcp/main.tf | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/example/stack_gcp/main.tf b/example/stack_gcp/main.tf index 40884ad..35cb134 100644 --- a/example/stack_gcp/main.tf +++ b/example/stack_gcp/main.tf @@ -1,9 +1,8 @@ -provider "aws" { - region = "eu-central-1" +provider "google" { + project = var.project + region = var.region } -data "aws_caller_identity" "self" {} - variable "region" {} variable "environment" {} variable "project" {} @@ -13,11 +12,11 @@ variable "foo" { type = bool } -resource "aws_s3_bucket" "test" { - bucket = "test-${var.environment}-${data.aws_caller_identity.self.account_id}" -} -resource "aws_s3_bucket" "state" {} +resource "google_storage_bucket" "state" { + location = "EU" + name = "${var.project}-${var.account}-test" +} terraform { backend "gcs" { @@ -25,5 +24,5 @@ terraform { } output "foo" { - value = "test-${var.environment}-${data.aws_caller_identity.self.account_id}" + value = google_storage_bucket.state.id }