Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(entities): support terraform in config card [khcp-12445] #1549

Merged
merged 34 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
596540a
feat(entities): support terraform in config card [12445]
kaiarrowood Aug 9, 2024
542b884
fix(*): component test
kaiarrowood Aug 9, 2024
1d55828
fix(*): config key
kaiarrowood Aug 9, 2024
d7ed4cd
fix(*): handle undefined
kaiarrowood Aug 9, 2024
83a4956
fix(*): plugin form
kaiarrowood Aug 9, 2024
9d0f0fc
fix(*): sandbox
kaiarrowood Aug 9, 2024
5a11616
test(*): fix new required param
kaiarrowood Aug 9, 2024
2a49dff
feat(*): entity form updates
kaiarrowood Aug 9, 2024
aa5eca8
feat(*): consumers
kaiarrowood Aug 9, 2024
4813bfb
feat(*): consumer-groups
kaiarrowood Aug 9, 2024
c91f4cf
feat(*): gateway-services
kaiarrowood Aug 9, 2024
840e6be
feat(*): certs and ca certs
kaiarrowood Aug 9, 2024
44852a2
feat(*): snis
kaiarrowood Aug 9, 2024
53ba08b
feat(*): upstreams and targets
kaiarrowood Aug 9, 2024
42952cc
feat(*): keys and key sets
kaiarrowood Aug 9, 2024
8fda2cd
feat(*): routes
kaiarrowood Aug 9, 2024
317479d
feat(*): routes
kaiarrowood Aug 9, 2024
42f1775
feat(*): vaults
kaiarrowood Aug 9, 2024
f65beca
test(terraform): component test
kaiarrowood Aug 9, 2024
052df97
fix(*): stylelint
kaiarrowood Aug 9, 2024
2cba4b1
chore(*): bump dist size
kaiarrowood Aug 9, 2024
cb9cdb6
fix(*): ff guard plugins and gateway services
kaiarrowood Aug 12, 2024
3eb93f9
fix(*): keys and keysets
kaiarrowood Aug 12, 2024
e12471c
fix(*): routes and snis
kaiarrowood Aug 12, 2024
9bbb702
fix(*): secrets and vaults
kaiarrowood Aug 12, 2024
e4dc59f
fix(*): upstreams
kaiarrowood Aug 12, 2024
5d679d1
fix(*): certificates and consumers
kaiarrowood Aug 12, 2024
5cece73
fix(*): test
kaiarrowood Aug 12, 2024
d1c03c0
fix(*): translation
kaiarrowood Aug 12, 2024
1f685b7
fix(*): pr feedback
kaiarrowood Aug 13, 2024
7b5a956
fix(*): PR feedback
kaiarrowood Aug 14, 2024
eb73caa
fix(*): terraform newlines
kaiarrowood Aug 14, 2024
3f53b42
fix(*): docs
kaiarrowood Aug 14, 2024
d06ec14
fix(*): lint
kaiarrowood Aug 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,14 @@ Set this value to display the documentation button.

Set this value to `true` to hide the card title.

#### `enableTerraform`

- type: `Boolean`
- required: `false`
- default: `false`

Enable display of Terraform code. Guarded by FF: `khcp-12445-terraform-config-details`.

### Events

#### fetch:error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,14 @@ The base konnect or kongManger config.

If showing the `Edit` type form, the ID of the CA Certificate.

#### `enableTerraform`

- type: `Boolean`
- required: `false`
- default: `false`

Enable display of Terraform code. Guarded by FF: `khcp-12445-terraform-config-details`.

### Events

#### error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,14 @@ Set this value to display the documentation button.

Set this value to `true` to hide the card title.

#### `enableTerraform`

- type: `Boolean`
- required: `false`
- default: `false`

Enable display of Terraform code. Guarded by FF: `khcp-12445-terraform-config-details`.

### Events

#### fetch:error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,14 @@ If showing the `Edit` type form, the ID of the Certificate.

Whether to show the SNIs field in the form.

#### `enableTerraform`

- type: `Boolean`
- required: `false`
- default: `false`

Enable display of Terraform code. Guarded by FF: `khcp-12445-terraform-config-details`.

### Events

#### error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
:config="config"
:config-card-doc="configCardDoc"
:config-schema="configSchema"
:enable-terraform="enableTerraform"
:entity-type="SupportedEntityType.CaCertificate"
:fetch-url="fetchUrl"
:hide-title="hideTitle"
@fetch:error="(err: any) => $emit('fetch:error', err)"
Expand Down Expand Up @@ -68,7 +70,15 @@ import type { PropType } from 'vue'
import { computed, ref } from 'vue'
import type { AxiosError } from 'axios'
import type { KongManagerCertificateEntityConfig, KonnectCertificateEntityConfig, CACertificateConfigurationSchema, EntityRow } from '../types'
import { EntityBaseConfigCard, ConfigurationSchemaType, ConfigurationSchemaSection, useStringHelpers, useHelpers, ConfigCardItem } from '@kong-ui-public/entities-shared'
import {
EntityBaseConfigCard,
ConfigurationSchemaType,
ConfigurationSchemaSection,
useStringHelpers,
useHelpers,
ConfigCardItem ,
SupportedEntityType,
} from '@kong-ui-public/entities-shared'
import endpoints from '../ca-certificates-endpoints'
import composables from '../composables'
import '@kong-ui-public/entities-shared/dist/style.css'
Expand Down Expand Up @@ -110,6 +120,14 @@ const props = defineProps({
type: Boolean,
default: false,
},
/**
* Enable display of Terraform code
* Guarded by FF: khcp-12445-terraform-config-details
*/
enableTerraform: {
kaiarrowood marked this conversation as resolved.
Show resolved Hide resolved
type: Boolean,
default: false,
},
})

const { i18n: { t, formatUnixTimeStamp } } = composables.useI18n()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
:can-submit="canSubmit"
:config="config"
:edit-id="certificateId"
:enable-terraform="enableTerraform"
:entity-type="SupportedEntityType.CaCertificate"
:error-message="form.errorMessage"
:fetch-url="fetchUrl"
:form-fields="requestBody"
Expand Down Expand Up @@ -72,7 +74,14 @@ import type {
} from '../types'
import endpoints from '../ca-certificates-endpoints'
import composables from '../composables'
import { useAxios, useErrors, EntityFormSection, EntityBaseForm, EntityBaseFormType } from '@kong-ui-public/entities-shared'
import {
useAxios,
useErrors,
EntityFormSection,
EntityBaseForm,
EntityBaseFormType,
SupportedEntityType,
} from '@kong-ui-public/entities-shared'
import '@kong-ui-public/entities-shared/dist/style.css'

const emit = defineEmits<{
Expand Down Expand Up @@ -101,6 +110,14 @@ const props = defineProps({
required: false,
default: '',
},
/**
* Enable display of Terraform code
* Guarded by FF: khcp-12445-terraform-config-details
*/
enableTerraform: {
type: Boolean,
default: false,
},
})

const router = useRouter()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
:config="config"
:config-card-doc="configCardDoc"
:config-schema="(configSchema as any)"
:enable-terraform="enableTerraform"
:entity-type="SupportedEntityType.Certificate"
:fetch-url="fetchUrl"
:hide-title="hideTitle"
@fetch:error="(err: any) => $emit('fetch:error', err)"
Expand Down Expand Up @@ -138,7 +140,15 @@ import type { PropType } from 'vue'
import { computed, ref } from 'vue'
import type { AxiosError } from 'axios'
import type { KongManagerCertificateEntityConfig, KonnectCertificateEntityConfig, CertificateConfigurationSchema, EntityRow } from '../types'
import { EntityBaseConfigCard, ConfigurationSchemaSection, ConfigurationSchemaType, ConfigCardItem, useStringHelpers, useHelpers } from '@kong-ui-public/entities-shared'
import {
EntityBaseConfigCard,
ConfigurationSchemaSection,
ConfigurationSchemaType,
ConfigCardItem,
SupportedEntityType,
useStringHelpers,
useHelpers,
} from '@kong-ui-public/entities-shared'
import endpoints from '../certificates-endpoints'
import composables from '../composables'
import '@kong-ui-public/entities-shared/dist/style.css'
Expand Down Expand Up @@ -178,6 +188,14 @@ const props = defineProps({
type: Boolean,
default: false,
},
/**
* Enable display of Terraform code
* Guarded by FF: khcp-12445-terraform-config-details
*/
enableTerraform: {
type: Boolean,
default: false,
},
})

const { i18n: { t, formatUnixTimeStamp }, i18nT } = composables.useI18n()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
:can-submit="canSubmit"
:config="config"
:edit-id="certificateId"
:enable-terraform="enableTerraform"
:entity-type="SupportedEntityType.Certificate"
:error-message="form.errorMessage"
:fetch-url="fetchUrl"
:form-fields="requestBody"
Expand Down Expand Up @@ -144,7 +146,14 @@ import type {
import endpoints from '../certificates-endpoints'
import composables from '../composables'
import CertificateFormSniField from './CertificateFormSniField.vue'
import { useAxios, useErrors, EntityFormSection, EntityBaseForm, EntityBaseFormType } from '@kong-ui-public/entities-shared'
import {
useAxios,
useErrors,
EntityFormSection,
EntityBaseForm,
EntityBaseFormType,
SupportedEntityType,
} from '@kong-ui-public/entities-shared'
import '@kong-ui-public/entities-shared/dist/style.css'

const emit = defineEmits<{
Expand Down Expand Up @@ -179,6 +188,14 @@ const props = defineProps({
required: false,
default: false,
},
/**
* Enable display of Terraform code
* Guarded by FF: khcp-12445-terraform-config-details
*/
enableTerraform: {
type: Boolean,
default: false,
},
})

const router = useRouter()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,14 @@ Set this value to display the documentation button.

Set this value to `true` to hide the card title.

#### `enableTerraform`

- type: `Boolean`
- required: `false`
- default: `false`

Enable display of Terraform code. Guarded by FF: `khcp-12445-terraform-config-details`.

### Events

#### fetch:error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ A form component to create/edit Consumer Group.

- [Requirements](#requirements)
- [Usage](#usage)
- [Install](#install)
- [Props](#props)
- [Events](#events)
- [Usage example](#usage-example)
- [Install](#install)
- [Props](#props)
- [Events](#events)
- [Usage example](#usage-example)
- [TypeScript interfaces](#typescript-interfaces)

## Requirements
Expand All @@ -26,49 +26,59 @@ A form component to create/edit Consumer Group.
### Props

#### `config`

- type: `Object as PropType<KonnectConsumerGroupFormConfig | KongManagerConsumerGroupFormConfig>`
- required: `true`
- default: `undefined`
- properties:
- `app`:
- type: `'konnect' | 'kongManager'`
- required: `true`
- default: `undefined`
- App name.
- `apiBaseUrl`:
- type: `string`
- required: `true`
- default: `undefined`
- Base URL for API requests.
- `axiosRequestConfig`:
- type: `AxiosRequestConfig`
- required: `false`
- default: `undefined`
- An optional configuration object for the underlying Axios request.
- `cancelRoute`:
- type: `RouteLocationRaw`
- required: `true`
- default: `undefined`
- Route to return to when canceling creation of a Consumer.

- `workspace`:
- type: `string`
- required: `true`
- default: `undefined`
- *Specific to Kong Manager*. Name of the current workspace.

- `controlPlaneId`:
- type: `string`
- required: `true`
- default: `undefined`
- *Specific to Konnect*. Name of the current control plane.
- `app`:
- type: `'konnect' | 'kongManager'`
- required: `true`
- default: `undefined`
- App name.
- `apiBaseUrl`:
- type: `string`
- required: `true`
- default: `undefined`
- Base URL for API requests.
- `axiosRequestConfig`:
- type: `AxiosRequestConfig`
- required: `false`
- default: `undefined`
- An optional configuration object for the underlying Axios request.
- `cancelRoute`:
- type: `RouteLocationRaw`
- required: `true`
- default: `undefined`
- Route to return to when canceling creation of a Consumer.

- `workspace`:
- type: `string`
- required: `true`
- default: `undefined`
- *Specific to Kong Manager*. Name of the current workspace.

- `controlPlaneId`:
- type: `string`
- required: `true`
- default: `undefined`
- *Specific to Konnect*. Name of the current control plane.

#### `consumerGroupId`

- type: `string`
- required: `false`
- default: `''`
- If a valid consumerGroupId is provided, it will put the form in Edit mode instead of Create.

#### `enableTerraform`

- type: `Boolean`
- required: `false`
- default: `false`

Enable display of Terraform code. Guarded by FF: `khcp-12445-terraform-config-details`.

### Events

#### update
Expand Down Expand Up @@ -103,4 +113,4 @@ import type {
ConsumerGroupActions,
ConsumerGroupData,
} from '@kong-ui-public/entities-consumer-groups'
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
:config-card-doc="configCardDoc"
:config-schema="configSchema"
data-key="consumer_group"
:enable-terraform="enableTerraform"
:entity-type="SupportedEntityType.ConsumerGroup"
:fetch-url="fetchUrl"
:hide-title="hideTitle"
@fetch:error="(err: any) => $emit('fetch:error', err)"
Expand All @@ -19,7 +21,7 @@ import type { PropType } from 'vue'
import { computed, ref } from 'vue'
import type { AxiosError } from 'axios'
import type { KongManagerConsumerGroupEntityConfig, KonnectConsumerGroupEntityConfig, ConsumerGroupConfigurationSchema } from '../types'
import { EntityBaseConfigCard } from '@kong-ui-public/entities-shared'
import { EntityBaseConfigCard, SupportedEntityType } from '@kong-ui-public/entities-shared'
import endpoints from '../consumer-groups-endpoints'
import composables from '../composables'
import '@kong-ui-public/entities-shared/dist/style.css'
Expand Down Expand Up @@ -59,6 +61,14 @@ const props = defineProps({
type: Boolean,
default: false,
},
/**
* Enable display of Terraform code
* Guarded by FF: khcp-12445-terraform-config-details
*/
enableTerraform: {
type: Boolean,
default: false,
},
})

const { i18n: { t } } = composables.useI18n()
Expand Down
Loading
Loading