From 030e0a01cdb2438aab6585be120fa362f984dec3 Mon Sep 17 00:00:00 2001 From: Maor Friedman Date: Tue, 9 Jul 2024 14:35:31 +0300 Subject: [PATCH] terraform resources module --- graphql-schemas/schema.yml | 20 +++++++++++++ schemas/aws/terraform-resource-2.yml | 43 ++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) diff --git a/graphql-schemas/schema.yml b/graphql-schemas/schema.yml index 31eb5204..2a3406a1 100644 --- a/graphql-schemas/schema.yml +++ b/graphql-schemas/schema.yml @@ -1938,6 +1938,7 @@ confs: rosa-authenticator: NamespaceTerraformResourceRosaAuthenticator_V1 rosa-authenticator-vpce: NamespaceTerraformResourceRosaAuthenticatorVPCE_V1 msk: NamespaceTerraformResourceMsk_v1 + module: NamespaceTerraformResourceModule_v1 fields: - { name: provider, type: string, isRequired: true } - { name: identifier, type: string, isRequired: true } @@ -2488,6 +2489,25 @@ confs: - { name: query, type: string } - { name: status_code, type: string } +- name: NamespaceTerraformResourceModule_v1 + interface: NamespaceTerraformResourceAWS_v1 + fields: + - { name: provider, type: string, isRequired: true, isContextUnique: true } + - { name: region, type: string, isContextUnique: true } + - { name: identifier, type: string, isRequired: true, isContextUnique: true } + - { name: defaults, type: string, isRequired: true, isResource: true } + - { name: overrides, type: json } + - { name: output_resource_name, type: string } + - { name: output_format, type: NamespaceTerraformResourceOutputFormat_v1, isInterface: true } + - { name: annotations, type: json } + - { name: module, type: NamespaceTerraformResourceModuleSpec_v1, isRequired: true } + +- name: NamespaceTerraformResourceModuleSpec_v1 + fields: + - { name: url, type: string, isRequired: true } + - { name: path, type: string, isRequired: true } + - { name: ref, type: string, isRequired: true } + - name: ResourceValues_v1 fields: - { name: cpu, type: string } diff --git a/schemas/aws/terraform-resource-2.yml b/schemas/aws/terraform-resource-2.yml index 5afecc25..3487cf18 100644 --- a/schemas/aws/terraform-resource-2.yml +++ b/schemas/aws/terraform-resource-2.yml @@ -247,6 +247,16 @@ properties: delete: type: boolean description: Flag to delete the resource + module: + type: object + additionalProperties: false + properties: + url: + type: string + path: + type: string + ref: + type: string oneOf: @@ -1576,5 +1586,38 @@ oneOf: required: - identifier - defaults +- additionalProperties: false + properties: + provider: + type: string + enum: + - module + region: + "$ref": "/aws/regions-1.yml#/properties/region" + identifier: + "$ref": "/common-1.json#/definitions/longIdentifier" + output_resource_name: + "$ref": "/common-1.json#/definitions/longIdentifier" + output_format: + "$ref": "/openshift/terraform-output-format-1.yml" + defaults: + "$ref": "/common-1.json#/definitions/resourceref" + overrides: + type: object + annotations: + "$ref": "/common-1.json#/definitions/annotations" + module: + type: object + additionalProperties: false + properties: + url: + type: string + path: + type: string + ref: + type: string + required: + - identifier + - module required: - provider