Skip to content

Commit

Permalink
Update main.tf
Browse files Browse the repository at this point in the history
  • Loading branch information
janibashamd authored Aug 29, 2023
1 parent 1acbe1d commit d95d6b4
Showing 1 changed file with 76 additions and 16 deletions.
92 changes: 76 additions & 16 deletions workflow-guides/waf/f5-xc-waf-on-k8s/booksinfo/main.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resource "kubectl_manifest" "bookinfo" {
resource "kubectl_manifest" "details-service" {
yaml_body = <<YAML
apiVersion: v1
kind: Service
Expand All @@ -13,14 +13,23 @@ spec:
name: http
selector:
app: details
---
YAML
}

resource "kubectl_manifest" "sa-details" {
yaml_body = <<YAML
apiVersion: v1
kind: ServiceAccount
metadata:
name: bookinfo-details
labels:
account: details
---
YAML
}


resource "kubectl_manifest" "details-deployment" {
yaml_body = <<YAML
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -49,7 +58,11 @@ spec:
- containerPort: 9080
securityContext:
runAsUser: 1000
---
YAML
}

resource "kubectl_manifest" "ratings-service" {
yaml_body = <<YAML
apiVersion: v1
kind: Service
metadata:
Expand All @@ -63,14 +76,24 @@ spec:
name: http
selector:
app: ratings
---
YAML
}


resource "kubectl_manifest" "sa-ratings" {
yaml_body = <<YAML
apiVersion: v1
kind: ServiceAccount
metadata:
name: bookinfo-ratings
labels:
account: ratings
---
YAML
}


resource "kubectl_manifest" "deployment-ratings" {
yaml_body = <<YAML
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -99,8 +122,12 @@ spec:
- containerPort: 9080
securityContext:
runAsUser: 1000
---
YAML
}


resource "kubectl_manifest" "reviews-service" {
yaml_body = <<YAML
apiVersion: v1
kind: Service
metadata:
Expand All @@ -114,14 +141,24 @@ spec:
name: http
selector:
app: reviews
---
YAML
}


resource "kubectl_manifest" "sa-reviews" {
yaml_body = <<YAML
apiVersion: v1
kind: ServiceAccount
metadata:
name: bookinfo-reviews
labels:
account: reviews
---
YAML
}


resource "kubectl_manifest" "deployment-reviews" {
yaml_body = <<YAML
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -163,7 +200,12 @@ spec:
emptyDir: {}
- name: tmp
emptyDir: {}
---
YAML
}


resource "kubectl_manifest" "deployment-reviews2" {
yaml_body = <<YAML
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -205,7 +247,12 @@ spec:
emptyDir: {}
- name: tmp
emptyDir: {}
---
YAML
}


resource "kubectl_manifest" "deployment-reviews3" {
yaml_body = <<YAML
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -247,8 +294,12 @@ spec:
emptyDir: {}
- name: tmp
emptyDir: {}
---
YAML
}


resource "kubectl_manifest" "service-productpage" {
yaml_body = <<YAML
apiVersion: v1
kind: Service
metadata:
Expand All @@ -262,14 +313,24 @@ spec:
name: http
selector:
app: productpage
---
YAML
}


resource "kubectl_manifest" "sa-productpage" {
yaml_body = <<YAML
apiVersion: v1
kind: ServiceAccount
metadata:
name: bookinfo-productpage
labels:
account: productpage
---
YAML
}


resource "kubectl_manifest" "deployment-productpage" {
yaml_body = <<YAML
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -304,6 +365,5 @@ spec:
volumes:
- name: tmp
emptyDir: {}
---
YAML
}
}

0 comments on commit d95d6b4

Please sign in to comment.