Skip to content

Commit

Permalink
add bucketName
Browse files Browse the repository at this point in the history
  • Loading branch information
takutakahashi committed May 18, 2020
1 parent 8312ddd commit 77f2cfd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions api/v1beta1/awsbackend_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ type AWSBackendSpec struct {
Type AWSBackendType `json:"type,omitempty"`
VPC Identifier `json:"vpc,omitempty"`
Region string `json:"region,omitempty"`
BucketName string `json:"bucketName"`
Subnets []Identifier `json:"subnets,omitempty"`
Listeners []Listener `json:"listeners"`
}
Expand Down
2 changes: 1 addition & 1 deletion src/terraform/AWSBackend/backend.tf.tpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
terraform {
backend "s3" {
bucket = "loadbalancer-controller-tfstate"
bucket = "{{ .B.Spec.BucketName }}"
key = "{{ .B.Namespace }}/{{ .B.Name }}.tfstate"
region = "{{ .B.Spec.Region }}"
}
Expand Down

0 comments on commit 77f2cfd

Please sign in to comment.