add condition for broadcast server
This commit is contained in:
parent
02c3562030
commit
227930cb33
2 changed files with 18 additions and 11 deletions
|
|
@ -14,16 +14,31 @@ tf-validate:
|
||||||
- terraform init
|
- terraform init
|
||||||
- terraform validate
|
- terraform validate
|
||||||
|
|
||||||
tf-plan:
|
tf-plan-private:
|
||||||
stage: tf-plan
|
stage: tf-plan
|
||||||
script:
|
script:
|
||||||
- terraform init
|
- terraform init
|
||||||
- terraform plan -out plan.tfplan
|
- terraform plan -out plan.tfplan
|
||||||
|
environment:
|
||||||
|
name: Just Jammin
|
||||||
|
url: https://ejam.vereto.net
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- plan.tfplan
|
- plan.tfplan
|
||||||
|
|
||||||
tf-apply-private:
|
tf-plan-public:
|
||||||
|
stage: tf-plan
|
||||||
|
script:
|
||||||
|
- terraform init
|
||||||
|
- terraform plan -out plan.tfplan -var="broadcast_enabled=true"
|
||||||
|
environment:
|
||||||
|
name: Public Jammin
|
||||||
|
url: https://ejam.vereto.net
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- plan.tfplan
|
||||||
|
|
||||||
|
tf-apply:
|
||||||
stage: tf-apply
|
stage: tf-apply
|
||||||
image:
|
image:
|
||||||
name: hashicorp/terraform
|
name: hashicorp/terraform
|
||||||
|
|
@ -35,9 +50,6 @@ tf-apply-private:
|
||||||
script:
|
script:
|
||||||
- terraform init
|
- terraform init
|
||||||
- terraform apply plan.tfplan
|
- terraform apply plan.tfplan
|
||||||
environment:
|
|
||||||
name: Just Jammin
|
|
||||||
url: https://ejam.vereto.net
|
|
||||||
dependencies:
|
dependencies:
|
||||||
- tf-plan
|
- tf-plan
|
||||||
when: manual
|
when: manual
|
||||||
|
|
@ -55,10 +67,7 @@ tf-apply-public:
|
||||||
- chmod 600 jamulus.pem
|
- chmod 600 jamulus.pem
|
||||||
script:
|
script:
|
||||||
- terraform init
|
- terraform init
|
||||||
- terraform apply plan.tfplan -var="broadcast_enabled=true"
|
- terraform apply plan.tfplan
|
||||||
environment:
|
|
||||||
name: Public Jammin
|
|
||||||
url: https://ejam.vereto.net
|
|
||||||
dependencies:
|
dependencies:
|
||||||
- tf-plan
|
- tf-plan
|
||||||
when: manual
|
when: manual
|
||||||
|
|
|
||||||
2
main.tf
2
main.tf
|
|
@ -61,7 +61,6 @@ resource "aws_security_group_rule" "ssh" {
|
||||||
security_group_id = aws_security_group.ssh.id
|
security_group_id = aws_security_group.ssh.id
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
resource "aws_security_group" "jamulus" {
|
resource "aws_security_group" "jamulus" {
|
||||||
name = "jamulus-port-access"
|
name = "jamulus-port-access"
|
||||||
description = "Allow jamulus inbound traffic"
|
description = "Allow jamulus inbound traffic"
|
||||||
|
|
@ -90,7 +89,6 @@ resource "aws_security_group_rule" "node-exporter" {
|
||||||
security_group_id = aws_security_group.node-exporter.id
|
security_group_id = aws_security_group.node-exporter.id
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
output "jamulus_ip" {
|
output "jamulus_ip" {
|
||||||
value = "${aws_instance.jamulus.public_ip}"
|
value = "${aws_instance.jamulus.public_ip}"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue