From 421649ee3ec033f156af5829dbf01cc76f5a11c3 Mon Sep 17 00:00:00 2001 From: Alex Ives Date: Fri, 18 Sep 2020 17:36:50 -0500 Subject: [PATCH] Enable terraform state replication Fixes https://gitlab.com/gitlab-org/gitlab/-/issues/249176 Fixes https://gitlab.com/gitlab-org/gitlab/-/issues/254622 --- doc/administration/geo/replication/datatypes.md | 4 +++- doc/api/graphql/reference/gitlab_schema.graphql | 3 +-- doc/api/graphql/reference/gitlab_schema.json | 2 +- ee/app/graphql/types/geo/geo_node_type.rb | 3 +-- ee/app/replicators/geo/terraform_state_version_replicator.rb | 5 ----- .../alexives-249176-enable_terraform_state_replication.yml | 5 +++++ .../development/geo_terraform_state_version_replication.yml | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) create mode 100644 ee/changelogs/unreleased/alexives-249176-enable_terraform_state_replication.yml diff --git a/doc/administration/geo/replication/datatypes.md b/doc/administration/geo/replication/datatypes.md index 166a724f9c1a1d..99eda3dcead140 100644 --- a/doc/administration/geo/replication/datatypes.md +++ b/doc/administration/geo/replication/datatypes.md @@ -47,6 +47,8 @@ verification methods: | Blobs | Container registry _(object storage)_ | Geo with API/Managed/Docker API (*2*) | _Not implemented_ | | Blobs | Package registry _(filesystem)_ | Geo with API | _Not implemented_ | | Blobs | Package registry _(object storage)_ | Geo with API/Managed (*2*) | _Not implemented_ | +| Blobs | Versioned Terraform State _(filesystem)_ | Geo with API | _Not implemented_ | +| Blobs | Versioned Terraform State _(object storage)_ | Geo with API/Managed (*2*) | _Not implemented_ | - (*1*): Redis replication can be used as part of HA with Redis sentinel. It's not used between Geo nodes. - (*2*): Object storage replication can be performed by Geo or by your object storage provider/appliance @@ -185,7 +187,7 @@ successfully, you must replicate their data using some other means. | [PyPi Repository](../../../user/packages/pypi_repository/index.md) | **Yes** (13.2) | No | Behind feature flag `geo_package_file_replication`, enabled by default | | [Composer Repository](../../../user/packages/composer_repository/index.md) | **Yes** (13.2) | No | Behind feature flag `geo_package_file_replication`, enabled by default | | [External merge request diffs](../../merge_request_diffs.md) | [No](https://gitlab.com/gitlab-org/gitlab/-/issues/33817) | No | | -| [Terraform State](../../terraform_state.md) | [No](https://gitlab.com/groups/gitlab-org/-/epics/3112)(*3*) | No | | +| [Versioned Terraform State](../../terraform_state.md) | **Yes** (13.5) | No | | | [Vulnerability Export](../../../user/application_security/security_dashboard/#export-vulnerabilities) | [No](https://gitlab.com/groups/gitlab-org/-/epics/3111)(*3*) | No | | | Content in object storage | **Yes** (12.4) | No | | diff --git a/doc/api/graphql/reference/gitlab_schema.graphql b/doc/api/graphql/reference/gitlab_schema.graphql index b86dee861bec3d..ff9bf42975df2c 100644 --- a/doc/api/graphql/reference/gitlab_schema.graphql +++ b/doc/api/graphql/reference/gitlab_schema.graphql @@ -7001,8 +7001,7 @@ type GeoNode { ): TerraformStateRegistryConnection """ - Find terraform state version registries on this Geo node. Available only when - feature flag `geo_terraform_state_version_replication` is enabled + Find terraform state version registries on this Geo node """ terraformStateVersionRegistries( """ diff --git a/doc/api/graphql/reference/gitlab_schema.json b/doc/api/graphql/reference/gitlab_schema.json index 16532060e97f47..35bbb04a04b4eb 100644 --- a/doc/api/graphql/reference/gitlab_schema.json +++ b/doc/api/graphql/reference/gitlab_schema.json @@ -19422,7 +19422,7 @@ }, { "name": "terraformStateVersionRegistries", - "description": "Find terraform state version registries on this Geo node. Available only when feature flag `geo_terraform_state_version_replication` is enabled", + "description": "Find terraform state version registries on this Geo node", "args": [ { "name": "ids", diff --git a/ee/app/graphql/types/geo/geo_node_type.rb b/ee/app/graphql/types/geo/geo_node_type.rb index ccc802241bbc1f..6334fc0a05d710 100644 --- a/ee/app/graphql/types/geo/geo_node_type.rb +++ b/ee/app/graphql/types/geo/geo_node_type.rb @@ -34,8 +34,7 @@ class GeoNodeType < BaseObject field :terraform_state_version_registries, ::Types::Geo::TerraformStateVersionRegistryType.connection_type, null: true, resolver: ::Resolvers::Geo::TerraformStateVersionRegistriesResolver, - description: 'Find terraform state version registries on this Geo node', - feature_flag: :geo_terraform_state_version_replication + description: 'Find terraform state version registries on this Geo node' end end end diff --git a/ee/app/replicators/geo/terraform_state_version_replicator.rb b/ee/app/replicators/geo/terraform_state_version_replicator.rb index 2d4b01fd0327b5..30f3daaf17021f 100644 --- a/ee/app/replicators/geo/terraform_state_version_replicator.rb +++ b/ee/app/replicators/geo/terraform_state_version_replicator.rb @@ -11,10 +11,5 @@ def carrierwave_uploader def self.model ::Terraform::StateVersion end - - # Remove with https://gitlab.com/gitlab-org/gitlab/-/issues/249176 - def self.replication_enabled_by_default? - false - end end end diff --git a/ee/changelogs/unreleased/alexives-249176-enable_terraform_state_replication.yml b/ee/changelogs/unreleased/alexives-249176-enable_terraform_state_replication.yml new file mode 100644 index 00000000000000..0b6f4be9e9cd02 --- /dev/null +++ b/ee/changelogs/unreleased/alexives-249176-enable_terraform_state_replication.yml @@ -0,0 +1,5 @@ +--- +title: Enable geo replication of versioned terraform state +merge_request: 43367 +author: +type: added diff --git a/ee/config/feature_flags/development/geo_terraform_state_version_replication.yml b/ee/config/feature_flags/development/geo_terraform_state_version_replication.yml index fcedeb73cac842..a243ccdb40e668 100644 --- a/ee/config/feature_flags/development/geo_terraform_state_version_replication.yml +++ b/ee/config/feature_flags/development/geo_terraform_state_version_replication.yml @@ -4,4 +4,4 @@ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/42529 rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/254622 group: group::geo type: development -default_enabled: false +default_enabled: true -- GitLab