From 82dd0656cea8e5cf8daa9573fd19e5b4175b5eeb Mon Sep 17 00:00:00 2001 From: norbjd Date: Mon, 27 Mar 2023 13:24:21 +0200 Subject: [PATCH 1/4] feat: add scaleway provider with scaleway_function_namespace resource support --- README.md | 2 +- enumeration/remote/common/providers.go | 18 +- enumeration/remote/remote.go | 4 + enumeration/remote/scaleway/client/client.go | 65 + .../scaleway/function_namespace_enumerator.go | 46 + enumeration/remote/scaleway/init.go | 47 + enumeration/remote/scaleway/provider.go | 47 + .../repository/function_repository.go | 48 + .../repository/function_repository_test.go | 80 + .../repository/mock_FunctionRepository.go | 54 + enumeration/remote/scaleway/util.go | 11 + enumeration/terraform/providers.go | 9 +- go.mod | 1 + go.sum | 2 + pkg/cmd/driftctl_test.go | 2 +- pkg/cmd/scan_test.go | 4 +- pkg/resource/resource_types.go | 2 + pkg/resource/scaleway/metadata_test.go | 35 + pkg/resource/scaleway/metadatas.go | 9 + .../scaleway/scaleway_function_namespace.go | 12 + .../scaleway_function_namespace_test.go | 34 + .../scaleway_function_namespace/.driftignore | 2 + .../.terraform.lock.hcl | 24 + .../scaleway_function_namespace/terraform.tf | 15 + pkg/resource/schemas/repository.go | 5 + test/scaleway/function.go | 10 + test/scaleway/mock_FakeFunction.go | 63 + test/schemas/scaleway/2.14.1/schema.json | 9118 +++++++++++++++++ 28 files changed, 9753 insertions(+), 16 deletions(-) create mode 100644 enumeration/remote/scaleway/client/client.go create mode 100644 enumeration/remote/scaleway/function_namespace_enumerator.go create mode 100644 enumeration/remote/scaleway/init.go create mode 100644 enumeration/remote/scaleway/provider.go create mode 100644 enumeration/remote/scaleway/repository/function_repository.go create mode 100644 enumeration/remote/scaleway/repository/function_repository_test.go create mode 100644 enumeration/remote/scaleway/repository/mock_FunctionRepository.go create mode 100644 enumeration/remote/scaleway/util.go create mode 100644 pkg/resource/scaleway/metadata_test.go create mode 100644 pkg/resource/scaleway/metadatas.go create mode 100644 pkg/resource/scaleway/scaleway_function_namespace.go create mode 100644 pkg/resource/scaleway/scaleway_function_namespace_test.go create mode 100644 pkg/resource/scaleway/testdata/acc/scaleway_function_namespace/.driftignore create mode 100644 pkg/resource/scaleway/testdata/acc/scaleway_function_namespace/.terraform.lock.hcl create mode 100644 pkg/resource/scaleway/testdata/acc/scaleway_function_namespace/terraform.tf create mode 100644 test/scaleway/function.go create mode 100644 test/scaleway/mock_FakeFunction.go create mode 100755 test/schemas/scaleway/2.14.1/schema.json diff --git a/README.md b/README.md index d4ccd636c..d2b0b0589 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@

Measures infrastructure as code coverage, and tracks infrastructure drift.
- IaC: Terraform. Cloud providers: AWS, GitHub, Azure, GCP.
+ IaC: Terraform. Cloud providers: AWS, GitHub, Azure, GCP, Scaleway (alpha).
:warning: This tool is still in beta state and will evolve in the future with potential breaking changes :warning:

diff --git a/enumeration/remote/common/providers.go b/enumeration/remote/common/providers.go index 8afd7ab11..d4b834290 100644 --- a/enumeration/remote/common/providers.go +++ b/enumeration/remote/common/providers.go @@ -8,17 +8,19 @@ import ( type RemoteParameter string const ( - RemoteAWSTerraform = "aws+tf" - RemoteGithubTerraform = "github+tf" - RemoteGoogleTerraform = "gcp+tf" - RemoteAzureTerraform = "azure+tf" + RemoteAWSTerraform = "aws+tf" + RemoteGithubTerraform = "github+tf" + RemoteGoogleTerraform = "gcp+tf" + RemoteAzureTerraform = "azure+tf" + RemoteScalewayTerraform = "scaleway+tf" ) var remoteParameterMapping = map[RemoteParameter]string{ - RemoteAWSTerraform: tf.AWS, - RemoteGithubTerraform: tf.GITHUB, - RemoteGoogleTerraform: tf.GOOGLE, - RemoteAzureTerraform: tf.AZURE, + RemoteAWSTerraform: tf.AWS, + RemoteGithubTerraform: tf.GITHUB, + RemoteGoogleTerraform: tf.GOOGLE, + RemoteAzureTerraform: tf.AZURE, + RemoteScalewayTerraform: tf.SCALEWAY, } func (p RemoteParameter) GetProviderAddress() *lock.ProviderAddress { diff --git a/enumeration/remote/remote.go b/enumeration/remote/remote.go index f01cb617a..b64880fd5 100644 --- a/enumeration/remote/remote.go +++ b/enumeration/remote/remote.go @@ -9,6 +9,7 @@ import ( "github.com/snyk/driftctl/enumeration/remote/common" "github.com/snyk/driftctl/enumeration/remote/github" "github.com/snyk/driftctl/enumeration/remote/google" + "github.com/snyk/driftctl/enumeration/remote/scaleway" "github.com/snyk/driftctl/enumeration/resource" "github.com/snyk/driftctl/enumeration/terraform" ) @@ -18,6 +19,7 @@ var supportedRemotes = []string{ common.RemoteGithubTerraform, common.RemoteGoogleTerraform, common.RemoteAzureTerraform, + common.RemoteScalewayTerraform, } func IsSupported(remote string) bool { @@ -39,6 +41,8 @@ func Activate(remote, version string, alerter alerter.AlerterInterface, provider return google.Init(version, alerter, providerLibrary, remoteLibrary, progress, factory, configDir) case common.RemoteAzureTerraform: return azurerm.Init(version, alerter, providerLibrary, remoteLibrary, progress, factory, configDir) + case common.RemoteScalewayTerraform: + return scaleway.Init(version, alerter, providerLibrary, remoteLibrary, progress, factory, configDir) default: return errors.Errorf("unsupported remote '%s'", remote) diff --git a/enumeration/remote/scaleway/client/client.go b/enumeration/remote/scaleway/client/client.go new file mode 100644 index 000000000..77681fdd7 --- /dev/null +++ b/enumeration/remote/scaleway/client/client.go @@ -0,0 +1,65 @@ +package client + +import ( + "errors" + "fmt" + + "github.com/scaleway/scaleway-sdk-go/scw" + "github.com/snyk/driftctl/pkg/version" +) + +// Create - Creates a new Scaleway client object +// Heavily inspired by the createClient method in Scaleway CLI: +// https://github.com/scaleway/scaleway-cli/blob/v2.13.0/internal/core/client.go#L15-L83 +func Create() (*scw.Client, error) { + + profile := scw.LoadEnvProfile() + + // Default path is based on the following priority order: + // * $SCW_CONFIG_PATH + // * $XDG_CONFIG_HOME/scw/config.yaml + // * $HOME/.config/scw/config.yaml + // * $USERPROFILE/.config/scw/config.yaml + var errConfigFileNotFound *scw.ConfigFileNotFoundError + config, err := scw.LoadConfigFromPath(scw.GetConfigPath()) + + switch { + case errors.As(err, &errConfigFileNotFound): + break + case err != nil: + return nil, err + default: + // If a config file is found and loaded, we merge with env + activeProfile, err := config.GetActiveProfile() + if err != nil { + return nil, err + } + + // Creates a client from the active profile + // It will trigger a validation step on its configuration to catch errors if any + opts := []scw.ClientOption{ + scw.WithProfile(activeProfile), + } + + _, err = scw.NewClient(opts...) + if err != nil { + return nil, err + } + + profile = scw.MergeProfiles(activeProfile, profile) + } + + opts := []scw.ClientOption{ + scw.WithDefaultRegion(scw.RegionFrPar), + scw.WithDefaultZone(scw.ZoneFrPar1), + scw.WithUserAgent(fmt.Sprintf("driftctl/%s", version.Current())), + scw.WithProfile(profile), + } + + client, err := scw.NewClient(opts...) + if err != nil { + return nil, err + } + + return client, nil +} diff --git a/enumeration/remote/scaleway/function_namespace_enumerator.go b/enumeration/remote/scaleway/function_namespace_enumerator.go new file mode 100644 index 000000000..bd99005d6 --- /dev/null +++ b/enumeration/remote/scaleway/function_namespace_enumerator.go @@ -0,0 +1,46 @@ +package scaleway + +import ( + remoteerror "github.com/snyk/driftctl/enumeration/remote/error" + "github.com/snyk/driftctl/enumeration/remote/scaleway/repository" + "github.com/snyk/driftctl/enumeration/resource" + "github.com/snyk/driftctl/pkg/resource/scaleway" +) + +type FunctionNamespaceEnumerator struct { + repository repository.FunctionRepository + factory resource.ResourceFactory +} + +func NewFunctionNamespaceEnumerator(repo repository.FunctionRepository, factory resource.ResourceFactory) *FunctionNamespaceEnumerator { + return &FunctionNamespaceEnumerator{ + repository: repo, + factory: factory, + } +} + +func (e *FunctionNamespaceEnumerator) SupportedType() resource.ResourceType { + return scaleway.ScalewayFunctionNamespaceResourceType +} + +func (e *FunctionNamespaceEnumerator) Enumerate() ([]*resource.Resource, error) { + namespaces, err := e.repository.ListAllNamespaces() + if err != nil { + return nil, remoteerror.NewResourceListingError(err, string(e.SupportedType())) + } + + results := make([]*resource.Resource, 0, len(namespaces)) + + for _, namespace := range namespaces { + results = append( + results, + e.factory.CreateAbstractResource( + string(e.SupportedType()), + getRegionalID(namespace.Region.String(), namespace.ID), + map[string]interface{}{}, + ), + ) + } + + return results, err +} diff --git a/enumeration/remote/scaleway/init.go b/enumeration/remote/scaleway/init.go new file mode 100644 index 000000000..a9f997fae --- /dev/null +++ b/enumeration/remote/scaleway/init.go @@ -0,0 +1,47 @@ +package scaleway + +import ( + "github.com/snyk/driftctl/enumeration" + "github.com/snyk/driftctl/enumeration/alerter" + "github.com/snyk/driftctl/enumeration/remote/cache" + "github.com/snyk/driftctl/enumeration/remote/common" + "github.com/snyk/driftctl/enumeration/remote/scaleway/client" + "github.com/snyk/driftctl/enumeration/remote/scaleway/repository" + "github.com/snyk/driftctl/enumeration/resource" + "github.com/snyk/driftctl/enumeration/terraform" + "github.com/snyk/driftctl/pkg/resource/scaleway" +) + +func Init(version string, alerter alerter.AlerterInterface, providerLibrary *terraform.ProviderLibrary, remoteLibrary *common.RemoteLibrary, progress enumeration.ProgressCounter, factory resource.ResourceFactory, configDir string) error { + + if version == "" { + version = "2.14.1" + } + + provider, err := NewScalewayTerraformProvider(version, progress, configDir) + if err != nil { + return err + } + err = provider.Init() + if err != nil { + return err + } + + providerLibrary.AddProvider(terraform.SCALEWAY, provider) + + scwClient, err := client.Create() + if err != nil { + return err + } + + repositoryCache := cache.New(100) + + funcRepository := repository.NewFunctionRepository(scwClient, repositoryCache) + + deserializer := resource.NewDeserializer(factory) + + remoteLibrary.AddEnumerator(NewFunctionNamespaceEnumerator(funcRepository, factory)) + remoteLibrary.AddDetailsFetcher(scaleway.ScalewayFunctionNamespaceResourceType, common.NewGenericDetailsFetcher(scaleway.ScalewayFunctionNamespaceResourceType, provider, deserializer)) + + return nil +} diff --git a/enumeration/remote/scaleway/provider.go b/enumeration/remote/scaleway/provider.go new file mode 100644 index 000000000..326ad3704 --- /dev/null +++ b/enumeration/remote/scaleway/provider.go @@ -0,0 +1,47 @@ +package scaleway + +import ( + "github.com/snyk/driftctl/enumeration" + "github.com/snyk/driftctl/enumeration/remote/terraform" + tf "github.com/snyk/driftctl/enumeration/terraform" +) + +type ScalewayTerraformProvider struct { + *terraform.TerraformProvider + name string + version string +} + +func NewScalewayTerraformProvider(version string, progress enumeration.ProgressCounter, configDir string) (*ScalewayTerraformProvider, error) { + + provider := &ScalewayTerraformProvider{ + version: version, + name: "scaleway", + } + + installer, err := tf.NewProviderInstaller(tf.ProviderConfig{ + Key: provider.name, + Version: version, + ConfigDir: configDir, + }) + if err != nil { + return nil, err + } + + tfProvider, err := terraform.NewTerraformProvider(installer, terraform.TerraformProviderConfig{ + Name: provider.name, + }, progress) + if err != nil { + return nil, err + } + provider.TerraformProvider = tfProvider + return provider, err +} + +func (p *ScalewayTerraformProvider) Name() string { + return p.name +} + +func (p *ScalewayTerraformProvider) Version() string { + return p.version +} diff --git a/enumeration/remote/scaleway/repository/function_repository.go b/enumeration/remote/scaleway/repository/function_repository.go new file mode 100644 index 000000000..a3a1abbc6 --- /dev/null +++ b/enumeration/remote/scaleway/repository/function_repository.go @@ -0,0 +1,48 @@ +package repository + +import ( + "github.com/scaleway/scaleway-sdk-go/api/function/v1beta1" + "github.com/scaleway/scaleway-sdk-go/scw" + "github.com/snyk/driftctl/enumeration/remote/cache" +) + +type FunctionRepository interface { + ListAllNamespaces() ([]*function.Namespace, error) +} + +// We create an interface here (mainly for mocking purpose) because in scaleway-sdk-go, API is a struct and not an interface +type functionAPI interface { + ListNamespaces(req *function.ListNamespacesRequest, opts ...scw.RequestOption) (*function.ListNamespacesResponse, error) +} + +type functionRepository struct { + client functionAPI + cache cache.Cache +} + +func NewFunctionRepository(client *scw.Client, c cache.Cache) *functionRepository { + + api := function.NewAPI(client) + return &functionRepository{ + api, + c, + } +} + +func (r *functionRepository) ListAllNamespaces() ([]*function.Namespace, error) { + if v := r.cache.Get("functionListAllNamespaces"); v != nil { + return v.([]*function.Namespace), nil + } + + req := &function.ListNamespacesRequest{} + res, err := r.client.ListNamespaces(req) + if err != nil { + return nil, err + } + + namespaces := res.Namespaces + + r.cache.Put("functionListAllNamespaces", namespaces) + + return namespaces, err +} diff --git a/enumeration/remote/scaleway/repository/function_repository_test.go b/enumeration/remote/scaleway/repository/function_repository_test.go new file mode 100644 index 000000000..0c1425eed --- /dev/null +++ b/enumeration/remote/scaleway/repository/function_repository_test.go @@ -0,0 +1,80 @@ +package repository + +import ( + "strings" + "testing" + + "github.com/r3labs/diff/v2" + "github.com/scaleway/scaleway-sdk-go/api/function/v1beta1" + "github.com/snyk/driftctl/enumeration/remote/cache" + scalewaytest "github.com/snyk/driftctl/test/scaleway" + "github.com/stretchr/testify/assert" +) + +func Test_functionRepository_ListAllNamespaces(t *testing.T) { + tests := []struct { + name string + mocks func(client *scalewaytest.MockFakeFunction) + want []*function.Namespace + wantErr error + }{ + { + name: "list", + mocks: func(client *scalewaytest.MockFakeFunction) { + client.On("ListNamespaces", &function.ListNamespacesRequest{}). + Once(). + Return( + &function.ListNamespacesResponse{ + Namespaces: []*function.Namespace{ + { + Name: "namespace1", + }, + { + Name: "namespace2", + }, + }, + TotalCount: 2, + }, nil, + ) + }, + want: []*function.Namespace{ + { + Name: "namespace1", + }, + { + Name: "namespace2", + }, + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + store := cache.New(1) + client := &scalewaytest.MockFakeFunction{} + tt.mocks(client) + r := &functionRepository{ + client: client, + cache: store, + } + got, err := r.ListAllNamespaces() + assert.Equal(t, tt.wantErr, err) + + if err == nil { + // Check that results were cached + cachedData, err := r.ListAllNamespaces() + assert.NoError(t, err) + assert.Equal(t, got, cachedData) + assert.IsType(t, []*function.Namespace{}, store.Get("functionListAllNamespaces")) + } + + changelog, err := diff.Diff(got, tt.want) + assert.Nil(t, err) + if len(changelog) > 0 { + for _, change := range changelog { + t.Errorf("%s: %s -> %s", strings.Join(change.Path, "."), change.From, change.To) + } + t.Fail() + } + }) + } +} diff --git a/enumeration/remote/scaleway/repository/mock_FunctionRepository.go b/enumeration/remote/scaleway/repository/mock_FunctionRepository.go new file mode 100644 index 000000000..9fbe5d8f0 --- /dev/null +++ b/enumeration/remote/scaleway/repository/mock_FunctionRepository.go @@ -0,0 +1,54 @@ +// Code generated by mockery v2.23.1. DO NOT EDIT. + +package repository + +import ( + "github.com/scaleway/scaleway-sdk-go/api/function/v1beta1" + mock "github.com/stretchr/testify/mock" +) + +// MockFunctionRepository is an autogenerated mock type for the FunctionRepository type +type MockFunctionRepository struct { + mock.Mock +} + +// ListAllNamespaces provides a mock function with given fields: +func (_m *MockFunctionRepository) ListAllNamespaces() ([]*function.Namespace, error) { + ret := _m.Called() + + var r0 []*function.Namespace + var r1 error + if rf, ok := ret.Get(0).(func() ([]*function.Namespace, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() []*function.Namespace); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*function.Namespace) + } + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type mockConstructorTestingTNewMockFunctionRepository interface { + mock.TestingT + Cleanup(func()) +} + +// NewMockFunctionRepository creates a new instance of MockFunctionRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewMockFunctionRepository(t mockConstructorTestingTNewMockFunctionRepository) *MockFunctionRepository { + mock := &MockFunctionRepository{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/enumeration/remote/scaleway/util.go b/enumeration/remote/scaleway/util.go new file mode 100644 index 000000000..1907ca8eb --- /dev/null +++ b/enumeration/remote/scaleway/util.go @@ -0,0 +1,11 @@ +package scaleway + +import ( + "fmt" +) + +// IDs of some resources are regional, meaning the same ID (uuid) can exist in multiple regions +// To distinguish them, the resources defined in Terraform have their ID prepended with the region where they belong +func getRegionalID(region, id string) string { + return fmt.Sprintf("%s/%s", region, id) +} diff --git a/enumeration/terraform/providers.go b/enumeration/terraform/providers.go index 435a5506f..d9f666323 100644 --- a/enumeration/terraform/providers.go +++ b/enumeration/terraform/providers.go @@ -5,10 +5,11 @@ import ( ) const ( - AWS string = "aws" - GITHUB string = "github" - GOOGLE string = "google" - AZURE string = "azurerm" + AWS string = "aws" + GITHUB string = "github" + GOOGLE string = "google" + AZURE string = "azurerm" + SCALEWAY string = "scaleway" ) type ProviderLibrary struct { diff --git a/go.mod b/go.mod index 214521328..6d6f0504a 100644 --- a/go.mod +++ b/go.mod @@ -39,6 +39,7 @@ require ( github.com/mitchellh/go-homedir v1.1.0 github.com/pkg/errors v0.9.1 github.com/r3labs/diff/v2 v2.6.0 + github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15 github.com/shurcooL/githubv4 v0.0.0-20201206200315-234843c633fa github.com/sirupsen/logrus v1.6.0 github.com/spf13/cobra v1.0.0 diff --git a/go.sum b/go.sum index 296ff5d82..ac38a031a 100644 --- a/go.sum +++ b/go.sum @@ -699,6 +699,8 @@ github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQD github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15 h1:Y7xOFbD+3jaPw+VN7lkakNJ/pa+ZSQVFp1ONtJaBxns= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sebdah/goldie v1.0.0/go.mod h1:jXP4hmWywNEwZzhMuv2ccnqTSFpuq8iyQhtQdkkZBH4= diff --git a/pkg/cmd/driftctl_test.go b/pkg/cmd/driftctl_test.go index f7fb1fa65..3290acd20 100644 --- a/pkg/cmd/driftctl_test.go +++ b/pkg/cmd/driftctl_test.go @@ -70,7 +70,7 @@ func TestDriftctlCmd_Scan(t *testing.T) { env: map[string]string{ "DCTL_TO": "test", }, - err: fmt.Errorf("unsupported cloud provider 'test'\nValid values are: aws+tf,github+tf,gcp+tf,azure+tf"), + err: fmt.Errorf("unsupported cloud provider 'test'\nValid values are: aws+tf,github+tf,gcp+tf,azure+tf,scaleway+tf"), }, { env: map[string]string{ diff --git a/pkg/cmd/scan_test.go b/pkg/cmd/scan_test.go index 232fb90bb..96e658cb4 100644 --- a/pkg/cmd/scan_test.go +++ b/pkg/cmd/scan_test.go @@ -73,9 +73,9 @@ func TestScanCmd_Invalid(t *testing.T) { {args: []string{"scan", "-e"}, expected: `unknown shorthand flag: 'e' in -e`}, {args: []string{"scan", "--error"}, expected: `unknown flag: --error`}, {args: []string{"scan", "-t"}, expected: `flag needs an argument: 't' in -t`}, - {args: []string{"scan", "-t", "glou"}, expected: "unsupported cloud provider 'glou'\nValid values are: aws+tf,github+tf,gcp+tf,azure+tf"}, + {args: []string{"scan", "-t", "glou"}, expected: "unsupported cloud provider 'glou'\nValid values are: aws+tf,github+tf,gcp+tf,azure+tf,scaleway+tf"}, {args: []string{"scan", "--to"}, expected: `flag needs an argument: --to`}, - {args: []string{"scan", "--to", "glou"}, expected: "unsupported cloud provider 'glou'\nValid values are: aws+tf,github+tf,gcp+tf,azure+tf"}, + {args: []string{"scan", "--to", "glou"}, expected: "unsupported cloud provider 'glou'\nValid values are: aws+tf,github+tf,gcp+tf,azure+tf,scaleway+tf"}, {args: []string{"scan", "-f"}, expected: `flag needs an argument: 'f' in -f`}, {args: []string{"scan", "--from"}, expected: `flag needs an argument: --from`}, {args: []string{"scan", "--from"}, expected: `flag needs an argument: --from`}, diff --git a/pkg/resource/resource_types.go b/pkg/resource/resource_types.go index aabaf0303..a91c6f946 100644 --- a/pkg/resource/resource_types.go +++ b/pkg/resource/resource_types.go @@ -254,6 +254,8 @@ var supportedTypes = map[string]ResourceTypeMeta{ "azurerm_private_dns_txt_record": {}, "azurerm_image": {}, "azurerm_ssh_public_key": {}, + + "scaleway_function_namespace": {}, } func IsResourceTypeSupported(ty string) bool { diff --git a/pkg/resource/scaleway/metadata_test.go b/pkg/resource/scaleway/metadata_test.go new file mode 100644 index 000000000..69ff23d90 --- /dev/null +++ b/pkg/resource/scaleway/metadata_test.go @@ -0,0 +1,35 @@ +package scaleway_test + +import ( + "testing" + + "github.com/snyk/driftctl/enumeration/resource" + "github.com/snyk/driftctl/pkg/resource/scaleway" + testresource "github.com/snyk/driftctl/test/resource" + "github.com/stretchr/testify/assert" +) + +func TestScaleway_Metadata_Flags(t *testing.T) { + testcases := map[string][]resource.Flags{ + scaleway.ScalewayFunctionNamespaceResourceType: {resource.FlagDeepMode}, + } + + schemaRepository := testresource.InitFakeSchemaRepository("scaleway", "2.14.1") + scaleway.InitResourcesMetadata(schemaRepository) + + for ty, flags := range testcases { + t.Run(ty, func(tt *testing.T) { + sch, exist := schemaRepository.GetSchema(ty) + assert.True(tt, exist) + + if len(flags) == 0 { + assert.Equal(tt, resource.Flags(0x0), sch.Flags, "should not have any flag") + return + } + + for _, flag := range flags { + assert.Truef(tt, sch.Flags.HasFlag(flag), "should have given flag %d", flag) + } + }) + } +} diff --git a/pkg/resource/scaleway/metadatas.go b/pkg/resource/scaleway/metadatas.go new file mode 100644 index 000000000..80d151383 --- /dev/null +++ b/pkg/resource/scaleway/metadatas.go @@ -0,0 +1,9 @@ +package scaleway + +import ( + "github.com/snyk/driftctl/pkg/resource" +) + +func InitResourcesMetadata(resourceSchemaRepository resource.SchemaRepositoryInterface) { + initScalewayFunctionNamespace(resourceSchemaRepository) +} diff --git a/pkg/resource/scaleway/scaleway_function_namespace.go b/pkg/resource/scaleway/scaleway_function_namespace.go new file mode 100644 index 000000000..9852b942d --- /dev/null +++ b/pkg/resource/scaleway/scaleway_function_namespace.go @@ -0,0 +1,12 @@ +package scaleway + +import ( + "github.com/snyk/driftctl/enumeration/resource" + dctlresource "github.com/snyk/driftctl/pkg/resource" +) + +const ScalewayFunctionNamespaceResourceType = "scaleway_function_namespace" + +func initScalewayFunctionNamespace(resourceSchemaRepository dctlresource.SchemaRepositoryInterface) { + resourceSchemaRepository.SetFlags(ScalewayFunctionNamespaceResourceType, resource.FlagDeepMode) +} diff --git a/pkg/resource/scaleway/scaleway_function_namespace_test.go b/pkg/resource/scaleway/scaleway_function_namespace_test.go new file mode 100644 index 000000000..498992293 --- /dev/null +++ b/pkg/resource/scaleway/scaleway_function_namespace_test.go @@ -0,0 +1,34 @@ +package scaleway_test + +import ( + "testing" + "time" + + "github.com/snyk/driftctl/test" + "github.com/snyk/driftctl/test/acceptance" +) + +func TestAcc_Scaleway_FunctionNamespace(t *testing.T) { + acceptance.Run(t, acceptance.AccTestCase{ + TerraformVersion: "1.4.2", + Paths: []string{"./testdata/acc/scaleway_function_namespace"}, + Args: []string{ + "scan", + "--to", "scaleway+tf", + }, + Checks: []acceptance.AccCheck{ + { + ShouldRetry: func(result *test.ScanResult, retryDuration time.Duration, retryCount uint8) bool { + return !result.IsSync() && retryDuration < time.Minute + }, + Check: func(result *test.ScanResult, stdout string, err error) { + if err != nil { + t.Fatal(err) + } + result.AssertInfrastructureIsInSync() + result.AssertManagedCount(1) + }, + }, + }, + }) +} diff --git a/pkg/resource/scaleway/testdata/acc/scaleway_function_namespace/.driftignore b/pkg/resource/scaleway/testdata/acc/scaleway_function_namespace/.driftignore new file mode 100644 index 000000000..73604f0ca --- /dev/null +++ b/pkg/resource/scaleway/testdata/acc/scaleway_function_namespace/.driftignore @@ -0,0 +1,2 @@ +* +!scaleway_function_namespace diff --git a/pkg/resource/scaleway/testdata/acc/scaleway_function_namespace/.terraform.lock.hcl b/pkg/resource/scaleway/testdata/acc/scaleway_function_namespace/.terraform.lock.hcl new file mode 100644 index 000000000..65c4877ad --- /dev/null +++ b/pkg/resource/scaleway/testdata/acc/scaleway_function_namespace/.terraform.lock.hcl @@ -0,0 +1,24 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/scaleway/scaleway" { + version = "2.14.1" + constraints = "2.14.1" + hashes = [ + "h1:g4h1U37SJaYw4pOk8z8bBTufgY/si7v8tPdejh38kJo=", + "zh:04fce75170b4f40c27c78f4109c2067318ea9f40e3da3577d85527cf8ba110ef", + "zh:0ee65a061360bda494a9706d0b950ab36976e0f4e66ca7e8019ceebe6c861a90", + "zh:1fa649ecafaaa8ac4c406428ea94b1265e5a2eea73f6635075a821bde812d5e0", + "zh:2274a0e5d3db5453c1152e43a167bb6c94445ae2aa8714fafd289a56a4a21236", + "zh:28dbcbfcdc1b211ba67c594c8a716dbf9d63044b203ee8fa27b60e3a530ff5d4", + "zh:4c8bfb1a2b1aa8d549743b04db00b7914a73e4914dd27745ff5b6457363de3ef", + "zh:57f528bfe05a82a69e0e44be6c1007dc0c878544bdaaa30f0ed7cded0e50c2e2", + "zh:6acf9522406353520503ad2525ff92438dd0234ab31e47877f50022c5d3f218e", + "zh:9144f8b979b28e7a71169086b9489109be99dfc29c0fc7395f961ccd29c5df4c", + "zh:9dd8d9f48cf153076362cce45ec8b32eea1768b771ed63f5ff0f1d99ee9f33f6", + "zh:b42bda207e2c17539999134a4ee8a250b72d02a5796a8bafa584792312d269d6", + "zh:cf3cc151cb3e8d72b964a837144e746f4d35237e41847aeeacdb86e69bb50ec4", + "zh:db57237d829557419e43a9b23ccce9cad45e40a8b45a735fe310e54a31166510", + "zh:e6d344b6ec752ac84d2399fc4f96c99c3b3b1a88c7034a14d1e955abf4a7e526", + ] +} diff --git a/pkg/resource/scaleway/testdata/acc/scaleway_function_namespace/terraform.tf b/pkg/resource/scaleway/testdata/acc/scaleway_function_namespace/terraform.tf new file mode 100644 index 000000000..46907e8ea --- /dev/null +++ b/pkg/resource/scaleway/testdata/acc/scaleway_function_namespace/terraform.tf @@ -0,0 +1,15 @@ +provider "scaleway" {} + +terraform { + required_providers { + scaleway = { + source = "scaleway/scaleway" + version = "2.14.1" + } + } +} + +resource "scaleway_function_namespace" "namespace" { + name = "TestAcc-Scaleway-FunctionNamespace" + description = "This is a test description" +} diff --git a/pkg/resource/schemas/repository.go b/pkg/resource/schemas/repository.go index b1ad485aa..b44cf918b 100644 --- a/pkg/resource/schemas/repository.go +++ b/pkg/resource/schemas/repository.go @@ -13,6 +13,7 @@ import ( "github.com/snyk/driftctl/pkg/resource/azurerm" "github.com/snyk/driftctl/pkg/resource/github" "github.com/snyk/driftctl/pkg/resource/google" + "github.com/snyk/driftctl/pkg/resource/scaleway" ) type SchemaRepository struct { @@ -58,6 +59,8 @@ func (r *SchemaRepository) Init(providerName, providerVersion string, schema map providerVersion = "3.78.0" case "azurerm": providerVersion = "2.71.0" + case "scaleway": + providerVersion = "2.14.1" default: return errors.Errorf("unsupported remote '%s'", providerName) } @@ -92,6 +95,8 @@ func (r *SchemaRepository) Init(providerName, providerVersion string, schema map google.InitResourcesMetadata(r) case "azurerm": azurerm.InitResourcesMetadata(r) + case "scaleway": + scaleway.InitResourcesMetadata(r) default: return errors.Errorf("unsupported remote '%s'", providerName) } diff --git a/test/scaleway/function.go b/test/scaleway/function.go new file mode 100644 index 000000000..df4a753d6 --- /dev/null +++ b/test/scaleway/function.go @@ -0,0 +1,10 @@ +package scaleway + +import ( + "github.com/scaleway/scaleway-sdk-go/api/function/v1beta1" + "github.com/scaleway/scaleway-sdk-go/scw" +) + +type FakeFunction interface { + ListNamespaces(req *function.ListNamespacesRequest, opts ...scw.RequestOption) (*function.ListNamespacesResponse, error) +} diff --git a/test/scaleway/mock_FakeFunction.go b/test/scaleway/mock_FakeFunction.go new file mode 100644 index 000000000..3420d8d6c --- /dev/null +++ b/test/scaleway/mock_FakeFunction.go @@ -0,0 +1,63 @@ +// Code generated by mockery v2.23.1. DO NOT EDIT. + +package scaleway + +import ( + "github.com/scaleway/scaleway-sdk-go/api/function/v1beta1" + mock "github.com/stretchr/testify/mock" + + scw "github.com/scaleway/scaleway-sdk-go/scw" +) + +// MockFakeFunction is an autogenerated mock type for the FakeFunction type +type MockFakeFunction struct { + mock.Mock +} + +// ListNamespaces provides a mock function with given fields: req, opts +func (_m *MockFakeFunction) ListNamespaces(req *function.ListNamespacesRequest, opts ...scw.RequestOption) (*function.ListNamespacesResponse, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, req) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *function.ListNamespacesResponse + var r1 error + if rf, ok := ret.Get(0).(func(*function.ListNamespacesRequest, ...scw.RequestOption) (*function.ListNamespacesResponse, error)); ok { + return rf(req, opts...) + } + if rf, ok := ret.Get(0).(func(*function.ListNamespacesRequest, ...scw.RequestOption) *function.ListNamespacesResponse); ok { + r0 = rf(req, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*function.ListNamespacesResponse) + } + } + + if rf, ok := ret.Get(1).(func(*function.ListNamespacesRequest, ...scw.RequestOption) error); ok { + r1 = rf(req, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type mockConstructorTestingTNewMockFakeFunction interface { + mock.TestingT + Cleanup(func()) +} + +// NewMockFakeFunction creates a new instance of MockFakeFunction. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewMockFakeFunction(t mockConstructorTestingTNewMockFakeFunction) *MockFakeFunction { + mock := &MockFakeFunction{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/test/schemas/scaleway/2.14.1/schema.json b/test/schemas/scaleway/2.14.1/schema.json new file mode 100755 index 000000000..592772203 --- /dev/null +++ b/test/schemas/scaleway/2.14.1/schema.json @@ -0,0 +1,9118 @@ +{ + "scaleway_account_project": { + "version": 0, + "block": { + "attributes": { + "created_at": { + "type": "string", + "description": "The date and time of the creation of the Project (Format ISO 8601)", + "description_kind": "plain", + "computed": true + }, + "description": { + "type": "string", + "description": "Description of the project", + "description_kind": "plain", + "optional": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "name": { + "type": "string", + "description": "The name of the project", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "organization_id": { + "type": "string", + "description": "The organization_id you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "updated_at": { + "type": "string", + "description": "The date and time of the last update of the Project (Format ISO 8601)", + "description_kind": "plain", + "computed": true + } + }, + "description_kind": "plain" + } + }, + "scaleway_account_ssh_key": { + "version": 0, + "block": { + "attributes": { + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "name": { + "type": "string", + "description": "The name of the SSH key", + "description_kind": "plain", + "optional": true + }, + "organization_id": { + "type": "string", + "description": "The organization_id you want to attach the resource to", + "description_kind": "plain", + "computed": true + }, + "project_id": { + "type": "string", + "description": "The project_id you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "public_key": { + "type": "string", + "description": "The public SSH key", + "description_kind": "plain", + "required": true + } + }, + "block_types": { + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_apple_silicon_server": { + "version": 0, + "block": { + "attributes": { + "created_at": { + "type": "string", + "description": "The date and time of the creation of the server", + "description_kind": "plain", + "computed": true + }, + "deletable_at": { + "type": "string", + "description": "The minimal date and time on which you can delete this server due to Apple licence", + "description_kind": "plain", + "computed": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "ip": { + "type": "string", + "description": "IPv4 address of the server", + "description_kind": "plain", + "computed": true + }, + "name": { + "type": "string", + "description": "Name of the server", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "organization_id": { + "type": "string", + "description": "The organization_id you want to attach the resource to", + "description_kind": "plain", + "computed": true + }, + "project_id": { + "type": "string", + "description": "The project_id you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "state": { + "type": "string", + "description": "The state of the server", + "description_kind": "plain", + "computed": true + }, + "type": { + "type": "string", + "description": "Type of the server", + "description_kind": "plain", + "required": true + }, + "updated_at": { + "type": "string", + "description": "The date and time of the last update of the server", + "description_kind": "plain", + "computed": true + }, + "vnc_url": { + "type": "string", + "description": "VNC url use to connect remotely to the desktop GUI", + "description_kind": "plain", + "computed": true + }, + "zone": { + "type": "string", + "description": "The zone you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + } + }, + "block_types": { + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "create": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_baremetal_server": { + "version": 0, + "block": { + "attributes": { + "description": { + "type": "string", + "description": "Some description to associate to the server, max 255 characters", + "description_kind": "plain", + "optional": true + }, + "domain": { + "type": "string", + "description_kind": "plain", + "computed": true + }, + "hostname": { + "type": "string", + "description": "Hostname of the server", + "description_kind": "plain", + "optional": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "ips": { + "type": [ + "list", + [ + "object", + { + "address": "string", + "id": "string", + "reverse": "string", + "version": "string" + } + ] + ], + "description_kind": "plain", + "computed": true + }, + "name": { + "type": "string", + "description": "Name of the server", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "offer": { + "type": "string", + "description": "ID or name of the server offer", + "description_kind": "plain", + "required": true + }, + "offer_id": { + "type": "string", + "description": "ID of the server offer", + "description_kind": "plain", + "computed": true + }, + "offer_name": { + "type": "string", + "description": "Name of the server offer", + "description_kind": "plain", + "computed": true + }, + "organization_id": { + "type": "string", + "description": "The organization_id you want to attach the resource to", + "description_kind": "plain", + "computed": true + }, + "os": { + "type": "string", + "description": "The base image of the server", + "description_kind": "plain", + "required": true + }, + "os_name": { + "type": "string", + "description": "The base image name of the server", + "description_kind": "plain", + "computed": true + }, + "password": { + "type": "string", + "description": "Password used for the installation.", + "description_kind": "plain", + "optional": true, + "sensitive": true + }, + "project_id": { + "type": "string", + "description": "The project_id you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "reinstall_on_config_changes": { + "type": "bool", + "description": "If True, this boolean allows to reinstall the server on SSH key IDs, user or password changes", + "description_kind": "plain", + "optional": true + }, + "service_password": { + "type": "string", + "description": "Password used for the service to install.", + "description_kind": "plain", + "optional": true, + "sensitive": true + }, + "service_user": { + "type": "string", + "description": "User used for the service to install.", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "ssh_key_ids": { + "type": [ + "list", + "string" + ], + "description": "Array of SSH key IDs allowed to SSH to the server\n\n**NOTE** : If you are attempting to update your SSH key IDs, it will induce the reinstall of your server. \nIf this behaviour is wanted, please set 'reinstall_on_ssh_key_changes' argument to true.", + "description_kind": "plain", + "required": true + }, + "tags": { + "type": [ + "list", + "string" + ], + "description": "Array of tags to associate with the server", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "user": { + "type": "string", + "description": "User used for the installation.", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "zone": { + "type": "string", + "description": "The zone you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + } + }, + "block_types": { + "options": { + "nesting_mode": "set", + "block": { + "attributes": { + "expires_at": { + "type": "string", + "description": "Auto expire the option after this date", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "id": { + "type": "string", + "description": "IDs of the options", + "description_kind": "plain", + "required": true + }, + "name": { + "type": "string", + "description": "name of the option", + "description_kind": "plain", + "computed": true + } + }, + "description": "The options to enable on server", + "description_kind": "plain" + } + }, + "private_network": { + "nesting_mode": "set", + "block": { + "attributes": { + "created_at": { + "type": "string", + "description": "The date and time of the creation of the private network", + "description_kind": "plain", + "computed": true + }, + "id": { + "type": "string", + "description": "The private network ID", + "description_kind": "plain", + "required": true + }, + "status": { + "type": "string", + "description": "The private network status", + "description_kind": "plain", + "computed": true + }, + "updated_at": { + "type": "string", + "description": "The date and time of the last update of the private network", + "description_kind": "plain", + "computed": true + }, + "vlan": { + "type": "number", + "description": "The VLAN ID associated to the private network", + "description_kind": "plain", + "computed": true + } + }, + "description": "The private networks to attach to the server", + "description_kind": "plain" + } + }, + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "create": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "delete": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "update": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_cockpit": { + "version": 0, + "block": { + "attributes": { + "endpoints": { + "type": [ + "list", + [ + "object", + { + "alertmanager_url": "string", + "grafana_url": "string", + "logs_url": "string", + "metrics_url": "string" + } + ] + ], + "description": "Endpoints", + "description_kind": "plain", + "computed": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "project_id": { + "type": "string", + "description": "The project_id you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + } + }, + "block_types": { + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "create": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "delete": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "read": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_cockpit_grafana_user": { + "version": 0, + "block": { + "attributes": { + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "login": { + "type": "string", + "description": "The login of the Grafana user", + "description_kind": "plain", + "required": true + }, + "password": { + "type": "string", + "description": "The password of the Grafana user", + "description_kind": "plain", + "computed": true, + "sensitive": true + }, + "project_id": { + "type": "string", + "description": "The project_id you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "role": { + "type": "string", + "description": "The role of the Grafana user", + "description_kind": "plain", + "required": true + } + }, + "block_types": { + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "create": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "delete": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "read": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_cockpit_token": { + "version": 0, + "block": { + "attributes": { + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "name": { + "type": "string", + "description": "The name of the token", + "description_kind": "plain", + "required": true + }, + "project_id": { + "type": "string", + "description": "The project_id you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "secret_key": { + "type": "string", + "description": "The secret key of the token", + "description_kind": "plain", + "computed": true, + "sensitive": true + } + }, + "block_types": { + "scopes": { + "nesting_mode": "list", + "block": { + "attributes": { + "query_logs": { + "type": "bool", + "description": "Query logs", + "description_kind": "plain", + "optional": true + }, + "query_metrics": { + "type": "bool", + "description": "Query metrics", + "description_kind": "plain", + "optional": true + }, + "setup_alerts": { + "type": "bool", + "description": "Setup alerts", + "description_kind": "plain", + "optional": true + }, + "setup_logs_rules": { + "type": "bool", + "description": "Setup logs rules", + "description_kind": "plain", + "optional": true + }, + "setup_metrics_rules": { + "type": "bool", + "description": "Setup metrics rules", + "description_kind": "plain", + "optional": true + }, + "write_logs": { + "type": "bool", + "description": "Write logs", + "description_kind": "plain", + "optional": true + }, + "write_metrics": { + "type": "bool", + "description": "Write metrics", + "description_kind": "plain", + "optional": true + } + }, + "description": "Endpoints", + "description_kind": "plain" + }, + "max_items": 1 + }, + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "create": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "delete": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "read": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_container": { + "version": 0, + "block": { + "attributes": { + "cpu_limit": { + "type": "number", + "description": "The amount of vCPU computing resources to allocate to each container. Defaults to 70.", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "cron_status": { + "type": "string", + "description": "The cron status", + "description_kind": "plain", + "computed": true + }, + "deploy": { + "type": "bool", + "description": "This allows you to control your production environment", + "description_kind": "plain", + "optional": true + }, + "description": { + "type": "string", + "description": "The container description", + "description_kind": "plain", + "optional": true + }, + "domain_name": { + "type": "string", + "description": "The native container domain name.", + "description_kind": "plain", + "computed": true + }, + "environment_variables": { + "type": [ + "map", + "string" + ], + "description": "The environment variables to be injected into your container at runtime.", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "error_message": { + "type": "string", + "description": "The error description", + "description_kind": "plain", + "computed": true + }, + "http_option": { + "type": "string", + "description": "HTTP traffic configuration", + "description_kind": "plain", + "optional": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "max_concurrency": { + "type": "number", + "description": "The maximum the number of simultaneous requests your container can handle at the same time. Defaults to 50.", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "max_scale": { + "type": "number", + "description": "The maximum of number of instances this container can scale to. Default to 20.", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "memory_limit": { + "type": "number", + "description": "The memory computing resources in MB to allocate to each container. Defaults to 128.", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "min_scale": { + "type": "number", + "description": "The minimum of running container instances continuously. Defaults to 0.", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "name": { + "type": "string", + "description": "The container name", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "namespace_id": { + "type": "string", + "description": "The container namespace associated", + "description_kind": "plain", + "required": true + }, + "port": { + "type": "number", + "description": "The port to expose the container. Defaults to 8080", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "privacy": { + "type": "string", + "description": "The privacy type define the way to authenticate to your container", + "description_kind": "plain", + "optional": true + }, + "protocol": { + "type": "string", + "description": "The communication protocol http1 or h2c. Defaults to http1.", + "description_kind": "plain", + "optional": true + }, + "region": { + "type": "string", + "description": "The region of the resource", + "description_kind": "plain", + "computed": true + }, + "registry_image": { + "type": "string", + "description": "The scaleway registry image address", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "registry_sha256": { + "type": "string", + "description": "The sha256 of your source registry image, changing it will re-apply the deployment. Can be any string", + "description_kind": "plain", + "optional": true + }, + "secret_environment_variables": { + "type": [ + "map", + "string" + ], + "description": "The secret environment variables to be injected into your container at runtime.", + "description_kind": "plain", + "optional": true, + "sensitive": true + }, + "status": { + "type": "string", + "description": "The container status", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "timeout": { + "type": "number", + "description": "The maximum amount of time in seconds during which your container can process a request before we stop it. Defaults to 300s.", + "description_kind": "plain", + "optional": true, + "computed": true + } + }, + "block_types": { + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "create": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "delete": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "read": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "update": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_container_cron": { + "version": 0, + "block": { + "attributes": { + "args": { + "type": "string", + "description": "Cron arguments as json object to pass through during execution.", + "description_kind": "plain", + "required": true + }, + "container_id": { + "type": "string", + "description": "The Container ID to link with your trigger.", + "description_kind": "plain", + "required": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "region": { + "type": "string", + "description": "The region of the resource", + "description_kind": "plain", + "computed": true + }, + "schedule": { + "type": "string", + "description": "Cron format string, e.g. 0 * * * * or @hourly, as schedule time of its jobs to be created and executed.", + "description_kind": "plain", + "required": true + }, + "status": { + "type": "string", + "description": "Cron job status.", + "description_kind": "plain", + "computed": true + } + }, + "block_types": { + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "create": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "delete": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "read": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "update": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_container_domain": { + "version": 0, + "block": { + "attributes": { + "container_id": { + "type": "string", + "description": "Container the domain will be bound to", + "description_kind": "plain", + "required": true + }, + "hostname": { + "type": "string", + "description": "Domain's hostname", + "description_kind": "plain", + "required": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "region": { + "type": "string", + "description": "The region you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "url": { + "type": "string", + "description": "URL used to query the container", + "description_kind": "plain", + "computed": true + } + }, + "block_types": { + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "create": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "delete": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "read": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "update": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_container_namespace": { + "version": 0, + "block": { + "attributes": { + "description": { + "type": "string", + "description": "The description of the container namespace", + "description_kind": "plain", + "optional": true + }, + "destroy_registry": { + "type": "bool", + "description": "Destroy registry on deletion", + "description_kind": "plain", + "optional": true + }, + "environment_variables": { + "type": [ + "map", + "string" + ], + "description": "The environment variables of the container namespace", + "description_kind": "plain", + "optional": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "name": { + "type": "string", + "description": "The name of the container namespace", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "organization_id": { + "type": "string", + "description": "The organization_id you want to attach the resource to", + "description_kind": "plain", + "computed": true + }, + "project_id": { + "type": "string", + "description": "The project_id you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "region": { + "type": "string", + "description": "The region you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "registry_endpoint": { + "type": "string", + "description": "The endpoint reachable by docker", + "description_kind": "plain", + "computed": true + }, + "registry_namespace_id": { + "type": "string", + "description": "The ID of the registry namespace", + "description_kind": "plain", + "computed": true + }, + "secret_environment_variables": { + "type": [ + "map", + "string" + ], + "description": "The secret environment variables of the container namespace", + "description_kind": "plain", + "optional": true, + "sensitive": true + } + }, + "block_types": { + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "create": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "delete": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "read": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "update": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_container_token": { + "version": 0, + "block": { + "attributes": { + "container_id": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "description": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "expires_at": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "namespace_id": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "region": { + "type": "string", + "description": "The region you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "token": { + "type": "string", + "description_kind": "plain", + "computed": true, + "sensitive": true + } + }, + "description_kind": "plain" + } + }, + "scaleway_domain_record": { + "version": 0, + "block": { + "attributes": { + "data": { + "type": "string", + "description": "The data of the record", + "description_kind": "plain", + "required": true + }, + "dns_zone": { + "type": "string", + "description": "The zone you want to add the record in", + "description_kind": "plain", + "required": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "keep_empty_zone": { + "type": "bool", + "description": "When destroy a resource record, if a zone have only NS, delete the zone", + "description_kind": "plain", + "optional": true + }, + "name": { + "type": "string", + "description": "The name of the record", + "description_kind": "plain", + "optional": true + }, + "priority": { + "type": "number", + "description": "The priority of the record", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "project_id": { + "type": "string", + "description": "The project_id you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "root_zone": { + "type": "bool", + "description": "Does the DNS zone is the root zone or not", + "description_kind": "plain", + "computed": true + }, + "ttl": { + "type": "number", + "description": "The ttl of the record", + "description_kind": "plain", + "optional": true + }, + "type": { + "type": "string", + "description": "The type of the record", + "description_kind": "plain", + "required": true + } + }, + "block_types": { + "geo_ip": { + "nesting_mode": "list", + "block": { + "block_types": { + "matches": { + "nesting_mode": "list", + "block": { + "attributes": { + "continents": { + "type": [ + "list", + "string" + ], + "description": "List of continents (eg: EU for Europe, NA for North America, AS for Asia...). List of all continents code: https://api.scaleway.com/domain-private/v2beta1/continents", + "description_kind": "plain", + "optional": true + }, + "countries": { + "type": [ + "list", + "string" + ], + "description": "List of countries (eg: FR for France, US for the United States, GB for Great Britain...). List of all countries code: https://api.scaleway.com/domain-private/v2beta1/countries", + "description_kind": "plain", + "optional": true + }, + "data": { + "type": "string", + "description": "The data of the match result", + "description_kind": "plain", + "required": true + } + }, + "description": "The list of matches", + "description_kind": "plain" + }, + "min_items": 1 + } + }, + "description": "Return record based on client localisation", + "description_kind": "plain" + }, + "max_items": 1 + }, + "http_service": { + "nesting_mode": "list", + "block": { + "attributes": { + "ips": { + "type": [ + "list", + "string" + ], + "description": "IPs to check", + "description_kind": "plain", + "required": true + }, + "must_contain": { + "type": "string", + "description": "Text to search", + "description_kind": "plain", + "required": true + }, + "strategy": { + "type": "string", + "description": "Strategy to return an IP from the IPs list", + "description_kind": "plain", + "required": true + }, + "url": { + "type": "string", + "description": "URL to match the must_contain text to validate an IP", + "description_kind": "plain", + "required": true + }, + "user_agent": { + "type": "string", + "description": "User-agent used when checking the URL", + "description_kind": "plain", + "optional": true + } + }, + "description": "Return record based on client localisation", + "description_kind": "plain" + }, + "max_items": 1 + }, + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "create": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "delete": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "read": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "update": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + }, + "view": { + "nesting_mode": "list", + "block": { + "attributes": { + "data": { + "type": "string", + "description": "The data of the view record", + "description_kind": "plain", + "required": true + }, + "subnet": { + "type": "string", + "description": "The subnet of the view", + "description_kind": "plain", + "required": true + } + }, + "description": "Return record based on client subnet", + "description_kind": "plain" + } + }, + "weighted": { + "nesting_mode": "list", + "block": { + "attributes": { + "ip": { + "type": "string", + "description": "The weighted IP", + "description_kind": "plain", + "required": true + }, + "weight": { + "type": "number", + "description": "The weight of the IP", + "description_kind": "plain", + "required": true + } + }, + "description": "Return record based on weight", + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_domain_zone": { + "version": 0, + "block": { + "attributes": { + "domain": { + "type": "string", + "description": "The domain where the DNS zone will be created.", + "description_kind": "plain", + "required": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "message": { + "type": "string", + "description": "Message", + "description_kind": "plain", + "computed": true + }, + "ns": { + "type": [ + "list", + "string" + ], + "description": "NameServer list for zone.", + "description_kind": "plain", + "computed": true + }, + "ns_default": { + "type": [ + "list", + "string" + ], + "description": "NameServer default list for zone.", + "description_kind": "plain", + "computed": true + }, + "ns_master": { + "type": [ + "list", + "string" + ], + "description": "NameServer master list for zone.", + "description_kind": "plain", + "computed": true + }, + "project_id": { + "type": "string", + "description": "The project_id you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "status": { + "type": "string", + "description": "The domain zone status.", + "description_kind": "plain", + "computed": true + }, + "subdomain": { + "type": "string", + "description": "The subdomain of the DNS zone to create.", + "description_kind": "plain", + "required": true + }, + "updated_at": { + "type": "string", + "description": "The date and time of the last update of the DNS zone.", + "description_kind": "plain", + "computed": true + } + }, + "block_types": { + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_flexible_ip": { + "version": 0, + "block": { + "attributes": { + "created_at": { + "type": "string", + "description": "The date and time of the creation of the Flexible IP (Format ISO 8601)", + "description_kind": "plain", + "computed": true + }, + "description": { + "type": "string", + "description": "Description of the flexible IP", + "description_kind": "plain", + "optional": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "ip_address": { + "type": "string", + "description": "The IPv4 address of the flexible IP", + "description_kind": "plain", + "computed": true + }, + "mac_address": { + "type": "string", + "description": "The MAC address of the server associated with this flexible IP", + "description_kind": "plain", + "computed": true + }, + "organization_id": { + "type": "string", + "description": "The organization_id you want to attach the resource to", + "description_kind": "plain", + "computed": true + }, + "project_id": { + "type": "string", + "description": "The project_id you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "reverse": { + "type": "string", + "description": "The reverse DNS for this flexible IP", + "description_kind": "plain", + "optional": true + }, + "server_id": { + "type": "string", + "description": "The baremetal server associated with this flexible IP", + "description_kind": "plain", + "optional": true + }, + "tags": { + "type": [ + "list", + "string" + ], + "description": "The tags associated with the flexible IP", + "description_kind": "plain", + "optional": true + }, + "updated_at": { + "type": "string", + "description": "The date and time of the last update of the Flexible IP (Format ISO 8601)", + "description_kind": "plain", + "computed": true + }, + "zone": { + "type": "string", + "description": "The zone you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + } + }, + "block_types": { + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "create": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "delete": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "read": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "update": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_function": { + "version": 0, + "block": { + "attributes": { + "cpu_limit": { + "type": "number", + "description": "CPU limit in mCPU for your function", + "description_kind": "plain", + "computed": true + }, + "deploy": { + "type": "bool", + "description": "Define if the function should be deployed, terraform will wait for function to be deployed", + "description_kind": "plain", + "optional": true + }, + "description": { + "type": "string", + "description": "The description of the function", + "description_kind": "plain", + "optional": true + }, + "domain_name": { + "type": "string", + "description": "The native function domain name.", + "description_kind": "plain", + "computed": true + }, + "environment_variables": { + "type": [ + "map", + "string" + ], + "description": "The environment variables of the function", + "description_kind": "plain", + "optional": true + }, + "handler": { + "type": "string", + "description": "Handler of the function. Depends on the runtime https://developers.scaleway.com/en/products/functions/api/#create-a-function", + "description_kind": "plain", + "required": true + }, + "http_option": { + "type": "string", + "description": "HTTP traffic configuration", + "description_kind": "plain", + "optional": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "max_scale": { + "type": "number", + "description": "Maximum replicas for your function (defaults to 20), our system will scale your functions automatically based on incoming workload, but will never scale the number of replicas above the configured max_scale.", + "description_kind": "plain", + "optional": true + }, + "memory_limit": { + "type": "number", + "description": "Memory limit in MB for your function, defaults to 128MB", + "description_kind": "plain", + "optional": true + }, + "min_scale": { + "type": "number", + "description": "Minimum replicas for your function, defaults to 0, Note that a function is billed when it gets executed, and using a min_scale greater than 0 will cause your function to run all the time.", + "description_kind": "plain", + "optional": true + }, + "name": { + "type": "string", + "description": "The name of the function", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "namespace_id": { + "type": "string", + "description": "The namespace ID associated with this function", + "description_kind": "plain", + "required": true + }, + "organization_id": { + "type": "string", + "description": "The organization_id you want to attach the resource to", + "description_kind": "plain", + "computed": true + }, + "privacy": { + "type": "string", + "description": "Privacy of the function. Can be either `private` or `public`", + "description_kind": "plain", + "required": true + }, + "project_id": { + "type": "string", + "description": "The project_id you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "region": { + "type": "string", + "description": "The region you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "runtime": { + "type": "string", + "description": "Runtime of the function", + "description_kind": "plain", + "required": true + }, + "secret_environment_variables": { + "type": [ + "map", + "string" + ], + "description": "The secret environment variables to be injected into your function at runtime.", + "description_kind": "plain", + "optional": true, + "sensitive": true + }, + "timeout": { + "type": "number", + "description": "Holds the max duration (in seconds) the function is allowed for responding to a request", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "zip_file": { + "type": "string", + "description": "Location of the zip file to upload containing your function sources", + "description_kind": "plain", + "optional": true + }, + "zip_hash": { + "type": "string", + "description": "The hash of your source zip file, changing it will re-apply function. Can be any string", + "description_kind": "plain", + "optional": true + } + }, + "block_types": { + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "create": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "delete": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "read": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "update": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_function_cron": { + "version": 0, + "block": { + "attributes": { + "args": { + "type": "string", + "description": "Functions arguments as json object to pass through during execution.", + "description_kind": "plain", + "required": true + }, + "function_id": { + "type": "string", + "description": "The ID of the function to create a cron for.", + "description_kind": "plain", + "required": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "region": { + "type": "string", + "description": "The region you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "schedule": { + "type": "string", + "description": "Cron format string, e.g. 0 * * * * or @hourly, as schedule time of its jobs to be created and executed.", + "description_kind": "plain", + "required": true + }, + "status": { + "type": "string", + "description": "Cron job status.", + "description_kind": "plain", + "computed": true + } + }, + "block_types": { + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "create": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "delete": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "read": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "update": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_function_domain": { + "version": 0, + "block": { + "attributes": { + "function_id": { + "type": "string", + "description": "The ID of the function", + "description_kind": "plain", + "required": true + }, + "hostname": { + "type": "string", + "description": "The hostname that should be redirected to the function", + "description_kind": "plain", + "required": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "region": { + "type": "string", + "description": "The region you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "url": { + "type": "string", + "description": "URL to use to trigger the function", + "description_kind": "plain", + "computed": true + } + }, + "block_types": { + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "create": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "delete": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "read": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "update": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_function_namespace": { + "version": 0, + "block": { + "attributes": { + "description": { + "type": "string", + "description": "The description of the function namespace", + "description_kind": "plain", + "optional": true + }, + "environment_variables": { + "type": [ + "map", + "string" + ], + "description": "The environment variables of the function namespace", + "description_kind": "plain", + "optional": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "name": { + "type": "string", + "description": "The name of the function namespace", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "organization_id": { + "type": "string", + "description": "The organization_id you want to attach the resource to", + "description_kind": "plain", + "computed": true + }, + "project_id": { + "type": "string", + "description": "The project_id you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "region": { + "type": "string", + "description": "The region you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "registry_endpoint": { + "type": "string", + "description": "The endpoint reachable by docker", + "description_kind": "plain", + "computed": true + }, + "registry_namespace_id": { + "type": "string", + "description": "The ID of the registry namespace", + "description_kind": "plain", + "computed": true + }, + "secret_environment_variables": { + "type": [ + "map", + "string" + ], + "description": "The environment variables of the function namespace", + "description_kind": "plain", + "optional": true, + "sensitive": true + } + }, + "block_types": { + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "create": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "delete": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "read": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "update": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_function_token": { + "version": 0, + "block": { + "attributes": { + "description": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "expires_at": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "function_id": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "namespace_id": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "region": { + "type": "string", + "description": "The region you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "token": { + "type": "string", + "description_kind": "plain", + "computed": true, + "sensitive": true + } + }, + "description_kind": "plain" + } + }, + "scaleway_iam_api_key": { + "version": 0, + "block": { + "attributes": { + "access_key": { + "type": "string", + "description": "The access key of the iam api key", + "description_kind": "plain", + "computed": true + }, + "application_id": { + "type": "string", + "description": "ID of the application attached to the api key", + "description_kind": "plain", + "optional": true + }, + "created_at": { + "type": "string", + "description": "The date and time of the creation of the iam api key", + "description_kind": "plain", + "computed": true + }, + "creation_ip": { + "type": "string", + "description": "The IPv4 Address of the device which created the API key", + "description_kind": "plain", + "computed": true + }, + "default_project_id": { + "type": "string", + "description": "The project_id you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "description": { + "type": "string", + "description": "The description of the iam api key", + "description_kind": "plain", + "optional": true + }, + "editable": { + "type": "bool", + "description": "Whether or not the iam api key is editable", + "description_kind": "plain", + "computed": true + }, + "expires_at": { + "type": "string", + "description": "The date and time of the expiration of the iam api key. Cannot be changed afterwards", + "description_kind": "plain", + "optional": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "secret_key": { + "type": "string", + "description": "The secret Key of the iam api key", + "description_kind": "plain", + "computed": true, + "sensitive": true + }, + "updated_at": { + "type": "string", + "description": "The date and time of the last update of the iam api key", + "description_kind": "plain", + "computed": true + }, + "user_id": { + "type": "string", + "description": "ID of the user attached to the api key", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + }, + "scaleway_iam_application": { + "version": 0, + "block": { + "attributes": { + "created_at": { + "type": "string", + "description": "The date and time of the creation of the application", + "description_kind": "plain", + "computed": true + }, + "description": { + "type": "string", + "description": "The description of the iam application", + "description_kind": "plain", + "optional": true + }, + "editable": { + "type": "bool", + "description": "Whether or not the application is editable.", + "description_kind": "plain", + "computed": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "name": { + "type": "string", + "description": "The name of the iam application", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "organization_id": { + "type": "string", + "description": "ID of organization the resource is associated to.", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "updated_at": { + "type": "string", + "description": "The date and time of the last update of the application", + "description_kind": "plain", + "computed": true + } + }, + "description_kind": "plain" + } + }, + "scaleway_iam_group": { + "version": 0, + "block": { + "attributes": { + "application_ids": { + "type": [ + "set", + "string" + ], + "description": "List of IDs of the applications attached to the group", + "description_kind": "plain", + "optional": true + }, + "created_at": { + "type": "string", + "description": "The date and time of the creation of the group", + "description_kind": "plain", + "computed": true + }, + "description": { + "type": "string", + "description": "The description of the iam group", + "description_kind": "plain", + "optional": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "name": { + "type": "string", + "description": "The name of the iam group", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "organization_id": { + "type": "string", + "description": "ID of organization the resource is associated to.", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "updated_at": { + "type": "string", + "description": "The date and time of the last update of the group", + "description_kind": "plain", + "computed": true + }, + "user_ids": { + "type": [ + "set", + "string" + ], + "description": "List of IDs of the users attached to the group", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + }, + "scaleway_iam_policy": { + "version": 0, + "block": { + "attributes": { + "application_id": { + "type": "string", + "description": "Application id", + "description_kind": "plain", + "optional": true + }, + "created_at": { + "type": "string", + "description": "The date and time of the creation of the policy", + "description_kind": "plain", + "computed": true + }, + "description": { + "type": "string", + "description": "The description of the iam policy", + "description_kind": "plain", + "optional": true + }, + "editable": { + "type": "bool", + "description": "Whether or not the policy is editable.", + "description_kind": "plain", + "computed": true + }, + "group_id": { + "type": "string", + "description": "Group id", + "description_kind": "plain", + "optional": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "name": { + "type": "string", + "description": "The name of the iam policy", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "no_principal": { + "type": "bool", + "description": "Deactivate policy to a principal", + "description_kind": "plain", + "optional": true + }, + "organization_id": { + "type": "string", + "description": "ID of organization the resource is associated to.", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "updated_at": { + "type": "string", + "description": "The date and time of the last update of the policy", + "description_kind": "plain", + "computed": true + }, + "user_id": { + "type": "string", + "description": "User id", + "description_kind": "plain", + "optional": true + } + }, + "block_types": { + "rule": { + "nesting_mode": "list", + "block": { + "attributes": { + "organization_id": { + "type": "string", + "description": "ID of organization scoped to the rule. Only one of project_ids and organization_id may be set.", + "description_kind": "plain", + "optional": true + }, + "permission_set_names": { + "type": [ + "set", + "string" + ], + "description": "Names of permission sets bound to the rule.", + "description_kind": "plain", + "required": true + }, + "project_ids": { + "type": [ + "list", + "string" + ], + "description": "List of project IDs scoped to the rule. Only one of project_ids and organization_id may be set.", + "description_kind": "plain", + "optional": true + } + }, + "description": "Rules of the policy to create", + "description_kind": "plain" + }, + "min_items": 1 + } + }, + "description_kind": "plain" + } + }, + "scaleway_iam_ssh_key": { + "version": 0, + "block": { + "attributes": { + "created_at": { + "type": "string", + "description": "The date and time of the creation of the iam SSH Key", + "description_kind": "plain", + "computed": true + }, + "disabled": { + "type": "bool", + "description": "The SSH key status", + "description_kind": "plain", + "optional": true + }, + "fingerprint": { + "type": "string", + "description": "The fingerprint of the iam SSH key", + "description_kind": "plain", + "computed": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "name": { + "type": "string", + "description": "The name of the iam SSH key", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "organization_id": { + "type": "string", + "description": "The organization_id you want to attach the resource to", + "description_kind": "plain", + "computed": true + }, + "project_id": { + "type": "string", + "description": "The project_id you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "public_key": { + "type": "string", + "description": "The public SSH key", + "description_kind": "plain", + "required": true + }, + "updated_at": { + "type": "string", + "description": "The date and time of the last update of the iam SSH Key", + "description_kind": "plain", + "computed": true + } + }, + "description_kind": "plain" + } + }, + "scaleway_instance_image": { + "version": 0, + "block": { + "attributes": { + "additional_volume_ids": { + "type": [ + "list", + "string" + ], + "description": "The IDs of the additional volumes attached to the image", + "description_kind": "plain", + "optional": true + }, + "additional_volumes": { + "type": [ + "list", + [ + "object", + { + "creation_date": "string", + "export_uri": "string", + "id": "string", + "modification_date": "string", + "name": "string", + "organization": "string", + "project": "string", + "server": [ + "map", + "string" + ], + "size": "number", + "state": "string", + "tags": [ + "list", + "string" + ], + "volume_type": "string", + "zone": "string" + } + ] + ], + "description": "Specs of the additional volumes attached to the image", + "description_kind": "plain", + "computed": true + }, + "architecture": { + "type": "string", + "description": "Architecture of the image (default = x86_64)", + "description_kind": "plain", + "optional": true + }, + "creation_date": { + "type": "string", + "description": "The date and time of the creation of the image", + "description_kind": "plain", + "computed": true + }, + "from_server_id": { + "type": "string", + "description": "The ID of the backed-up server from which the snapshot was taken", + "description_kind": "plain", + "computed": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "modification_date": { + "type": "string", + "description": "The date and time of the last modification of the Redis cluster", + "description_kind": "plain", + "computed": true + }, + "name": { + "type": "string", + "description": "The name of the image", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "organization_id": { + "type": "string", + "description": "The organization_id you want to attach the resource to", + "description_kind": "plain", + "computed": true + }, + "project_id": { + "type": "string", + "description": "The project_id you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "public": { + "type": "bool", + "description": "If true, the image will be public", + "description_kind": "plain", + "optional": true + }, + "root_volume_id": { + "type": "string", + "description": "UUID of the snapshot from which the image is to be created", + "description_kind": "plain", + "required": true + }, + "state": { + "type": "string", + "description": "The state of the image [ available | creating | error ]", + "description_kind": "plain", + "computed": true + }, + "tags": { + "type": [ + "list", + "string" + ], + "description": "List of tags [\"tag1\", \"tag2\", ...] attached to the image", + "description_kind": "plain", + "optional": true + }, + "zone": { + "type": "string", + "description": "The zone you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + } + }, + "block_types": { + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "create": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "delete": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "read": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "update": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_instance_ip": { + "version": 0, + "block": { + "attributes": { + "address": { + "type": "string", + "description": "The IP address", + "description_kind": "plain", + "computed": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "organization_id": { + "type": "string", + "description": "The organization_id you want to attach the resource to", + "description_kind": "plain", + "computed": true + }, + "project_id": { + "type": "string", + "description": "The project_id you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "reverse": { + "type": "string", + "description": "The reverse DNS for this IP", + "description_kind": "plain", + "computed": true + }, + "server_id": { + "type": "string", + "description": "The server associated with this IP", + "description_kind": "plain", + "computed": true + }, + "tags": { + "type": [ + "list", + "string" + ], + "description": "The tags associated with the ip", + "description_kind": "plain", + "optional": true + }, + "zone": { + "type": "string", + "description": "The zone you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + } + }, + "block_types": { + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_instance_ip_reverse_dns": { + "version": 0, + "block": { + "attributes": { + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "ip_id": { + "type": "string", + "description": "The IP ID or IP address", + "description_kind": "plain", + "required": true + }, + "reverse": { + "type": "string", + "description": "The reverse DNS for this IP", + "description_kind": "plain", + "required": true + }, + "zone": { + "type": "string", + "description": "The zone you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + } + }, + "block_types": { + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "create": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "update": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_instance_placement_group": { + "version": 0, + "block": { + "attributes": { + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "name": { + "type": "string", + "description": "The name of the placement group", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "organization_id": { + "type": "string", + "description": "The organization_id you want to attach the resource to", + "description_kind": "plain", + "computed": true + }, + "policy_mode": { + "type": "string", + "description": "One of the two policy_mode may be selected: enforced or optional.", + "description_kind": "plain", + "optional": true + }, + "policy_respected": { + "type": "bool", + "description": "Is true when the policy is respected.", + "description_kind": "plain", + "computed": true + }, + "policy_type": { + "type": "string", + "description": "The operating mode is selected by a policy_type", + "description_kind": "plain", + "optional": true + }, + "project_id": { + "type": "string", + "description": "The project_id you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "tags": { + "type": [ + "list", + "string" + ], + "description": "The tags associated with the placement group", + "description_kind": "plain", + "optional": true + }, + "zone": { + "type": "string", + "description": "The zone you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + } + }, + "block_types": { + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_instance_private_nic": { + "version": 0, + "block": { + "attributes": { + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "mac_address": { + "type": "string", + "description": "MAC address of the NIC", + "description_kind": "plain", + "computed": true + }, + "private_network_id": { + "type": "string", + "description": "The private network ID", + "description_kind": "plain", + "required": true + }, + "server_id": { + "type": "string", + "description": "The server ID", + "description_kind": "plain", + "required": true + }, + "tags": { + "type": [ + "list", + "string" + ], + "description": "The tags associated with the private-nic", + "description_kind": "plain", + "optional": true + }, + "zone": { + "type": "string", + "description": "The zone you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + } + }, + "block_types": { + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "create": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "delete": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "read": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "update": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_instance_security_group": { + "version": 0, + "block": { + "attributes": { + "description": { + "type": "string", + "description": "The description of the security group", + "description_kind": "plain", + "optional": true + }, + "enable_default_security": { + "type": "bool", + "description": "Enable blocking of SMTP on IPv4 and IPv6", + "description_kind": "plain", + "optional": true + }, + "external_rules": { + "type": "bool", + "description_kind": "plain", + "optional": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "inbound_default_policy": { + "type": "string", + "description": "Default inbound traffic policy for this security group", + "description_kind": "plain", + "optional": true + }, + "name": { + "type": "string", + "description": "The name of the security group", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "organization_id": { + "type": "string", + "description": "The organization_id you want to attach the resource to", + "description_kind": "plain", + "computed": true + }, + "outbound_default_policy": { + "type": "string", + "description": "Default outbound traffic policy for this security group", + "description_kind": "plain", + "optional": true + }, + "project_id": { + "type": "string", + "description": "The project_id you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "stateful": { + "type": "bool", + "description": "The stateful value of the security group", + "description_kind": "plain", + "optional": true + }, + "tags": { + "type": [ + "list", + "string" + ], + "description": "The tags associated with the security group", + "description_kind": "plain", + "optional": true + }, + "zone": { + "type": "string", + "description": "The zone you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + } + }, + "block_types": { + "inbound_rule": { + "nesting_mode": "list", + "block": { + "attributes": { + "action": { + "type": "string", + "description": "Action when rule match request (drop or accept)", + "description_kind": "plain", + "required": true + }, + "ip": { + "type": "string", + "description": "Ip address for this rule (e.g: 1.1.1.1). Only one of ip or ip_range should be provided", + "description_kind": "plain", + "deprecated": true, + "optional": true + }, + "ip_range": { + "type": "string", + "description": "Ip range for this rule (e.g: 192.168.1.0/24). Only one of ip or ip_range should be provided", + "description_kind": "plain", + "optional": true + }, + "port": { + "type": "number", + "description": "Network port for this rule", + "description_kind": "plain", + "optional": true + }, + "port_range": { + "type": "string", + "description": "Computed port range for this rule (e.g: 1-1024, 22-22)", + "description_kind": "plain", + "optional": true + }, + "protocol": { + "type": "string", + "description": "Protocol for this rule (TCP, UDP, ICMP or ANY)", + "description_kind": "plain", + "optional": true + } + }, + "description": "Inbound rules for this security group", + "description_kind": "plain" + } + }, + "outbound_rule": { + "nesting_mode": "list", + "block": { + "attributes": { + "action": { + "type": "string", + "description": "Action when rule match request (drop or accept)", + "description_kind": "plain", + "required": true + }, + "ip": { + "type": "string", + "description": "Ip address for this rule (e.g: 1.1.1.1). Only one of ip or ip_range should be provided", + "description_kind": "plain", + "deprecated": true, + "optional": true + }, + "ip_range": { + "type": "string", + "description": "Ip range for this rule (e.g: 192.168.1.0/24). Only one of ip or ip_range should be provided", + "description_kind": "plain", + "optional": true + }, + "port": { + "type": "number", + "description": "Network port for this rule", + "description_kind": "plain", + "optional": true + }, + "port_range": { + "type": "string", + "description": "Computed port range for this rule (e.g: 1-1024, 22-22)", + "description_kind": "plain", + "optional": true + }, + "protocol": { + "type": "string", + "description": "Protocol for this rule (TCP, UDP, ICMP or ANY)", + "description_kind": "plain", + "optional": true + } + }, + "description": "Outbound rules for this security group", + "description_kind": "plain" + } + }, + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_instance_security_group_rules": { + "version": 0, + "block": { + "attributes": { + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "security_group_id": { + "type": "string", + "description": "The security group associated with this volume", + "description_kind": "plain", + "required": true + } + }, + "block_types": { + "inbound_rule": { + "nesting_mode": "list", + "block": { + "attributes": { + "action": { + "type": "string", + "description": "Action when rule match request (drop or accept)", + "description_kind": "plain", + "required": true + }, + "ip": { + "type": "string", + "description": "Ip address for this rule (e.g: 1.1.1.1). Only one of ip or ip_range should be provided", + "description_kind": "plain", + "deprecated": true, + "optional": true + }, + "ip_range": { + "type": "string", + "description": "Ip range for this rule (e.g: 192.168.1.0/24). Only one of ip or ip_range should be provided", + "description_kind": "plain", + "optional": true + }, + "port": { + "type": "number", + "description": "Network port for this rule", + "description_kind": "plain", + "optional": true + }, + "port_range": { + "type": "string", + "description": "Computed port range for this rule (e.g: 1-1024, 22-22)", + "description_kind": "plain", + "optional": true + }, + "protocol": { + "type": "string", + "description": "Protocol for this rule (TCP, UDP, ICMP or ANY)", + "description_kind": "plain", + "optional": true + } + }, + "description": "Inbound rules for this set of security group rules", + "description_kind": "plain" + } + }, + "outbound_rule": { + "nesting_mode": "list", + "block": { + "attributes": { + "action": { + "type": "string", + "description": "Action when rule match request (drop or accept)", + "description_kind": "plain", + "required": true + }, + "ip": { + "type": "string", + "description": "Ip address for this rule (e.g: 1.1.1.1). Only one of ip or ip_range should be provided", + "description_kind": "plain", + "deprecated": true, + "optional": true + }, + "ip_range": { + "type": "string", + "description": "Ip range for this rule (e.g: 192.168.1.0/24). Only one of ip or ip_range should be provided", + "description_kind": "plain", + "optional": true + }, + "port": { + "type": "number", + "description": "Network port for this rule", + "description_kind": "plain", + "optional": true + }, + "port_range": { + "type": "string", + "description": "Computed port range for this rule (e.g: 1-1024, 22-22)", + "description_kind": "plain", + "optional": true + }, + "protocol": { + "type": "string", + "description": "Protocol for this rule (TCP, UDP, ICMP or ANY)", + "description_kind": "plain", + "optional": true + } + }, + "description": "Outbound rules for this set of security group rules", + "description_kind": "plain" + } + }, + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_instance_server": { + "version": 0, + "block": { + "attributes": { + "additional_volume_ids": { + "type": [ + "list", + "string" + ], + "description": "The additional volumes attached to the server", + "description_kind": "plain", + "optional": true + }, + "boot_type": { + "type": "string", + "description": "The boot type of the server", + "description_kind": "plain", + "optional": true + }, + "bootscript_id": { + "type": "string", + "description": "ID of the target bootscript (set boot_type to bootscript)", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "cloud_init": { + "type": "string", + "description": "The cloud init script associated with this server", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "enable_dynamic_ip": { + "type": "bool", + "description": "Enable dynamic IP on the server", + "description_kind": "plain", + "optional": true + }, + "enable_ipv6": { + "type": "bool", + "description": "Determines if IPv6 is enabled for the server", + "description_kind": "plain", + "optional": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "image": { + "type": "string", + "description": "The UUID or the label of the base image used by the server", + "description_kind": "plain", + "optional": true + }, + "ip_id": { + "type": "string", + "description": "The ID of the reserved IP for the server", + "description_kind": "plain", + "optional": true + }, + "ipv6_address": { + "type": "string", + "description": "The default public IPv6 address routed to the server.", + "description_kind": "plain", + "computed": true + }, + "ipv6_gateway": { + "type": "string", + "description": "The IPv6 gateway address", + "description_kind": "plain", + "computed": true + }, + "ipv6_prefix_length": { + "type": "number", + "description": "The IPv6 prefix length routed to the server.", + "description_kind": "plain", + "computed": true + }, + "name": { + "type": "string", + "description": "The name of the server", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "organization_id": { + "type": "string", + "description": "The organization_id you want to attach the resource to", + "description_kind": "plain", + "computed": true + }, + "placement_group_id": { + "type": "string", + "description": "The placement group the server is attached to", + "description_kind": "plain", + "optional": true + }, + "placement_group_policy_respected": { + "type": "bool", + "description": "True when the placement group policy is respected", + "description_kind": "plain", + "computed": true + }, + "private_ip": { + "type": "string", + "description": "The Scaleway internal IP address of the server", + "description_kind": "plain", + "computed": true + }, + "project_id": { + "type": "string", + "description": "The project_id you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "public_ip": { + "type": "string", + "description": "The public IPv4 address of the server", + "description_kind": "plain", + "computed": true + }, + "security_group_id": { + "type": "string", + "description": "The security group the server is attached to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "state": { + "type": "string", + "description": "The state of the server should be: started, stopped, standby", + "description_kind": "plain", + "optional": true + }, + "tags": { + "type": [ + "list", + "string" + ], + "description": "The tags associated with the server", + "description_kind": "plain", + "optional": true + }, + "type": { + "type": "string", + "description": "The instance type of the server", + "description_kind": "plain", + "required": true + }, + "user_data": { + "type": [ + "map", + "string" + ], + "description": "The user data associated with the server", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "zone": { + "type": "string", + "description": "The zone you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + } + }, + "block_types": { + "private_network": { + "nesting_mode": "list", + "block": { + "attributes": { + "mac_address": { + "type": "string", + "description": "MAC address of the NIC", + "description_kind": "plain", + "computed": true + }, + "pn_id": { + "type": "string", + "description": "The Private Network ID", + "description_kind": "plain", + "required": true + }, + "status": { + "type": "string", + "description": "The private NIC state", + "description_kind": "plain", + "computed": true + }, + "zone": { + "type": "string", + "description": "The zone you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + } + }, + "description": "List of private network to connect with your instance", + "description_kind": "plain" + }, + "max_items": 8 + }, + "root_volume": { + "nesting_mode": "list", + "block": { + "attributes": { + "boot": { + "type": "bool", + "description": "Set the volume where the boot the server", + "description_kind": "plain", + "optional": true + }, + "delete_on_termination": { + "type": "bool", + "description": "Force deletion of the root volume on instance termination", + "description_kind": "plain", + "optional": true + }, + "name": { + "type": "string", + "description": "Name of the root volume", + "description_kind": "plain", + "computed": true + }, + "size_in_gb": { + "type": "number", + "description": "Size of the root volume in gigabytes", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "volume_id": { + "type": "string", + "description": "Volume ID of the root volume", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "volume_type": { + "type": "string", + "description": "Volume type of the root volume", + "description_kind": "plain", + "optional": true, + "computed": true + } + }, + "description": "Root volume attached to the server on creation", + "description_kind": "plain" + }, + "max_items": 1 + }, + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "create": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "delete": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "read": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "update": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_instance_snapshot": { + "version": 0, + "block": { + "attributes": { + "created_at": { + "type": "string", + "description": "The date and time of the creation of the snapshot", + "description_kind": "plain", + "computed": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "name": { + "type": "string", + "description": "The name of the snapshot", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "organization_id": { + "type": "string", + "description": "The organization_id you want to attach the resource to", + "description_kind": "plain", + "computed": true + }, + "project_id": { + "type": "string", + "description": "The project_id you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "size_in_gb": { + "type": "number", + "description": "The size of the snapshot in gigabyte", + "description_kind": "plain", + "computed": true + }, + "tags": { + "type": [ + "list", + "string" + ], + "description": "The tags associated with the snapshot", + "description_kind": "plain", + "optional": true + }, + "type": { + "type": "string", + "description": "The snapshot's volume type", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "volume_id": { + "type": "string", + "description": "ID of the volume to take a snapshot from", + "description_kind": "plain", + "optional": true + }, + "zone": { + "type": "string", + "description": "The zone you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + } + }, + "block_types": { + "import": { + "nesting_mode": "list", + "block": { + "attributes": { + "bucket": { + "type": "string", + "description": "Bucket containing qcow", + "description_kind": "plain", + "required": true + }, + "key": { + "type": "string", + "description": "Key of the qcow file in the specified bucket", + "description_kind": "plain", + "required": true + } + }, + "description": "Import snapshot from a qcow", + "description_kind": "plain" + }, + "max_items": 1 + }, + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "create": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "delete": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_instance_user_data": { + "version": 0, + "block": { + "attributes": { + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "key": { + "type": "string", + "description": "The key of the user data to set.", + "description_kind": "plain", + "required": true + }, + "server_id": { + "type": "string", + "description": "The ID of the server", + "description_kind": "plain", + "required": true + }, + "value": { + "type": "string", + "description": "The value of the user data to set.", + "description_kind": "plain", + "required": true + }, + "zone": { + "type": "string", + "description": "The zone you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + } + }, + "block_types": { + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "create": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "delete": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "read": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "update": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_instance_volume": { + "version": 0, + "block": { + "attributes": { + "from_snapshot_id": { + "type": "string", + "description": "Create a volume based on a image", + "description_kind": "plain", + "optional": true + }, + "from_volume_id": { + "type": "string", + "description": "Create a copy of an existing volume", + "description_kind": "plain", + "optional": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "name": { + "type": "string", + "description": "The name of the volume", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "organization_id": { + "type": "string", + "description": "The organization_id you want to attach the resource to", + "description_kind": "plain", + "computed": true + }, + "project_id": { + "type": "string", + "description": "The project_id you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "server_id": { + "type": "string", + "description": "The server associated with this volume", + "description_kind": "plain", + "computed": true + }, + "size_in_gb": { + "type": "number", + "description": "The size of the volume in gigabyte", + "description_kind": "plain", + "optional": true + }, + "tags": { + "type": [ + "list", + "string" + ], + "description": "The tags associated with the volume", + "description_kind": "plain", + "optional": true + }, + "type": { + "type": "string", + "description": "The volume type", + "description_kind": "plain", + "required": true + }, + "zone": { + "type": "string", + "description": "The zone you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + } + }, + "block_types": { + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "create": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "delete": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "update": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_iot_device": { + "version": 0, + "block": { + "attributes": { + "allow_insecure": { + "type": "bool", + "description": "Allow plain and server-authenticated SSL connections in addition to mutually-authenticated ones", + "description_kind": "plain", + "optional": true + }, + "allow_multiple_connections": { + "type": "bool", + "description": "Allow multiple connections", + "description_kind": "plain", + "optional": true + }, + "created_at": { + "type": "string", + "description": "The date and time of the creation of the device", + "description_kind": "plain", + "computed": true + }, + "description": { + "type": "string", + "description": "The description of the device", + "description_kind": "plain", + "optional": true + }, + "hub_id": { + "type": "string", + "description": "The ID of the hub on which this device will be created", + "description_kind": "plain", + "required": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "is_connected": { + "type": "bool", + "description": "The MQTT connection status of the device", + "description_kind": "plain", + "computed": true + }, + "last_activity_at": { + "type": "string", + "description": "The date and time of last MQTT activity of the device", + "description_kind": "plain", + "computed": true + }, + "name": { + "type": "string", + "description": "The name of the device", + "description_kind": "plain", + "required": true + }, + "region": { + "type": "string", + "description": "The region you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "status": { + "type": "string", + "description": "The status of the device", + "description_kind": "plain", + "computed": true + }, + "updated_at": { + "type": "string", + "description": "The date and time of the last update of the device", + "description_kind": "plain", + "computed": true + } + }, + "block_types": { + "certificate": { + "nesting_mode": "list", + "block": { + "attributes": { + "crt": { + "type": "string", + "description": "X509 PEM encoded certificate of the device", + "description_kind": "plain", + "optional": true, + "computed": true, + "sensitive": true + }, + "key": { + "type": "string", + "description": "X509 PEM encoded key of the device", + "description_kind": "plain", + "computed": true, + "sensitive": true + } + }, + "description": "Certificate section of the device", + "description_kind": "plain" + }, + "max_items": 1 + }, + "message_filters": { + "nesting_mode": "list", + "block": { + "block_types": { + "publish": { + "nesting_mode": "list", + "block": { + "attributes": { + "policy": { + "type": "string", + "description": "Publish message filter policy", + "description_kind": "plain", + "optional": true + }, + "topics": { + "type": [ + "list", + "string" + ], + "description": "List of topics in the set", + "description_kind": "plain", + "optional": true + } + }, + "description": "Rule to restrict topics the device can publish to", + "description_kind": "plain" + }, + "max_items": 1 + }, + "subscribe": { + "nesting_mode": "list", + "block": { + "attributes": { + "policy": { + "type": "string", + "description": "Subscribe message filter policy", + "description_kind": "plain", + "optional": true + }, + "topics": { + "type": [ + "list", + "string" + ], + "description": "List of topics in the set", + "description_kind": "plain", + "optional": true + } + }, + "description": "Rule to restrict topics the device can subscribe to", + "description_kind": "plain" + }, + "max_items": 1 + } + }, + "description": "Rules to authorize or deny the device to publish/subscribe to specific topics", + "description_kind": "plain" + }, + "max_items": 1 + } + }, + "description_kind": "plain" + } + }, + "scaleway_iot_hub": { + "version": 0, + "block": { + "attributes": { + "connected_device_count": { + "type": "number", + "description": "The current number of connected devices in the Hub", + "description_kind": "plain", + "computed": true + }, + "created_at": { + "type": "string", + "description": "The date and time of the creation of the IoT Hub", + "description_kind": "plain", + "computed": true + }, + "device_auto_provisioning": { + "type": "bool", + "description": "Wether to enable the device auto provisioning or not", + "description_kind": "plain", + "optional": true + }, + "device_count": { + "type": "number", + "description": "The number of registered devices in the Hub", + "description_kind": "plain", + "computed": true + }, + "disable_events": { + "type": "bool", + "description": "Whether to enable the hub events or not", + "description_kind": "plain", + "optional": true + }, + "enabled": { + "type": "bool", + "description": "Whether to enable the hub or not", + "description_kind": "plain", + "optional": true + }, + "endpoint": { + "type": "string", + "description": "The endpoint to connect the devices to", + "description_kind": "plain", + "computed": true + }, + "events_topic_prefix": { + "type": "string", + "description": "Topic prefix for the hub events", + "description_kind": "plain", + "optional": true + }, + "hub_ca": { + "type": "string", + "description": "Custom user provided certificate authority", + "description_kind": "plain", + "optional": true + }, + "hub_ca_challenge": { + "type": "string", + "description": "Challenge certificate for the user provided hub CA", + "description_kind": "plain", + "optional": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "name": { + "type": "string", + "description": "The name of the hub", + "description_kind": "plain", + "required": true + }, + "organization_id": { + "type": "string", + "description": "The organization_id you want to attach the resource to", + "description_kind": "plain", + "computed": true + }, + "product_plan": { + "type": "string", + "description": "The product plan of the hub", + "description_kind": "plain", + "required": true + }, + "project_id": { + "type": "string", + "description": "The project_id you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "region": { + "type": "string", + "description": "The region you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "status": { + "type": "string", + "description": "The status of the hub", + "description_kind": "plain", + "computed": true + }, + "updated_at": { + "type": "string", + "description": "The date and time of the last update of the IoT Hub", + "description_kind": "plain", + "computed": true + } + }, + "block_types": { + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_iot_network": { + "version": 0, + "block": { + "attributes": { + "created_at": { + "type": "string", + "description": "The date and time of the creation of the network", + "description_kind": "plain", + "computed": true + }, + "endpoint": { + "type": "string", + "description": "The endpoint to use when interacting with the network", + "description_kind": "plain", + "computed": true + }, + "hub_id": { + "type": "string", + "description": "The ID of the hub on which this network will be created", + "description_kind": "plain", + "required": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "name": { + "type": "string", + "description": "The name of the network", + "description_kind": "plain", + "required": true + }, + "secret": { + "type": "string", + "description": "The endpoint key to keep secret", + "description_kind": "plain", + "computed": true, + "sensitive": true + }, + "topic_prefix": { + "type": "string", + "description": "The prefix that will be prepended to all topics for this Network", + "description_kind": "plain", + "optional": true + }, + "type": { + "type": "string", + "description": "The type of the network", + "description_kind": "plain", + "required": true + } + }, + "block_types": { + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "delete": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_iot_route": { + "version": 0, + "block": { + "attributes": { + "created_at": { + "type": "string", + "description": "The date and time of the creation of the IoT Route", + "description_kind": "plain", + "computed": true + }, + "hub_id": { + "type": "string", + "description": "The ID of the route's hub", + "description_kind": "plain", + "required": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "name": { + "type": "string", + "description": "The name of the route", + "description_kind": "plain", + "required": true + }, + "region": { + "type": "string", + "description": "The region you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "topic": { + "type": "string", + "description": "The Topic the route subscribes to (wildcards allowed)", + "description_kind": "plain", + "required": true + } + }, + "block_types": { + "database": { + "nesting_mode": "list", + "block": { + "attributes": { + "dbname": { + "type": "string", + "description": "The database name", + "description_kind": "plain", + "required": true + }, + "host": { + "type": "string", + "description": "The database hostname", + "description_kind": "plain", + "required": true + }, + "password": { + "type": "string", + "description": "The database password", + "description_kind": "plain", + "required": true, + "sensitive": true + }, + "port": { + "type": "number", + "description": "The database port", + "description_kind": "plain", + "required": true + }, + "query": { + "type": "string", + "description": "SQL query to be executed ($TOPIC and $PAYLOAD variables are available, see documentation)", + "description_kind": "plain", + "required": true + }, + "username": { + "type": "string", + "description": "The database username", + "description_kind": "plain", + "required": true + } + }, + "description": "Database Route parameters", + "description_kind": "plain" + }, + "max_items": 1 + }, + "rest": { + "nesting_mode": "list", + "block": { + "attributes": { + "headers": { + "type": [ + "map", + "string" + ], + "description": "The HTTP call extra headers", + "description_kind": "plain", + "required": true + }, + "uri": { + "type": "string", + "description": "The URI of the REST endpoint", + "description_kind": "plain", + "required": true + }, + "verb": { + "type": "string", + "description": "The HTTP Verb used to call REST URI", + "description_kind": "plain", + "required": true + } + }, + "description": "Rest Route parameters", + "description_kind": "plain" + }, + "max_items": 1 + }, + "s3": { + "nesting_mode": "list", + "block": { + "attributes": { + "bucket_name": { + "type": "string", + "description": "The name of the S3 route's destination bucket", + "description_kind": "plain", + "required": true + }, + "bucket_region": { + "type": "string", + "description": "The region of the S3 route's destination bucket", + "description_kind": "plain", + "required": true + }, + "object_prefix": { + "type": "string", + "description": "The string to prefix object names with", + "description_kind": "plain", + "optional": true + }, + "strategy": { + "type": "string", + "description": "How the S3 route's objects will be created: one per topic or one per message", + "description_kind": "plain", + "required": true + } + }, + "description": "S3 Route parameters", + "description_kind": "plain" + }, + "max_items": 1 + }, + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "create": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_k8s_cluster": { + "version": 0, + "block": { + "attributes": { + "admission_plugins": { + "type": [ + "list", + "string" + ], + "description": "The list of admission plugins to enable on the cluster", + "description_kind": "plain", + "optional": true + }, + "apiserver_cert_sans": { + "type": [ + "list", + "string" + ], + "description": "Additional Subject Alternative Names for the Kubernetes API server certificate", + "description_kind": "plain", + "optional": true + }, + "apiserver_url": { + "type": "string", + "description": "Kubernetes API server URL", + "description_kind": "plain", + "computed": true + }, + "cni": { + "type": "string", + "description": "The CNI plugin of the cluster", + "description_kind": "plain", + "required": true + }, + "created_at": { + "type": "string", + "description": "The date and time of the creation of the Kubernetes cluster", + "description_kind": "plain", + "computed": true + }, + "delete_additional_resources": { + "type": "bool", + "description": "Delete additional resources like block volumes and loadbalancers on cluster deletion", + "description_kind": "plain", + "required": true + }, + "description": { + "type": "string", + "description": "The description of the cluster", + "description_kind": "plain", + "optional": true + }, + "feature_gates": { + "type": [ + "list", + "string" + ], + "description": "The list of feature gates to enable on the cluster", + "description_kind": "plain", + "optional": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "kubeconfig": { + "type": [ + "list", + [ + "object", + { + "cluster_ca_certificate": "string", + "config_file": "string", + "host": "string", + "token": "string" + } + ] + ], + "description": "The kubeconfig configuration file of the Kubernetes cluster", + "description_kind": "plain", + "computed": true, + "sensitive": true + }, + "name": { + "type": "string", + "description": "The name of the cluster", + "description_kind": "plain", + "required": true + }, + "organization_id": { + "type": "string", + "description": "The organization_id you want to attach the resource to", + "description_kind": "plain", + "computed": true + }, + "project_id": { + "type": "string", + "description": "The project_id you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "region": { + "type": "string", + "description": "The region you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "status": { + "type": "string", + "description": "The status of the cluster", + "description_kind": "plain", + "computed": true + }, + "tags": { + "type": [ + "list", + "string" + ], + "description": "The tags associated with the cluster", + "description_kind": "plain", + "optional": true + }, + "type": { + "type": "string", + "description": "The type of cluster", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "updated_at": { + "type": "string", + "description": "The date and time of the last update of the Kubernetes cluster", + "description_kind": "plain", + "computed": true + }, + "upgrade_available": { + "type": "bool", + "description": "True if an upgrade is available", + "description_kind": "plain", + "computed": true + }, + "version": { + "type": "string", + "description": "The version of the cluster", + "description_kind": "plain", + "required": true + }, + "wildcard_dns": { + "type": "string", + "description": "Wildcard DNS pointing to all the ready nodes", + "description_kind": "plain", + "computed": true + } + }, + "block_types": { + "auto_upgrade": { + "nesting_mode": "list", + "block": { + "attributes": { + "enable": { + "type": "bool", + "description": "Enables the Kubernetes patch version auto upgrade", + "description_kind": "plain", + "required": true + }, + "maintenance_window_day": { + "type": "string", + "description": "Day of the maintenance window", + "description_kind": "plain", + "required": true + }, + "maintenance_window_start_hour": { + "type": "number", + "description": "Start hour of the 2-hour maintenance window", + "description_kind": "plain", + "required": true + } + }, + "description": "The auto upgrade configuration for the cluster", + "description_kind": "plain" + }, + "max_items": 1 + }, + "autoscaler_config": { + "nesting_mode": "list", + "block": { + "attributes": { + "balance_similar_node_groups": { + "type": "bool", + "description": "Detect similar node groups and balance the number of nodes between them", + "description_kind": "plain", + "optional": true + }, + "disable_scale_down": { + "type": "bool", + "description": "Disable the scale down feature of the autoscaler", + "description_kind": "plain", + "optional": true + }, + "estimator": { + "type": "string", + "description": "Type of resource estimator to be used in scale up", + "description_kind": "plain", + "optional": true + }, + "expander": { + "type": "string", + "description": "Type of node group expander to be used in scale up", + "description_kind": "plain", + "optional": true + }, + "expendable_pods_priority_cutoff": { + "type": "number", + "description": "Pods with priority below cutoff will be expendable. They can be killed without any consideration during scale down and they don't cause scale up. Pods with null priority (PodPriority disabled) are non expendable", + "description_kind": "plain", + "optional": true + }, + "ignore_daemonsets_utilization": { + "type": "bool", + "description": "Ignore DaemonSet pods when calculating resource utilization for scaling down", + "description_kind": "plain", + "optional": true + }, + "max_graceful_termination_sec": { + "type": "number", + "description": "Maximum number of seconds the cluster autoscaler waits for pod termination when trying to scale down a node", + "description_kind": "plain", + "optional": true + }, + "scale_down_delay_after_add": { + "type": "string", + "description": "How long after scale up that scale down evaluation resumes", + "description_kind": "plain", + "optional": true + }, + "scale_down_unneeded_time": { + "type": "string", + "description": "How long a node should be unneeded before it is eligible for scale down", + "description_kind": "plain", + "optional": true + }, + "scale_down_utilization_threshold": { + "type": "number", + "description": "Node utilization level, defined as sum of requested resources divided by capacity, below which a node can be considered for scale down", + "description_kind": "plain", + "optional": true + } + }, + "description": "The autoscaler configuration for the cluster", + "description_kind": "plain" + }, + "max_items": 1 + }, + "open_id_connect_config": { + "nesting_mode": "list", + "block": { + "attributes": { + "client_id": { + "type": "string", + "description": "A client id that all tokens must be issued for", + "description_kind": "plain", + "required": true + }, + "groups_claim": { + "type": [ + "list", + "string" + ], + "description": "JWT claim to use as the user's group", + "description_kind": "plain", + "optional": true + }, + "groups_prefix": { + "type": "string", + "description": "Prefix prepended to group claims", + "description_kind": "plain", + "optional": true + }, + "issuer_url": { + "type": "string", + "description": "URL of the provider which allows the API server to discover public signing keys", + "description_kind": "plain", + "required": true + }, + "required_claim": { + "type": [ + "list", + "string" + ], + "description": "Multiple key=value pairs that describes a required claim in the ID Token", + "description_kind": "plain", + "optional": true + }, + "username_claim": { + "type": "string", + "description": "JWT claim to use as the user name", + "description_kind": "plain", + "optional": true + }, + "username_prefix": { + "type": "string", + "description": "Prefix prepended to username", + "description_kind": "plain", + "optional": true + } + }, + "description": "The OpenID Connect configuration of the cluster", + "description_kind": "plain" + }, + "max_items": 1 + }, + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "create": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "delete": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "read": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "update": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_k8s_pool": { + "version": 0, + "block": { + "attributes": { + "autohealing": { + "type": "bool", + "description": "Enable the autohealing on the pool", + "description_kind": "plain", + "optional": true + }, + "autoscaling": { + "type": "bool", + "description": "Enable the autoscaling on the pool", + "description_kind": "plain", + "optional": true + }, + "cluster_id": { + "type": "string", + "description": "The ID of the cluster on which this pool will be created", + "description_kind": "plain", + "required": true + }, + "container_runtime": { + "type": "string", + "description": "Container runtime for the pool", + "description_kind": "plain", + "optional": true + }, + "created_at": { + "type": "string", + "description": "The date and time of the creation of the pool", + "description_kind": "plain", + "computed": true + }, + "current_size": { + "type": "number", + "description": "The actual size of the pool", + "description_kind": "plain", + "computed": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "kubelet_args": { + "type": [ + "map", + "string" + ], + "description": "The Kubelet arguments to be used by this pool", + "description_kind": "plain", + "optional": true + }, + "max_size": { + "type": "number", + "description": "Maximum size of the pool", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "min_size": { + "type": "number", + "description": "Minimum size of the pool", + "description_kind": "plain", + "optional": true + }, + "name": { + "type": "string", + "description": "The name of the cluster", + "description_kind": "plain", + "required": true + }, + "node_type": { + "type": "string", + "description": "Server type of the pool servers", + "description_kind": "plain", + "required": true + }, + "nodes": { + "type": [ + "list", + [ + "object", + { + "name": "string", + "public_ip": "string", + "public_ip_v6": "string", + "status": "string" + } + ] + ], + "description_kind": "plain", + "computed": true + }, + "placement_group_id": { + "type": "string", + "description": "ID of the placement group", + "description_kind": "plain", + "optional": true + }, + "region": { + "type": "string", + "description": "The region you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "root_volume_size_in_gb": { + "type": "number", + "description": "The size of the system volume of the nodes in gigabyte", + "description_kind": "plain", + "optional": true + }, + "root_volume_type": { + "type": "string", + "description": "System volume type of the nodes composing the pool", + "description_kind": "plain", + "optional": true + }, + "size": { + "type": "number", + "description": "Size of the pool", + "description_kind": "plain", + "required": true + }, + "status": { + "type": "string", + "description": "The status of the pool", + "description_kind": "plain", + "computed": true + }, + "tags": { + "type": [ + "list", + "string" + ], + "description": "The tags associated with the pool", + "description_kind": "plain", + "optional": true + }, + "updated_at": { + "type": "string", + "description": "The date and time of the last update of the pool", + "description_kind": "plain", + "computed": true + }, + "version": { + "type": "string", + "description": "The Kubernetes version of the pool", + "description_kind": "plain", + "computed": true + }, + "wait_for_pool_ready": { + "type": "bool", + "description": "Whether to wait for the pool to be ready", + "description_kind": "plain", + "optional": true + }, + "zone": { + "type": "string", + "description": "The zone you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + } + }, + "block_types": { + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "create": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "update": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + }, + "upgrade_policy": { + "nesting_mode": "list", + "block": { + "attributes": { + "max_surge": { + "type": "number", + "description": "The maximum number of nodes to be created during the upgrade", + "description_kind": "plain", + "optional": true + }, + "max_unavailable": { + "type": "number", + "description": "The maximum number of nodes that can be not ready at the same time", + "description_kind": "plain", + "optional": true + } + }, + "description": "The Pool upgrade policy", + "description_kind": "plain" + }, + "max_items": 1 + } + }, + "description_kind": "plain" + } + }, + "scaleway_lb": { + "version": 1, + "block": { + "attributes": { + "description": { + "type": "string", + "description": "The description of the lb", + "description_kind": "plain", + "optional": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "ip_address": { + "type": "string", + "description": "The load-balance public IP address", + "description_kind": "plain", + "computed": true + }, + "ip_id": { + "type": "string", + "description": "The load-balance public IP ID", + "description_kind": "plain", + "required": true + }, + "name": { + "type": "string", + "description": "Name of the lb", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "organization_id": { + "type": "string", + "description": "The organization_id you want to attach the resource to", + "description_kind": "plain", + "computed": true + }, + "project_id": { + "type": "string", + "description": "The project_id you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "region": { + "type": "string", + "description": "The region of the resource", + "description_kind": "plain", + "computed": true + }, + "release_ip": { + "type": "bool", + "description": "Release the IPs related to this load-balancer", + "description_kind": "plain", + "deprecated": true, + "optional": true + }, + "ssl_compatibility_level": { + "type": "string", + "description": "Enforces minimal SSL version (in SSL/TLS offloading context)", + "description_kind": "plain", + "optional": true + }, + "tags": { + "type": [ + "list", + "string" + ], + "description": "Array of tags to associate with the load-balancer", + "description_kind": "plain", + "optional": true + }, + "type": { + "type": "string", + "description": "The type of load-balancer you want to create", + "description_kind": "plain", + "required": true + }, + "zone": { + "type": "string", + "description": "The zone you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + } + }, + "block_types": { + "private_network": { + "nesting_mode": "list", + "block": { + "attributes": { + "dhcp_config": { + "type": "bool", + "description": "Set to true if you want to let DHCP assign IP addresses", + "description_kind": "plain", + "optional": true + }, + "private_network_id": { + "type": "string", + "description": "The Private Network ID", + "description_kind": "plain", + "required": true + }, + "static_config": { + "type": [ + "list", + "string" + ], + "description": "Define an IP address in the subnet of your private network that will be assigned to your load balancer instance", + "description_kind": "plain", + "optional": true + }, + "status": { + "type": "string", + "description": "The status of private network connection", + "description_kind": "plain", + "computed": true + }, + "zone": { + "type": "string", + "description": "The zone you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + } + }, + "description": "List of private network to connect with your load balancer", + "description_kind": "plain" + }, + "max_items": 8 + }, + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "create": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "delete": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "read": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "update": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_lb_backend": { + "version": 1, + "block": { + "attributes": { + "failover_host": { + "type": "string", + "description": "Scaleway S3 bucket website to be served in case all backend servers are down\n\n**NOTE** : Only the host part of the Scaleway S3 bucket website is expected.\nE.g. 'failover-website.s3-website.fr-par.scw.cloud' if your bucket website URL is 'https://failover-website.s3-website.fr-par.scw.cloud/'.", + "description_kind": "plain", + "optional": true + }, + "forward_port": { + "type": "number", + "description": "User sessions will be forwarded to this port of backend servers", + "description_kind": "plain", + "required": true + }, + "forward_port_algorithm": { + "type": "string", + "description": "Load balancing algorithm", + "description_kind": "plain", + "optional": true + }, + "forward_protocol": { + "type": "string", + "description": "Backend protocol", + "description_kind": "plain", + "required": true + }, + "health_check_delay": { + "type": "string", + "description": "Interval between two HC requests", + "description_kind": "plain", + "optional": true + }, + "health_check_max_retries": { + "type": "number", + "description": "Number of allowed failed HC requests before the backend server is marked down", + "description_kind": "plain", + "optional": true + }, + "health_check_port": { + "type": "number", + "description": "Port the HC requests will be send to. Default to `forward_port`", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "health_check_timeout": { + "type": "string", + "description": "Timeout before we consider a HC request failed", + "description_kind": "plain", + "optional": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "ignore_ssl_server_verify": { + "type": "bool", + "description": "Specifies whether the Load Balancer should check the backend server’s certificate before initiating a connection", + "description_kind": "plain", + "optional": true + }, + "lb_id": { + "type": "string", + "description": "The load-balancer ID", + "description_kind": "plain", + "required": true + }, + "name": { + "type": "string", + "description": "The name of the backend", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "on_marked_down_action": { + "type": "string", + "description": "Modify what occurs when a backend server is marked down", + "description_kind": "plain", + "optional": true + }, + "proxy_protocol": { + "type": "string", + "description": "Type of PROXY protocol to enable", + "description_kind": "plain", + "optional": true + }, + "send_proxy_v2": { + "type": "bool", + "description": "Enables PROXY protocol version 2", + "description_kind": "plain", + "deprecated": true, + "optional": true + }, + "server_ips": { + "type": [ + "list", + "string" + ], + "description": "Backend server IP addresses list (IPv4 or IPv6)", + "description_kind": "plain", + "optional": true + }, + "ssl_bridging": { + "type": "bool", + "description": "Enables SSL between load balancer and backend servers", + "description_kind": "plain", + "optional": true + }, + "sticky_sessions": { + "type": "string", + "description": "Load balancing algorithm", + "description_kind": "plain", + "optional": true + }, + "sticky_sessions_cookie_name": { + "type": "string", + "description": "Cookie name for for sticky sessions", + "description_kind": "plain", + "optional": true + }, + "timeout_connect": { + "type": "string", + "description": "Maximum initial server connection establishment time", + "description_kind": "plain", + "optional": true + }, + "timeout_server": { + "type": "string", + "description": "Maximum server connection inactivity time", + "description_kind": "plain", + "optional": true + }, + "timeout_tunnel": { + "type": "string", + "description": "Maximum tunnel inactivity time", + "description_kind": "plain", + "optional": true + } + }, + "block_types": { + "health_check_http": { + "nesting_mode": "list", + "block": { + "attributes": { + "code": { + "type": "number", + "description": "The expected HTTP status code", + "description_kind": "plain", + "optional": true + }, + "host_header": { + "type": "string", + "description": "The HTTP host header to use for HC requests", + "description_kind": "plain", + "optional": true + }, + "method": { + "type": "string", + "description": "The HTTP method to use for HC requests", + "description_kind": "plain", + "optional": true + }, + "uri": { + "type": "string", + "description": "The HTTP endpoint URL to call for HC requests", + "description_kind": "plain", + "required": true + } + }, + "description_kind": "plain" + }, + "max_items": 1 + }, + "health_check_https": { + "nesting_mode": "list", + "block": { + "attributes": { + "code": { + "type": "number", + "description": "The expected HTTP status code", + "description_kind": "plain", + "optional": true + }, + "host_header": { + "type": "string", + "description": "The HTTP host header to use for HC requests", + "description_kind": "plain", + "optional": true + }, + "method": { + "type": "string", + "description": "The HTTP method to use for HC requests", + "description_kind": "plain", + "optional": true + }, + "sni": { + "type": "string", + "description": "The SNI to use for HC requests over SSL", + "description_kind": "plain", + "optional": true + }, + "uri": { + "type": "string", + "description": "The HTTPS endpoint URL to call for HC requests", + "description_kind": "plain", + "required": true + } + }, + "description_kind": "plain" + }, + "max_items": 1 + }, + "health_check_tcp": { + "nesting_mode": "list", + "block": { + "description_kind": "plain" + }, + "max_items": 1 + }, + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "create": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "delete": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "read": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "update": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_lb_certificate": { + "version": 1, + "block": { + "attributes": { + "common_name": { + "type": "string", + "description": "The main domain name of the certificate", + "description_kind": "plain", + "computed": true + }, + "fingerprint": { + "type": "string", + "description": "The identifier (SHA-1) of the certificate", + "description_kind": "plain", + "computed": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "lb_id": { + "type": "string", + "description": "The load-balancer ID", + "description_kind": "plain", + "required": true + }, + "name": { + "type": "string", + "description": "The name of the load-balancer certificate", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "not_valid_after": { + "type": "string", + "description": "The not valid after validity bound timestamp", + "description_kind": "plain", + "computed": true + }, + "not_valid_before": { + "type": "string", + "description": "The not valid before validity bound timestamp", + "description_kind": "plain", + "computed": true + }, + "status": { + "type": "string", + "description": "The status of certificate", + "description_kind": "plain", + "computed": true + }, + "subject_alternative_name": { + "type": [ + "list", + "string" + ], + "description": "The alternative domain names of the certificate", + "description_kind": "plain", + "computed": true + } + }, + "block_types": { + "custom_certificate": { + "nesting_mode": "list", + "block": { + "attributes": { + "certificate_chain": { + "type": "string", + "description": "The full PEM-formatted certificate chain", + "description_kind": "plain", + "required": true + } + }, + "description": "The custom type certificate type configuration", + "description_kind": "plain" + }, + "max_items": 1 + }, + "letsencrypt": { + "nesting_mode": "list", + "block": { + "attributes": { + "common_name": { + "type": "string", + "description": "The main domain name of the certificate", + "description_kind": "plain", + "required": true + }, + "subject_alternative_name": { + "type": [ + "list", + "string" + ], + "description": "The alternative domain names of the certificate", + "description_kind": "plain", + "optional": true + } + }, + "description": "The Let's Encrypt type certificate configuration", + "description_kind": "plain" + }, + "max_items": 1 + }, + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "create": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "delete": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "read": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "update": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_lb_frontend": { + "version": 1, + "block": { + "attributes": { + "backend_id": { + "type": "string", + "description": "The load-balancer backend ID", + "description_kind": "plain", + "required": true + }, + "certificate_id": { + "type": "string", + "description": "Certificate ID", + "description_kind": "plain", + "deprecated": true, + "computed": true + }, + "certificate_ids": { + "type": [ + "list", + "string" + ], + "description": "Collection of Certificate IDs related to the load balancer and domain", + "description_kind": "plain", + "optional": true + }, + "enable_http3": { + "type": "bool", + "description": "Activates HTTP/3 protocol", + "description_kind": "plain", + "optional": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "inbound_port": { + "type": "number", + "description": "TCP port to listen on the front side", + "description_kind": "plain", + "required": true + }, + "lb_id": { + "type": "string", + "description": "The load-balancer ID", + "description_kind": "plain", + "required": true + }, + "name": { + "type": "string", + "description": "The name of the frontend", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "timeout_client": { + "type": "string", + "description": "Set the maximum inactivity time on the client side", + "description_kind": "plain", + "optional": true + } + }, + "block_types": { + "acl": { + "nesting_mode": "list", + "block": { + "attributes": { + "name": { + "type": "string", + "description": "The ACL name", + "description_kind": "plain", + "optional": true, + "computed": true + } + }, + "block_types": { + "action": { + "nesting_mode": "list", + "block": { + "attributes": { + "type": { + "type": "string", + "description": "The action type", + "description_kind": "plain", + "required": true + } + }, + "description": "Action to undertake when an ACL filter matches", + "description_kind": "plain" + }, + "min_items": 1, + "max_items": 1 + }, + "match": { + "nesting_mode": "list", + "block": { + "attributes": { + "http_filter": { + "type": "string", + "description": "The HTTP filter to match", + "description_kind": "plain", + "optional": true + }, + "http_filter_option": { + "type": "string", + "description": "You can use this field with http_header_match acl type to set the header name to filter", + "description_kind": "plain", + "optional": true + }, + "http_filter_value": { + "type": [ + "list", + "string" + ], + "description": "A list of possible values to match for the given HTTP filter", + "description_kind": "plain", + "optional": true + }, + "invert": { + "type": "bool", + "description": "If set to true, the condition will be of type \"unless\"", + "description_kind": "plain", + "optional": true + }, + "ip_subnet": { + "type": [ + "list", + "string" + ], + "description": "A list of IPs or CIDR v4/v6 addresses of the client of the session to match", + "description_kind": "plain", + "optional": true + } + }, + "description": "The ACL match rule", + "description_kind": "plain" + }, + "min_items": 1, + "max_items": 1 + } + }, + "description": "ACL rules", + "description_kind": "plain" + } + }, + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "create": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "delete": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "update": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_lb_ip": { + "version": 1, + "block": { + "attributes": { + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "ip_address": { + "type": "string", + "description": "The load-balancer public IP address", + "description_kind": "plain", + "computed": true + }, + "lb_id": { + "type": "string", + "description": "The ID of the load balancer attached to this IP, if any", + "description_kind": "plain", + "computed": true + }, + "organization_id": { + "type": "string", + "description": "The organization_id you want to attach the resource to", + "description_kind": "plain", + "computed": true + }, + "project_id": { + "type": "string", + "description": "The project_id you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "region": { + "type": "string", + "description": "The region of the resource", + "description_kind": "plain", + "computed": true + }, + "reverse": { + "type": "string", + "description": "The reverse domain name for this IP", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "zone": { + "type": "string", + "description": "The zone you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + } + }, + "block_types": { + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "delete": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "read": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "update": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_lb_route": { + "version": 1, + "block": { + "attributes": { + "backend_id": { + "type": "string", + "description": "The backend ID destination of redirection", + "description_kind": "plain", + "required": true + }, + "created_at": { + "type": "string", + "description": "The date at which the route was created (RFC 3339 format)", + "description_kind": "plain", + "computed": true + }, + "frontend_id": { + "type": "string", + "description": "The frontend ID origin of redirection", + "description_kind": "plain", + "required": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "match_host_header": { + "type": "string", + "description": "Specifies the host of the server to which the request is being sent", + "description_kind": "plain", + "optional": true + }, + "match_sni": { + "type": "string", + "description": "Server Name Indication TLS extension field from an incoming connection made via an SSL/TLS transport layer", + "description_kind": "plain", + "optional": true + }, + "updated_at": { + "type": "string", + "description": "The date at which the route was last updated (RFC 3339 format)", + "description_kind": "plain", + "computed": true + } + }, + "block_types": { + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_mnq_credential": { + "version": 0, + "block": { + "attributes": { + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "name": { + "type": "string", + "description": "The name of the Credential", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "namespace_id": { + "type": "string", + "description": "The ID of the Namespace associated to", + "description_kind": "plain", + "required": true + }, + "protocol": { + "type": "string", + "description": "The Namespace protocol", + "description_kind": "plain", + "computed": true + }, + "region": { + "type": "string", + "description": "The region you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + } + }, + "block_types": { + "nats_credentials": { + "nesting_mode": "list", + "block": { + "attributes": { + "content": { + "type": "string", + "description": "Raw content of the NATS credentials file", + "description_kind": "plain", + "computed": true, + "sensitive": true + } + }, + "description": "credential for NATS protocol", + "description_kind": "plain" + }, + "max_items": 1 + }, + "sqs_sns_credentials": { + "nesting_mode": "list", + "block": { + "attributes": { + "access_key": { + "type": "string", + "description": "The key of the credential", + "description_kind": "plain", + "computed": true + }, + "secret_key": { + "type": "string", + "description": "The secret value of the key", + "description_kind": "plain", + "computed": true, + "sensitive": true + } + }, + "block_types": { + "permissions": { + "nesting_mode": "list", + "block": { + "attributes": { + "can_manage": { + "type": "bool", + "description": "Allow manage the associated resource", + "description_kind": "plain", + "optional": true + }, + "can_publish": { + "type": "bool", + "description": "Allow publish messages to the service", + "description_kind": "plain", + "optional": true + }, + "can_receive": { + "type": "bool", + "description": "Allow receive messages from the service", + "description_kind": "plain", + "optional": true + } + }, + "description": "The permission associated to this credential.", + "description_kind": "plain" + }, + "max_items": 1 + } + }, + "description": "The credential used to connect to the SQS/SNS service", + "description_kind": "plain" + }, + "max_items": 1 + } + }, + "description_kind": "plain" + } + }, + "scaleway_mnq_namespace": { + "version": 0, + "block": { + "attributes": { + "created_at": { + "type": "string", + "description": "The date and time of the creation of the mnq Namespace", + "description_kind": "plain", + "computed": true + }, + "endpoint": { + "type": "string", + "description": "The endpoint of the service matching the Namespace protocol", + "description_kind": "plain", + "computed": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "name": { + "type": "string", + "description": "The name of the mnq namespace", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "project_id": { + "type": "string", + "description": "The project_id you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "protocol": { + "type": "string", + "description": "The Namespace protocol", + "description_kind": "plain", + "required": true + }, + "region": { + "type": "string", + "description": "The region you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "updated_at": { + "type": "string", + "description": "The date and time of the last update of the mnq Namespace", + "description_kind": "plain", + "computed": true + } + }, + "block_types": { + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "create": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "delete": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "read": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "update": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_object": { + "version": 0, + "block": { + "attributes": { + "bucket": { + "type": "string", + "description": "The name of the bucket", + "description_kind": "plain", + "required": true + }, + "file": { + "type": "string", + "description": "File to upload, defaults to an empty file", + "description_kind": "plain", + "optional": true + }, + "hash": { + "type": "string", + "description": "File hash to trigger upload", + "description_kind": "plain", + "optional": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "key": { + "type": "string", + "description": "Key of the object", + "description_kind": "plain", + "required": true + }, + "metadata": { + "type": [ + "map", + "string" + ], + "description": "Map of object's metadata, only lower case keys are allowed", + "description_kind": "plain", + "optional": true + }, + "project_id": { + "type": "string", + "description": "The project_id you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "region": { + "type": "string", + "description": "The region you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "storage_class": { + "type": "string", + "description": "Specifies the Scaleway Object Storage class to which you want the object to transition", + "description_kind": "plain", + "optional": true + }, + "tags": { + "type": [ + "map", + "string" + ], + "description": "Map of object's tags", + "description_kind": "plain", + "optional": true + }, + "visibility": { + "type": "string", + "description": "Visibility of the object, public-read or private", + "description_kind": "plain", + "optional": true, + "computed": true + } + }, + "block_types": { + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "create": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "delete": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "read": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "update": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_object_bucket": { + "version": 0, + "block": { + "attributes": { + "acl": { + "type": "string", + "description": "ACL of the bucket: either 'public-read' or 'private'.", + "description_kind": "plain", + "deprecated": true, + "optional": true + }, + "endpoint": { + "type": "string", + "description": "Endpoint of the bucket", + "description_kind": "plain", + "computed": true + }, + "force_destroy": { + "type": "bool", + "description": "Delete objects in bucket", + "description_kind": "plain", + "optional": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "name": { + "type": "string", + "description": "The name of the bucket", + "description_kind": "plain", + "required": true + }, + "object_lock_enabled": { + "type": "bool", + "description": "Enable object lock", + "description_kind": "plain", + "optional": true + }, + "project_id": { + "type": "string", + "description": "The project_id you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "region": { + "type": "string", + "description": "The region you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "tags": { + "type": [ + "map", + "string" + ], + "description": "The tags associated with this bucket", + "description_kind": "plain", + "optional": true + } + }, + "block_types": { + "cors_rule": { + "nesting_mode": "list", + "block": { + "attributes": { + "allowed_headers": { + "type": [ + "list", + "string" + ], + "description_kind": "plain", + "optional": true + }, + "allowed_methods": { + "type": [ + "list", + "string" + ], + "description_kind": "plain", + "required": true + }, + "allowed_origins": { + "type": [ + "list", + "string" + ], + "description_kind": "plain", + "required": true + }, + "expose_headers": { + "type": [ + "list", + "string" + ], + "description_kind": "plain", + "optional": true + }, + "max_age_seconds": { + "type": "number", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + }, + "lifecycle_rule": { + "nesting_mode": "list", + "block": { + "attributes": { + "abort_incomplete_multipart_upload_days": { + "type": "number", + "description": "Specifies the number of days after initiating a multipart upload when the multipart upload must be completed", + "description_kind": "plain", + "optional": true + }, + "enabled": { + "type": "bool", + "description": "Specifies if the configuration rule is Enabled or Disabled", + "description_kind": "plain", + "required": true + }, + "id": { + "type": "string", + "description": "Unique identifier for the rule", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "prefix": { + "type": "string", + "description": "The prefix identifying one or more objects to which the rule applies", + "description_kind": "plain", + "optional": true + }, + "tags": { + "type": [ + "map", + "string" + ], + "description": "The tags associated with the bucket lifecycle", + "description_kind": "plain", + "optional": true + } + }, + "block_types": { + "expiration": { + "nesting_mode": "list", + "block": { + "attributes": { + "days": { + "type": "number", + "description": "Specifies the number of days after object creation when the specific rule action takes effect", + "description_kind": "plain", + "required": true + } + }, + "description": "Specifies a period in the object's expire", + "description_kind": "plain" + }, + "max_items": 1 + }, + "transition": { + "nesting_mode": "set", + "block": { + "attributes": { + "days": { + "type": "number", + "description": "Specifies the number of days after object creation when the specific rule action takes effect", + "description_kind": "plain", + "optional": true + }, + "storage_class": { + "type": "string", + "description": "Specifies the Scaleway Object Storage class to which you want the object to transition", + "description_kind": "plain", + "required": true + } + }, + "description": "Define when objects transition to another storage class", + "description_kind": "plain" + } + } + }, + "description": "Lifecycle configuration is a set of rules that define actions that Scaleway Object Storage applies to a group of objects", + "description_kind": "plain" + } + }, + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + }, + "versioning": { + "nesting_mode": "list", + "block": { + "attributes": { + "enabled": { + "type": "bool", + "description": "Enable versioning. Once you version-enable a bucket, it can never return to an unversioned state", + "description_kind": "plain", + "optional": true, + "computed": true + } + }, + "description": "Allow multiple versions of an object in the same bucket", + "description_kind": "plain" + }, + "max_items": 1 + } + }, + "description_kind": "plain" + } + }, + "scaleway_object_bucket_acl": { + "version": 0, + "block": { + "attributes": { + "acl": { + "type": "string", + "description": "ACL of the bucket: either 'public-read' or 'private'.", + "description_kind": "plain", + "optional": true + }, + "bucket": { + "type": "string", + "description": "The bucket name.", + "description_kind": "plain", + "required": true + }, + "expected_bucket_owner": { + "type": "string", + "description": "The project ID as owner.", + "description_kind": "plain", + "optional": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "project_id": { + "type": "string", + "description": "The project_id you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "region": { + "type": "string", + "description": "The region you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + } + }, + "block_types": { + "access_control_policy": { + "nesting_mode": "list", + "block": { + "block_types": { + "grant": { + "nesting_mode": "set", + "block": { + "attributes": { + "permission": { + "type": "string", + "description": "Logging permissions assigned to the grantee for the bucket.", + "description_kind": "plain", + "required": true + } + }, + "block_types": { + "grantee": { + "nesting_mode": "list", + "block": { + "attributes": { + "display_name": { + "type": "string", + "description_kind": "plain", + "computed": true + }, + "id": { + "type": "string", + "description": "The project ID owner of the grantee.", + "description_kind": "plain", + "required": true + }, + "type": { + "type": "string", + "description": "Type of grantee. Valid values: `CanonicalUser`", + "description_kind": "plain", + "required": true + } + }, + "description": "Configuration block for the project being granted permissions.", + "description_kind": "plain" + }, + "max_items": 1 + } + }, + "description_kind": "plain" + } + }, + "owner": { + "nesting_mode": "list", + "block": { + "attributes": { + "display_name": { + "type": "string", + "description": "The project ID of the grantee.", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "id": { + "type": "string", + "description": "The display ID of the project.", + "description_kind": "plain", + "required": true + } + }, + "description": "Configuration block of the bucket project owner's display organization ID.", + "description_kind": "plain" + }, + "min_items": 1, + "max_items": 1 + } + }, + "description": "A configuration block that sets the ACL permissions for an object per grantee.", + "description_kind": "plain" + }, + "max_items": 1 + } + }, + "description_kind": "plain" + } + }, + "scaleway_object_bucket_lock_configuration": { + "version": 0, + "block": { + "attributes": { + "bucket": { + "type": "string", + "description": "The bucket name.", + "description_kind": "plain", + "required": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "project_id": { + "type": "string", + "description": "The project_id you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "region": { + "type": "string", + "description": "The region you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + } + }, + "block_types": { + "rule": { + "nesting_mode": "list", + "block": { + "block_types": { + "default_retention": { + "nesting_mode": "list", + "block": { + "attributes": { + "days": { + "type": "number", + "description": "The number of days that you want to specify for the default retention period.", + "description_kind": "plain", + "optional": true + }, + "mode": { + "type": "string", + "description": "The default Object Lock retention mode you want to apply to new objects placed in the specified bucket.", + "description_kind": "plain", + "required": true + }, + "years": { + "type": "number", + "description": "The number of years that you want to specify for the default retention period.", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + }, + "min_items": 1, + "max_items": 1 + } + }, + "description": "Specifies the Object Lock rule for the specified object.", + "description_kind": "plain" + }, + "min_items": 1, + "max_items": 1 + } + }, + "description_kind": "plain" + } + }, + "scaleway_object_bucket_policy": { + "version": 0, + "block": { + "attributes": { + "bucket": { + "type": "string", + "description": "The bucket name.", + "description_kind": "plain", + "required": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "policy": { + "type": "string", + "description": "The text of the policy.", + "description_kind": "plain", + "required": true + }, + "project_id": { + "type": "string", + "description": "The project_id you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "region": { + "type": "string", + "description": "The region you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + } + }, + "block_types": { + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_object_bucket_website_configuration": { + "version": 0, + "block": { + "attributes": { + "bucket": { + "type": "string", + "description": "The bucket name.", + "description_kind": "plain", + "required": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "project_id": { + "type": "string", + "description": "The project_id you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "region": { + "type": "string", + "description": "The region you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "website_domain": { + "type": "string", + "description": "The website endpoint.", + "description_kind": "plain", + "computed": true + }, + "website_endpoint": { + "type": "string", + "description": "The domain of the website endpoint.", + "description_kind": "plain", + "computed": true + } + }, + "block_types": { + "error_document": { + "nesting_mode": "list", + "block": { + "attributes": { + "key": { + "type": "string", + "description_kind": "plain", + "required": true + } + }, + "description": "The name of the error document for the website.", + "description_kind": "plain" + }, + "max_items": 1 + }, + "index_document": { + "nesting_mode": "list", + "block": { + "attributes": { + "suffix": { + "type": "string", + "description_kind": "plain", + "required": true + } + }, + "description": "The name of the index document for the website.", + "description_kind": "plain" + }, + "min_items": 1, + "max_items": 1 + } + }, + "description_kind": "plain" + } + }, + "scaleway_rdb_acl": { + "version": 0, + "block": { + "attributes": { + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "instance_id": { + "type": "string", + "description": "Instance on which the ACL is applied", + "description_kind": "plain", + "required": true + }, + "region": { + "type": "string", + "description": "The region you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + } + }, + "block_types": { + "acl_rules": { + "nesting_mode": "list", + "block": { + "attributes": { + "description": { + "type": "string", + "description": "Description of the rule", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "ip": { + "type": "string", + "description": "Target IP of the rules", + "description_kind": "plain", + "required": true + } + }, + "description": "List of ACL rules to apply", + "description_kind": "plain" + }, + "min_items": 1 + }, + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "create": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "delete": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "read": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "update": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_rdb_database": { + "version": 0, + "block": { + "attributes": { + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "instance_id": { + "type": "string", + "description": "Instance on which the database is created", + "description_kind": "plain", + "required": true + }, + "managed": { + "type": "bool", + "description": "Whether or not the database is managed", + "description_kind": "plain", + "computed": true + }, + "name": { + "type": "string", + "description": "Database name", + "description_kind": "plain", + "required": true + }, + "owner": { + "type": "string", + "description": "User that own the database", + "description_kind": "plain", + "computed": true + }, + "region": { + "type": "string", + "description": "The region you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "size": { + "type": "string", + "description": "Size of the database", + "description_kind": "plain", + "computed": true + } + }, + "block_types": { + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "create": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "delete": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_rdb_database_backup": { + "version": 0, + "block": { + "attributes": { + "created_at": { + "type": "string", + "description": "Creation date (Format ISO 8601).", + "description_kind": "plain", + "computed": true + }, + "database_name": { + "type": "string", + "description": "Name of the database of this backup.", + "description_kind": "plain", + "required": true + }, + "expires_at": { + "type": "string", + "description": "Expiration date (Format ISO 8601). Cannot be removed.", + "description_kind": "plain", + "optional": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "instance_id": { + "type": "string", + "description": "Instance on which the user is created", + "description_kind": "plain", + "required": true + }, + "instance_name": { + "type": "string", + "description": "Name of the instance of the backup.", + "description_kind": "plain", + "computed": true + }, + "name": { + "type": "string", + "description": "Name of the backup.", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "region": { + "type": "string", + "description": "The region you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "size": { + "type": "number", + "description": "Size of the backup (in bytes).", + "description_kind": "plain", + "computed": true + }, + "updated_at": { + "type": "string", + "description": "Updated date (Format ISO 8601).", + "description_kind": "plain", + "computed": true + } + }, + "block_types": { + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "create": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "delete": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "read": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "update": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_rdb_instance": { + "version": 0, + "block": { + "attributes": { + "backup_same_region": { + "type": "bool", + "description": "Boolean to store logical backups in the same region as the database instance", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "backup_schedule_frequency": { + "type": "number", + "description": "Backup schedule frequency in hours", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "backup_schedule_retention": { + "type": "number", + "description": "Backup schedule retention in days", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "certificate": { + "type": "string", + "description": "Certificate of the database instance", + "description_kind": "plain", + "computed": true + }, + "disable_backup": { + "type": "bool", + "description": "Disable automated backup for the database instance", + "description_kind": "plain", + "optional": true + }, + "endpoint_ip": { + "type": "string", + "description": "Endpoint IP of the database instance", + "description_kind": "plain", + "deprecated": true, + "computed": true + }, + "endpoint_port": { + "type": "number", + "description": "Endpoint port of the database instance", + "description_kind": "plain", + "computed": true + }, + "engine": { + "type": "string", + "description": "Database's engine version id", + "description_kind": "plain", + "required": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "init_settings": { + "type": [ + "map", + "string" + ], + "description": "Map of engine settings to be set at database initialisation.", + "description_kind": "plain", + "optional": true + }, + "is_ha_cluster": { + "type": "bool", + "description": "Enable or disable high availability for the database instance", + "description_kind": "plain", + "optional": true + }, + "load_balancer": { + "type": [ + "list", + [ + "object", + { + "endpoint_id": "string", + "hostname": "string", + "ip": "string", + "name": "string", + "port": "number" + } + ] + ], + "description": "Load balancer of the database instance", + "description_kind": "plain", + "computed": true + }, + "name": { + "type": "string", + "description": "Name of the database instance", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "node_type": { + "type": "string", + "description": "The type of database instance you want to create", + "description_kind": "plain", + "required": true + }, + "organization_id": { + "type": "string", + "description": "The organization_id you want to attach the resource to", + "description_kind": "plain", + "computed": true + }, + "password": { + "type": "string", + "description": "Password for the first user of the database instance", + "description_kind": "plain", + "optional": true, + "sensitive": true + }, + "project_id": { + "type": "string", + "description": "The project_id you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "read_replicas": { + "type": [ + "list", + [ + "object", + { + "ip": "string", + "name": "string", + "port": "number" + } + ] + ], + "description": "Read replicas of the database instance", + "description_kind": "plain", + "computed": true + }, + "region": { + "type": "string", + "description": "The region you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "settings": { + "type": [ + "map", + "string" + ], + "description": "Map of engine settings to be set on a running instance.", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "tags": { + "type": [ + "list", + "string" + ], + "description": "List of tags [\"tag1\", \"tag2\", ...] attached to a database instance", + "description_kind": "plain", + "optional": true + }, + "user_name": { + "type": "string", + "description": "Identifier for the first user of the database instance", + "description_kind": "plain", + "optional": true + }, + "volume_size_in_gb": { + "type": "number", + "description": "Volume size (in GB) when volume_type is not lssd", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "volume_type": { + "type": "string", + "description": "Type of volume where data are stored", + "description_kind": "plain", + "optional": true + } + }, + "block_types": { + "private_network": { + "nesting_mode": "list", + "block": { + "attributes": { + "endpoint_id": { + "type": "string", + "description": "The endpoint ID", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "hostname": { + "type": "string", + "description": "The hostname of your endpoint", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "ip": { + "type": "string", + "description": "The IP of your private service", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "ip_net": { + "type": "string", + "description": "The ip net of your private network", + "description_kind": "plain", + "required": true + }, + "name": { + "type": "string", + "description": "The name of your private service", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "pn_id": { + "type": "string", + "description": "The private network ID", + "description_kind": "plain", + "required": true + }, + "port": { + "type": "number", + "description": "The port of your private service", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "zone": { + "type": "string", + "description": "The zone you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + } + }, + "description": "List of private network to expose your database instance", + "description_kind": "plain" + }, + "max_items": 1 + }, + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "create": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "delete": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "read": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "update": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_rdb_privilege": { + "version": 1, + "block": { + "attributes": { + "database_name": { + "type": "string", + "description": "Database name", + "description_kind": "plain", + "required": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "instance_id": { + "type": "string", + "description": "Instance on which the database is created", + "description_kind": "plain", + "required": true + }, + "permission": { + "type": "string", + "description": "Privilege", + "description_kind": "plain", + "required": true + }, + "region": { + "type": "string", + "description": "The region you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "user_name": { + "type": "string", + "description": "User name", + "description_kind": "plain", + "required": true + } + }, + "block_types": { + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "create": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "delete": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "read": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "update": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_rdb_read_replica": { + "version": 0, + "block": { + "attributes": { + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "instance_id": { + "type": "string", + "description": "Id of the rdb instance to replicate", + "description_kind": "plain", + "required": true + }, + "region": { + "type": "string", + "description": "The region you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + } + }, + "block_types": { + "direct_access": { + "nesting_mode": "list", + "block": { + "attributes": { + "endpoint_id": { + "type": "string", + "description": "UUID of the endpoint (UUID format).", + "description_kind": "plain", + "computed": true + }, + "hostname": { + "type": "string", + "description": "Hostname of the endpoint. Only one of ip and hostname may be set.", + "description_kind": "plain", + "computed": true + }, + "ip": { + "type": "string", + "description": "IPv4 address of the endpoint (IP address). Only one of ip and hostname may be set.", + "description_kind": "plain", + "computed": true + }, + "name": { + "type": "string", + "description": "Name of the endpoint.", + "description_kind": "plain", + "computed": true + }, + "port": { + "type": "number", + "description": "TCP port of the endpoint.", + "description_kind": "plain", + "computed": true + } + }, + "description": "Direct access endpoint, it gives you an IP and a port to access your read-replica", + "description_kind": "plain" + }, + "max_items": 1 + }, + "private_network": { + "nesting_mode": "list", + "block": { + "attributes": { + "endpoint_id": { + "type": "string", + "description": "UUID of the endpoint (UUID format).", + "description_kind": "plain", + "computed": true + }, + "hostname": { + "type": "string", + "description": "Hostname of the endpoint. Only one of ip and hostname may be set.", + "description_kind": "plain", + "computed": true + }, + "ip": { + "type": "string", + "description": "IPv4 address of the endpoint (IP address). Only one of ip and hostname may be set.", + "description_kind": "plain", + "computed": true + }, + "name": { + "type": "string", + "description": "Name of the endpoint.", + "description_kind": "plain", + "computed": true + }, + "port": { + "type": "number", + "description": "TCP port of the endpoint.", + "description_kind": "plain", + "computed": true + }, + "private_network_id": { + "type": "string", + "description": "UUID of the private network to be connected to the read replica (UUID format).", + "description_kind": "plain", + "required": true + }, + "service_ip": { + "type": "string", + "description": "Endpoint IPv4 address with a CIDR notation. Check documentation about IP and subnet limitations. (IP network).", + "description_kind": "plain", + "required": true + }, + "zone": { + "type": "string", + "description": "Private network zone.", + "description_kind": "plain", + "computed": true + } + }, + "description": "Private network endpoints", + "description_kind": "plain" + }, + "max_items": 1 + }, + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "create": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "delete": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "read": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "update": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_rdb_user": { + "version": 0, + "block": { + "attributes": { + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "instance_id": { + "type": "string", + "description": "Instance on which the user is created", + "description_kind": "plain", + "required": true + }, + "is_admin": { + "type": "bool", + "description": "Grant admin permissions to database user", + "description_kind": "plain", + "optional": true + }, + "name": { + "type": "string", + "description": "Database user name", + "description_kind": "plain", + "required": true + }, + "password": { + "type": "string", + "description": "Database user password", + "description_kind": "plain", + "required": true, + "sensitive": true + }, + "region": { + "type": "string", + "description": "The region you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + } + }, + "block_types": { + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "create": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "delete": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "read": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "update": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_redis_cluster": { + "version": 0, + "block": { + "attributes": { + "certificate": { + "type": "string", + "description": "public TLS certificate used by redis cluster, empty if tls is disabled", + "description_kind": "plain", + "computed": true + }, + "cluster_size": { + "type": "number", + "description": "Number of nodes for the cluster.", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "created_at": { + "type": "string", + "description": "The date and time of the creation of the Redis cluster", + "description_kind": "plain", + "computed": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "name": { + "type": "string", + "description": "Name of the redis cluster", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "node_type": { + "type": "string", + "description": "Type of node to use for the cluster", + "description_kind": "plain", + "required": true + }, + "password": { + "type": "string", + "description": "Password of the user", + "description_kind": "plain", + "required": true, + "sensitive": true + }, + "project_id": { + "type": "string", + "description": "The project_id you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "settings": { + "type": [ + "map", + "string" + ], + "description": "Map of settings to define for the cluster.", + "description_kind": "plain", + "optional": true + }, + "tags": { + "type": [ + "list", + "string" + ], + "description": "List of tags [\"tag1\", \"tag2\", ...] attached to a redis cluster", + "description_kind": "plain", + "optional": true + }, + "tls_enabled": { + "type": "bool", + "description": "Whether or not TLS is enabled.", + "description_kind": "plain", + "optional": true + }, + "updated_at": { + "type": "string", + "description": "The date and time of the last update of the Redis cluster", + "description_kind": "plain", + "computed": true + }, + "user_name": { + "type": "string", + "description": "Name of the user created when the cluster is created", + "description_kind": "plain", + "required": true + }, + "version": { + "type": "string", + "description": "Redis version of the cluster", + "description_kind": "plain", + "required": true + }, + "zone": { + "type": "string", + "description": "The zone you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + } + }, + "block_types": { + "acl": { + "nesting_mode": "set", + "block": { + "attributes": { + "description": { + "type": "string", + "description": "Description of the rule.", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "id": { + "type": "string", + "description": "ID of the rule (UUID format).", + "description_kind": "plain", + "computed": true + }, + "ip": { + "type": "string", + "description": "IPv4 network address of the rule (IP network in a CIDR format).", + "description_kind": "plain", + "required": true + } + }, + "description": "List of acl rules.", + "description_kind": "plain" + } + }, + "private_network": { + "nesting_mode": "set", + "block": { + "attributes": { + "endpoint_id": { + "type": "string", + "description": "UUID of the endpoint to be connected to the cluster", + "description_kind": "plain", + "computed": true + }, + "id": { + "type": "string", + "description": "UUID of the private network to be connected to the cluster", + "description_kind": "plain", + "required": true + }, + "service_ips": { + "type": [ + "list", + "string" + ], + "description": "List of IPv4 addresses of the private network with a CIDR notation", + "description_kind": "plain", + "required": true + }, + "zone": { + "type": "string", + "description": "The zone you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + } + }, + "description": "Private network specs details", + "description_kind": "plain" + } + }, + "public_network": { + "nesting_mode": "list", + "block": { + "attributes": { + "id": { + "type": "string", + "description_kind": "plain", + "computed": true + }, + "ips": { + "type": [ + "list", + "string" + ], + "description_kind": "plain", + "computed": true + }, + "port": { + "type": "number", + "description": "TCP port of the endpoint", + "description_kind": "plain", + "computed": true + } + }, + "description": "Public network specs details", + "description_kind": "plain" + }, + "max_items": 1 + }, + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "create": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "delete": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "update": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_registry_namespace": { + "version": 0, + "block": { + "attributes": { + "description": { + "type": "string", + "description": "The description of the container registry namespace", + "description_kind": "plain", + "optional": true + }, + "endpoint": { + "type": "string", + "description": "The endpoint reachable by docker", + "description_kind": "plain", + "computed": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "is_public": { + "type": "bool", + "description": "Define the default visibity policy", + "description_kind": "plain", + "optional": true + }, + "name": { + "type": "string", + "description": "The name of the container registry namespace", + "description_kind": "plain", + "required": true + }, + "organization_id": { + "type": "string", + "description": "The organization_id you want to attach the resource to", + "description_kind": "plain", + "computed": true + }, + "project_id": { + "type": "string", + "description": "The project_id you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "region": { + "type": "string", + "description": "The region you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + } + }, + "block_types": { + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "create": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "delete": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "read": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "update": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_secret": { + "version": 0, + "block": { + "attributes": { + "created_at": { + "type": "string", + "description": "Date and time of secret's creation (RFC 3339 format)", + "description_kind": "plain", + "computed": true + }, + "description": { + "type": "string", + "description": "Description of the secret", + "description_kind": "plain", + "optional": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "name": { + "type": "string", + "description": "The secret name", + "description_kind": "plain", + "required": true + }, + "project_id": { + "type": "string", + "description": "The project_id you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "region": { + "type": "string", + "description": "The region you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "status": { + "type": "string", + "description": "Status of the secret", + "description_kind": "plain", + "computed": true + }, + "tags": { + "type": [ + "list", + "string" + ], + "description": "List of tags [\"tag1\", \"tag2\", ...] associated to secret", + "description_kind": "plain", + "optional": true + }, + "updated_at": { + "type": "string", + "description": "Date and time of secret's creation (RFC 3339 format)", + "description_kind": "plain", + "computed": true + }, + "version_count": { + "type": "number", + "description": "The number of versions for this Secret", + "description_kind": "plain", + "computed": true + } + }, + "block_types": { + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_secret_version": { + "version": 0, + "block": { + "attributes": { + "created_at": { + "type": "string", + "description": "Date and time of secret version's creation (RFC 3339 format)", + "description_kind": "plain", + "computed": true + }, + "data": { + "type": "string", + "description": "The data payload of your secret version.", + "description_kind": "plain", + "required": true, + "sensitive": true + }, + "description": { + "type": "string", + "description": "Description of the secret version", + "description_kind": "plain", + "optional": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "region": { + "type": "string", + "description": "The region you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "revision": { + "type": "string", + "description": "The revision of secret version", + "description_kind": "plain", + "computed": true + }, + "secret_id": { + "type": "string", + "description": "The secret ID associated with this version", + "description_kind": "plain", + "required": true + }, + "status": { + "type": "string", + "description": "Status of the secret version", + "description_kind": "plain", + "computed": true + }, + "updated_at": { + "type": "string", + "description": "Date and time of secret version's creation (RFC 3339 format)", + "description_kind": "plain", + "computed": true + } + }, + "block_types": { + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_tem_domain": { + "version": 0, + "block": { + "attributes": { + "accept_tos": { + "type": "bool", + "description": "Accept the Scaleway Terms of Service", + "description_kind": "plain", + "required": true + }, + "created_at": { + "type": "string", + "description": "Date and time of domain's creation (RFC 3339 format)", + "description_kind": "plain", + "computed": true + }, + "dkim_config": { + "type": "string", + "description": "DKIM public key, as should be recorded in the DNS zone", + "description_kind": "plain", + "computed": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "last_error": { + "type": "string", + "description": "Error message if the last check failed", + "description_kind": "plain", + "computed": true + }, + "last_valid_at": { + "type": "string", + "description": "Date and time the domain was last found to be valid (RFC 3339 format)", + "description_kind": "plain", + "computed": true + }, + "name": { + "type": "string", + "description": "The domain name used when sending emails", + "description_kind": "plain", + "required": true + }, + "next_check_at": { + "type": "string", + "description": "Date and time of the next scheduled check (RFC 3339 format)", + "description_kind": "plain", + "computed": true + }, + "project_id": { + "type": "string", + "description": "The project_id you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "region": { + "type": "string", + "description": "The region you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "revoked_at": { + "type": "string", + "description": "Date and time of the revocation of the domain (RFC 3339 format)", + "description_kind": "plain", + "computed": true + }, + "spf_config": { + "type": "string", + "description": "Snippet of the SPF record that should be registered in the DNS zone", + "description_kind": "plain", + "computed": true + }, + "status": { + "type": "string", + "description": "Status of the domain", + "description_kind": "plain", + "computed": true + } + }, + "block_types": { + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "delete": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_vpc_gateway_network": { + "version": 0, + "block": { + "attributes": { + "cleanup_dhcp": { + "type": "bool", + "description": "Remove DHCP config on this network on destroy", + "description_kind": "plain", + "optional": true + }, + "created_at": { + "type": "string", + "description": "The date and time of the creation of the gateway network", + "description_kind": "plain", + "computed": true + }, + "dhcp_id": { + "type": "string", + "description": "The ID of the public gateway DHCP config", + "description_kind": "plain", + "optional": true + }, + "enable_dhcp": { + "type": "bool", + "description": "Enable DHCP config on this network", + "description_kind": "plain", + "optional": true + }, + "enable_masquerade": { + "type": "bool", + "description": "Enable masquerade on this network", + "description_kind": "plain", + "optional": true + }, + "gateway_id": { + "type": "string", + "description": "The ID of the public gateway where connect to", + "description_kind": "plain", + "required": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "mac_address": { + "type": "string", + "description": "The mac address on this network", + "description_kind": "plain", + "computed": true + }, + "private_network_id": { + "type": "string", + "description": "The ID of the private network where connect to", + "description_kind": "plain", + "required": true + }, + "static_address": { + "type": "string", + "description": "The static IP address in CIDR on this network", + "description_kind": "plain", + "optional": true + }, + "updated_at": { + "type": "string", + "description": "The date and time of the last update of the gateway network", + "description_kind": "plain", + "computed": true + }, + "zone": { + "type": "string", + "description": "The zone you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + } + }, + "block_types": { + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "create": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "delete": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "read": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "update": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_vpc_private_network": { + "version": 0, + "block": { + "attributes": { + "created_at": { + "type": "string", + "description": "The date and time of the creation of the private network", + "description_kind": "plain", + "computed": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "name": { + "type": "string", + "description": "The name of the private network", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "organization_id": { + "type": "string", + "description": "The organization_id you want to attach the resource to", + "description_kind": "plain", + "computed": true + }, + "project_id": { + "type": "string", + "description": "The project_id you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "tags": { + "type": [ + "list", + "string" + ], + "description": "The tags associated with private network", + "description_kind": "plain", + "optional": true + }, + "updated_at": { + "type": "string", + "description": "The date and time of the last update of the private network", + "description_kind": "plain", + "computed": true + }, + "zone": { + "type": "string", + "description": "The zone you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + } + }, + "description_kind": "plain" + } + }, + "scaleway_vpc_public_gateway": { + "version": 0, + "block": { + "attributes": { + "bastion_enabled": { + "type": "bool", + "description": "Enable SSH bastion on the gateway", + "description_kind": "plain", + "optional": true + }, + "bastion_port": { + "type": "number", + "description": "Port of the SSH bastion", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "created_at": { + "type": "string", + "description": "The date and time of the creation of the public gateway", + "description_kind": "plain", + "computed": true + }, + "enable_smtp": { + "type": "bool", + "description": "Enable SMTP on the gateway", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "ip_id": { + "type": "string", + "description": "attach an existing IP to the gateway", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "name": { + "type": "string", + "description": "name of the gateway", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "organization_id": { + "type": "string", + "description": "The organization_id you want to attach the resource to", + "description_kind": "plain", + "computed": true + }, + "project_id": { + "type": "string", + "description": "The project_id you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "tags": { + "type": [ + "list", + "string" + ], + "description": "The tags associated with public gateway", + "description_kind": "plain", + "optional": true + }, + "type": { + "type": "string", + "description": "gateway type", + "description_kind": "plain", + "required": true + }, + "updated_at": { + "type": "string", + "description": "The date and time of the last update of the public gateway", + "description_kind": "plain", + "computed": true + }, + "upstream_dns_servers": { + "type": [ + "list", + "string" + ], + "description": "override the gateway's default recursive DNS servers, if DNS features are enabled", + "description_kind": "plain", + "optional": true + }, + "zone": { + "type": "string", + "description": "The zone you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + } + }, + "block_types": { + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "create": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "delete": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "read": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "update": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_vpc_public_gateway_dhcp": { + "version": 0, + "block": { + "attributes": { + "address": { + "type": "string", + "description": "The address of the DHCP server. This will be the gateway's address in the private network. Defaults to the first address of the subnet", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "created_at": { + "type": "string", + "description": "The date and time of the creation of the public gateway.", + "description_kind": "plain", + "computed": true + }, + "dns_local_name": { + "type": "string", + "description": "TLD given to hostnames in the Private Network. Allowed characters are `a-z0-9-.`. Defaults to the slugified Private Network name if created along a GatewayNetwork, or else to `priv`.", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "dns_search": { + "type": [ + "list", + "string" + ], + "description": "Additional DNS search paths.", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "dns_servers_override": { + "type": [ + "list", + "string" + ], + "description": "Override the DNS server list pushed to DHCP clients, instead of the gateway itself.", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "enable_dynamic": { + "type": "bool", + "description": "Whether to enable dynamic pooling of IPs. By turning the dynamic pool off, only pre-existing DHCP reservations will be handed out. Defaults to true.", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "organization_id": { + "type": "string", + "description": "The organization_id you want to attach the resource to", + "description_kind": "plain", + "computed": true + }, + "pool_high": { + "type": "string", + "description": "High IP (included) of the dynamic address pool. Defaults to the last address of the subnet.", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "pool_low": { + "type": "string", + "description": "Low IP (included) of the dynamic address pool. Defaults to the second address of the subnet.", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "project_id": { + "type": "string", + "description": "The project_id you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "push_default_route": { + "type": "bool", + "description": "Whether the gateway should push a default route to DHCP clients or only hand out IPs. Defaults to true.", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "push_dns_server": { + "type": "bool", + "description": "Whether the gateway should push custom DNS servers to clients. This allows for instance hostname -> IP resolution. Defaults to true.", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "rebind_timer": { + "type": "number", + "description": "After how long, in seconds, a DHCP client will query for a new lease if previous renews fail. Must be 30s lower than `valid_lifetime`. Defaults to 51m (3060s).", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "renew_timer": { + "type": "number", + "description": "After how long, in seconds, a renew will be attempted. Must be 30s lower than `rebind_timer`. Defaults to 50m (3000s).", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "subnet": { + "type": "string", + "description": "Subnet for the DHCP server", + "description_kind": "plain", + "required": true + }, + "updated_at": { + "type": "string", + "description": "The date and time of the last update of the public gateway.", + "description_kind": "plain", + "computed": true + }, + "valid_lifetime": { + "type": "number", + "description": "For how long, in seconds, will DHCP entries will be valid. Defaults to 1h (3600s).", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "zone": { + "type": "string", + "description": "The zone you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + } + }, + "description_kind": "plain" + } + }, + "scaleway_vpc_public_gateway_dhcp_reservation": { + "version": 0, + "block": { + "attributes": { + "created_at": { + "type": "string", + "description": "The configuration creation date.", + "description_kind": "plain", + "computed": true + }, + "gateway_network_id": { + "type": "string", + "description": "The ID of the owning GatewayNetwork (UUID format).", + "description_kind": "plain", + "required": true + }, + "hostname": { + "type": "string", + "description": "The Hostname of the client machine.", + "description_kind": "plain", + "computed": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "ip_address": { + "type": "string", + "description": "The IP address to give to the machine (IPv4 address).", + "description_kind": "plain", + "required": true + }, + "mac_address": { + "type": "string", + "description": "The MAC address to give a static entry to.", + "description_kind": "plain", + "required": true + }, + "type": { + "type": "string", + "description": "The reservation type, either static (DHCP reservation) or dynamic (DHCP lease). Possible values are reservation and lease", + "description_kind": "plain", + "computed": true + }, + "updated_at": { + "type": "string", + "description": "The configuration last modification date.", + "description_kind": "plain", + "computed": true + }, + "zone": { + "type": "string", + "description": "The zone you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + } + }, + "block_types": { + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "create": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "delete": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "update": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_vpc_public_gateway_ip": { + "version": 0, + "block": { + "attributes": { + "address": { + "type": "string", + "description": "the IP itself", + "description_kind": "plain", + "computed": true + }, + "created_at": { + "type": "string", + "description": "The date and time of the creation of the public gateway IP", + "description_kind": "plain", + "computed": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "organization_id": { + "type": "string", + "description": "The organization_id you want to attach the resource to", + "description_kind": "plain", + "computed": true + }, + "project_id": { + "type": "string", + "description": "The project_id you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "reverse": { + "type": "string", + "description": "reverse domain name for the IP address", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "tags": { + "type": [ + "list", + "string" + ], + "description": "The tags associated with public gateway IP", + "description_kind": "plain", + "optional": true + }, + "updated_at": { + "type": "string", + "description": "The date and time of the last update of the public gateway IP", + "description_kind": "plain", + "computed": true + }, + "zone": { + "type": "string", + "description": "The zone you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + } + }, + "description_kind": "plain" + } + }, + "scaleway_vpc_public_gateway_ip_reverse_dns": { + "version": 0, + "block": { + "attributes": { + "gateway_ip_id": { + "type": "string", + "description": "The IP ID", + "description_kind": "plain", + "required": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "reverse": { + "type": "string", + "description": "The reverse DNS for this IP", + "description_kind": "plain", + "required": true + }, + "zone": { + "type": "string", + "description": "The zone you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + } + }, + "block_types": { + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "create": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "update": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + }, + "scaleway_vpc_public_gateway_pat_rule": { + "version": 0, + "block": { + "attributes": { + "created_at": { + "type": "string", + "description": "The date and time of the creation of the PAT rule", + "description_kind": "plain", + "computed": true + }, + "gateway_id": { + "type": "string", + "description": "The ID of the gateway this PAT rule is applied to", + "description_kind": "plain", + "required": true + }, + "id": { + "type": "string", + "description_kind": "plain", + "optional": true, + "computed": true + }, + "organization_id": { + "type": "string", + "description": "The organization_id you want to attach the resource to", + "description_kind": "plain", + "computed": true + }, + "private_ip": { + "type": "string", + "description": "The private IP used in the PAT rule", + "description_kind": "plain", + "required": true + }, + "private_port": { + "type": "number", + "description": "The private port used in the PAT rule", + "description_kind": "plain", + "required": true + }, + "protocol": { + "type": "string", + "description": "The protocol used in the PAT rule", + "description_kind": "plain", + "optional": true + }, + "public_port": { + "type": "number", + "description": "The public port used in the PAT rule", + "description_kind": "plain", + "required": true + }, + "updated_at": { + "type": "string", + "description": "The date and time of the last update of the PAT rule", + "description_kind": "plain", + "computed": true + }, + "zone": { + "type": "string", + "description": "The zone you want to attach the resource to", + "description_kind": "plain", + "optional": true, + "computed": true + } + }, + "block_types": { + "timeouts": { + "nesting_mode": "single", + "block": { + "attributes": { + "create": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "default": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "delete": { + "type": "string", + "description_kind": "plain", + "optional": true + }, + "update": { + "type": "string", + "description_kind": "plain", + "optional": true + } + }, + "description_kind": "plain" + } + } + }, + "description_kind": "plain" + } + } +} \ No newline at end of file From 17e13382068eac82b9c069ea892e8ae1050cebd1 Mon Sep 17 00:00:00 2001 From: norbjd Date: Mon, 27 Mar 2023 13:41:09 +0200 Subject: [PATCH 2/4] chore: lint --- enumeration/remote/scaleway/init.go | 62 ++++++++++++++--------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/enumeration/remote/scaleway/init.go b/enumeration/remote/scaleway/init.go index a9f997fae..af9e64efd 100644 --- a/enumeration/remote/scaleway/init.go +++ b/enumeration/remote/scaleway/init.go @@ -1,47 +1,47 @@ package scaleway import ( - "github.com/snyk/driftctl/enumeration" - "github.com/snyk/driftctl/enumeration/alerter" - "github.com/snyk/driftctl/enumeration/remote/cache" - "github.com/snyk/driftctl/enumeration/remote/common" - "github.com/snyk/driftctl/enumeration/remote/scaleway/client" - "github.com/snyk/driftctl/enumeration/remote/scaleway/repository" - "github.com/snyk/driftctl/enumeration/resource" - "github.com/snyk/driftctl/enumeration/terraform" - "github.com/snyk/driftctl/pkg/resource/scaleway" + "github.com/snyk/driftctl/enumeration" + "github.com/snyk/driftctl/enumeration/alerter" + "github.com/snyk/driftctl/enumeration/remote/cache" + "github.com/snyk/driftctl/enumeration/remote/common" + "github.com/snyk/driftctl/enumeration/remote/scaleway/client" + "github.com/snyk/driftctl/enumeration/remote/scaleway/repository" + "github.com/snyk/driftctl/enumeration/resource" + "github.com/snyk/driftctl/enumeration/terraform" + "github.com/snyk/driftctl/pkg/resource/scaleway" ) func Init(version string, alerter alerter.AlerterInterface, providerLibrary *terraform.ProviderLibrary, remoteLibrary *common.RemoteLibrary, progress enumeration.ProgressCounter, factory resource.ResourceFactory, configDir string) error { - if version == "" { - version = "2.14.1" - } + if version == "" { + version = "2.14.1" + } - provider, err := NewScalewayTerraformProvider(version, progress, configDir) - if err != nil { - return err - } - err = provider.Init() - if err != nil { - return err - } + provider, err := NewScalewayTerraformProvider(version, progress, configDir) + if err != nil { + return err + } + err = provider.Init() + if err != nil { + return err + } - providerLibrary.AddProvider(terraform.SCALEWAY, provider) + providerLibrary.AddProvider(terraform.SCALEWAY, provider) - scwClient, err := client.Create() - if err != nil { - return err - } + scwClient, err := client.Create() + if err != nil { + return err + } - repositoryCache := cache.New(100) + repositoryCache := cache.New(100) - funcRepository := repository.NewFunctionRepository(scwClient, repositoryCache) + funcRepository := repository.NewFunctionRepository(scwClient, repositoryCache) - deserializer := resource.NewDeserializer(factory) + deserializer := resource.NewDeserializer(factory) - remoteLibrary.AddEnumerator(NewFunctionNamespaceEnumerator(funcRepository, factory)) - remoteLibrary.AddDetailsFetcher(scaleway.ScalewayFunctionNamespaceResourceType, common.NewGenericDetailsFetcher(scaleway.ScalewayFunctionNamespaceResourceType, provider, deserializer)) + remoteLibrary.AddEnumerator(NewFunctionNamespaceEnumerator(funcRepository, factory)) + remoteLibrary.AddDetailsFetcher(scaleway.ScalewayFunctionNamespaceResourceType, common.NewGenericDetailsFetcher(scaleway.ScalewayFunctionNamespaceResourceType, provider, deserializer)) - return nil + return nil } From 649be0648860cb80f15b19cf1afd80ee5855b11b Mon Sep 17 00:00:00 2001 From: norbjd Date: Mon, 27 Mar 2023 13:46:58 +0200 Subject: [PATCH 3/4] fix: add scaleway in TestDriftctlRun_TestResourcesNormalization --- pkg/driftctl_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/driftctl_test.go b/pkg/driftctl_test.go index 7349e3c1f..6dabe0f06 100644 --- a/pkg/driftctl_test.go +++ b/pkg/driftctl_test.go @@ -1436,6 +1436,7 @@ func TestDriftctlRun_TestResourcesNormalization(t *testing.T) { "github": "4.4.0", "google": "3.78.0", "azurerm": "2.71.0", + "scaleway": "2.14.1", } cases := []normalizationTestCase{} From 1d9632d7f48759b19de9f291b625fae8733e45fe Mon Sep 17 00:00:00 2001 From: norbjd Date: Mon, 27 Mar 2023 13:50:11 +0200 Subject: [PATCH 4/4] chore: lint --- pkg/driftctl_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/driftctl_test.go b/pkg/driftctl_test.go index 6dabe0f06..25c94465d 100644 --- a/pkg/driftctl_test.go +++ b/pkg/driftctl_test.go @@ -1432,10 +1432,10 @@ func TestDriftctlRun_TestResourcesNormalization(t *testing.T) { } defaultProviderVersions := map[string]string{ - "aws": "3.19.0", - "github": "4.4.0", - "google": "3.78.0", - "azurerm": "2.71.0", + "aws": "3.19.0", + "github": "4.4.0", + "google": "3.78.0", + "azurerm": "2.71.0", "scaleway": "2.14.1", }