Documentation ¶
Overview ¶
Copyright © 2021 Gastón Durand Vadas <gdurandvadas@gmail.com>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2021 Gastón Durand Vadas <gdurandvadas@gmail.com>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2021 Gastón Durand Vadas <gdurandvadas@gmail.com>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Module ¶
type Module struct { // Remote state attributes Path string OrganizationName string Client *tfe.Client Ctx context.Context // .module.{yml|yaml} config attributes Name string `yaml:"name"` Provider string `yaml:"provider"` Ignored []string `yaml:"ignored"` }
Module type to interact with modules Defines remote state attributes and config attributes
func (*Module) Delete ¶
func (m *Module) Delete()
Deletes a module - version: removes a specific version of a module - provider: removes all versions of certain module/provider
func (*Module) NewVersion ¶
func (m *Module) NewVersion(client *tfe.Client, ctx context.Context, organizationName, semver string) *tfe.RegistryModuleVersion
The NewVersion function will either: - create the module version v0.0.1 if the module doesn't exists - create a new version calculated with semver from the existing
func (*Module) Pack ¶
Pack stores all the files on the module, minus the ignored. The files are placed in a temporal directory
func (*Module) ReadConfig ¶
func (m *Module) ReadConfig()
Read the .module.{yml|yaml} file in the module path