Skip to content

Commit

Permalink
Merge pull request #33 from takutakahashi/add_aws_backend
Browse files Browse the repository at this point in the history
add bucketName
  • Loading branch information
takutakahashi committed May 18, 2020
2 parents 9839389 + 77f2cfd commit dd19a5a
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 dd19a5a

Please sign in to comment.