-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(CLOUDDEV-414): fixed makefile and readme instructions #41
fix(CLOUDDEV-414): fixed makefile and readme instructions #41
Conversation
126ef59
to
64c4a38
Compare
README.md
Outdated
|
||
### Writing modules files | ||
|
||
Create module files using the examples provided in the folder ./examples |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: in the ./examples
folder
README.md
Outdated
``` | ||
### Project initializing | ||
|
||
#### Prepare module configure file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
configuration file
README.md
Outdated
It is necessary to add provider settings according to the instructions https://developer.hashicorp.com/terraform/language/providers/requirements: | ||
Each Terraform module must declare which providers it requires, so that Terraform can install and use them. | ||
|
||
To use the provider, prepare configuration file `provider.tf` in module directory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in the module directory
README.md
Outdated
} | ||
``` | ||
#### Initialize working directory | ||
Run terraform init in module directory. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in the module directory
README.md
Outdated
Before initializing the project you should to set VAULT_ADDR and VAULT_TOKEN envs: | ||
```bash | ||
export VAULT_ADDR=<you can ask address from Cloud team (matermost tag: @devcloud)> | ||
export VAULT_TOKEN=<you can generate this token in ${VAULT_ADDR} page> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in -> at the
README.md
Outdated
export VAULT_TOKEN=<you can generate this token in ${VAULT_ADDR} page> | ||
``` | ||
#### Initialize | ||
Initialize the project this command: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using this command
README.md
Outdated
```sh | ||
$ make init | ||
``` | ||
This command creates ./bin and install jq, godotenv, golangci-lint utils. Then the command downloads env file from vault to ./edgecenter/test/.env and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
не обязательно писать, что делает команда, т.к. это может поменяться в коде
в данном случае баш код команды self-descriptive
README.md
Outdated
|
||
### Using built Terraform provider | ||
|
||
If you want use built provider from previous step, or use dubug mode, you should add dev_overrides opts to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To use the built provider from the previous step, you should add the dev_overrides
option to the ~/.terraformrc
file:
Заметил еще пару вещей, отписал в ПР Так же, в секции В принципе, я бы проверил всю секцию Debug, потому что если там есть не работающие вещи, их стоит либо поправить, либо лучше тогда вообще убрать |
Аппрувнул ПР, чтобы не затягивать код-ревью Не забудь перед мержем:
|
README.md
Outdated
``` | ||
For testing not cloud (storage, cdn, dns) data sources and resources: | ||
```bash | ||
make test_not_cloud: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
лишняя ":" в конце
Makefile
Outdated
@@ -24,9 +24,33 @@ TAG = $(shell git describe --tags) | |||
VERSION = $(shell git describe --tags $(LAST_TAG_COMMIT) | sed "s/^$(TAG_PREFIX)//") | |||
PLUGIN_PATH = ~/.terraform.d/plugins/local.edgecenter.ru/repo/edgecenter/$(VERSION)/$(OS)_$(ARCH) | |||
|
|||
|
|||
create_bin: | |||
mkdir -p bin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Выше есть $BIN_DIR
Makefile
Outdated
|
||
install_jq: | ||
if test "$(OS)" = "linux"; then \ | ||
curl -L -o $(BIN_DIR)/jq https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64; \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
В идеале использовать $ARCH
: у меня например мак на M1
.gitignore
Outdated
@@ -12,6 +12,7 @@ terraform.tfstate | |||
### bin | |||
bin/ | |||
.local.env | |||
edgecenter/test/.env |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
**/*.env
? Чтобы все .env файлы сразу вместо этих двух
и не в секции ### bin
fa90df5
to
357efe5
Compare
357efe5
to
4abb1ee
Compare
No description provided.