usegalaxy-eu / infrastructure

All of Galaxyproject EU's cloud infrastructure.
8 stars 25 forks source link

Make terraform work again #190

Closed mira-miracoli closed 7 months ago

mira-miracoli commented 7 months ago

We need to add most_recent = true to avoid terraform breaking when there is more than one image version. test.internal subdomain caused the following error with AWS:

RRSet of type CNAME with DNS name \052.interactivetoolentrypoint.interactivetool.test.internal.usegalaxy.eu. is not permitted as it conflicts with other records with the same DNS name in zone usegalaxy.eu

Afaik we are not using this subdomain, so we can simply remove it

usegalaxy-eu-bot commented 7 months ago


Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create
  ~ update in-place
  - destroy
-/+ destroy and then create replacement

Terraform will perform the following actions:

  # aws_route53_record.beacon-import-galaxyproject will be updated in-place
  ~ resource "aws_route53_record" "beacon-import-galaxyproject" {
        id              = "Z386N8B8JBC6TQ_beacon-import.galaxyproject.eu_A"
        name            = "beacon-import.galaxyproject.eu"
      ~ records         = [
          - "10.5.68.53",
        ] -> (known after apply)
        # (5 unchanged attributes hidden)
    }

  # aws_route53_record.galaxyproject_eu_dmarc_txt will be created
  + resource "aws_route53_record" "galaxyproject_eu_dmarc_txt" {
      + allow_overwrite = (known after apply)
      + fqdn            = (known after apply)
      + id              = (known after apply)
      + name            = "_dmarc.galaxyproject.eu"
      + records         = [
          + "v=DMARC1;p=reject;pct=100;ruf=mailto:galaxy-ops@informatik.uni-freiburg.de;aspf=r",
        ]
      + ttl             = 300
      + type            = "TXT"
      + zone_id         = "Z386N8B8JBC6TQ"
    }

  # aws_route53_record.galaxyproject_eu_spf_txt will be created
  + resource "aws_route53_record" "galaxyproject_eu_spf_txt" {
      + allow_overwrite = (known after apply)
      + fqdn            = (known after apply)
      + id              = (known after apply)
      + records         = [
          + "v=spf1 -all",
        ]
      + ttl             = 300
      + type            = "TXT"
      + zone_id         = "Z386N8B8JBC6TQ"
    }

  # aws_route53_record.it-subdomain-main[14] will be created
  + resource "aws_route53_record" "it-subdomain-main" {
      + allow_overwrite = true
      + fqdn            = (known after apply)
      + id              = (known after apply)
      + name            = "*.interactivetoolentrypoint.interactivetool.live.usegalaxy.eu"
      + records         = [
          + "usegalaxy.eu",
        ]
      + ttl             = 7200
      + type            = "CNAME"
      + zone_id         = "Z1C7L7XFF9613J"
    }

  # aws_route53_record.it-subdomain-main[15] must be replaced
-/+ resource "aws_route53_record" "it-subdomain-main" {
      ~ fqdn            = "*.interactivetoolentrypoint.interactivetool.live.usegalaxy.eu" -> (known after apply)
      ~ id              = "Z1C7L7XFF9613J_*.interactivetoolentrypoint.interactivetool.live.usegalaxy.eu_CNAME" -> (known after apply)
      ~ name            = "*.interactivetoolentrypoint.interactivetool.live.usegalaxy.eu" -> "*.interactivetoolentrypoint.interactivetool.metabolomics.usegalaxy.eu" # forces replacement
        # (5 unchanged attributes hidden)
    }

  # aws_route53_record.it-subdomain-main[16] must be replaced
-/+ resource "aws_route53_record" "it-subdomain-main" {
      ~ fqdn            = "*.interactivetoolentrypoint.interactivetool.metabolomics.usegalaxy.eu" -> (known after apply)
      ~ id              = "Z1C7L7XFF9613J_*.interactivetoolentrypoint.interactivetool.metabolomics.usegalaxy.eu_CNAME" -> (known after apply)
      ~ name            = "*.interactivetoolentrypoint.interactivetool.metabolomics.usegalaxy.eu" -> "*.interactivetoolentrypoint.interactivetool.metagenomics.usegalaxy.eu" # forces replacement
        # (5 unchanged attributes hidden)
    }

  # aws_route53_record.it-subdomain-main[17] must be replaced
-/+ resource "aws_route53_record" "it-subdomain-main" {
      ~ fqdn            = "*.interactivetoolentrypoint.interactivetool.metagenomics.usegalaxy.eu" -> (known after apply)
      ~ id              = "Z1C7L7XFF9613J_*.interactivetoolentrypoint.interactivetool.metagenomics.usegalaxy.eu_CNAME" -> (known after apply)
      ~ name            = "*.interactivetoolentrypoint.interactivetool.metagenomics.usegalaxy.eu" -> "*.interactivetoolentrypoint.interactivetool.nanopore.usegalaxy.eu" # forces replacement
        # (5 unchanged attributes hidden)
    }

  # aws_route53_record.it-subdomain-main[18] must be replaced
-/+ resource "aws_route53_record" "it-subdomain-main" {
      ~ fqdn            = "*.interactivetoolentrypoint.interactivetool.nanopore.usegalaxy.eu" -> (known after apply)
      ~ id              = "Z1C7L7XFF9613J_*.interactivetoolentrypoint.interactivetool.nanopore.usegalaxy.eu_CNAME" -> (known after apply)
      ~ name            = "*.interactivetoolentrypoint.interactivetool.nanopore.usegalaxy.eu" -> "*.interactivetoolentrypoint.interactivetool.proteomics.usegalaxy.eu" # forces replacement
        # (5 unchanged attributes hidden)
    }

  # aws_route53_record.it-subdomain-main[19] must be replaced
-/+ resource "aws_route53_record" "it-subdomain-main" {
      ~ fqdn            = "*.interactivetoolentrypoint.interactivetool.proteomics.usegalaxy.eu" -> (known after apply)
      ~ id              = "Z1C7L7XFF9613J_*.interactivetoolentrypoint.interactivetool.proteomics.usegalaxy.eu_CNAME" -> (known after apply)
      ~ name            = "*.interactivetoolentrypoint.interactivetool.proteomics.usegalaxy.eu" -> "*.interactivetoolentrypoint.interactivetool.rna.usegalaxy.eu" # forces replacement
        # (5 unchanged attributes hidden)
    }

  # aws_route53_record.it-subdomain-main[20] must be replaced
-/+ resource "aws_route53_record" "it-subdomain-main" {
      ~ fqdn            = "*.interactivetoolentrypoint.interactivetool.rna.usegalaxy.eu" -> (known after apply)
      ~ id              = "Z1C7L7XFF9613J_*.interactivetoolentrypoint.interactivetool.rna.usegalaxy.eu_CNAME" -> (known after apply)
      ~ name            = "*.interactivetoolentrypoint.interactivetool.rna.usegalaxy.eu" -> "*.interactivetoolentrypoint.interactivetool.singlecell.usegalaxy.eu" # forces replacement
        # (5 unchanged attributes hidden)
    }

  # aws_route53_record.it-subdomain-main[21] must be replaced
-/+ resource "aws_route53_record" "it-subdomain-main" {
      ~ fqdn            = "*.interactivetoolentrypoint.interactivetool.singlecell.usegalaxy.eu" -> (known after apply)
      ~ id              = "Z1C7L7XFF9613J_*.interactivetoolentrypoint.interactivetool.singlecell.usegalaxy.eu_CNAME" -> (known after apply)
      ~ name            = "*.interactivetoolentrypoint.interactivetool.singlecell.usegalaxy.eu" -> "*.interactivetoolentrypoint.interactivetool.stats.usegalaxy.eu" # forces replacement
        # (5 unchanged attributes hidden)
    }

  # aws_route53_record.it-subdomain-main[22] must be replaced
-/+ resource "aws_route53_record" "it-subdomain-main" {
      ~ fqdn            = "*.interactivetoolentrypoint.interactivetool.stats.usegalaxy.eu" -> (known after apply)
      ~ id              = "Z1C7L7XFF9613J_*.interactivetoolentrypoint.interactivetool.stats.usegalaxy.eu_CNAME" -> (known after apply)
      ~ name            = "*.interactivetoolentrypoint.interactivetool.stats.usegalaxy.eu" -> "*.interactivetoolentrypoint.interactivetool.streetscience.usegalaxy.eu" # forces replacement
        # (5 unchanged attributes hidden)
    }

  # aws_route53_record.it-subdomain-main[23] must be replaced
-/+ resource "aws_route53_record" "it-subdomain-main" {
      ~ fqdn            = "*.interactivetoolentrypoint.interactivetool.streetscience.usegalaxy.eu" -> (known after apply)
      ~ id              = "Z1C7L7XFF9613J_*.interactivetoolentrypoint.interactivetool.streetscience.usegalaxy.eu_CNAME" -> (known after apply)
      ~ name            = "*.interactivetoolentrypoint.interactivetool.streetscience.usegalaxy.eu" -> "*.interactivetoolentrypoint.interactivetool.test.usegalaxy.eu" # forces replacement
        # (5 unchanged attributes hidden)
    }

  # aws_route53_record.it-subdomain-main[24] must be replaced
-/+ resource "aws_route53_record" "it-subdomain-main" {
      ~ fqdn            = "*.interactivetoolentrypoint.interactivetool.test.usegalaxy.eu" -> (known after apply)
      ~ id              = "Z1C7L7XFF9613J_*.interactivetoolentrypoint.interactivetool.test.usegalaxy.eu_CNAME" -> (known after apply)
      ~ name            = "*.interactivetoolentrypoint.interactivetool.test.usegalaxy.eu" -> "*.interactivetoolentrypoint.interactivetool.earth-system.usegalaxy.eu" # forces replacement
        # (5 unchanged attributes hidden)
    }

  # aws_route53_record.it-subdomain-main[25] will be destroyed
  # (because index [25] is out of range for count)
  - resource "aws_route53_record" "it-subdomain-main" {
      - allow_overwrite = true -> null
      - fqdn            = "*.interactivetoolentrypoint.interactivetool.earth-system.usegalaxy.eu" -> null
      - id              = "Z1C7L7XFF9613J_*.interactivetoolentrypoint.interactivetool.earth-system.usegalaxy.eu_CNAME" -> null
      - name            = "*.interactivetoolentrypoint.interactivetool.earth-system.usegalaxy.eu" -> null
      - records         = [
          - "usegalaxy.eu",
        ] -> null
      - ttl             = 7200 -> null
      - type            = "CNAME" -> null
      - zone_id         = "Z1C7L7XFF9613J" -> null
    }

  # aws_route53_record.usegalaxy_eu_dmarc_txt will be created
  + resource "aws_route53_record" "usegalaxy_eu_dmarc_txt" {
      + allow_overwrite = (known after apply)
      + fqdn            = (known after apply)
      + id              = (known after apply)
      + name            = "_dmarc.usegalaxy.eu"
      + records         = [
          + "v=DMARC1;p=reject;pct=100;ruf=mailto:galaxy-ops@informatik.uni-freiburg.de;aspf=r",
        ]
      + ttl             = 300
      + type            = "TXT"
      + zone_id         = "Z1C7L7XFF9613J"
    }

  # aws_route53_record.usegalaxy_eu_spf_txt will be created
  + resource "aws_route53_record" "usegalaxy_eu_spf_txt" {
      + allow_overwrite = (known after apply)
      + fqdn            = (known after apply)
      + id              = (known after apply)
      + records         = [
          + "v=spf1 include:mailgun.org -all",
        ]
      + ttl             = 300
      + type            = "TXT"
      + zone_id         = "Z1C7L7XFF9613J"
    }

  # openstack_compute_instance_v2.beacon-import will be created
  + resource "openstack_compute_instance_v2" "beacon-import" {
      + access_ip_v4        = (known after apply)
      + access_ip_v6        = (known after apply)
      + all_metadata        = (known after apply)
      + all_tags            = (known after apply)
      + availability_zone   = (known after apply)
      + flavor_id           = (known after apply)
      + flavor_name         = "m1.tiny"
      + force_delete        = false
      + id                  = (known after apply)
      + image_id            = "7a20a99e-823a-4500-84a3-43ed26e0a4a2"
      + image_name          = (known after apply)
      + key_pair            = "cloud2"
      + name                = "beacon-import.galaxyproject.eu"
      + power_state         = "active"
      + region              = (known after apply)
      + security_groups     = [
          + "default",
        ]
      + stop_before_destroy = false
      + user_data           = "f1afc818d33a9c6c68d6c2dd4401f2e9abd7f8fc"

      + network {
          + access_network = false
          + fixed_ip_v4    = (known after apply)
          + fixed_ip_v6    = (known after apply)
          + floating_ip    = (known after apply)
          + mac            = (known after apply)
          + name           = "bioinf"
          + port           = (known after apply)
          + uuid           = (known after apply)
        }
    }

Plan: 16 to add, 1 to change, 11 to destroy.

─────────────────────────────────────────────────────────────────────────────

Saved the plan to: tf.plan

To perform exactly these actions, run the following command to apply:
    terraform apply "tf.plan" ```